diff options
| author | michael pereira | 2011-03-09 20:54:27 +0100 |
|---|---|---|
| committer | michael pereira | 2011-03-09 20:54:27 +0100 |
| commit | fbff9df0469ee998389fa263d8638cc3bf3618b5 (patch) | |
| tree | 04adfd6a021e574055469ce6d0469988cb4684bd /application/controllers/ClientController.php | |
| parent | KCL und BootMenuFilter (diff) | |
| parent | FilterController Evaluate funktioniert (diff) | |
| download | pbs2-fbff9df0469ee998389fa263d8638cc3bf3618b5.tar.gz pbs2-fbff9df0469ee998389fa263d8638cc3bf3618b5.tar.xz pbs2-fbff9df0469ee998389fa263d8638cc3bf3618b5.zip | |
Merge branch 'master' of openslx.org:lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/controllers/ClientController.php')
| -rw-r--r-- | application/controllers/ClientController.php | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/application/controllers/ClientController.php b/application/controllers/ClientController.php index ff663ba..580eb6e 100644 --- a/application/controllers/ClientController.php +++ b/application/controllers/ClientController.php @@ -16,16 +16,15 @@ class ClientController extends Zend_Controller_Action public function addclientAction() { - $mac = $this->_request->getParam('mac'); - $hh = $this->_request->getParam('hh'); + $mac = $this->_request->getParam('mac'); + $hh = $this->_request->getParam('hh'); if (!isset($_POST["add"])){ - $addclient = new Application_Form_Client(); - $this->view->addclient = $addclient; + $addclient = new Application_Form_Client(); + $this->view->addclient = $addclient; } else{ $addfilterform = new Application_Form_Client($_POST); - print_a($_POST,$addfilterform->isValid($_POST)); if ($addfilterform->isValid($_POST) || ($mac != '' && $hh != '') ) { $client = new Application_Model_Client(); $mac = ($mac!='')?$mac:$_POST['macadress']; @@ -37,9 +36,7 @@ class ClientController extends Zend_Controller_Action print_a('inserted'); $this->_redirect('/client'); } - else{ - print_a('no insert'); - } + $this->view->addclient = $addclient; } } @@ -69,8 +66,8 @@ class ClientController extends Zend_Controller_Action $this->view->editclient = $editclient; } else{ - $addfilterform = new Application_Form_Client($_POST); - if ($addfilterform->isValid($_POST) || ($mac != '' && $hh != '') ) { + $editclient = new Application_Form_Client($_POST); + if ($editclient->isValid($_POST) || ($mac != '' && $hh != '') ) { $client = new Application_Model_Client($_POST); $client->setID($this->_request->getParam('clientID')); $clientmapper = new Application_Model_ClientMapper(); @@ -78,9 +75,7 @@ class ClientController extends Zend_Controller_Action print_a('updated'); $this->_redirect('/client'); } - else{ - print_a('no update'); - } + $this->view->editclient = $editclient; } } |
