summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 928e5d6)
raw | patch | inline | side by side (parent: 928e5d6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 May 2010 16:02:26 +0000 (16:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 May 2010 16:02:26 +0000 (16:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18053 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-core/plugins/addons/configViewer/class_configViewer.inc b/gosa-core/plugins/addons/configViewer/class_configViewer.inc
index 687da8877719b1dfb7fca2ac5fa3b977b3356b68..343f038456e59c04fd3dca654410c0697ee07deb 100644 (file)
*/
function execute()
{
- foreach($_POST as $pName => $value){
- if(preg_match("/:/", $pName)){
- list($class,$name) = preg_split("/:/", $pName,2);
- if($this->config->configRegistry->propertyExists($class,$name)){
- $prop = $this->config->configRegistry->getProperty($class,$name);
- $prop->setValue(get_post($pName));;
- }
+ // Walk trough all properties and check if there posts for us.
+ $all = $this->config->configRegistry->getAllProperties();
+ $modified = FALSE;
+ foreach($all as $prop){
+ $post = "{$prop->getClass()}:{$prop->getName()}";
+ if(isset($_POST[$post])){
+ $prop->setValue(get_post($post));;
}
+
+ $modified |= in_array($prop->getStatus(),array('modified','removed'));
}
+
+ $smarty = get_smarty();
+ $smarty->assign('is_modified', $modified);
return(management::execute());
}
diff --git a/gosa-core/plugins/addons/configViewer/generic.tpl b/gosa-core/plugins/addons/configViewer/generic.tpl
index 1893271ab806e4c38c31604119f2e532c187e788..d02577fb73e56fc78639cc7a5b60d0654cd0541b 100644 (file)
</div>
</div>
-
+{if !$is_modified}
+<input type="hidden" name="ignore">
+{/if}
{$content}
diff --git a/gosa-core/plugins/addons/configViewer/property-list.tpl b/gosa-core/plugins/addons/configViewer/property-list.tpl
index 082f5dea62d40943b9ebb55bc36f626d89d4605d..785129092f6a261c79e1b1112f1c86231385404e 100644 (file)
{$LIST}
</div>
+{if !$is_modified}
+<input type="hidden" name="ignore">
+{/if}
+
<div class="plugin-actions">
<button name='saveProperties'>{msgPool type='okButton'}</button>
<button name='cancelProperties'>{msgPool type='cancelButton'}</button>