Code

Made mail plugin w3c conform
[gosa.git] / plugins / personal / connectivity / class_connectivity.inc
index 1cad08b5d0cc9ca6f9a5b07333b1a4ac562bd8ba..83252cc8a75011f80f57e8f2c8aae3718bbde9d7 100644 (file)
@@ -22,6 +22,8 @@ class connectivity extends plugin
   var $ignore_account= TRUE;
   var $plugin= array();
   var $plugin_name= array();
+  var $CopyPasteVars = array("plugin","plugin_name");
+
 
   function connectivity ($config, $dn= NULL)
   {
@@ -51,7 +53,7 @@ class connectivity extends plugin
 
     /* Do we represent a valid account? */
     if ($this->parent == NULL){
-      $enabled= false;
+      $enabled= true;
       foreach ($this->plugin_name as $name){
         if ($this->plugin[$name]->is_account){
           $enabled= true;
@@ -75,7 +77,11 @@ class connectivity extends plugin
 
     /* Execude  objects */
     $is_first= true;
+
+    $ReadOnly = (!is_object($this->parent) && !isset($_SESSION['edit']));
+
     foreach ($this->plugin_name as $name){
+      $this->plugin[$name]->ReadOnly = $ReadOnly;
       if (!$is_first){
         $display.= '<p class="seperator">&nbsp;</p>';
       } else {
@@ -103,7 +109,7 @@ class connectivity extends plugin
 
   function check()
   {
-    $message= array();
+    $message= plugin::check();
 
     foreach ($this->plugin_name as $name){
       $tmp= $this->plugin[$name]->check();
@@ -150,6 +156,34 @@ class connectivity extends plugin
     }
   }
 
+  /* Prepare the connectivity obj 
+   */
+  function PrepareForCopyPaste($obj)
+  { 
+    $tmp = $this->plugin;
+    plugin::PrepareForCopyPaste($obj);
+    $this->plugin = $tmp;
+    foreach($obj->plugin as $key => $plug){
+      $this->plugin[$key]->PrepareForCopyPaste($plug);
+    }
+  }
+
+/* Return plugin informations for acl handling 
+#FIXME We should check here, if the user has access to one of the subClasses */ 
+  function plInfo()
+  {
+    return (array(  
+          "plShortName"       => _("Connectivity"),
+          "plDescription"     => _("Connectivity settings"),
+          "plSelfModify"      => TRUE,
+          "plDepends"         => array("user"),
+          "plPriority"        => 5,                                 // Position in tabs
+          "plSection"       => "personal",                        // This belongs to personal
+          "plCategory"      => array("users"),
+          "plOptions"       => array(),
+          "plProvidedAcls"  => array()
+          ));
+  }
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: