diff options
| author | Simon | 2011-04-20 18:00:20 +0200 |
|---|---|---|
| committer | Simon | 2011-04-20 18:00:20 +0200 |
| commit | 156abd0d614adfffed22e1d4de3168c22bf611c6 (patch) | |
| tree | 6eac79e0c19ff6a8f5d0983b2090019d38a343a4 /application/modules/user/controllers | |
| parent | BootOsUser und HomeType Models hinzugefügt (diff) | |
| download | pbs2-156abd0d614adfffed22e1d4de3168c22bf611c6.tar.gz pbs2-156abd0d614adfffed22e1d4de3168c22bf611c6.tar.xz pbs2-156abd0d614adfffed22e1d4de3168c22bf611c6.zip | |
Created bei Client hinzugefügt
Diffstat (limited to 'application/modules/user/controllers')
| -rw-r--r-- | application/modules/user/controllers/ClientController.php | 12 | ||||
| -rw-r--r-- | application/modules/user/controllers/PoolController.php | 7 |
2 files changed, 16 insertions, 3 deletions
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()); diff --git a/application/modules/user/controllers/PoolController.php b/application/modules/user/controllers/PoolController.php index 3d6c0a7..3d6a0f5 100644 --- a/application/modules/user/controllers/PoolController.php +++ b/application/modules/user/controllers/PoolController.php @@ -112,7 +112,12 @@ class User_PoolController extends Zend_Controller_Action // extract the un-assigned clients from the clientlist of the group $freeclients = $this->arrayDiff($clientsArray,$assignedclientsArray); - + + // Format Time-String + foreach($freeclients as $k=>$cig){ + $freeclients[$k]['created'] = date(Zend_Registry::get('dateformat'),$cig['created']); + } + if(Pbs_Acl::checkRight('posuc')) $this->view->freeclients = $freeclients; } |
