summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c7265e3)
raw | patch | inline | side by side (parent: c7265e3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 13 Nov 2006 11:34:01 +0000 (11:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 13 Nov 2006 11:34:01 +0000 (11:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5080 594d385d-05f5-0310-b6e9-bd551577e9d8
index 4637552b7c79021b8adf3c17556faa195ab25c1d..3f8f520a81f8fd74d9375bd3aad2f2a79e3d9c56 100644 (file)
/* Create action icons */
$action ="";
if($this->parent->CopyPasteHandler){
- $action .= "<input class='center' type='image'
- src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
+ if($value['FAIstate'] != "freeze"){
+ $action .= "<input class='center' type='image'
+ src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
+ }
$action.= "<input class='center' type='image'
src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
}
index 121d0ca5c9543fe64379a9264890fac1df92765f..2d6e6f94aff16de2f636fd575e61fc5b81fa794e 100644 (file)
var $release = "";
var $copy_paste_mode = false;
+ var $CopyPasteVars = array("SubObjects","FAIstate");
+
function faiHook ($config, $dn= NULL)
{
/* Load Attributes */
$ldap = $this->config->get_ldap_link();
+ /* Copy & Paste : Ensure that FAIstate is copied too */
+ if($this->copy_paste_mode && preg_match("/freeze/",$this->FAIstate)){
+ $this->attrs['FAIstate'] = $this->FAIstate;
+ }
+
$ldap->cat($this->dn,array("objectClass"));
if($ldap->count()!=0){
/* Write FAIscript to ldap*/
if($obj['status'] == "FreshLoaded"){
if($this->copy_paste_mode){
$this->SubObjects[$name] = $this->get_object_attributes($obj,$this->sub_Load_Later);
+ $this->SubObjects[$name]['status'] = "new";
}else{
unset($this->SubObjects[$name]);
}
index 7697beb74c189ccf32691a0ba87e3630e7d5b78c..27faa1c589f4660daae2bb411a861f32b604d598 100644 (file)
var $base = "";
var $release = "";
var $copy_paste_mode = false;
- var $CopyPasteVars = array("FAIdebianRelease","FAIdebianSection","FAIinstallMethod","mirror","servers","releases","sections","list","mirrors","usedPackages");
+ var $CopyPasteVars = array("FAIstate","ConfiguredPackages","FAIdebianRelease","FAIdebianSection","FAIinstallMethod","mirror","servers","releases","sections","list","mirrors","usedPackages");
function faiPackage ($config, $dn= NULL)
$ldap = $this->config->get_ldap_link();
+ /* Copy & Paste : Ensure that FAIstate is copied too */
+ if($this->copy_paste_mode && preg_match("/freeze/",$this->FAIstate)){
+ $this->attrs['FAIstate'] = $this->FAIstate;
+ }
+
$this->attrs['FAIpackage'] = array();
foreach($this->usedPackages as $pkg => $obj){
$this->attrs['FAIpackage'][] = $pkg;
diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc
index f5ca9f7b1ec3568fbdfc860c86543c8293db9232..e306340590ebaf6c99cb13896888ae8eb40287a1 100644 (file)
var $release = "";
var $copy_paste_mode = false;
+ var $CopyPasteVars = array("disks","FAIstate");
+
function faiPartitionTable ($config, $dn= NULL)
{
/* Load Attributes */
* 3 : Save partitions for each disk
*/
+ /* Copy & Paste : Ensure that FAIstate is copied too */
+ if($this->copy_paste_mode && preg_match("/freeze/",$this->FAIstate)){
+ $this->attrs['FAIstate'] = $this->FAIstate;
+ }
+
$ldap = $this->config->get_ldap_link();
if($this->new){
$disk_attrs['description'] = $disk['description'];
$disk_attrs['objectClass'] = array("top","FAIclass","FAIpartitionDisk");
+ /* We currently use the copy & paste method */
+ if($this->copy_paste_mode){
+ $disk['status'] = "new";
+ }
+
if($disk['status']=="new"){
$ldap->cat($disk_dn,array("objectClass"));
if($ldap->count()){
if(isset($attrs['objectClass']) && in_array_ics("gosaAdministrativeUnitTag",$attrs['objectClass'])){
$disk_attrs['objectClass'][] = "gosaAdministrativeUnitTag";
}
-
+
if($disk['status'] == "delete"){
$ldap->cd($disk_dn);
$ldap->rmdir_recursive($disk_dn);
unset($partition_attrs['status']);
unset($partition_attrs['old_cn']);
+ /* We currently use the copy & paste method */
+ if($this->copy_paste_mode){
+ $partition['status']="new";
+ }
+
/* Check if this partition is realy new .. */
if($partition['status']=="new"){
$ldap->cat($partition_dn,array("objectClass"));
index 1b11447e4dd890d3e6632f3c52c0c9e3993c73cd..69af93981b56e3d03f3d5101091b513a8e828102 100644 (file)
$this->attrs['FAIclass']=trim($this->FAIclass);
+ /* Copy & Paste : Ensure that FAIstate is copied too */
+ if($this->copy_paste_mode && preg_match("/freeze/",$this->FAIstate)){
+ $this->attrs['FAIstate'] = $this->FAIstate;
+ }
+
$ldap->cat($this->dn,array("objectClass"));
if($ldap->count()!=0){
/* Write FAIscript to ldap*/
index 50a73992b4c9a19d9ff89b4cf556ac7a4f90f43e..c8337c4a1572b3cbe4e24edc2547b028413581a0 100644 (file)
$ldap = $this->config->get_ldap_link();
+ /* Copy & Paste : Ensure that FAIstate is copied too */
+ if($this->copy_paste_mode && preg_match("/freeze/",$this->FAIstate)){
+ $this->attrs['FAIstate'] = $this->FAIstate;
+ }
+
$ldap->cat($this->dn,array("objectClass"));
if($ldap->count()!=0){
/* Write FAIscript to ldap*/
if($obj['status'] == "FreshLoaded"){
if($this->copy_paste_mode){
$this->SubObjects[$name] = $this->get_object_attributes($obj,$this->sub_Load_Later);
+ $this->SubObjects[$name]['status'] = "new";
}else{
unset($this->SubObjects[$name]);
}
index 1b2f78752291fa26a737574c7b5678b23b75658d..0ef911b09a230b1983e0ee2831fc15c863da6bf0 100644 (file)
var $release = "";
var $copy_paste_mode = false;
+ var $CopyPasteVars = array("SubObjects","FAIstate");
+
function faiTemplate ($config, $dn= NULL)
{
/* Load Attributes */
$ldap = $this->config->get_ldap_link();
+ /* Copy & Paste : Ensure that FAIstate is copied too */
+ if($this->copy_paste_mode && preg_match("/freeze/",$this->FAIstate)){
+ $this->attrs['FAIstate'] = $this->FAIstate;
+ }
+
$ldap->cat($this->dn,array("objectClass"));
if($ldap->count()!=0){
/* Write FAIscript to ldap*/
if($obj['status'] == "FreshLoaded"){
if($this->copy_paste_mode){
$this->SubObjects[$name] = $this->get_object_attributes($obj,$this->sub_Load_Later);
+ $this->SubObjects[$name]['status'] = "new";
}else{
unset($this->SubObjects[$name]);
}
index 4b10b70e4f2bf530972723bbfcc380834705ca8f..83027c7dfb31307909ea6a1e6dc6f0bb4b2bccca 100644 (file)
var $release = "";
var $copy_paste_mode = false;
+ var $CopyPasteVars = array("SubObjects","FAIstate");
+
function faiVariable ($config, $dn= NULL)
{
/* Load Attributes */
plugin::save();
$ldap = $this->config->get_ldap_link();
-
+
+ /* Copy & Paste : Ensure that FAIstate is copied too */
+ if($this->copy_paste_mode && preg_match("/freeze/",$this->FAIstate)){
+ $this->attrs['FAIstate'] = $this->FAIstate;
+ }
+
$ldap->cat($this->dn,array("objectClass"));
if($ldap->count()!=0){
/* Write FAIscript to ldap*/
$sub_dn = "cn=".$obj['cn'].",".$this->dn;
+ if($this->copy_paste_mode){
+ $obj['status'] = "new";
+ }
+
if($obj['status']=="new"){
$ldap->cat($sub_dn,array("objectClass"));
if($ldap->count()){