summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de92f0c)
raw | patch | inline | side by side (parent: de92f0c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Jun 2006 08:45:24 +0000 (08:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Jun 2006 08:45:24 +0000 (08:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3707 594d385d-05f5-0310-b6e9-bd551577e9d8
13 files changed:
diff --git a/plugins/admin/systems/class_goCupsServer.inc b/plugins/admin/systems/class_goCupsServer.inc
index 6e95c7bede2764555765f924eee0eb1e64782459..924519abf698f7090e5134a91017b7c70afd36b4 100644 (file)
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
{
plugin::save_object();
}
+
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goFaxServer.inc b/plugins/admin/systems/class_goFaxServer.inc
index 71db436e104c1f89f2cdbe8194a03f7cce63221b..d8333160679e534dafafb2a591e593375ad288c9 100644 (file)
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
if(isset($_POST['goFaxServerPosted'])){
plugin::save_object();
}
- }
+ }
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goFonServer.inc b/plugins/admin/systems/class_goFonServer.inc
index c117972d5893ca6f61bb3635b3fc41da14c9614a..e420801791c7637859c105c0c0e190139b35bd6a 100644 (file)
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
if(isset($_POST['goFonServerPosted'])){
plugin::save_object();
}
- }
+ }
+
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goGlpiServer.inc b/plugins/admin/systems/class_goGlpiServer.inc
index 83970daad2db4610a538d2d3ce2956f001ba9074..7491ea64097012399af6df4a1b301aedc8f89657 100644 (file)
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
if(isset($_POST['goLogDBServerPosted'])){
plugin::save_object();
}
- }
+ }
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goImapServer.inc b/plugins/admin/systems/class_goImapServer.inc
index 56d658bab5cbb17314c802bb3e3c15ab9460f1ce..8ad0d12dacf1c381b97b36cbdfef7d87c27ca084 100644 (file)
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
}
}
}
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goKrbServer.inc b/plugins/admin/systems/class_goKrbServer.inc
index f2637b541a964d878fab1305ac92c6418877207f..e5beef1250719eacbd6e3f06888602a497b57cce 100644 (file)
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
if(isset($_POST['goKrbServerPosted'])){
plugin::save_object();
}
- }
+ }
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goLdapServer.inc b/plugins/admin/systems/class_goLdapServer.inc
index d18c6a224b4870db7ef19372cb94f2189aa490a5..ce2e2c77b77fd1d1699d8d21aeef9c294b8cd375 100644 (file)
<?php
class goLdapServer extends plugin{
-
+
var $cli_summary = "This plugin is used within the ServerService Pluign \nand indicates that this server has goLdapServer defined.";
var $cli_description = "Some longer text\nfor help";
var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
var $objectclasses = array("goLdapServer");
var $attributes = array("goLdapServerStatus","goLdapBase");
var $StatusFlag = "goLdapServerStatus";
-
+
/* This class can't be assigned twice so it conflicts with itsself */
var $conflicts = array("goLdapServer");
var $goLdapServerStatus = "";
var $goLdapBase = "";
-
+
function goLdapServer($config,$dn)
{
plugin::plugin($config,$dn);
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
-
+
function check()
{
$message = plugin::check();
}
return($message);
}
-
+
function save_object()
{
if(isset($_POST['goLdapServerPosted'])){
plugin::save_object();
}
- }
+ }
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goLogDBServer.inc b/plugins/admin/systems/class_goLogDBServer.inc
index 0abf2163bc7831a46cf3cbe6e3b95edd951c9633..6c0ab3a567b1cf42597b74f1451d436c36620b62 100644 (file)
var $objectclasses = array("goLogDBServer");
var $attributes = array("goLogDBServerStatus","goLogAdmin", "goLogPassword");
var $StatusFlag = "goLogDBServerStatus";
-
+
/* This class can't be assigned twice so it conflicts with itsself */
var $conflicts = array("goLogDBServer");
var $goLogDBServerStatus = "";
var $goLogAdmin = "";
var $goLogPassword = "";
-
-
+
+
function goLogDBServer($config,$dn)
{
plugin::plugin($config,$dn);
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
}
return($message);
}
-
+
function save_object()
{
if(isset($_POST['goLogDBServerPosted'])){
plugin::save_object();
}
- }
+ }
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goMailServer.inc b/plugins/admin/systems/class_goMailServer.inc
index 7e8d8cf8a43b4e314878c517534e7dbdcfd77fce..bb0a9347a27d93745c08fc59998de6b18f5c6dd4 100644 (file)
foreach($this->postfixMyNetworks as $entry){
$this->attrs['postfixMyNetworks'] .=$entry.",";
}
- $this->postfixMyNetworks = preg_replace("/,$/","",$this->attrs['postfixMyNetworks']);
+ $this->attrs['postfixMyNetworks'] = preg_replace("/,$/","",$this->attrs['postfixMyNetworks']);
}else{
$this->attrs['postfixMyNetworks'] = array();
}
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
return($ret);
}
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
function save_object()
{
diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc
index b7577f202c4af287ff917fcbec2a38cd6d9b611e..3f423dea7a7b84b892ccd4581c34957f7b7252f5 100644 (file)
<?php
class goNtpServer extends plugin{
-
+
var $cli_summary = "This pluign is used within the ServerService Pluign \nand indicates that this server supports NTP service.";
var $cli_description = "Some longer text\nfor help";
var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
var $objectclasses = array("goNtpServer");
var $attributes = array("goTimeSource","goNtpServerStatus");
var $StatusFlag = "goNtpServerStatus";
-
+
/* This class can't be assigned twice so it conflicts with itsself */
var $conflicts = array("goNtpServer");
var $goTimeSource = array();
var $goNtpServerStatus= "";
var $acl;
-
-
+
+
function goNtpServer($config,$dn)
{
plugin::plugin($config,$dn);
$this->DisplayName = _("Time service");
-
+
/* Load arrays */
$tmp = array();
if (isset($this->attrs['goTimeSource'])){
{
$smarty = get_smarty();
- /* Here we add a new entry */
+ /* Here we add a new entry */
if(isset($_POST['NewNTPAdd']) && $_POST['NewNTPExport'] != "") {
$this->goTimeSource[$_POST['NewNTPExport']]= $_POST['NewNTPExport'];
asort($this->goTimeSource);
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
function check(){ return array();}
-
-function save_object(){;}
+
+ function save_object(){;}
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goShareServer.inc b/plugins/admin/systems/class_goShareServer.inc
index 3a00600e66a5e40ce855e5401e96ba69061cf61c..ac6c5408b14e6a273e57a7cbd18b58bae3c96b0b 100644 (file)
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
}
}
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
diff --git a/plugins/admin/systems/class_goSyslogServer.inc b/plugins/admin/systems/class_goSyslogServer.inc
index f1cb8203ce4ebaea2af287af7144960391cbe491..8011baff64aef4d837c836156f6e625e9a808e87 100644 (file)
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
$message = plugin::check();
return($message);
}
-
+
function save_object()
{
plugin::save_object();
- }
+ }
+
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/plugins/admin/systems/class_goTerminalServer.inc b/plugins/admin/systems/class_goTerminalServer.inc
index 7fe9709686e4c6f673a45babf7d07cc500f821af..3ddc52c8e41359f55fbec7d51acf9a24b40df1d8 100644 (file)
var $goTerminalServerStatus = "";
var $goXdmcpIsEnabled = false;
var $goFontPath = "";
-
-
+
+
function goTerminalServer($config,$dn)
{
plugin::plugin($config,$dn);
if(!$this->goXdmcpIsEnabled){
$this->attrs['goXdmcpIsEnabled'] = "0";
}
-
+
/* Check if this is a new entry ... add/modify */
$ldap = $this->config->get_ldap_link();
$ldap->cat($this->dn,array("objectClass"));
$this->$flag = $value;
$ldap->modify($attrs);
show_ldap_error($ldap->get_error());
+ $this->action_hook();
}
}
return($message);
}
-
+
function save_object()
{
$this->goXdmcpIsEnabled = false;
}
}
- }
+ }
+
+ function action_hook($add_attrs= array())
+ {
+ /* Find postcreate entries for this class */
+ $command= search_config($this->config->data['MENU'], get_class($this), "ACTION_HOOK");
+ if ($command == "" && isset($this->config->data['TABS'])){
+ $command= search_config($this->config->data['TABS'], get_class($this), "ACTION_HOOK");
+ }
+ if ($command != ""){
+ /* Walk through attribute list */
+ foreach ($this->attributes as $attr){
+ if (!is_array($this->$attr)){
+ $command= preg_replace("/%$attr/", $this->$attr, $command);
+ }
+ }
+ $command= preg_replace("/%dn/", $this->dn, $command);
+ /* Additional attributes */
+ foreach ($add_attrs as $name => $value){
+ $command= preg_replace("/%$name/", $value, $command);
+ }
+ if (check_command($command)){
+ @DEBUG (DEBUG_SHELL, __LINE__, __FUNCTION__, __FILE__,
+ $command, "Execute");
+
+ exec($command);
+ } else {
+ $message= sprintf(_("Command '%s', specified as ACTION_HOOK for plugin '%s' doesn't seem to exist."), $command, get_class($this));
+ print_red ($message);
+ }
+ }
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>