summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 75f0abd)
raw | patch | inline | side by side (parent: 75f0abd)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Sep 2006 03:52:14 +0000 (03:52 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 5 Sep 2006 03:52:14 +0000 (03:52 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4586 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/applications/class_applicationGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc
index 92da9a56b5aa783276265f1c6f52dcc7ec01bca0..42626b91e1cf43ec63c5e14d7c2fdaf64d3d33de 100644 (file)
/* Save to LDAP */
function save()
{
+ /* Get application script without header part, to check if we must save the script itself */
+ $script = preg_replace('/.*### END HEADER ###/s', '', $this->gotoLogonScript);
+
plugin::save();
$this->attrs["gosaApplicationIcon"]= $this->gosaApplicationIcon;
$a= $ldap->fetch();
if (count($a)){
+
+ /* Remove gotoLogonScript if it is empty */
+ if(empty($script)) {
+ $this->attrs['gotoLogonScript'] = array();
+ }
+
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
$this->handle_post_events("modify");
} else {
+
+ /* Remove gotoLogonScript if it is empty */
+ if(empty($script)) {
+ unset($this->attrs['gotoLogonScript']);
+ }
+
$ldap->cd($this->config->current['BASE']);
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));
$ldap->cd($this->dn);