summaryrefslogtreecommitdiffstats
path: root/application/modules
diff options
context:
space:
mode:
authorBjörn Geiger2011-04-05 18:13:19 +0200
committerBjörn Geiger2011-04-05 18:13:19 +0200
commit9af50098ab0cd1412c8db21da090ef526b9da592 (patch)
tree09717998529795c7abc085b423667e942797f106 /application/modules
parentSearch in Group, Person und Role (diff)
parentfilter table repariert (diff)
downloadpbs2-9af50098ab0cd1412c8db21da090ef526b9da592.tar.gz
pbs2-9af50098ab0cd1412c8db21da090ef526b9da592.tar.xz
pbs2-9af50098ab0cd1412c8db21da090ef526b9da592.zip
Merge branch 'master' of ssh://git.openslx.org/lsfks/master-teamprojekt/pbs2
Diffstat (limited to 'application/modules')
-rw-r--r--application/modules/user/controllers/BootisoController.php5
-rw-r--r--application/modules/user/controllers/BootmenuController.php2
-rw-r--r--application/modules/user/controllers/BootosController.php8
-rw-r--r--application/modules/user/controllers/ConfigController.php4
-rw-r--r--application/modules/user/controllers/FilterController.php6
-rw-r--r--application/modules/user/controllers/PrebootController.php4
-rw-r--r--application/modules/user/controllers/SessionController.php6
-rw-r--r--application/modules/user/views/scripts/config/index.phtml2
-rw-r--r--application/modules/user/views/scripts/filter/index.phtml4
-rw-r--r--application/modules/user/views/scripts/session/index.phtml2
10 files changed, 24 insertions, 19 deletions
diff --git a/application/modules/user/controllers/BootisoController.php b/application/modules/user/controllers/BootisoController.php
index 654e7eb..2c9c584 100644
--- a/application/modules/user/controllers/BootisoController.php
+++ b/application/modules/user/controllers/BootisoController.php
@@ -100,8 +100,6 @@ class user_BootisoController extends Zend_Controller_Action
$this->view->pagination = $pagination->pagination($pageurl);
$this->view->page = $pagination->getRequestPage();
- $this->view->bootisolist= $this->view->bootisolist;
-
$prebootMapper = new Application_Model_PreBootMapper();
$this->view->prebootlist = array();
@@ -109,7 +107,8 @@ class user_BootisoController extends Zend_Controller_Action
foreach ($this->view->bootisolist as $bootiso){
$this->view->prebootlist[$bootiso->getID()] = $prebootMapper->find($bootiso->getPrebootID())->getTitle();
$bootiso->setGroupID("[".$bootiso->getGroupID()."] ".$groupMapper->find($bootiso->getGroupID())->getTitle());
- $bootiso->setMembershipID("[".$bootiso->getMembershipID()."] ".$personMapper->find($this->membershipMapper->find($bootiso->getMembershipID())->getPersonID())->getFirstname());
+ $bootiso->setCreated(date(Zend_Registry::get('dateformat'),$bootiso->getCreated()));
+ $bootiso->setExpires(date(Zend_Registry::get('dateformat'),$bootiso->getExpires()));
}
}
diff --git a/application/modules/user/controllers/BootmenuController.php b/application/modules/user/controllers/BootmenuController.php
index f24cb47..738b7d5 100644
--- a/application/modules/user/controllers/BootmenuController.php
+++ b/application/modules/user/controllers/BootmenuController.php
@@ -69,6 +69,7 @@ class user_BootmenuController extends Zend_Controller_Action
if(Pbs_Acl::checkRight('booai')){
$bootmenu = $this->bootmenuMapper->findBy(array('groupID' => $this->membership->getGroupID()));
foreach ($bootmenu as $bm){
+ $bm->setCreated(date(Zend_Registry::get('dateformat'),$bm->getCreated()));
$bootmenuID = $bm->getID();
$bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID));
foreach ($bootmenuentries[$bootmenuID] as $bootmenuentry){
@@ -79,6 +80,7 @@ class user_BootmenuController extends Zend_Controller_Action
}else{
$bootmenu = $this->bootmenuMapper->findBy(array('membershipID' => $this->membership->getID()));
+ $bootmenu[0]->setCreated(date(Zend_Registry::get('dateformat'),$bm->getCreated()));
$bootmenuID = $bootmenu[0]->getID();
$bootmenuentries[$bootmenuID] = $this->bootmenuentriesMapper->findBy(array('bootmenuID' => $bootmenuID));
foreach ($bootmenuentries[$bootmenuID] as $bootmenuentry){
diff --git a/application/modules/user/controllers/BootosController.php b/application/modules/user/controllers/BootosController.php
index 12e2d68..04324ef 100644
--- a/application/modules/user/controllers/BootosController.php
+++ b/application/modules/user/controllers/BootosController.php
@@ -86,9 +86,7 @@ class user_BootosController extends Zend_Controller_Action
$this->view->bootoslist = $pagination->getElements();
$this->view->pagination = $pagination->pagination($pageurl);
- $this->view->page = $pagination->getRequestPage();
- $this->view->bootoslist = $this->view->bootoslist;
-
+ $this->view->page = $pagination->getRequestPage();
$update = $this->_request->getParam('checkupdate');
@@ -96,9 +94,9 @@ class user_BootosController extends Zend_Controller_Action
foreach ($this->view->bootoslist as $bootos){
$this->view->update[$bootos->getID()] = $update && $this->checkupdateAction($bootos);
$bootos->setGroupID("[".$bootos->getGroupID()."] ".$groupMapper->find($bootos->getGroupID())->getTitle());
- $bootos->setMembershipID("[".$bootos->getMembershipID()."] ".$personMapper->find($this->membershipMapper->find($bootos->getMembershipID())->getPersonID())->getFirstname());
$bootos->setConfigID("[".$bootos->getConfigID()."] ".$configMapper->find($bootos->getConfigID())->getTitle());
-
+ $bootos->setCreated(date(Zend_Registry::get('dateformat'),$bootos->getCreated()));
+ $bootos->setExpires(date(Zend_Registry::get('dateformat'),$bootos->getExpires()));
}
}
diff --git a/application/modules/user/controllers/ConfigController.php b/application/modules/user/controllers/ConfigController.php
index 498e890..2bb588e 100644
--- a/application/modules/user/controllers/ConfigController.php
+++ b/application/modules/user/controllers/ConfigController.php
@@ -7,6 +7,7 @@ class user_ConfigController extends Zend_Controller_Action
protected $membershipMapper;
protected $membership;
protected $page;
+ protected $config;
public function init()
{
@@ -62,7 +63,7 @@ class user_ConfigController extends Zend_Controller_Action
}
foreach ($this->view->configlist as $config){
- $config->setGroupID("[".$config->getGroupID()."] ".$groupMapper->find($config->getGroupID())->getTitle());
+ $config->setCreated(date(Zend_Registry::get('dateformat'),$config->getCreated()));
}
// Search
@@ -86,7 +87,6 @@ class user_ConfigController extends Zend_Controller_Action
$this->view->pagination = $pagination->pagination($pageurl);
$this->view->page = $pagination->getRequestPage();
- $this->view->configlist = $this->view->configlist;
}
diff --git a/application/modules/user/controllers/FilterController.php b/application/modules/user/controllers/FilterController.php
index e9850a9..ead81ab 100644
--- a/application/modules/user/controllers/FilterController.php
+++ b/application/modules/user/controllers/FilterController.php
@@ -48,11 +48,14 @@ class User_FilterController extends Zend_Controller_Action
$this->view->notification = $pbsNotifier->notify('modify',$result);
}
- $filters = $this->filterMapper->findBy(array('groupID' => $this->membership->getGroupID()),true,array('priority'=>'DESC'));
+ $filters = $this->filterMapper->findBy(array('groupID' => $this->membership->getGroupID(),'membershipID'=>null),true,array('priority'=>'DESC'));
+ $bootmenuMapper = new Application_Model_BootMenuMapper();
foreach($filters as $filter){
$ff = new Application_Model_Filter();
$ff->setOptions($filter);
$ff->setID($filter['filterID']);
+ $ff->setBootmenuID("[".$ff->getBootmenuID()."] ".$bootmenuMapper->find($ff->getBootmenuID())->getTitle());
+ $ff->setCreated(date(Zend_Registry::get('dateformat'),$ff->getCreated()));
$allFilter[] = $ff;
}
@@ -130,6 +133,7 @@ class User_FilterController extends Zend_Controller_Action
$filterentry = new Application_Model_FilterEntries();
$filterentry->setFilterID($id);
$filterentry->setFiltertypeID(6);
+ $filterentry->setCreated(time());
$filterentry->setFiltervalue($this->membership->getGroupID());
$filterentriesMapper->save($filterentry);
diff --git a/application/modules/user/controllers/PrebootController.php b/application/modules/user/controllers/PrebootController.php
index f283969..8bf6c47 100644
--- a/application/modules/user/controllers/PrebootController.php
+++ b/application/modules/user/controllers/PrebootController.php
@@ -84,9 +84,7 @@ class User_PrebootController extends Zend_Controller_Action
$this->view->prebootlist = $pagination->getElements();
$this->view->pagination = $pagination->pagination($pageurl);
- $this->view->page = $pagination->getRequestPage();
- $this->view->prebootlist= $this->view->prebootlist;
-
+ $this->view->page = $pagination->getRequestPage();
$this->view->update = array();
diff --git a/application/modules/user/controllers/SessionController.php b/application/modules/user/controllers/SessionController.php
index d149f22..3768af9 100644
--- a/application/modules/user/controllers/SessionController.php
+++ b/application/modules/user/controllers/SessionController.php
@@ -18,6 +18,7 @@ class User_SessionController extends Zend_Controller_Action
} else {
$this->_helper->redirector('login', 'auth');
}
+
$this->page = $this->_request->getParam('page');
}
@@ -53,14 +54,15 @@ class User_SessionController extends Zend_Controller_Action
$personMapper->find($personID,$p);
$session->setMembershipID("[".$session->getMembershipID()."] ".$p->getFirstname()." ".$p->getName());
- }
+ }
+ $session->setTime(date(Zend_Registry::get('dateformat'),$session->getTime()));
$mySessions[] =$session;
}
}
// Sort after date/id
usort($mySessions, function($func_a, $func_b) {
if($func_a->getID() == $func_b->getID()) return 0;
- return ($func_a->getID() < $func_b->getID()) ? -1 : 1;
+ return ($func_a->getID() < $func_b->getID()) ? 1 : -1;
});
// Search
diff --git a/application/modules/user/views/scripts/config/index.phtml b/application/modules/user/views/scripts/config/index.phtml
index 91177f4..b651f63 100644
--- a/application/modules/user/views/scripts/config/index.phtml
+++ b/application/modules/user/views/scripts/config/index.phtml
@@ -22,7 +22,7 @@
<td><?php echo $this->escape($config->getTitle()); ?></td>
<td><?php echo $this->escape($config->getGroupID()); ?></td>
<td><?php echo $this->escape($config->getShellscript()); ?></td>
- <td><?php echo $this->escape(date('Y-m-d H:i:s', $config->getCreated())); ?></td>
+ <td><?php echo $this->escape($config->getCreated()); ?></td>
<td class='action'><a href="<?php echo $this->url(
array(
'module' => 'user',
diff --git a/application/modules/user/views/scripts/filter/index.phtml b/application/modules/user/views/scripts/filter/index.phtml
index 7f8bad8..5d3646d 100644
--- a/application/modules/user/views/scripts/filter/index.phtml
+++ b/application/modules/user/views/scripts/filter/index.phtml
@@ -13,6 +13,7 @@
<th>Description <span class='code'>description</span></th>
<th>Priority <span class='code'>priority</span></th>
<th>TargetBootMenu <span class='code'>bootmenuID</span></th>
+ <th>Created <span class='code'>created</span></th>
<th colspan=3>Actions</th>
</tr>
<?php foreach ($this->filters as $filter): ?>
@@ -22,6 +23,7 @@
<td><?php echo $this->escape($filter->Description) ?></td>
<td><?php echo $this->escape($filter->priority) ?></td>
<td><?php echo $this->escape($filter->bootmenuID) ?></td>
+ <td><?php echo $this->escape($filter->created) ?></td>
<td class='action'><a href="<?php echo $this->url(
array(
'module' => 'user',
@@ -61,7 +63,7 @@
<?php if (count($erg)>0): ?>
<tr class=detail>
<td class=arrowtop>↳</td>
- <td colspan=7>
+ <td colspan=8>
<?php
?>
diff --git a/application/modules/user/views/scripts/session/index.phtml b/application/modules/user/views/scripts/session/index.phtml
index bb9f1e2..32c8e04 100644
--- a/application/modules/user/views/scripts/session/index.phtml
+++ b/application/modules/user/views/scripts/session/index.phtml
@@ -22,7 +22,7 @@
<td><?php echo $this->escape($session->getBootosID()) ?></td>
<td><?php echo $this->escape($session->getBootisoID()) ?></td>
<td><?php echo $this->escape($session->getMembershipID()) ?></td>
- <td><?php echo date('d.m.Y H:i',$this->escape($session->getTime())) ?></td>
+ <td><?php echo $this->escape($session->getTime()) ?></td>
<td><?php echo $this->escape($session->getIp()) ?></td>
<td><?php echo $this->escape($session->getIp6()) ?></td>
</tr>