summaryrefslogtreecommitdiffstats
path: root/application/modules/user/controllers/ClientController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/user/controllers/ClientController.php')
-rw-r--r--application/modules/user/controllers/ClientController.php12
1 files changed, 10 insertions, 2 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());