Removed direct references to $_REQUEST and $_POST
This commit is contained in:
@@ -65,23 +65,23 @@ class Controller_Admin_Adsl extends Controller_Adsl {
|
||||
public function action_edit() {
|
||||
$apo = ORM::factory('Product_Plugin_Adsl',$this->request->param('id'));
|
||||
|
||||
if (! $qpo->loaded())
|
||||
if (! $apo->loaded())
|
||||
throw HTTP_Exception::factory(403,'Plan either doesnt exist, or you are not authorised to see it');
|
||||
|
||||
$this->meta->title = 'ADSL Plan: '.$qpo->name();
|
||||
$this->meta->title = 'ADSL Plan: '.$apo->name();
|
||||
|
||||
$test_result = array();
|
||||
|
||||
if (! $apo->loaded())
|
||||
HTTP::redirect(URL::link('admin','adsl/list'));
|
||||
|
||||
if ($_POST) {
|
||||
if ($apo->values($_POST)->changed() AND (! $this->save($apo)))
|
||||
if ($this->request->post()) {
|
||||
if ($apo->values($this->request->post())->changed() AND (! $this->save($apo)))
|
||||
$apo->reload();
|
||||
|
||||
if (isset($_POST['test'])) {
|
||||
$charge = isset($_POST['test']['charge']) ? $_POST['test']['charge'] : FALSE;
|
||||
$test_result = $apo->allowance($_POST['test'],FALSE,$charge,TRUE);
|
||||
if ($this->request->post('test')) {
|
||||
$charge = $this->request->post('test.charge');
|
||||
$test_result = $apo->allowance($this->request->post('test'),FALSE,$charge,TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,10 +161,10 @@ class Controller_Admin_Adsl extends Controller_Adsl {
|
||||
* Reconcile billing for an ADSL supplier
|
||||
*/
|
||||
public function action_traffic() {
|
||||
if (empty($_POST['sid']))
|
||||
if (! $this->request->post('sid'))
|
||||
HTTP::redirect(URL::link('admin','adsl/index'));
|
||||
|
||||
$aso = ORM::factory('ADSL_Supplier',$_POST['sid']);
|
||||
$aso = ORM::factory('ADSL_Supplier',$this->request->post('sid'));
|
||||
if (! $aso->loaded())
|
||||
HTTP::redirect(URL::link('admin','adsl/index'));
|
||||
|
||||
|
Reference in New Issue
Block a user