summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b1e65f0)
raw | patch | inline | side by side (parent: b1e65f0)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 10:01:22 +0000 (10:01 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 10:01:22 +0000 (10:01 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10206 594d385d-05f5-0310-b6e9-bd551577e9d8
14 files changed:
index f6f806185e295efdd04d423dd3c58cbee45857c4..32d129c424ccd6a9bfa08fb7ac9831ade57d4a58 100644 (file)
$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 19345338c8a1fe5cf33183d1e40282d20a1ebacc..efc16028ebd1911ebdd65e49d0edf8da11e7ec36 100644 (file)
src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
}
- if($value['FAIstate'] == "freeze"){
+ if(preg_match("/^freeze/", $value['FAIstate'])){
$action.= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
name='entry_edit_%KEY%' title='"._("Edit class")."'>";
$action.= "<img src='images/closedlock.png' alt='F' class='center'>";
diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc
index 82e14b4a869b5a62c337161612535e1aa9758c5c..0e5a17105739cf73dcb6bb90bdd8f232efe78371 100644 (file)
$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 .= "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("Edit")."' alt='"._("Edit")."'>";
}else{
$act .= "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("Edit")."' alt='"._("Edit")."'>";
$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));
}
*/
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 30caab263e1cb696d671c70ff508902b27ce632a..433437e5be990a93b693a1a89a01d220990dc1d2 100644 (file)
/* 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 958f2696792f0695467fe29eee4c4bf712a6c92f..5a781fcf878eed1bb30b71994ccb89b82881a20b 100644 (file)
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.", ";
$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 075d80072cd1d10b90dac6ad6c1ee53d1f7189d1..76f5cae5cc5797702e2c4fca4ea94a00b99769f4 100644 (file)
/* 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]);
/* 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){
}
/* 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])){
/* 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;
*/
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 2ef87bc1f8d696f5b36d15561f951df0bcbafd6e..3179e4cb23e70fd3aa3ff0618fa52281395298f8 100644 (file)
*/
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){
* 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])){
*/
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 8e29422fbb5ef3d965199278703e5bdc71ab07e2..2524c97cc6bc3d417fd9c9b686d8b74025b4e695 100644 (file)
}
$disableALL = "";
- if($this->FAIstate =="freeze"){
+ if (preg_match("/freeze/", $this->FAIstate)){
$disableALL = " disabled ";
}
/* 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 9fb9ae0f7272e50e21d773c686c5f078333de1a3..c6c4c2f53a3c831140a3530a8a6c5cfacc1f3572 100644 (file)
$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 331ca3799ca77faf0c112dba4ec709dd1d454202..2693e8b386b94cffc1b14b9d67220159395fd9cf 100644 (file)
$act = "";
/* Hide delete icon if this object is freezed */
- if($this->FAIstate == "freeze"){
+ if(preg_match("/freeze/", $this->FAIstate)){
$act .= "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
}else{
$act .= "<input type='image' src='images/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
*/
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 51a42682906c548f0e93a7e915b89c9fc3fa272c..370c892a07054ef27ec7165ecfe72ceccba95cf6 100644 (file)
/* 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 62752d01d6d5872099e373bbbf9df564591cfa9c..0d288b1bc1107623e4f77b45fc1b6e99da0bb410 100644 (file)
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 a3ca17002fc1dee5e50efc4a21bbe5b18f49ab42..53bf6706b5c387159985394a43d84e87cc47c2e6 100644 (file)
}
$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) {
*/
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 fa9ecbb353502f7af3819f7dad8f827ecc03ae3b..50e7348203146fb3636108a4863770ad048318d7 100644 (file)
/* 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])){