From: hickert Date: Fri, 9 Jun 2006 04:36:08 +0000 (+0000) Subject: Updated action hook, you can use every class var you want now X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=da473c00c00f0f4b4ac0a2fad8e2f6f03704be06;p=gosa.git Updated action hook, you can use every class var you want now git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3721 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_goCupsServer.inc b/plugins/admin/systems/class_goCupsServer.inc index 47fc45dbc..427f7e842 100644 --- a/plugins/admin/systems/class_goCupsServer.inc +++ b/plugins/admin/systems/class_goCupsServer.inc @@ -17,7 +17,7 @@ class goCupsServer extends plugin{ var $DisplayName = ""; var $dn = NULL; var $acl; - + var $cn = ""; var $goCupsServerStatus = ""; function goCupsServer($config,$dn) @@ -149,6 +149,16 @@ class goCupsServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goFaxServer.inc b/plugins/admin/systems/class_goFaxServer.inc index 934bc6c09..55a76a56a 100644 --- a/plugins/admin/systems/class_goFaxServer.inc +++ b/plugins/admin/systems/class_goFaxServer.inc @@ -21,6 +21,7 @@ class goFaxServer extends plugin{ var $goFaxAdmin = ""; var $goFaxPassword = ""; var $goFaxServerStatus = ""; + var $cn; function goFaxServer($config,$dn) { @@ -157,6 +158,16 @@ class goFaxServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goFonServer.inc b/plugins/admin/systems/class_goFonServer.inc index 4d0fca755..7f65e8e40 100644 --- a/plugins/admin/systems/class_goFonServer.inc +++ b/plugins/admin/systems/class_goFonServer.inc @@ -16,6 +16,7 @@ class goFonServer extends plugin{ var $DisplayName = ""; var $dn = NULL; + var $cn =""; var $acl; var $goFonServerStatus = ""; @@ -167,6 +168,16 @@ class goFonServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goGlpiServer.inc b/plugins/admin/systems/class_goGlpiServer.inc index 14938f41d..4d3418ef3 100644 --- a/plugins/admin/systems/class_goGlpiServer.inc +++ b/plugins/admin/systems/class_goGlpiServer.inc @@ -16,6 +16,7 @@ class goGlpiServer extends plugin{ var $DisplayName = ""; var $dn = NULL; + var $cn = ""; var $acl; var $goGlpiServerStatus =""; @@ -159,6 +160,16 @@ class goGlpiServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goImapServer.inc b/plugins/admin/systems/class_goImapServer.inc index 1ae6556b9..53e1688c4 100644 --- a/plugins/admin/systems/class_goImapServer.inc +++ b/plugins/admin/systems/class_goImapServer.inc @@ -217,6 +217,16 @@ class goImapServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goKrbServer.inc b/plugins/admin/systems/class_goKrbServer.inc index 5c96c3362..0b3b79c4f 100644 --- a/plugins/admin/systems/class_goKrbServer.inc +++ b/plugins/admin/systems/class_goKrbServer.inc @@ -18,7 +18,7 @@ class goKrbServer extends plugin{ var $dn = NULL; var $goKrbServerStatus= ""; var $acl; - + var $cn =""; var $goKrbRealm = ""; var $goKrbAdmin = ""; var $goKrbPassword =""; @@ -163,6 +163,16 @@ class goKrbServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goLdapServer.inc b/plugins/admin/systems/class_goLdapServer.inc index 888483dfb..8cce87d2d 100644 --- a/plugins/admin/systems/class_goLdapServer.inc +++ b/plugins/admin/systems/class_goLdapServer.inc @@ -17,7 +17,7 @@ class goLdapServer extends plugin{ var $DisplayName = ""; var $dn = NULL; var $acl; - + var $cn = ""; var $goLdapServerStatus = ""; var $goLdapBase = ""; @@ -154,6 +154,16 @@ class goLdapServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goLogDBServer.inc b/plugins/admin/systems/class_goLogDBServer.inc index 254abe369..2003937a5 100644 --- a/plugins/admin/systems/class_goLogDBServer.inc +++ b/plugins/admin/systems/class_goLogDBServer.inc @@ -17,7 +17,7 @@ class goLogDBServer extends plugin{ var $DisplayName = ""; var $dn = NULL; var $acl; - + var $cn = ""; var $goLogDBServerStatus = ""; var $goLogAdmin = ""; var $goLogPassword = ""; @@ -158,6 +158,16 @@ class goLogDBServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goMailServer.inc b/plugins/admin/systems/class_goMailServer.inc index c80075151..1c0cdc17d 100644 --- a/plugins/admin/systems/class_goMailServer.inc +++ b/plugins/admin/systems/class_goMailServer.inc @@ -37,7 +37,7 @@ class goMailServer extends plugin{ var $RestrictionFilters = array(); var $TransportProtocols = array(); var $Actions = array(); - + var $cn = ""; function goMailServer($config,$dn) { @@ -711,6 +711,16 @@ class goMailServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc index 21bab4276..dbfc1401d 100644 --- a/plugins/admin/systems/class_goNtpServer.inc +++ b/plugins/admin/systems/class_goNtpServer.inc @@ -19,7 +19,7 @@ class goNtpServer extends plugin{ var $goTimeSource = array(); var $goNtpServerStatus= ""; var $acl; - + var $cn = ""; function goNtpServer($config,$dn) { @@ -162,6 +162,16 @@ class goNtpServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goShareServer.inc b/plugins/admin/systems/class_goShareServer.inc index 010c18cad..6c968e948 100644 --- a/plugins/admin/systems/class_goShareServer.inc +++ b/plugins/admin/systems/class_goShareServer.inc @@ -17,7 +17,7 @@ class goShareServer extends plugin{ var $DisplayName = ""; var $dn = NULL; var $acl; - + var $cn = ""; var $goShareServerStatus = ""; var $goExportEntry = array(); var $allow_mounts = false; @@ -326,6 +326,16 @@ class goShareServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goSyslogServer.inc b/plugins/admin/systems/class_goSyslogServer.inc index 3ef9c860f..76fc03635 100644 --- a/plugins/admin/systems/class_goSyslogServer.inc +++ b/plugins/admin/systems/class_goSyslogServer.inc @@ -17,7 +17,7 @@ class goSyslogServer extends plugin{ var $DisplayName = ""; var $dn = NULL; var $acl; - + var $cn; var $goSyslogServerStatus = ""; function goSyslogServer($config,$dn) @@ -148,6 +148,16 @@ class goSyslogServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/class_goTerminalServer.inc b/plugins/admin/systems/class_goTerminalServer.inc index 86e2bd820..262ad19a1 100644 --- a/plugins/admin/systems/class_goTerminalServer.inc +++ b/plugins/admin/systems/class_goTerminalServer.inc @@ -17,7 +17,7 @@ class goTerminalServer extends plugin{ var $DisplayName = ""; var $dn = NULL; var $acl; - + var $cn = ""; var $goTerminalServerStatus = ""; var $goXdmcpIsEnabled = false; var $goFontPath = ""; @@ -166,6 +166,16 @@ class goTerminalServer extends plugin{ foreach ($add_attrs as $name => $value){ $command= preg_replace("/%$name/", $value, $command); } + + /* If there are still some %.. in our command, try to fill these with some other class vars */ + if(preg_match("/%/",$command)){ + $attrs = get_object_vars($this); + foreach($attrs as $name => $value){ + if(!is_string($value)) continue; + $command= preg_replace("/%$name/", $value, $command); + } + } + if (check_command($command)){ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__, $command, "Execute"); diff --git a/plugins/admin/systems/goFaxServer.tpl b/plugins/admin/systems/goFaxServer.tpl index 1c21ca4fc..7ceedbbf5 100644 --- a/plugins/admin/systems/goFaxServer.tpl +++ b/plugins/admin/systems/goFaxServer.tpl @@ -1,11 +1,11 @@

{t}FAX database information{/t}

- + - +
{t}FAX DB user{/t}{t}FAX DB user{/t}{$must}
{t}Password{/t}{t}Password{/t}{$must}