summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2cdc839)
raw | patch | inline | side by side (parent: 2cdc839)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Apr 2010 15:27:39 +0000 (15:27 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 6 Apr 2010 15:27:39 +0000 (15:27 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17491 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc
index 726c747c10edf7cb59cc215af570eb10280ddba7..72ade35c1a2e45abf01ed079cac095d793c2d9e1 100644 (file)
$this->$ll->setWidth("100%");
$this->$ll->setHeight("100px");
$this->$ll->setAcl($this->getacl($l));
+ $this->$ll->setDefaultSortColumn(1);
}
$this->sudoUserList->setHeader(array("!",_("Type"),_("Member"),_("Option")));
$this->sudoUserList->setColspecs(array('24px','24px','*','46px'));
+ $this->sudoUserList->setDefaultSortColumn(2);
$this->sudoHostList->setHeader(array("!",_("System"),_("Option")));
$this->sudoHostList->setColspecs(array('24px','*','46px'));
$this->sudoCommandList->setHeader(array("!",_("Command"),_("Option")));
}
foreach(array("sudoCommand","sudoHost","sudoRunAs") as $attr){
- if($this->acl_is_readable($attr)){
- $tmp =array();
- $list = $attr."List";
- $data = $attr."Data";
- foreach($this->$attr as $id => $entry){
- $neg = "";
- if(preg_match("/^!/",$entry)){
- $neg = $neg_img;
- }
- $entry = preg_replace("/^!/","",$entry);
-
- $action =preg_replace(array("/%KEY%/","/%ATTR%/"),array($id,$attr),$option);
- $tmp[$id] = array('data'=>array($neg,$entry,$action)) ;
- }
- $this->$list->setListData($this->$attr, $tmp);
- $this->$list->update();
- $smarty->assign("divlist_{$attr}", $this->$list->render());
- }
- }
-
-
- if($this->acl_is_readable($attr)){
- $img1 = image('plugins/users/images/select_user.png','',_("User"));
- $img2 = image('plugins/groups/images/select_group.png','',_("Group"));
- $sudoUserData = array();
- foreach($this->sudoUser as $id => $entry){
+ $tmp =array();
+ $list = $attr."List";
+ $data = $attr."Data";
+ foreach($this->$attr as $id => $entry){
$neg = "";
if(preg_match("/^!/",$entry)){
$neg = $neg_img;
}
$entry = preg_replace("/^!/","",$entry);
- $img = $img1;
- if(preg_match("/^%/",$entry)){
- $img = $img2;
- }
- $entry = preg_replace("/^%/","",$entry);
- $action =preg_replace(array("/%KEY%/","/%ATTR%/"),array($id,'sudoUser'),$option);
- $sudoUserData[$id] = array('data'=>array($neg,$img,$entry,$action)) ;
+ $action =preg_replace(array("/%KEY%/","/%ATTR%/"),array($id,$attr),$option);
+ $tmp[$id] = array('data'=>array($neg,$entry,$action)) ;
+ }
+ $this->$list->setListData($this->$attr, $tmp);
+ $this->$list->update();
+ $smarty->assign("divlist_{$attr}", $this->$list->render());
+ }
+
+
+ $img1 = image('plugins/users/images/select_user.png','',_("User"));
+ $img2 = image('plugins/groups/images/select_group.png','',_("Group"));
+ $sudoUserData = array();
+ foreach($this->sudoUser as $id => $entry){
+ $neg = "";
+ if(preg_match("/^!/",$entry)){
+ $neg = $neg_img;
+ }
+ $entry = preg_replace("/^!/","",$entry);
+
+ $img = $img1;
+ if(preg_match("/^%/",$entry)){
+ $img = $img2;
}
- $this->sudoUserList->setListData($this->sudoUser,$sudoUserData);
- $this->sudoUserList->update();
- $smarty->assign("divlist_sudoUser", $this->sudoUserList->render());
+ $entry = preg_replace("/^%/","",$entry);
+ $action =preg_replace(array("/%KEY%/","/%ATTR%/"),array($id,'sudoUser'),$option);
+ $sudoUserData[$id] = array('data'=>array($neg,$img,$entry,$action)) ;
}
+ $this->sudoUserList->setListData($this->sudoUser,$sudoUserData);
+ $this->sudoUserList->update();
+ $smarty->assign("divlist_sudoUser", $this->sudoUserList->render());
return($smarty->fetch(get_template_path('generic.tpl', TRUE)));
}