From: cajus Date: Fri, 4 Apr 2008 10:01:22 +0000 (+0000) Subject: Moved to -cow X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8a2533309503cf04a363b6ce03356053a30f4ac5;p=gosa.git Moved to -cow git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10206 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_FAI.inc b/gosa-plugins/fai/admin/fai/class_FAI.inc index f6f806185..32d129c42 100644 --- a/gosa-plugins/fai/admin/fai/class_FAI.inc +++ b/gosa-plugins/fai/admin/fai/class_FAI.inc @@ -787,7 +787,7 @@ class FAI $n_data['ou'] = $destination_name; $n_data['objectClass'] = array("top","organizationalUnit","FAIbranch"); if(!empty($type)){ - $n_data['FAIstate'] = $type; + $n_data['FAIstate'] = $type."/cow"; } foreach($groups as $dn => $att){ diff --git a/gosa-plugins/fai/admin/fai/class_divListFai.inc b/gosa-plugins/fai/admin/fai/class_divListFai.inc index 19345338c..efc16028e 100644 --- a/gosa-plugins/fai/admin/fai/class_divListFai.inc +++ b/gosa-plugins/fai/admin/fai/class_divListFai.inc @@ -327,7 +327,7 @@ class divListFai extends MultiSelectWindow src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> "; } - if($value['FAIstate'] == "freeze"){ + if(preg_match("/^freeze/", $value['FAIstate'])){ $action.= ""; $action.= "F"; diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc index 82e14b4a8..0e5a17105 100644 --- a/gosa-plugins/fai/admin/fai/class_faiHook.inc +++ b/gosa-plugins/fai/admin/fai/class_faiHook.inc @@ -319,7 +319,7 @@ class faiHook extends plugin $act = ""; /* Check if this object is freezed, in this case hide the delete icon */ - if($this->FAIstate == "freeze"){ + if(preg_match("/^freeze/", $this->FAIstate)){ $act .= ""; }else{ $act .= ""; @@ -369,7 +369,7 @@ class faiHook extends plugin $tmp = $this->plInfo(); $c_dn = $this->acl_base_for_current_object($this->dn); - $smarty->assign("sub_object_is_addable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiHookEntry")) && $this->FAIstate!="freeze"); + $smarty->assign("sub_object_is_addable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiHookEntry")) && !preg_match('/^freeze/', $this->FAIstate)); foreach($tmp['plProvidedAcls'] as $name => $translation){ $smarty->assign($name."ACL",$this->getacl($name)); } @@ -436,7 +436,7 @@ class faiHook extends plugin */ function save_object() { - if((isset($_POST['FAIhook_posted'])) && ($this->FAIstate != "freeze")){ + if((isset($_POST['FAIhook_posted'])) && !preg_match("/^freeze/", $this->FAIstate)){ plugin::save_object(); foreach($this->attributes as $attrs){ if(isset($_POST[$attrs])){ diff --git a/gosa-plugins/fai/admin/fai/class_faiHookEntry.inc b/gosa-plugins/fai/admin/fai/class_faiHookEntry.inc index 30caab263..433437e5b 100644 --- a/gosa-plugins/fai/admin/fai/class_faiHookEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiHookEntry.inc @@ -129,7 +129,7 @@ class faiHookEntry extends plugin /* Save data to object */ function save_object() { - if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){ + if((isset($_POST['SubObjectFormSubmitted'])) && !preg_match("/^freeze/", $this->FAIstate)){ foreach($this->attributes as $attrs){ if($this->acl_is_writeable($attrs)){ if(isset($_POST[$attrs])){ diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc index 958f26967..5a781fcf8 100644 --- a/gosa-plugins/fai/admin/fai/class_faiManagement.inc +++ b/gosa-plugins/fai/admin/fai/class_faiManagement.inc @@ -229,7 +229,7 @@ class faiManagement extends plugin foreach($ids as $id){ $dn = $this->objects[$id]['dn']; $cn = $this->objects[$id]['cn']; - if($this->objects[$id]['FAIstate'] != "freeze"){ + if(!preg_match('/^freeze/', $this->objects[$id]['FAIstate'])){ $this->dns[$id] = $dn; }else{ $errors .= $cn.", "; @@ -399,7 +399,7 @@ class faiManagement extends plugin $this->dialog->set_acl_base($this->dn); $this->is_dialog = true; - if($entry['FAIstate'] == "freeze"){ + if(preg_match("/^freeze/", $entry['FAIstate'])){ #$this->dialog->set_acl(array("*none*")) ; } session::set('objectinfo',$this->dn); diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc index 075d80072..76f5cae5c 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPackage.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPackage.inc @@ -217,7 +217,7 @@ class faiPackage extends plugin /* Delete selected package */ if(isset($_POST['Delpkg']) && $this->acl_is_writeable("FAIpackage")){ - if($this->FAIstate != "freeze"){ + if(!preg_match("/^freeze/", $this->FAIstate)){ foreach($_POST['usedPackages'] as $del){ if(isset($this->usedPackages[$del])){ unset($this->usedPackages[$del]); @@ -234,7 +234,7 @@ class faiPackage extends plugin /* attach new packages */ if(isset($_POST['SaveSubObject'])) { - if($this->FAIstate != "freeze"){ + if(!preg_match("/^freeze/", $this->FAIstate)){ $this->dialog->save_object(); if(count($this->dialog->check())){ foreach($this->dialog->check() as $msgs){ @@ -265,7 +265,7 @@ class faiPackage extends plugin } /* Configuration dialog open*/ - if($this->FAIstate != "freeze" && $this->acl_is_writeable("FAIpackage")){ + if(preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIpackage")){ if((isset($_POST['Markpkg']))&&(isset($_POST['usedPackages']))&&(!empty($_POST['usedPackages']))){ foreach($_POST['usedPackages'] as $pkg){ if (isset($this->usedPackages[$pkg])){ @@ -283,7 +283,7 @@ class faiPackage extends plugin /* Save Configuration */ if(isset($_POST['SaveObjectConfig'])){ - if($this->FAIstate != "freeze"){ + if(!preg_match("/^freeze/", $this->FAIstate)){ $this->ConfiguredPackages= array_merge($this->ConfiguredPackages,$this->dialog->save()); } $this->dialog = false; @@ -356,7 +356,7 @@ class faiPackage extends plugin */ function save_object() { - if($this->FAIstate == "freeze") return; + if(preg_match("/^freeze/", $this->FAIstate)) return; plugin::save_object(); } diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index 2ef87bc1f..3179e4cb2 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -193,7 +193,7 @@ class faiPartitionTable extends plugin */ if(isset($_POST['SaveDisk'])){ - if($this->FAIstate != "freeze"){ + if (!preg_match("/freeze/", $this->FAIstate)){ $this->dialog->save_object(); if(count($this->dialog->check())){ foreach($this->dialog->check() as $msg){ @@ -234,7 +234,7 @@ class faiPartitionTable extends plugin * Assign delete status for all its partitions */ if((isset($_POST['DelDisk']))&&(!empty($_POST['disks']))){ - if($this->FAIstate != "freeze"){ + if (!preg_match("/freeze/", $this->FAIstate)){ foreach($_POST['disks'] as $disk) { if(isset($this->disks[$disk])){ @@ -376,7 +376,7 @@ class faiPartitionTable extends plugin */ function save_object() { - if($this->FAIstate == "freeze") return; + if (preg_match("/freeze/", $this->FAIstate)) return; plugin::save_object(); foreach($this->attributes as $attrs){ if(isset($_POST[$attrs])){ diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc index 8e29422fb..2524c97cc 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc @@ -214,7 +214,7 @@ class faiPartitionTableEntry extends plugin } $disableALL = ""; - if($this->FAIstate =="freeze"){ + if (preg_match("/freeze/", $this->FAIstate)){ $disableALL = " disabled "; } @@ -356,7 +356,7 @@ class faiPartitionTableEntry extends plugin /* Save data to object */ function save_object() { - if((isset($_POST['TableEntryFrameSubmitted'])) && ($this->FAIstate != "freeze") ){ + if((isset($_POST['TableEntryFrameSubmitted'])) && !preg_match("/freeze/", $this->FAIstate) ){ plugin::save_object(); foreach($this->partitions as $key => $part){ diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc index 9fb9ae0f7..c6c4c2f53 100644 --- a/gosa-plugins/fai/admin/fai/class_faiProfile.inc +++ b/gosa-plugins/fai/admin/fai/class_faiProfile.inc @@ -319,7 +319,7 @@ class faiProfile extends plugin $field1 = array("string"=> $usedClass,"attach"=>""); $field2 = array("string"=> $str,"attach"=>""); - if(($this->FAIstate != "freeze") && $this->acl_is_writeable("FAIclass")){ + if(!preg_match("/freeze/", $this->FAIstate) && $this->acl_is_writeable("FAIclass")){ $field3 = array("string"=> preg_replace("/%KEY%/",base64_encode($usedClass),$actions). preg_replace("/%s/",base64_encode($usedClass),$linkupdown), "attach"=>"style='border-right:none;'"); diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc index 331ca3799..2693e8b38 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScript.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScript.inc @@ -354,7 +354,7 @@ class faiScript extends plugin $act = ""; /* Hide delete icon if this object is freezed */ - if($this->FAIstate == "freeze"){ + if(preg_match("/freeze/", $this->FAIstate)){ $act .= ""; }else{ $act .= ""; @@ -471,7 +471,7 @@ class faiScript extends plugin */ function save_object() { - if((isset($_POST['FAIscript_posted'])) && ($this->FAIstate != "freeze")){ + if((isset($_POST['FAIscript_posted'])) && !preg_match("/freeze/", $this->FAIstate)){ plugin::save_object(); foreach($this->attributes as $attrs){ if(isset($_POST[$attrs])){ diff --git a/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc b/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc index 51a426829..370c892a0 100644 --- a/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiScriptEntry.inc @@ -121,7 +121,7 @@ class faiScriptEntry extends plugin /* Save data to object */ function save_object() { - if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){ + if((isset($_POST['SubObjectFormSubmitted'])) && !preg_match("/freeze/", $this->FAIstate)){ foreach($this->attributes as $attrs){ if($this->acl_is_writeable($attrs)){ if(isset($_POST[$attrs])){ diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc index 62752d01d..0d288b1bc 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc @@ -149,7 +149,7 @@ class faiTemplateEntry extends plugin function save_object() { /* Check if form is posted and we are not freezed */ - if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){ + if((isset($_POST['SubObjectFormSubmitted'])) && !preg_match("/freeze/", $this->FAIstate)){ plugin::save_object(); diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc index a3ca17002..53bf6706b 100644 --- a/gosa-plugins/fai/admin/fai/class_faiVariable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiVariable.inc @@ -233,8 +233,8 @@ class faiVariable extends plugin } $c_dn = $this->acl_base_for_current_object($this->dn); - $smarty->assign("is_createable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiVariableEntry")) && $this->FAIstate!="freeze"); - $smarty->assign("is_removeable", preg_match("/d/",$this->ui->get_permissions($c_dn,"fai/faiVariableEntry")) && $this->FAIstate!="freeze"); + $smarty->assign("is_createable", preg_match("/c/",$this->ui->get_permissions($c_dn,"fai/faiVariableEntry")) && !preg_match("/freeze/", $this->FAIstate)); + $smarty->assign("is_removeable", preg_match("/d/",$this->ui->get_permissions($c_dn,"fai/faiVariableEntry")) && !preg_match("/freeze/", $this->FAIstate)); $tmp = $this->plInfo(); foreach($tmp['plProvidedAcls'] as $name => $translation) { @@ -304,7 +304,7 @@ class faiVariable extends plugin */ function save_object() { - if((isset($_POST['FAIvariable_posted'])) && ($this->FAIstate != "freeze") ){ + if((isset($_POST['FAIvariable_posted'])) && !preg_match("/freeze/", $this->FAIstate) ){ plugin::save_object(); foreach($this->attributes as $attrs){ if(isset($_POST[$attrs])){ diff --git a/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc index fa9ecbb35..50e734820 100644 --- a/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiVariableEntry.inc @@ -75,7 +75,7 @@ class faiVariableEntry extends plugin /* Save data to object */ function save_object() { - if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){ + if((isset($_POST['SubObjectFormSubmitted'])) && !preg_match("/freeze/", $this->FAIstate)){ foreach($this->attributes as $attrs){ if($this->acl_is_writeable($attrs)){ if(isset($_POST[$attrs])){