From: hickert Date: Wed, 22 Nov 2006 06:27:01 +0000 (+0000) Subject: Updated fai copy&paste stuff X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ca5fc245b0b7cfee6035da8331865d2a87e5326c;p=gosa.git Updated fai copy&paste stuff git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5184 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index 50f398e59..8c783b56a 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -40,6 +40,7 @@ class faiHook extends plugin var $base = ""; var $release = ""; var $copy_paste_mode = false; + var $cut_paste_mode = false; var $CopyPasteVars = array("SubObjects","FAIstate"); @@ -374,7 +375,7 @@ class faiHook extends plugin $message= plugin::check(); /* If this is a new script, check if a script with this name already exists */ - if(!empty($this->release) && $this->copy_paste_mode){ + if(!empty($this->release) && ($this->copy_paste_mode || $this->cut_paste_mode) ){ /* Check if current name is already used for fai scripts in selected release */ $dn = 'cn='.$this->cn.",ou=hooks,".$this->release; diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index a0f77a551..2bd6dd156 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -631,6 +631,9 @@ class faiManagement extends plugin if($this->CopyPasteHandler->copyCurrent){ $this->CopyPasteHandler->SetVar("copy_paste_mode", TRUE); } + if($this->CopyPasteHandler->cutCurrent){ + $this->CopyPasteHandler->SetVar("cut_paste_mode", TRUE); + } $release = "ou=fai,ou=configs,ou=systems,".$_SESSION['CurrentMainBase']; if($_SESSION['faifilter']['branch']!="main"){ diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 28897efac..40b340b31 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -64,6 +64,8 @@ class faiPackage extends plugin var $base = ""; var $release = ""; var $copy_paste_mode = false; + var $cut_paste_mode = false; + var $CopyPasteVars = array("FAIstate","ConfiguredPackages","FAIdebianRelease","FAIdebianSection","FAIinstallMethod","mirror","servers","releases","sections","list","mirrors","usedPackages"); @@ -384,7 +386,7 @@ class faiPackage extends plugin } /* If this is a new script, check if a script with this name already exists */ - if(!empty($this->release) && $this->copy_paste_mode){ + if(!empty($this->release) && ($this->copy_paste_mode || $this->cut_paste_mode) ){ /* Check if current name is already used for fai scripts in selected release */ $dn = 'cn='.$this->cn.",ou=packages,".$this->release; diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc index 3376d600e..9ea6a9c67 100644 --- a/plugins/admin/fai/class_faiPartitionTable.inc +++ b/plugins/admin/fai/class_faiPartitionTable.inc @@ -23,6 +23,7 @@ class faiPartitionTable extends plugin var $base = ""; var $release = ""; var $copy_paste_mode = false; + var $cut_paste_mode = false; var $CopyPasteVars = array("disks","FAIstate"); @@ -322,7 +323,7 @@ class faiPartitionTable extends plugin $message= plugin::check(); /* If this is a new script, check if a script with this name already exists */ - if(!empty($this->release) && $this->copy_paste_mode){ + if(!empty($this->release) && ($this->copy_paste_mode || $this->cut_paste_mode) ){ /* Check if current name is already used for fai scripts in selected release */ $dn = 'cn='.$this->cn.",ou=disk,".$this->release; diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index 6befbbdfd..2df7bac2f 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -34,6 +34,7 @@ class faiProfile extends plugin var $base = ""; var $release = ""; var $copy_paste_mode= false; + var $cut_paste_mode = false; var $CopyPasteVars = array("FAIclass","FAIclasses","FAIAllclasses","FAIstate"); @@ -388,7 +389,7 @@ class faiProfile extends plugin if($this->copy_paste_mode){ /* If this is a new script, check if a script with this name already exists */ - if(!empty($this->release) && $this->copy_paste_mode){ + if(!empty($this->release) && ($this->copy_paste_mode || $this->cut_paste_mode) ){ /* Check if current name is already used for fai scripts in selected release */ $dn = 'cn='.$this->cn.",ou=profiles,".$this->release; diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index e70a40456..e1c3ffbc7 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -41,6 +41,7 @@ class faiScript extends plugin var $base =""; var $release =""; var $copy_paste_mode = false; + var $cut_paste_mode = false; var $CopyPasteVars = array("SubObjects","FAIstate"); @@ -347,7 +348,7 @@ class faiScript extends plugin $message= plugin::check(); /* If this is a new script, check if a script with this name already exists */ - if(!empty($this->release) && $this->copy_paste_mode){ + if(!empty($this->release) && ($this->copy_paste_mode || $this->cut_paste_mode) ){ /* Check if current name is already used for fai scripts in selected release */ $dn = 'cn='.$this->cn.",ou=scripts,".$this->release; diff --git a/plugins/admin/fai/class_faiTemplate.inc b/plugins/admin/fai/class_faiTemplate.inc index 06945f10c..cb74de6b9 100644 --- a/plugins/admin/fai/class_faiTemplate.inc +++ b/plugins/admin/fai/class_faiTemplate.inc @@ -40,6 +40,7 @@ class faiTemplate extends plugin var $base = ""; var $release = ""; var $copy_paste_mode = false; + var $cut_paste_mode = false; var $CopyPasteVars = array("SubObjects","FAIstate"); @@ -344,7 +345,7 @@ class faiTemplate extends plugin $message= plugin::check(); /* If this is a new script, check if a script with this name already exists */ - if(!empty($this->release) && $this->copy_paste_mode){ + if(!empty($this->release) && ($this->copy_paste_mode || $this->cut_paste_mode) ){ /* Check if current name is already used for fai scripts in selected release */ $dn = 'cn='.$this->cn.",ou=templates,".$this->release; diff --git a/plugins/admin/fai/class_faiVariable.inc b/plugins/admin/fai/class_faiVariable.inc index 39565634a..7f14681a6 100644 --- a/plugins/admin/fai/class_faiVariable.inc +++ b/plugins/admin/fai/class_faiVariable.inc @@ -38,6 +38,7 @@ class faiVariable extends plugin var $base = ""; var $release = ""; var $copy_paste_mode = false; + var $cut_paste_mode = false; var $CopyPasteVars = array("SubObjects","FAIstate"); @@ -272,7 +273,7 @@ class faiVariable extends plugin $message= plugin::check(); /* If this is a new script, check if a script with this name already exists */ - if(!empty($this->release) && $this->copy_paste_mode){ + if(!empty($this->release) && ($this->copy_paste_mode || $this->cut_paste_mode) ){ /* Check if current name is already used for fai scripts in selected release */ $dn = 'cn='.$this->cn.",ou=variables,".$this->release;