diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index a56fbe7f98455e70bfd5df1dc7332c5148616192..3c2b052f4ce518de9f461479be2f42f2c36d4f7c 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.");
// Delete the object
$this->dn = $dn;
if($info['tabClass'] == "phonetabs"){
- $this->tabObject= new $tabtype($this->config, $this->config->data['TABS'][$tabobj], $dn,$type);
+ $this->tabObject= new $info['tabClass']($this->config, $this->config->data['TABS'][$info['tabDesc']], $dn,$type);
$this->tabObject->set_acl_base($dn);
$this->tabObject->by_object['phoneGeneric']->remove_from_parent ();
}else{
$headpage = $this->getHeadpage();
$dn = $target[0];
$type =$headpage->getType($dn);
+
+ if(!isset($tInfo[$type])){
+ msg_dialog::display(_("Information"),sprintf(_("The object-type '%s' cannot be managed with your setup of GOsa, please install the required plugins!"), $type), ERROR_DIALOG);
+ return;
+ }
+
$tData = $tInfo[$type];
if($type == "FAKE_OC_ArpNewDevice"){
$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" => get_ou('Device','DeviceRDN'),
+ "ou" => get_ou('Device','GOsaDeviceRDN'),
"plugClass" => "Device",
"tabClass" => "DeviceTab",
"tabDesc" => "NEWDEVICETABS",