Code

Updated opsi generic
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Dec 2009 12:33:33 +0000 (12:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Dec 2009 12:33:33 +0000 (12:33 +0000)
- Do not use DEFAULT as property value, use CURRENT

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14960 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/opsi/admin/opsi/class_opsi.inc
gosa-plugins/opsi/admin/opsi/class_opsiProperties.inc
gosa-plugins/opsi/admin/opsi/class_opsigeneric.inc
gosa-plugins/opsi/admin/opsi/properties.tpl

index 4c7415fb1c5eccdbf826cb86f5242cea81602442..7109f91c1b72cd82afa9a645403e546d08fc332d 100644 (file)
@@ -436,7 +436,7 @@ class opsi extends gosaSupportDaemon
     /* Add properties */
     $data['item'] = array();
     foreach($cfg as $name => $value){
-      $data['item'][] = "<name>".$name."</name><value>".$value['DEFAULT']."</value>";
+      $data['item'][] = "<name>".$name."</name><value>".$value['CURRENT']."</value>";
     }  
 
     /* Query SI server */
index f44cce8bfe0666e7f07d7f44afdac248486aefb9..0917e88b655d4e413f47655a4922a405b6da0ff3 100644 (file)
@@ -50,7 +50,7 @@ class opsiProperties extends plugin
     if(preg_match("/w/",$acl)){
       foreach($this->cfg as $name => $value){
         if(isset($_POST['value_'.$name])){
-          $this->cfg[$name]['DEFAULT'] = validate(get_post('value_'.$name));
+          $this->cfg[$name]['CURRENT'] = validate(get_post('value_'.$name));
         }
       }
     }
index a22ad30ee90a0852646608b9bad3867c8db9075a..d57f7762333018b25a3a747c2e68a143ec5d27ee 100644 (file)
@@ -537,12 +537,12 @@ class opsiGeneric extends plugin
      */
     $res = array();
     foreach($c2 as $name => $value){
-      if(!isset($c1[$name]) || $c1[$name]['DEFAULT'] != $c2[$name]['DEFAULT']){
+      if(!isset($c1[$name]) || $c1[$name]['CURRENT'] != $c2[$name]['CURRENT']){
         $res[$name] = $c2[$name];
       }
     }
     foreach($c1 as $name => $value){
-      if(!isset($c2[$name]) || $c2[$name]['DEFAULT'] != $c1[$name]['DEFAULT']){
+      if(!isset($c2[$name]) || $c2[$name]['CURRENT'] != $c1[$name]['CURRENT']){
         $res[$name] = $c1[$name];
       }
     }
index fe7d4e08f1295b77e34827ecc728ee3461d5f2f5..ff49f8c7d434d8c9d0dcc6d80e2da55bd78c0abd 100644 (file)
                        {if $item.VALUE_CNT}
                                <select name="value_{$key}" style='width:180px;'>
                                {foreach from=$item.VALUE key=k item=i}
-                                       <option {if $item.DEFAULT == $i} selected {/if} value="{$i}">{$i}</option>
+                                       <option {if $item.CURRENT == $i} selected {/if} value="{$i}">{$i}</option>
                                {/foreach}
                                </select>
                        {else}
-                               <input type='input' name='value_{$key}' value="{$item.DEFAULT}" style='width:280px;'>
+                               <input type='input' name='value_{$key}' value="{$item.CURRENT}" style='width:280px;'>
                        {/if}
 {/render}
                </td>