Code

Reverted Last commits, I've accidentally replaced to much.
[gosa.git] / gosa-plugins / goto / personal / environment / class_environment.inc
index 904cde4073421a6df4492557ce9b2f29d37d7bc6..237de00d999dc04883004984baf6ce0ed6ba3fde 100644 (file)
@@ -6,7 +6,7 @@ class environment extends plugin
 
   /* attribute list for save action */
   var $ignore_account       = FALSE;
-  var $plHeadline           = "Environment";
+  var $plHeadline           = "Desktop";
   var $plDescription        = "This does something";
   var $dialog               = false;    // Indicates that we are currently editing in an seperate dialog
   
@@ -64,11 +64,11 @@ class environment extends plugin
   /* general settings */
   // Sets the attributes which will kept on page reload, which will be saved, ...
 
-  var $CopyPasteVars      = array("gotoHotplugDevices","gotoAvailableShares","gotoShareSelections","gotoPrinterSel","gotoProfileFlagL","gotoXResolutions","gotoProfileFlagC","gotoProfileServers","useProfile","is_group","in_dialog","OrigCn","gotoKioskProfile_Server","gotoKioskProfile_Profile");
+  var $CopyPasteVars      = array("gotoHotplugDevices","gotoAvailableShares","gotoShareSelections","gotoPrinterSel","gotoProfileFlagL","gotoXResolutions","gotoProfileFlagC","gotoProfileServers","useProfile","is_group","in_dialog","OrigCn","gotoKioskProfile_Server","gotoKioskProfile_Profile", "gotoLogonScripts","gotoLogonScript","gotoShare","gotoShares");
 
   var $attributes         = array("uid","gotoProfileServer","gotoProfileFlags","gotoHotplugDeviceDN",
       "gotoXResolution","gotoProfileQuota",
-      "gotoLogonScript",
+      "gotoLogonScript","gotoLogonScripts","gotoHotplugDevices",
       "gotoPrinter", "gosaDefaultPrinter",
       "gotoShare",
       "gotoKioskProfile");
@@ -219,8 +219,8 @@ class environment extends plugin
                                     "1280x768"  =>  "1280x768",
                                     "1280x1024" =>  "1280x1024");
 
-    if($this->config->get_cfg_value("resolutions") != ""){
-      $file = $this->config->get_cfg_value("resolutions");
+    if($this->config->get_cfg_value("core","resolutions") != ""){
+      $file = $this->config->get_cfg_value("core","resolutions");
 
       if(is_readable($file)){
         $str = file_get_contents($file);
@@ -301,7 +301,8 @@ class environment extends plugin
       }
     }
 
-    if($cnt && $this->config->search("environment","kioskpath",array('menu','tabs'))){
+    $tmp = $this->config->get_cfg_value("environment","kioskPath");
+    if($cnt && !empty($tmp)){
       $this->kiosk_enabled = TRUE;
     }
 
@@ -441,8 +442,8 @@ class environment extends plugin
       }
       /* Group Dialog with enabled environment options */
       if ($this->is_account){
-        $display= $this->show_enable_header(msgPool::removeFeaturesButton(_("Environment")),
-            msgPool::featuresEnabled(_("Environment")));
+        $display= $this->show_disable_header(msgPool::removeFeaturesButton(_("Desktop")),
+            msgPool::featuresEnabled(_("Desktop")));
       } else {
 
         /* Environment is disabled 
@@ -450,16 +451,16 @@ class environment extends plugin
            environment extensions
          */
         if((isset($this->parent->by_object['group']))||(isset($this->attrs['objectClass']))&&((in_array("posixAccount",$this->attrs['objectClass'])))){
-          $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Environment")),
-              msgPool::featuresDisabled(_("Environment")));
+          $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Desktop")),
+              msgPool::featuresDisabled(_("Desktop")));
           return $display;
         }elseif((isset($this->parent->by_object['ogroup']))){
-          $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Environment")),
-              msgPool::featuresDisabled(_("Environment")));
+          $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Desktop")),
+              msgPool::featuresDisabled(_("Desktop")));
           return $display;
         }else{
-          $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Environment")),
-              msgPool::featuresDisabled(_("Environment"), _("POSIX")), TRUE);
+          $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Desktop")),
+              msgPool::featuresDisabled(_("Desktop"), _("POSIX")), TRUE);
           return $display;
         }
       }
@@ -481,17 +482,17 @@ class environment extends plugin
 
         // 3. Account enabled . Editing from adminmenu
         if ($this->is_account){
-          $display= $this->show_enable_header(msgPool::removeFeaturesButton(_("Environment")),
-              msgPool::featuresEnabled(_("Environment")));
+          $display= $this->show_disable_header(msgPool::removeFeaturesButton(_("Desktop")),
+              msgPool::featuresEnabled(_("Desktop")));
         } else {
 
           if($this->parent->by_object['posixAccount']->is_account==true){
-            $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Environment")),
-                msgPool::featuresDisabled(_("Environment")));
+            $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Desktop")),
+                msgPool::featuresDisabled(_("Desktop")));
             return $display;
           }else{
-            $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Environment")),
-                msgPool::featuresDisabled(_("Environment"), _("POSIX")), TRUE);
+            $display= $this->show_enable_header(msgPool::addFeaturesButton(_("Desktop")),
+                msgPool::featuresDisabled(_("Desktop"), _("POSIX")), TRUE);
             return $display;
           }
         }
@@ -923,6 +924,8 @@ class environment extends plugin
               $type = "AddUser";
             }elseif(isset($this->NewDeletedPrinters[$pname])){
               $type = "AddUser";
+            }elseif($this->dn == "new"){  
+              $type = "AddUser";
             }elseif($printerObj->by_object['printgeneric']->AddMember("AddUser",$this->dn)){
               $type = "AddUser";
             }
@@ -1760,8 +1763,8 @@ class environment extends plugin
 #FIXME these ACLs should work for groups too */ 
   static function plInfo()
   {
-    return (array("plShortName"     => _("Environment"),
-          "plDescription"   => _("Environment settings"),         // Description
+    return (array("plShortName"     => _("Desktop"),
+          "plDescription"   => _("Desktop settings"),         // Description
           "plSelfModify"    => TRUE,                              
           "plDepends"       => array("user", "posixAccount"),     // This plugin depends on 
           "plPriority"      => 3,                                 // Position in tabs