index afae3ad9047ef83199c6ac052835b0875cd8abf9..02fab1345de33a42c7d646468dc58acb8d724c3f 100644 (file)
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
/* Fill templating stuff */
$smarty = get_smarty();
$base = $faifilter['branch'];
}
$ldap = $this->config->get_ldap_link();
- $res = get_list($this->ui->subtreeACL, "(objectClass=organizationalUnit)",FALSE, $base, array("cn","description","objectClass"),TRUE);
- $used = array();
+
+ $res= get_list("(&(objectClass=organizationalUnit)(!(objectClass=FAIbranch)))", "fai", $base,
+ array("cn","description","objectClass"), GL_SIZELIMIT );
$delete = array();
+ $used = array();
foreach($res as $objecttypes){
- $res2 = get_list2($this->ui->subtreeACL, "(objectClass=*)",
- FALSE, $objecttypes['dn'], array("cn","description","objectClass","FAIclass"),TRUE);
-
+ $res2= get_list("(objectClass=*)", "fai", $objecttypes['dn'],
+ array("cn","description","objectClass","FAIclass","FAIstate"), GL_SIZELIMIT | GL_CONVERT );
foreach($res2 as $object){
+
/* skip class names with this name */
if(in_array($this->objectClass,$object['objectClass'])){
+ if(isset($object['FAIstate'][0]) && preg_match("/removed$/",$object['FAIstate'][0])){
+ continue;
+ }
$delete[] = $object['cn'][0];
}
}
}
}
-
+
/* Create headline
* Depending on the object type we want to create, a different headline will be shown
*/
$smarty->assign("ClassNamesAvailable", "");
$smarty->assign("grey", "");
}
+ ksort($used);
$smarty->assign("ClassNames", $used);
- $smarty->assign("ClassNameKeys", $used);
+ $smarty->assign("ClassName", $this->ClassName);
$display.= $smarty->fetch(get_template_path('askClassName.tpl', TRUE));
return($display);
}
/* Call common method to give check the hook */
$message= plugin::check();
+ if($this->ClassName != preg_replace("/ /","",trim($this->ClassName))){
+ $message[] = _("Spaces are not allowed within class names.");
+ }
+
if(empty($this->ClassName)){
$message[]=_("The given class name is empty.");
}