From 156abd0d614adfffed22e1d4de3168c22bf611c6 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 20 Apr 2011 18:00:20 +0200 Subject: Created bei Client hinzugefĆ¼gt --- application/modules/user/controllers/ClientController.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'application/modules/user/controllers/ClientController.php') diff --git a/application/modules/user/controllers/ClientController.php b/application/modules/user/controllers/ClientController.php index 687e910..589fcdc 100644 --- a/application/modules/user/controllers/ClientController.php +++ b/application/modules/user/controllers/ClientController.php @@ -69,7 +69,12 @@ class User_ClientController extends Zend_Controller_Action $clientsInGroup = $mySearch->search($clientsInGroup); } $this->view->searchform = $mySearch->searchForm(); - + + // Format Time-String + foreach($clientsInGroup as $k=>$cig){ + $clientsInGroup[$k]['created'] = date(Zend_Registry::get('dateformat'),$cig['created']); + } + // Pagination $pagination = new Pbs_Pagination(); $pagination->setPerPage(10); @@ -111,7 +116,8 @@ class User_ClientController extends Zend_Controller_Action $mac = ($mac!='')?$mac:$_POST['macadress']; $hh = ($hh!='')?$hh:$_POST['hardwarehash']; $client->setMacadress($mac); - $client->setHardwarehash($hh); + $client->setHardwarehash($hh); + $client->setCreated(time()); $client->setGroupID($this->membership->getGroupID()); $clientmapper = new Application_Model_ClientMapper(); $clientmapper->save($client); @@ -178,6 +184,8 @@ class User_ClientController extends Zend_Controller_Action $dbclient = new Application_Model_Client(); $clientMapper = new Application_Model_ClientMapper(); $clientMapper->find($this->_request->getParam('clientID'),$dbclient); + + $client->setCreated($dbclient->getCreated()); if($dbclient->getGroupID() == $this->membership->getGroupID()){ $client->setGroupID($this->membership->getGroupID()); -- cgit v1.2.3-55-g7522