diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc
index f15d1b37881981e9843ac3295346a2786599b3cf..b833a9186d5db04e62c5b92414c98e845fa4113d 100644 (file)
/* Do we represent a valid group? */
if (!$this->is_account){
$display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\"> <b>".
- _("This 'dn' is no object group.")."</b>";
+ msgPool::noValidExtension("object group")."</b>";
return ($display);
}
$smarty->assign("tree_image", get_template_path('images/tree.png'));
$smarty->assign("deplist", $this->config->idepartments);
$smarty->assign("alphabet", generate_alphabet());
- foreach( array("dselect", "regex", "accounts", "groups", "applications",
- "departments", "servers", "workstations", "winstations", "terminals","subtrees",
- "printers", "phones") as $type){
+ foreach( array("dselect", "regex", "subtrees") as $type){
$smarty->assign("$type", $ogfilter[$type]);
}
$smarty->assign("hint", print_sizelimit_warning());
$smarty->assign("apply", apply_filter());
+ /* Build up checkboxes
+ */
+ $ar = array(
+ "departments" => array(
+ "T" => msgPool::selectToView(_("departments")),
+ "C" => (isset($ogfilter['departments']) && ($ogfilter['departments'])),
+ "L" => sprintf(_("Show %s"),_("departments"))),
+ "accounts" => array(
+ "T" => msgPool::selectToView(_("people")),
+ "C" => (isset($ogfilter['accounts']) && ($ogfilter['accounts'])),
+ "L" => sprintf(_("Show %s"),_("people"))),
+ "groups"=> array(
+ "T" => msgPool::selectToView(_("groups")),
+ "C" => (isset($ogfilter['groups']) && ($ogfilter['groups'])),
+ "L" => sprintf(_("Show %s"),_("groups"))),
+ "applications"=> array(
+ "T" => msgPool::selectToView(_("applications")),
+ "C" => (isset($ogfilter['applications']) && ($ogfilter['applications'])),
+ "L" => sprintf(_("Show %s"),_("applications"))),
+ "servers"=> array(
+ "T" => msgPool::selectToView(_("servers")),
+ "C" => (isset($ogfilter['servers']) && ($ogfilter['servers'])),
+ "L" => sprintf(_("Show %s"),_("servers"))),
+ "workstations"=> array(
+ "T" => msgPool::selectToView(_("workstations")),
+ "C" => (isset($ogfilter['workstations']) && ($ogfilter['workstations'])),
+ "L" => sprintf(_("Show %s"),_("workstations"))),
+ "terminals"=> array(
+ "T" => msgPool::selectToView(_("terminals")),
+ "C" => (isset($ogfilter['terminals']) && ($ogfilter['terminals'])),
+ "L" => sprintf(_("Show %s"),_("terminals"))),
+ "printers"=> array(
+ "T" => msgPool::selectToView(_("printer")),
+ "C" => (isset($ogfilter['printers']) && ($ogfilter['printers'])),
+ "L" => sprintf(_("Show %s"),_("printers"))),
+ "phones"=> array(
+ "T" => msgPool::selectToView(_("phones")),
+ "C" => (isset($ogfilter['phones']) && ($ogfilter['phones'])),
+ "L" => sprintf(_("Show %s"),_("phones"))));
+ $smarty->assign("checkboxes",$ar);
$display= $smarty->fetch (get_template_path('ogroup_objects.tpl', TRUE, dirname(__FILE__)));
return ($display);
}
error_reporting(0);
if (isset($type[1]) && preg_match('/[UGADSFOWTP]/', $type[1])){
$p2= $conv[$type[1]];
- $smarty->assign("combinedObjects", "$p1 "._("and")." $p2");
+ $smarty->assign("combinedObjects", sprintf("'%s' and '%s'", $p1, $p2));
} else {
$smarty->assign("combinedObjects", "$p1");
}
it seams that this entry was removed
*/
/* Try to resolv the entry again, if it still fails, display error msg */
- $ldap->cat($dn, array("cn", "sn", "givenName", "ou", "description", "objectClass"));
+ $ldap->cat($dn, array("cn", "sn", "givenName", "ou", "description", "objectClass", "macAddress"));
/* It has failed, add entry with type flag I (Invalid)*/
if (!$ldap->success()){
$this->objcache[$attrs["dn"]]= array("text" => "$name", "type" => "$type");
}
$this->objcache[$attrs["dn"]]['objectClass'] = $attrs['objectClass'];
+
+ if(isset($attrs['macAddress'][0])){
+ $this->objcache[$attrs["dn"]]['macAddress'] = $attrs['macAddress'][0];
+ }else{
+ $this->objcache[$attrs["dn"]]['macAddress'] = "";
+ }
+
if(isset($attrs['uid'])){
$this->objcache[$attrs["dn"]]['uid'] = $attrs['uid'];
}