Code

Added list footer
[gosa.git] / gosa-core / include / class_CopyPasteHandler.inc
index 1d7364dfcde91299c5d09afa1c2f4fdfc2f62080..e18c26b7c1cf37c130d3185a3f3a1d9d402aa80b 100644 (file)
@@ -1,4 +1,24 @@
 <?php
+/*
+ * This code is part of GOsa (http://www.gosa-project.org)
+ * Copyright (C) 2003-2008 GONICUS GmbH
+ *
+ * ID: $$Id$$
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
 
 define("LDAP_DUMP_PATH","/tmp/gosa");
 
@@ -276,7 +296,6 @@ class CopyPasteHandler {
          */
         if(!isset($entry['object'])){
           $entry = $this->load_entry_from_queue($entry);
-          $entry = $this->_update_vars($entry);
           $this->queue[$key] = $entry;
         }
         $msgs = $entry['object']->check();
@@ -308,6 +327,7 @@ class CopyPasteHandler {
         /* Load next queue entry */
         $this->current = $entry;
         $this->lastdn = $this->current['object']->dn;
+        $this->current= $this->_update_vars($this->current);
         $this->current['object']->save();
         $this->current = FALSE;
       } 
@@ -322,6 +342,7 @@ class CopyPasteHandler {
       /* Load next queue entry */
       if(!count($msgs)){
         $this->lastdn = $this->current['object']->dn;
+        $this->current= $this->_update_vars($this->current);
         $this->current['object']->save();
         $this->current = FALSE;
       }else{
@@ -339,12 +360,12 @@ class CopyPasteHandler {
         $dns .= $entry['dn']."\n";
       }
       $smarty = get_smarty();
-      $smarty->assign("type","cut");
+      $smarty->assign("type","directly");
       $smarty->assign("Complete",false);
       $smarty->assign("AttributesToFix","&nbsp;");
       $smarty->assign("SubDialog","");
       $smarty->assign("objectDN" ,$dns);
-      $smarty->assign("message"  , sprintf(_("You are going to paste the cutted entry '%s'."), "<pre>".$dns."</pre>"));
+      $smarty->assign("message"  , sprintf(_("You are going to paste the following entries '%s'."), "<pre>".$dns."</pre>"));
       return($smarty->fetch(get_template_path("copyPasteDialog.tpl",FALSE)));
     }
 
@@ -362,12 +383,12 @@ class CopyPasteHandler {
       }
       if($this->current){
         $smarty = get_smarty();
-        $smarty->assign("type","copy");
+        $smarty->assign("type","modified");
         $smarty->assign("Complete",false);
         $smarty->assign("AttributesToFix",$this->generateAttributesToFix());
         $smarty->assign("SubDialog",$this->current['object']->SubDialog);
         $smarty->assign("objectDN",$this->current['source_data']['dn']);
-        $smarty->assign("message", sprintf(_("You are going to paste the copied entry '%s'."), $this->current['source_data']['dn']));
+        $smarty->assign("message", sprintf(_("You are going to paste the following entry '%s'."), $this->current['source_data']['dn']));
         return($smarty->fetch(get_template_path("copyPasteDialog.tpl",FALSE)));
       }
     }