summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 750f101)
raw | patch | inline | side by side (parent: 750f101)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Mar 2010 09:01:35 +0000 (09:01 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Mar 2010 09:01:35 +0000 (09:01 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17009 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc
index 15cd3bdfe762397aeb7844867d1c71e0a2bd3694..e972a1b1c90206ee80ae19384fef3b7ee4cc02c3 100644 (file)
}
$smarty->assign("gotoShares",$this->printOutAssignedShares());
+ $smarty->assign("gotoSharesCount",count($this->printOutAssignedShares()));
$smarty->assign("gotoShareKeys",array_flip($this->printOutAssignedShares()));
/* Create divSelectBox for ldap server selection
}
/* Move ldap servers up and down */
- if(!$this->gotoLdap_inherit){
+ if(!$this->gotoLdap_inherit && $this->acl_is_writeable("gotoLdapServer")){
foreach($_POST as $name => $value){
if(preg_match("/sort_ldap_up_/",$name)){
- $id = preg_replace("/^sort_ldap_up_([0-9]*)_(x|y)$/","\\1",$name);
+ $id = preg_replace("/^sort_ldap_up_([0-9]*)$/","\\1",$name);
$from = $id;
$to = $id -1;
$tmp = $this->array_switch_item($this->gotoLdapServers,$from,$to);
break;
}
if(preg_match("/sort_ldap_down_/",$name)){
- $id = preg_replace("/^sort_ldap_down_([0-9]*)_(x|y)$/","\\1",$name);
+ $id = preg_replace("/^sort_ldap_down_([0-9]*)$/","\\1",$name);
$from = $id;
$to = $id +1;
$tmp = $this->array_switch_item($this->gotoLdapServers,$from,$to);
break;
}
if(preg_match("/gotoLdapRemove_/",$name)){
- $id = preg_replace("/^gotoLdapRemove_([0-9]*)_(x|y)$/","\\1",$name);
+ $id = preg_replace("/^gotoLdapRemove_([0-9]*)$/","\\1",$name);
$value = $this->gotoLdapServers[$id];
$this->gotoLdapServers = array_remove_entries(array($value),$this->gotoLdapServers);
break;
}
}
}
- /* Add Entries
+
+ /* Add Entries
*/
- foreach($this->gotoLdapServers as $key => $server){
- if(!in_array($server,$this->gotoLdapServerList)){
- $server = $server." <font style='color:red'>(missing)</font>";
+ if($this->acl_is_readable("gotoLdapServer")){
+
+ foreach($this->gotoLdapServers as $key => $server){
+
+ /* Announce missing entries */
+ if(!in_array($server,$this->gotoLdapServerList)){
+ $server = $server." <font style='color:red'>(missing)</font>";
+ }
+
+ /* Convert old style entry */
+ if (!preg_match('%:ldaps?://%', $server)){
+ $server= "ldap://".preg_replace('/^([^:]+):/', '\1/', $server);
+
+ /* Beautify new style entries */
+ } else {
+ $server= preg_replace("/^[^:]+:/", "", $server);
}
$SelectBoxLdapServer->AddEntry(
- array(array("string" => $server),
+ array(
+ array(
+ "string" => $server),
array("string" =>
- "<input class='center' type='image' src='images/lists/sort-up.png' name='sort_ldap_up_".$key."'> ".
- "<input class='center' type='image' src='images/lists/sort-down.png' name='sort_ldap_down_".$key."'> ".
- "<input class='center' type='image' src='images/lists/trash.png' name='gotoLdapRemove_".$key."'>",
- "attach" => "style='text-align:right;width:40px;border-right:0px;'")));
+ image('images/lists/sort-up.png',"sort_ldap_up_".$key,'',"top").
+ image('images/lists/sort-down.png',"sort_ldap_down_".$key,'',"bottom").
+ image('images/lists/trash.png',"gotoLdapRemove_".$key),
+ "attach" => "style='text-align:right;width:60px;border-right:0px;'")));
+ }
}
+
if($this->gotoLdap_inherit){
$smarty->assign("gotoLdapServerACL_inherit", preg_replace("/w/","",$this->getacl("gotoLdapServer")));;
}else{