diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index a84b8f6e6776f93975cd9c2ee4b9d569905b5f62..39835f2275e1d0819fc96b759934d2b43b9d3444 100644 (file)
$entry = $headpage->getEntry($dn);
$ui = get_userinfo();
$smarty = get_smarty();
- if(in_array("FAKE_OC_PWD_changeAble", $entry['objectClass'])){
+ if(in_array_strict("FAKE_OC_PWD_changeAble", $entry['objectClass'])){
$acl = $tDefs[$type]['aclCategory'].'/'.$tDefs[$type]['aclClass'];
$tabacl = $ui->get_permissions($dn,$acl,"userPassword");
if(preg_match("/w/",$tabacl)){
$ui = get_userinfo();
$smarty = get_smarty();
- if(!in_array('FAKE_OC_PWD_changeAble', $entry['objectClass'])){
+ if(!in_array_strict('FAKE_OC_PWD_changeAble', $entry['objectClass'])){
trigger_error("Tried to change pwd, for invalid object!");
}elseif (get_post('new_password') != get_post('repeated_password')){
msg_dialog::display(_("Error"),
/* Remove password attribute
*/
- if(in_array("simpleSecurityObject",$old_attrs['objectClass'])){
+ if(in_array_strict("simpleSecurityObject",$old_attrs['objectClass'])){
$attrs['objectClass'] = array();
for($i = 0 ; $i < $old_attrs['objectClass']['count'] ; $i ++){
if(!preg_match("/simpleSecurityObject/i",$old_attrs['objectClass'][$i])){
/* Add/modify password attribute
*/
- if(!in_array("simpleSecurityObject",$old_attrs['objectClass'])){
+ if(!in_array_strict("simpleSecurityObject",$old_attrs['objectClass'])){
$attrs['objectClass'] = array();
for($i = 0 ; $i < $old_attrs['objectClass']['count'] ; $i ++){
$attrs['objectClass'][] = $old_attrs['objectClass'][$i];
/* Skip installation or update trigerred events,
* if this entry is currently processing.
*/
- if($triggered && in_array($event,array("DaemonEvent_reinstall","DaemonEvent_update"))){
+ if($triggered && in_array_strict($event,array("DaemonEvent_reinstall","DaemonEvent_update"))){
foreach($mac as $key => $mac_address){
foreach($o_queue->get_entries_by_mac(array($mac_address)) as $entry){
$entry['STATUS'] = strtoupper($entry['STATUS']);
if($entry['STATUS'] == "PROCESSING" &&
isset($events['QUEUED'][$entry['HEADERTAG']]) &&
- in_array($events['QUEUED'][$entry['HEADERTAG']],array("DaemonEvent_reinstall","DaemonEvent_update"))){
+ in_array_strict($events['QUEUED'][$entry['HEADERTAG']],array("DaemonEvent_reinstall","DaemonEvent_update"))){
unset($mac[$key]);
new log("security","systems/".get_class($this),"",array(),"Skip adding 'DaemonEvent::".$type."' for mac '".$mac_address."', there is already a job in progress.");
$ocs = $attrs['objectClass'];
unset($ocs['count']);
$new_attrs = array();
- if(!in_array("FAIobject",$ocs)){
+ if(!in_array_strict("FAIobject",$ocs)){
$ocs[] = "FAIobject";
$new_attrs['objectClass'] = $ocs;
}
{
$tabs = array(
"device" => array(
- "ou" => "ou=systems,",
+ "ou" => get_ou('Device','DeviceRDN'),
"plugClass" => "Device",
"tabClass" => "DeviceTab",
"tabDesc" => "NEWDEVICETABS",
$tabs['FAKE_OC_ArpNewDevice'] = &$tabs['FAKE_OC_NewDevice'];
+
+ // Remove those types, we cannot handle at the moment due to lack of
+ // installed GOsa-plugins.
+ foreach($tabs as $name => $tab){
+
+ if(!class_available($tab['plugClass'])) {
+ unset($tabs[$name]);
+ }
+ }
+
return($tabs);
}
- static function filterSystemDescription($row,$dn,$pid,$state,$description=array())
+ static function filterSystemDescription($row,$dn,$pid,$state = '',$description=array())
{
$dn= LDAP::fix(func_get_arg(1));
$desc = isset($description[0])?set_post($description[0]):"";
"name" => "systemRDN",
"type" => "rdn",
"default" => "ou=systems,",
- "description" => _("The 'systemRDN' statement defines the location where new systems will be created. The default is 'ou=systems,'."),
+ "description" => _("RDN for system storage."),
"check" => "gosaProperty::isRdn",
"migrate" => "migrate_systemRDN",
"group" => "plugin",