From 892274d7dbedbccfa940afa4ae77a4cd9e256996 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 17 May 2010 13:43:31 +0000 Subject: [PATCH] Updated migration class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18520 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/addons/configViewer/migrate.tpl | 4 ++- .../migration/class_migrateRDN.inc | 35 ++++++++++++++----- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/gosa-core/plugins/addons/configViewer/migrate.tpl b/gosa-core/plugins/addons/configViewer/migrate.tpl index 08f08bef6..ad601eaa7 100644 --- a/gosa-core/plugins/addons/configViewer/migrate.tpl +++ b/gosa-core/plugins/addons/configViewer/migrate.tpl @@ -2,8 +2,10 @@

{t}Property migration assistent{/t} - {t}Migration steps left{/t}: {$leftSteps}

-
+
+ {$content} +

diff --git a/gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc b/gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc index 65cf2dee1..bbafd4527 100644 --- a/gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc +++ b/gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc @@ -17,10 +17,22 @@ class migrateRDN implements propertyMigration protected $suffix = ""; protected $prefix = ""; + protected $title = ""; + protected $description = ""; + + function __construct($config,$property) { $this->property = &$property; $this->config = &$config; + + //Set a dummy title and description + if(empty($this->title)){ + $this->title = sprintf(_("GOsa migration of property '%s'"), $this->property->getName()); + } + if(empty($this->description)){ + $this->description = sprintf(_("GOsa has detected objects outside of the configured storage point (%s)"), $this->property->getValue(TRUE)); + } } function getChanges() @@ -139,22 +151,29 @@ class migrateRDN implements propertyMigration function execute() { - $str = ""; + $str = "

".$this->title."

"; + $str.= $this->description; + $str.= "
"; if(count($this->found['add'])) { - $str.= "

"._("Objects that will be added")."

"; + $str.= "
"._("Objects that will be added"); + $str.= "
    "; foreach($this->found['add'] as $dn => $attrs){ - $str.= $dn."
    "; + $str.= "
  • ".$dn."
  • "; } + $str.= "
"; } if(count($this->found['move'])) { - $str.= "

"._("Objects that will be moved")."

"; - $str.="
";
+            $str.= "
"._("Objects that will be moved")."
"; + $str.= "
    "; foreach($this->found['move'] as $id => $data){ $checked = (!isset($_POST["migrateNow".get_class($this)])) ? 'checked':''; - $str.= ""; - $str.= sprintf(_("Moving object '%s' to '%s'"), $data['from'], $data['to'])."
    "; + $str.= "
  • + + + "; + $str.= sprintf(_("Moving object '%s' to '%s'"), $data['from'], $data['to'])."
  • "; } - $str.="
"; + $str.=""; } $str.= ""; return($str); -- 2.30.2