From: hickert Date: Wed, 23 May 2007 10:58:25 +0000 (+0000) Subject: Switched log call X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=77834e27646c6a9e5ee2d4097d004ab0deb1f430;p=gosa.git Switched log call git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6453 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_acl.inc b/include/class_acl.inc index 23db48299..6e7044c7d 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -1033,7 +1033,7 @@ class acl extends plugin $ldap->modify ($this->attrs); if(count($this->attrs)){ - @log::log("modify","acls/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","acls/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving ACLs with dn '%s' failed."),$this->dn)); @@ -1056,7 +1056,7 @@ class acl extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","acls/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","acls/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); /* Optionally execute a command after we're done */ $this->handle_post_events("remove",array("uid" => $this->uid)); diff --git a/include/class_plugin.inc b/include/class_plugin.inc index cf7ccc0ee..e71962faf 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -1525,7 +1525,7 @@ class plugin /* Update userinfo if necessary */ if($_SESSION['ui']->dn == $old_dn){ $_SESSION['ui']->dn = $new_dn; - @log::log("view","acl/".get_class($this),$this->dn,array(),"Updated current user dn from '".$old_dn."' to '".$new_dn."'"); + new log("view","acl/".get_class($this),$this->dn,array(),"Updated current user dn from '".$old_dn."' to '".$new_dn."'"); } /* Object was moved, ensure that all acls will be moved too */ diff --git a/include/php_setup.inc b/include/php_setup.inc index 7d6c73870..9c2153ed6 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -57,7 +57,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline) if((isset($config->data['MAIN']['DISPLAYERRORS']))&&(!preg_match("/^true$/i",$config->data['MAIN']['DISPLAYERRORS']))){ /* Write to syslog */ - @log::log("view","error","",array(),"PHP error: $errstr ($errfile, line $errline)"); + new log("view","error","",array(),"PHP error: $errstr ($errfile, line $errline)"); return; } } diff --git a/include/sieve/class_sieveManagement.inc b/include/sieve/class_sieveManagement.inc index 33c730945..4ac2c75fe 100644 --- a/include/sieve/class_sieveManagement.inc +++ b/include/sieve/class_sieveManagement.inc @@ -1039,7 +1039,7 @@ class sieveManagement extends plugin if($script['EDITED']){ $data = $this->scripts[$key]['SCRIPT']; if(!$this->sieve_handle->sieve_sendscript($script['NAME'], addcslashes ($data,"\\"))){ - @log::log("modify","users/mailAccount".get_class($this),$script['NAME'],"Failed to save sieve script named '".$script['NAME']."': ".to_string($this->sieve_handle->error_raw)); + new log("modify","users/mailAccount".get_class($this),$script['NAME'],"Failed to save sieve script named '".$script['NAME']."': ".to_string($this->sieve_handle->error_raw)); $everything_went_fine = FALSE; print_red(to_string($this->sieve_handle->error_raw)); diff --git a/plugins/addons/addressbook/class_addressbook.inc b/plugins/addons/addressbook/class_addressbook.inc index f766133f3..6ac0591e7 100644 --- a/plugins/addons/addressbook/class_addressbook.inc +++ b/plugins/addons/addressbook/class_addressbook.inc @@ -201,16 +201,16 @@ class addressbook extends plugin /* Delete request is permitted, perform LDAP action */ $ldap= $this->config->get_ldap_link(); $ldap->rmdir ($this->dn); - @log::log("remove","addressbook/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","addressbook/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of addressbook entry '%s' failed."),$this->dn)); - @log::log("remove","addressbook/".get_class($this),$this->dn,array(),"Address book object'".$this->dn."' has been removed"); + new log("remove","addressbook/".get_class($this),$this->dn,array(),"Address book object'".$this->dn."' has been removed"); } else { /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this entry!")); - @log::log("remove","addressbook/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick address book deletion."); + new log("remove","addressbook/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick address book deletion."); } /* Remove lock file after successfull deletion */ @@ -333,7 +333,7 @@ class addressbook extends plugin $this->view_logged =FALSE; if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","addressbook/".get_class($this),$this->dn); + new log("view","addressbook/".get_class($this),$this->dn); } $_SESSION['show_info']= base64_decode($_GET['show']); } @@ -762,9 +762,9 @@ class addressbook extends plugin } if($mode == "add"){ - @log::log("create","addressbook/".get_class($this),$this->dn, array_keys($this->attrs),$ldap->get_error()); + new log("create","addressbook/".get_class($this),$this->dn, array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("modify","addressbook/".get_class($this),$this->dn, array_keys($this->attrs),$ldap->get_error()); + new log("modify","addressbook/".get_class($this),$this->dn, array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc index c362ab439..6a2330b14 100644 --- a/plugins/addons/gotomasses/class_gotomasses.inc +++ b/plugins/addons/gotomasses/class_gotomasses.inc @@ -58,7 +58,7 @@ class gotomasses extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","gotomasses/".get_class($this),$this->dn); + new log("view","gotomasses/".get_class($this),$this->dn); } if(isset($_POST['export_gotomass_csv']) && $this->acl_is_writeable("something")){ diff --git a/plugins/addons/ldapmanager/class_csvimport.inc b/plugins/addons/ldapmanager/class_csvimport.inc index 9b3cf27d0..fcb5ef07a 100644 --- a/plugins/addons/ldapmanager/class_csvimport.inc +++ b/plugins/addons/ldapmanager/class_csvimport.inc @@ -31,7 +31,7 @@ class csvimport extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","all/".get_class($this),$this->dn); + new log("view","all/".get_class($this),$this->dn); } /* initiate smarty */ diff --git a/plugins/addons/ldapmanager/class_export.inc b/plugins/addons/ldapmanager/class_export.inc index d64dc79d4..64ea7c309 100644 --- a/plugins/addons/ldapmanager/class_export.inc +++ b/plugins/addons/ldapmanager/class_export.inc @@ -26,7 +26,7 @@ class ldifexport extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","all/".get_class($this),$this->dn); + new log("view","all/".get_class($this),$this->dn); } /* Set government mode */ diff --git a/plugins/addons/ldapmanager/class_exportxls.inc b/plugins/addons/ldapmanager/class_exportxls.inc index a8e1ee685..10100dadb 100644 --- a/plugins/addons/ldapmanager/class_exportxls.inc +++ b/plugins/addons/ldapmanager/class_exportxls.inc @@ -30,7 +30,7 @@ class xlsexport extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","all/".get_class($this),$this->dn); + new log("view","all/".get_class($this),$this->dn); } $dn = $this->config->current['BASE']; diff --git a/plugins/addons/ldapmanager/class_import.inc b/plugins/addons/ldapmanager/class_import.inc index ff61022bf..ca5a02ea0 100644 --- a/plugins/addons/ldapmanager/class_import.inc +++ b/plugins/addons/ldapmanager/class_import.inc @@ -29,7 +29,7 @@ class ldifimport extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","all/".get_class($this),$this->dn); + new log("view","all/".get_class($this),$this->dn); } /* Set government mode */ diff --git a/plugins/addons/logview/class_logview.inc b/plugins/addons/logview/class_logview.inc index 844969fc7..1a00f4d1e 100644 --- a/plugins/addons/logview/class_logview.inc +++ b/plugins/addons/logview/class_logview.inc @@ -47,7 +47,7 @@ class logview extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","logview/".get_class($this),$this->dn); + new log("view","logview/".get_class($this),$this->dn); } $logfilter= get_global("logfilter"); diff --git a/plugins/addons/mailqueue/class_mailqueue.inc b/plugins/addons/mailqueue/class_mailqueue.inc index fea487fd5..f33ba88b7 100644 --- a/plugins/addons/mailqueue/class_mailqueue.inc +++ b/plugins/addons/mailqueue/class_mailqueue.inc @@ -51,7 +51,7 @@ class mailqueue extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","mailqueue/".get_class($this),$this->dn); + new log("view","mailqueue/".get_class($this),$this->dn); } if(isset($_POST['EntriesPerPage'])){ diff --git a/plugins/addons/notifications/class_msgplug.inc b/plugins/addons/notifications/class_msgplug.inc index 517a78e3b..363a980b5 100644 --- a/plugins/addons/notifications/class_msgplug.inc +++ b/plugins/addons/notifications/class_msgplug.inc @@ -85,7 +85,7 @@ class msgplug extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","msgplug/".get_class($this),$this->dn); + new log("view","msgplug/".get_class($this),$this->dn); } /* Send message? */ diff --git a/plugins/admin/acl/class_aclManagement.inc b/plugins/admin/acl/class_aclManagement.inc index 450214858..ab61375a1 100644 --- a/plugins/admin/acl/class_aclManagement.inc +++ b/plugins/admin/acl/class_aclManagement.inc @@ -255,7 +255,7 @@ class aclManagement extends plugin print_red (_("You are not allowed to delete this acl role!")); if(isset($this->ui->uid)){ - @log::log("security","aclroles/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick acl role deletion."); + new log("security","aclroles/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick acl role deletion."); } } @@ -318,7 +318,7 @@ class aclManagement extends plugin print_red (_("You are not allowed to delete this acl!")); if(isset($this->ui->uid)){ - @log::log("security","aclroles/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick acl role deletion."); + new log("security","aclroles/".get_class($this),$this->dn,array(),"Warning: '".$this->ui->uid."' tried to trick acl role deletion."); } } diff --git a/plugins/admin/acl/class_aclRole.inc b/plugins/admin/acl/class_aclRole.inc index 2e6a146dd..3d4e2aba1 100644 --- a/plugins/admin/acl/class_aclRole.inc +++ b/plugins/admin/acl/class_aclRole.inc @@ -42,7 +42,7 @@ class aclrole extends acl $this->base = $_SESSION['CurrentMainBase']; }else{ $this->base = preg_replace("/^[^,]+,[^,]+,/","",$this->dn); - @log::log("view","aclroles/".get_class($this),$this->dn); + new log("view","aclroles/".get_class($this),$this->dn); } /* Load ACL's */ @@ -552,13 +552,13 @@ class aclrole extends acl $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $ldap->cd($this->config->current['BASE']); $ldap->create_missing_trees(preg_replace("/^[^,]+,/","",$this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving ACLs with dn '%s' failed."),$this->dn)); @@ -598,7 +598,7 @@ class aclrole extends acl } $ldap->rmDir($this->dn); - @log::log("remove","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of aclRole with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc index a82acc5b1..1882c313a 100644 --- a/plugins/admin/applications/class_applicationGeneric.inc +++ b/plugins/admin/applications/class_applicationGeneric.inc @@ -118,7 +118,7 @@ class application extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","application/".get_class($this),$this->dn); + new log("view","application/".get_class($this),$this->dn); } $smarty= get_smarty(); @@ -232,7 +232,7 @@ class application extends plugin { $ldap= $this->config->get_ldap_link(); $ldap->rmDir($this->dn); - @log::log("remove","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of application with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ @@ -459,7 +459,7 @@ class application extends plugin $this->cleanup(); $ldap->modify ($this->attrs); $this->handle_post_events("modify"); - @log::log("modify","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } else { /* Remove gotoLogonScript if it is empty */ @@ -471,7 +471,7 @@ class application extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("add"); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of application with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index 8ce6dc184..a340977ca 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -318,7 +318,7 @@ class applicationManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this application!")); - @log::log("security","application/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","application/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ del_lock ($dn); @@ -402,7 +402,7 @@ class applicationManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this application!")); - @log::log("security","application/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","application/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index 2b637e06e..7a0c3d840 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -100,7 +100,7 @@ class department extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","department/".get_class($this),$this->dn); + new log("view","department/".get_class($this),$this->dn); } /* Reload departments */ @@ -193,7 +193,7 @@ class department extends plugin $ldap= $this->config->get_ldap_link(); $ldap->cd ($this->dn); $ldap->recursive_remove(); - @log::log("remove","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of department with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ @@ -368,12 +368,12 @@ class department extends plugin if (count($a)){ $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events('modify'); } else { $ldap->add($this->attrs); $this->handle_post_events('add'); - @log::log("create","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","department/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of department with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index e041ac882..b68058fd4 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -150,7 +150,7 @@ class faiHook extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","fai/".get_class($this),$this->dn); + new log("view","fai/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -394,7 +394,7 @@ class faiHook extends plugin prepare_to_save_FAI_object($use_dn,array(),true); - @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes); + new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->SubObjects as $name => $obj){ # $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']); @@ -444,9 +444,9 @@ class faiHook extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/hook with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ - @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes); + new log("modify","fai/".get_class($this),$this->dn,$this->attributes); }else{ - @log::log("create","fai/".get_class($this),$this->dn,$this->attributes); + new log("create","fai/".get_class($this),$this->dn,$this->attributes); } /* Do object tagging */ diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 0488ed3ce..52a9bbd12 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -247,7 +247,7 @@ class faiManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this component!")); - @log::log("security","fai/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","fai/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ @@ -318,7 +318,7 @@ class faiManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this component!")); - @log::log("security","fai/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","fai/".get_class($this),$dn,array(),"Tried to trick deletion."); } }else{ @@ -407,7 +407,7 @@ class faiManagement extends plugin $this->lock_dn = $bb; $this->postremove(); - @log::log("remove","fai/".get_class($this),$br[$bb],array(),"Release removed"); + new log("remove","fai/".get_class($this),$br[$bb],array(),"Release removed"); } } @@ -513,7 +513,7 @@ class faiManagement extends plugin '; - @log::log("create","fai/".get_class($this),$NewReleaseName,array(),"New $type created"); + new log("create","fai/".get_class($this),$NewReleaseName,array(),"New $type created"); /* Duplicate applications */ diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 4b00f8088..5b9da7159 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -173,7 +173,7 @@ class faiPackage extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","fai/".get_class($this),$this->dn); + new log("view","fai/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -343,7 +343,7 @@ class faiPackage extends plugin prepare_to_save_FAI_object($use_dn,array(),true); - @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes); + new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->ConfiguredPackages as $pkgname => $attrs){ foreach($attrs as $name => $attr){ @@ -483,9 +483,9 @@ class faiPackage extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/package list with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ - @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes); + new log("modify","fai/".get_class($this),$this->dn,$this->attributes); }else{ - @log::log("create","fai/".get_class($this),$this->dn,$this->attributes); + new log("create","fai/".get_class($this),$this->dn,$this->attributes); } /* Do object tagging */ diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc index 7825da40d..7ac1a2917 100644 --- a/plugins/admin/fai/class_faiPartitionTable.inc +++ b/plugins/admin/fai/class_faiPartitionTable.inc @@ -126,7 +126,7 @@ class faiPartitionTable extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","fai/".get_class($this),$this->dn); + new log("view","fai/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -350,7 +350,7 @@ class faiPartitionTable extends plugin prepare_to_save_FAI_object($use_dn,array(),true); - @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes); + new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->disks as $disk){ @@ -417,9 +417,9 @@ class faiPartitionTable extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/partition table with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ - @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes); + new log("modify","fai/".get_class($this),$this->dn,$this->attributes); }else{ - @log::log("create","fai/".get_class($this),$this->dn,$this->attributes); + new log("create","fai/".get_class($this),$this->dn,$this->attributes); } /* Do object tagging */ diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index 0c8ef80a9..f7ec6810c 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -208,7 +208,7 @@ class faiProfile extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","fai/".get_class($this),$this->dn); + new log("view","fai/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -376,7 +376,7 @@ class faiProfile extends plugin $use_dn = $this->dn; } - @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes); + new log("remove","fai/".get_class($this),$use_dn,$this->attributes); prepare_to_save_FAI_object($use_dn,array(),true); $this->handle_post_events("remove"); } @@ -437,9 +437,9 @@ class faiProfile extends plugin prepare_to_save_FAI_object($this->dn,$this->attrs); if($this->initially_was_account){ - @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes); + new log("modify","fai/".get_class($this),$this->dn,$this->attributes); }else{ - @log::log("create","fai/".get_class($this),$this->dn,$this->attributes); + new log("create","fai/".get_class($this),$this->dn,$this->attributes); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/profile with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index 58e8aed41..9c01f5489 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -143,7 +143,7 @@ class faiScript extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","fai/".get_class($this),$this->dn); + new log("view","fai/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -391,7 +391,7 @@ class faiScript extends plugin $use_dn = $this->dn; } - @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes); + new log("remove","fai/".get_class($this),$use_dn,$this->attributes); prepare_to_save_FAI_object($use_dn,array(),true); @@ -443,9 +443,9 @@ class faiScript extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Creating of FAI/script with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ - @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes); + new log("modify","fai/".get_class($this),$this->dn,$this->attributes); }else{ - @log::log("create","fai/".get_class($this),$this->dn,$this->attributes); + new log("create","fai/".get_class($this),$this->dn,$this->attributes); } /* Do object tagging */ diff --git a/plugins/admin/fai/class_faiTemplate.inc b/plugins/admin/fai/class_faiTemplate.inc index e0af9e9fe..e2fe6d383 100644 --- a/plugins/admin/fai/class_faiTemplate.inc +++ b/plugins/admin/fai/class_faiTemplate.inc @@ -126,7 +126,7 @@ class faiTemplate extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","fai/".get_class($this),$this->dn); + new log("view","fai/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -377,7 +377,7 @@ class faiTemplate extends plugin } prepare_to_save_FAI_object($use_dn,array(),true); - @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes); + new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->SubObjects as $name => $obj){ # $use_dn = str_ireplace( get_release_dn($this->dn), $_SESSION['faifilter']['branch'], $obj['dn']); @@ -422,9 +422,9 @@ class faiTemplate extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/template with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ - @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes); + new log("modify","fai/".get_class($this),$this->dn,$this->attributes); }else{ - @log::log("create","fai/".get_class($this),$this->dn,$this->attributes); + new log("create","fai/".get_class($this),$this->dn,$this->attributes); } /* Do object tagging */ diff --git a/plugins/admin/fai/class_faiVariable.inc b/plugins/admin/fai/class_faiVariable.inc index b31e01317..dce2b16f3 100644 --- a/plugins/admin/fai/class_faiVariable.inc +++ b/plugins/admin/fai/class_faiVariable.inc @@ -112,7 +112,7 @@ class faiVariable extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","fai/".get_class($this),$this->dn); + new log("view","fai/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -289,7 +289,7 @@ class faiVariable extends plugin } prepare_to_save_FAI_object($use_dn,array(),true); - @log::log("remove","fai/".get_class($this),$use_dn,$this->attributes); + new log("remove","fai/".get_class($this),$use_dn,$this->attributes); foreach($this->SubObjects as $name => $obj){ $use_dn = preg_replace("/".normalizePreg(get_release_dn($this->dn))."/i", $_SESSION['faifilter']['branch'], $obj['dn']); @@ -338,9 +338,9 @@ class faiVariable extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/variable with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ - @log::log("modify","fai/".get_class($this),$this->dn,$this->attributes); + new log("modify","fai/".get_class($this),$this->dn,$this->attributes); }else{ - @log::log("create","fai/".get_class($this),$this->dn,$this->attributes); + new log("create","fai/".get_class($this),$this->dn,$this->attributes); } /* Do object tagging */ diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index 753352db1..10e3294e6 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -385,7 +385,7 @@ class appgroup extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","groups/".get_class($this),$this->dn); + new log("view","groups/".get_class($this),$this->dn); } /* Check if department was selected */ @@ -923,7 +923,7 @@ class appgroup extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of groups/applications with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ @@ -979,9 +979,9 @@ class appgroup extends plugin $ldap->modify ($this->attrs); if($this->initially_was_account){ - @log::log("modify","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","group/".get_class($this),$use_dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of groups/applications with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 75d3f4218..a80ddd944 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -184,7 +184,7 @@ class group extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","groups/".get_class($this),$this->dn); + new log("view","groups/".get_class($this),$this->dn); } /* Do we represent a valid group? */ @@ -520,7 +520,7 @@ class group extends plugin $ldap->rmdir($this->dn); show_ldap_error($ldap->get_error(), sprintf(_("Removing of groups/generic with dn '%s' failed."),$this->dn)); - @log::log("remove","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); @@ -747,9 +747,9 @@ class group extends plugin $ldap->$mode($this->attrs); if($this->initially_was_account){ - @log::log("modify","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } $ret= 0; diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index e3dd2ebac..a7225c4db 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -303,7 +303,7 @@ class mailgroup extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","groups/".get_class($this),$this->dn); + new log("view","groups/".get_class($this),$this->dn); } /* Load templating engine */ @@ -692,7 +692,7 @@ class mailgroup extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Removing of groups/mail with dn '%s' failed."),$this->dn)); - @log::log("remove","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); @@ -891,9 +891,9 @@ I: Only insider delivery */ show_ldap_error($ldap->get_error(), sprintf(_("Saving of groups/mail with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ - @log::log("modify","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index 6fd51ecd3..de6a7fb56 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -281,7 +281,7 @@ class groupManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this group!")); - @log::log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ del_lock ($dn); @@ -365,7 +365,7 @@ class groupManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this group!")); - @log::log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","groups/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc index 882c2b862..22b56bc94 100644 --- a/plugins/admin/mimetypes/class_mimetypeGeneric.inc +++ b/plugins/admin/mimetypes/class_mimetypeGeneric.inc @@ -152,7 +152,7 @@ class mimetype extends plugin if(!$this->view_logged){ $this->view_logged =TRUE; - @log::log("view","mimetypes/".get_class($this),$this->dn); + new log("view","mimetypes/".get_class($this),$this->dn); } $tmp = $this->plInfo(); @@ -460,12 +460,12 @@ class mimetype extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify($this->attrs); - @log::log("modify","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of mime type/generic with dn '%s' failed."),$this->dn)); } @@ -478,7 +478,7 @@ class mimetype extends plugin $ldap = $this->config->get_ldap_link(); $ldap->rmDir($this->dn); show_ldap_error($ldap->get_error(), sprintf(_("Removing of mime type/generic with dn '%s' failed."),$this->dn)); - @log::log("remove","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc index fc87bec43..4955d2fe7 100755 --- a/plugins/admin/mimetypes/class_mimetypeManagement.inc +++ b/plugins/admin/mimetypes/class_mimetypeManagement.inc @@ -315,7 +315,7 @@ class mimetypeManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this mime type!")); - @log::log("security","mimetypes/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","mimetypes/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ del_lock ($dn); @@ -399,7 +399,7 @@ class mimetypeManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this mime type!")); - @log::log("security","mimetypes/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","mimetypes/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ diff --git a/plugins/admin/ogroups/class_mailogroup.inc b/plugins/admin/ogroups/class_mailogroup.inc index 933dbb62a..1040dc626 100644 --- a/plugins/admin/ogroups/class_mailogroup.inc +++ b/plugins/admin/ogroups/class_mailogroup.inc @@ -31,7 +31,7 @@ class mailogroup extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","ogroups/".get_class($this),$this->dn); + new log("view","ogroups/".get_class($this),$this->dn); } @@ -110,9 +110,9 @@ class mailogroup extends plugin $ldap->modify ($this->attrs); if($this->initially_was_account){ - @log::log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of object group/mail with dn '%s' failed."),$this->dn)); @@ -148,7 +148,7 @@ class mailogroup extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of object group/mail with dn '%s' failed."),$this->dn)); } diff --git a/plugins/admin/ogroups/class_ogroup.inc b/plugins/admin/ogroups/class_ogroup.inc index d9114eb4e..db39046c4 100644 --- a/plugins/admin/ogroups/class_ogroup.inc +++ b/plugins/admin/ogroups/class_ogroup.inc @@ -145,7 +145,7 @@ class ogroup extends plugin if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","ogroups/".get_class($this),$this->dn); + new log("view","ogroups/".get_class($this),$this->dn); } @@ -654,9 +654,9 @@ class ogroup extends plugin $ldap->$mode($this->attrs); if($mode == "add"){ - @log::log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } /* Trigger post signal */ @@ -678,7 +678,7 @@ class ogroup extends plugin $ldap->rmdir($this->dn); show_ldap_error($ldap->get_error(), sprintf(_("Removing of object group/generic with dn '%s' failed."),$this->dn)); - @log::log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); /* Trigger remove signal */ $this->handle_post_events("remove"); diff --git a/plugins/admin/ogroups/class_ogroupManagement.inc b/plugins/admin/ogroups/class_ogroupManagement.inc index b5ab277dc..14f9d9f97 100644 --- a/plugins/admin/ogroups/class_ogroupManagement.inc +++ b/plugins/admin/ogroups/class_ogroupManagement.inc @@ -185,7 +185,7 @@ class ogroupManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this object group!")); - @log::log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ del_lock ($dn); @@ -264,7 +264,7 @@ class ogroupManagement extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this object group!")); - @log::log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","ogroups/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc index 6f615cff1..813981e8e 100644 --- a/plugins/admin/ogroups/class_phonequeue.inc +++ b/plugins/admin/ogroups/class_phonequeue.inc @@ -157,13 +157,13 @@ class phonequeue extends plugin $cfg_Current = $this->goFonHomeServers[$this->goFonHomeServer]; $r_current = @mysql_pconnect($cfg_Current['SERVER'],$cfg_Current['LOGIN'],$cfg_Current['PASSWORD']); if(!$r_current){ - @log::log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_current)); + new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_current)); return(sprintf(_("The MySQL home server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), $cfg_Current['SERVER'],$cfg_Current['LOGIN'])); } $db_current = @mysql_select_db($cfg_Current['DB'],$r_current); if(!$db_current){ - @log::log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_current)); + new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_current)); mysql_close($r_current); return( sprintf(_("Can't select database '%s' on home server '%s'."),$cfg_Current['DB'],$cfg_Current['SERVER'])); } @@ -176,13 +176,13 @@ class phonequeue extends plugin $cfg_Init = $this->goFonHomeServers[$this->init_HomeServer] ; $r_init = @mysql_pconnect($cfg_Init['SERVER'],$cfg_Init['LOGIN'],$cfg_Init['PASSWORD']); if(!$r_init){ - @log::log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_init)); + new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_init)); return(sprintf(_("The MySQL initial home server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), $cfg_Init['SERVER'],$cfg_Init['LOGIN'])); } $db_init = @mysql_select_db($cfg_Init['DB'],$r_init); if(!$db_init){ - @log::log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_init)); + new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_init)); mysql_close($r_init); return( sprintf(_("Can't select database '%s' on initial home server '%s'."),$cfg_Init['DB'],$cfg_Init['SERVER'])); } @@ -198,7 +198,7 @@ class phonequeue extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","ogroups/".get_class($this),$this->dn); + new log("view","ogroups/".get_class($this),$this->dn); } if(isset($_POST['modify_state'])){ @@ -379,7 +379,7 @@ class phonequeue extends plugin foreach($delete as $sql){ $res = @mysql_query($sql,$res_cur); if(!$res){ - @log::log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_current)); + new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($r_current)); return(_("Error while removing old queue entries from database."). " "._("Please have a look a the gosa logfiles.")); } @@ -439,7 +439,7 @@ class phonequeue extends plugin $query = "SELECT * FROM ".$cfg_Current['QUEUE_TABLE']." WHERE name='".$this->old_cn."';"; $res = mysql_query($query,$res_cur); if(!$res){ - @log::log("debug","ogroups/".get_class($this),"",array(),@mysql_error($res_cur)); + new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($res_cur)); return(_("Could not detect old queue entry, query failed.")." "._("Please have a look a the gosa logfiles.")); } $cnt = mysql_affected_rows($res_cur); @@ -734,7 +734,7 @@ class phonequeue extends plugin foreach($SQL as $query) $res = mysql_query($query,$res_cur); if(!$res){ - @log::log("debug","ogroups/".get_class($this),"",array(),@mysql_error($res_cur)); + new log("debug","ogroups/".get_class($this),"",array(),@mysql_error($res_cur)); return(_("Mysql query failed.")." "._("Please have a look a the gosa logfiles.")); } } @@ -835,9 +835,9 @@ class phonequeue extends plugin $ldap->modify ($this->attrs); if($this->initially_was_account){ - @log::log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), _("Saving phone queue failed")); @@ -892,7 +892,7 @@ class phonequeue extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), _("Removing phone queue failed")); } diff --git a/plugins/admin/ogroups/class_termgroup.inc b/plugins/admin/ogroups/class_termgroup.inc index a05c6a1c0..aa913640d 100644 --- a/plugins/admin/ogroups/class_termgroup.inc +++ b/plugins/admin/ogroups/class_termgroup.inc @@ -129,7 +129,7 @@ class termgroup extends plugin $ldap->cd($this->orig_dn); $ldap->modify($this->attrs); $this->handle_post_events("remove"); - @log::log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } @@ -177,7 +177,7 @@ class termgroup extends plugin if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","ogroups/".get_class($this),$this->dn); + new log("view","ogroups/".get_class($this),$this->dn); } /*************** @@ -369,9 +369,9 @@ class termgroup extends plugin $ldap->modify ($this->attrs); if($this->initially_was_account){ - @log::log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } if(!$this->didAction){ diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc index ef4308c47..20bb0c098 100644 --- a/plugins/admin/systems/class_componentGeneric.inc +++ b/plugins/admin/systems/class_componentGeneric.inc @@ -48,7 +48,7 @@ class componentGeneric extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","component/".get_class($this),$this->dn); + new log("view","component/".get_class($this),$this->dn); } /* Do we represent a valid phone? */ @@ -130,7 +130,7 @@ class componentGeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap->rmdir($this->dn); - @log::log("remove","component/".get_class($this),$this->dn,$this->attributes,$ldap->get_error()); + new log("remove","component/".get_class($this),$this->dn,$this->attributes,$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system component/generic with dn '%s' failed."),$this->dn)); $this->handle_post_events(array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); @@ -240,7 +240,7 @@ class componentGeneric extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","component/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","component/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); } else { @@ -251,7 +251,7 @@ class componentGeneric extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","component/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","component/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); } diff --git a/plugins/admin/systems/class_glpiAccount.inc b/plugins/admin/systems/class_glpiAccount.inc index 03e5712db..2859930ea 100644 --- a/plugins/admin/systems/class_glpiAccount.inc +++ b/plugins/admin/systems/class_glpiAccount.inc @@ -121,7 +121,7 @@ class glpiAccount extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","all/".get_class($this),$this->dn); + new log("view","all/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -673,11 +673,11 @@ class glpiAccount extends plugin $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']); if($this->initially_was_account){ $this->handle->removeComputerInformations($this->dn); - @log::log("remove","undefined/".get_class($this),$this->dn); + new log("remove","undefined/".get_class($this),$this->dn); } }else{ print_red(_("Can't remove glpi account, while mysql extension is missing.")); - @log::log("remove","undefined/".get_class($this),$this->dn,array(),_("Can't remove glpi account, while mysql extension is missing.")); + new log("remove","undefined/".get_class($this),$this->dn,array(),_("Can't remove glpi account, while mysql extension is missing.")); } } @@ -737,10 +737,10 @@ class glpiAccount extends plugin /* check if we have to update, add */ if($this->initially_was_account&&$this->is_account){ $this->handle->updateComputerInformations($attrs,$this->orig_dn); - @log::log("modify","undefined/".get_class($this),$this->dn); + new log("modify","undefined/".get_class($this),$this->dn); }elseif($this->is_account){ $this->handle->addComputerInformations($attrs,$this->dn); - @log::log("create","undefined/".get_class($this),$this->dn); + new log("create","undefined/".get_class($this),$this->dn); } $tmp = $this->handle->getComputerInformations($this->dn); $this->handle->addDevicesToComputer($this->usedDevices,$tmp[0]['ID']); diff --git a/plugins/admin/systems/class_glpiPrinterAccount.inc b/plugins/admin/systems/class_glpiPrinterAccount.inc index dd69e2301..9645a1e0b 100644 --- a/plugins/admin/systems/class_glpiPrinterAccount.inc +++ b/plugins/admin/systems/class_glpiPrinterAccount.inc @@ -136,7 +136,7 @@ class glpiPrinterAccount extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","printer/".get_class($this),$this->dn); + new log("view","printer/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -656,7 +656,7 @@ class glpiPrinterAccount extends plugin $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']); if($this->initially_was_account){ $this->handle->removePrinterInformations($this->dn); - @log::log("remove","printer/".get_class($this),$this->dn); + new log("remove","printer/".get_class($this),$this->dn); } } @@ -717,10 +717,10 @@ class glpiPrinterAccount extends plugin $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']); if($this->initially_was_account&&$this->is_account){ $this->handle->updatePrinterInformations($attrs,$this->dn); - @log::log("modify","printer/".get_class($this),$this->dn); + new log("modify","printer/".get_class($this),$this->dn); }elseif($this->is_account){ $this->handle->addPrinterInformations($attrs,$this->dn); - @log::log("create","printer/".get_class($this),$this->dn); + new log("create","printer/".get_class($this),$this->dn); } $tmp = $this->handle->getPrinterInformations($this->dn); $this->handle->addAttachmentsToPrinter($this->usedAttachments,$tmp[0]['ID']); diff --git a/plugins/admin/systems/class_goCupsServer.inc b/plugins/admin/systems/class_goCupsServer.inc index b5d282a01..e4e3f8b98 100644 --- a/plugins/admin/systems/class_goCupsServer.inc +++ b/plugins/admin/systems/class_goCupsServer.inc @@ -34,7 +34,7 @@ class goCupsServer extends goService{ { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $smarty = get_smarty(); diff --git a/plugins/admin/systems/class_goFaxServer.inc b/plugins/admin/systems/class_goFaxServer.inc index c791b6eb8..074df7086 100644 --- a/plugins/admin/systems/class_goFaxServer.inc +++ b/plugins/admin/systems/class_goFaxServer.inc @@ -39,7 +39,7 @@ class goFaxServer extends goService { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /* Assign acls */ diff --git a/plugins/admin/systems/class_goFonServer.inc b/plugins/admin/systems/class_goFonServer.inc index 7457444c8..7408a7800 100644 --- a/plugins/admin/systems/class_goFonServer.inc +++ b/plugins/admin/systems/class_goFonServer.inc @@ -40,7 +40,7 @@ class goFonServer extends goService{ { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $smarty = get_smarty(); diff --git a/plugins/admin/systems/class_goGlpiServer.inc b/plugins/admin/systems/class_goGlpiServer.inc index ec35b1f24..83ee39ef9 100644 --- a/plugins/admin/systems/class_goGlpiServer.inc +++ b/plugins/admin/systems/class_goGlpiServer.inc @@ -39,7 +39,7 @@ class goGlpiServer extends goService { { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $smarty = get_smarty(); diff --git a/plugins/admin/systems/class_goImapServer.inc b/plugins/admin/systems/class_goImapServer.inc index d08972ca7..3fb4fe957 100644 --- a/plugins/admin/systems/class_goImapServer.inc +++ b/plugins/admin/systems/class_goImapServer.inc @@ -63,7 +63,7 @@ class goImapServer extends goService { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /* set new status */ diff --git a/plugins/admin/systems/class_goKrbServer.inc b/plugins/admin/systems/class_goKrbServer.inc index 51802b1cd..e49c2ba4f 100644 --- a/plugins/admin/systems/class_goKrbServer.inc +++ b/plugins/admin/systems/class_goKrbServer.inc @@ -38,7 +38,7 @@ class goKrbServer extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $tmp = $this->plinfo(); diff --git a/plugins/admin/systems/class_goLdapServer.inc b/plugins/admin/systems/class_goLdapServer.inc index b8d151ee3..7e35f52e3 100644 --- a/plugins/admin/systems/class_goLdapServer.inc +++ b/plugins/admin/systems/class_goLdapServer.inc @@ -35,7 +35,7 @@ class goLdapServer extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $smarty = get_smarty(); diff --git a/plugins/admin/systems/class_goLogDBServer.inc b/plugins/admin/systems/class_goLogDBServer.inc index a28990812..4d95ca872 100644 --- a/plugins/admin/systems/class_goLogDBServer.inc +++ b/plugins/admin/systems/class_goLogDBServer.inc @@ -38,7 +38,7 @@ class goLogDBServer extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $tmp = $this->plInfo(); diff --git a/plugins/admin/systems/class_goMailServer.inc b/plugins/admin/systems/class_goMailServer.inc index 25d2fd827..251d2e53b 100644 --- a/plugins/admin/systems/class_goMailServer.inc +++ b/plugins/admin/systems/class_goMailServer.inc @@ -195,7 +195,7 @@ class goMailServer extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $tmp = $this->plInfo(); @@ -583,10 +583,10 @@ class goMailServer extends goService{ show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/mail with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ $this->handle_post_events("modify"); - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_goNtpServer.inc b/plugins/admin/systems/class_goNtpServer.inc index 26434eefb..bba487bc3 100644 --- a/plugins/admin/systems/class_goNtpServer.inc +++ b/plugins/admin/systems/class_goNtpServer.inc @@ -46,7 +46,7 @@ class goNtpServer extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /* Here we add a new entry */ @@ -99,10 +99,10 @@ class goNtpServer extends goService{ show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/goNtpServer with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ $this->handle_post_events("modify"); - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_goService.inc b/plugins/admin/systems/class_goService.inc index bf4b63bcb..49c44125f 100644 --- a/plugins/admin/systems/class_goService.inc +++ b/plugins/admin/systems/class_goService.inc @@ -32,7 +32,7 @@ class goService extends plugin{ { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $str ="
". @@ -97,7 +97,7 @@ class goService extends plugin{ } - @log::log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of server services/".get_class($this)." - (".$this->DisplayName.") with dn '%s' failed."),$this->dn)); $this->handle_post_events("remove"); @@ -119,11 +119,11 @@ class goService extends plugin{ $ldap->add($this->attrs); } if($this->initially_was_account){ - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("modify"); }else{ $this->handle_post_events("add"); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/".get_class($this)." - (".$this->DisplayName.") with dn '%s' failed."),$this->dn)); } diff --git a/plugins/admin/systems/class_goShareServer.inc b/plugins/admin/systems/class_goShareServer.inc index 315a6e26a..d12c5a07b 100644 --- a/plugins/admin/systems/class_goShareServer.inc +++ b/plugins/admin/systems/class_goShareServer.inc @@ -57,7 +57,7 @@ class goShareServer extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } @@ -193,10 +193,10 @@ class goShareServer extends goService{ show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/shares with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ $this->handle_post_events("modify"); - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_goSpamServer.inc b/plugins/admin/systems/class_goSpamServer.inc index 55781fbba..329522fa7 100644 --- a/plugins/admin/systems/class_goSpamServer.inc +++ b/plugins/admin/systems/class_goSpamServer.inc @@ -91,7 +91,7 @@ class gospamserver extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /* If displayed, it is ever true*/ @@ -276,10 +276,10 @@ class gospamserver extends goService{ } if($this->initially_was_account){ $this->handle_post_events("modify"); - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/spamassassin with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/systems/class_goSpamServerRule.inc b/plugins/admin/systems/class_goSpamServerRule.inc index 2adc6886e..e0935bc2e 100644 --- a/plugins/admin/systems/class_goSpamServerRule.inc +++ b/plugins/admin/systems/class_goSpamServerRule.inc @@ -22,7 +22,7 @@ class goSpamServerRule extends plugin { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } foreach($this->attributes as $attr){ diff --git a/plugins/admin/systems/class_goSyslogServer.inc b/plugins/admin/systems/class_goSyslogServer.inc index 4c242a329..b94093026 100644 --- a/plugins/admin/systems/class_goSyslogServer.inc +++ b/plugins/admin/systems/class_goSyslogServer.inc @@ -34,7 +34,7 @@ class goSyslogServer extends goService{ { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } diff --git a/plugins/admin/systems/class_goTerminalServer.inc b/plugins/admin/systems/class_goTerminalServer.inc index d6afed9fa..21b721b76 100644 --- a/plugins/admin/systems/class_goTerminalServer.inc +++ b/plugins/admin/systems/class_goTerminalServer.inc @@ -39,7 +39,7 @@ class goTerminalServer extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } @@ -85,10 +85,10 @@ class goTerminalServer extends goService{ show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/terminalServer with dn '%s' failed."),$this->dn)); if($this->initially_was_account){ $this->handle_post_events("modify"); - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_goVirusServer.inc b/plugins/admin/systems/class_goVirusServer.inc index 287f915d5..7e02b9701 100644 --- a/plugins/admin/systems/class_goVirusServer.inc +++ b/plugins/admin/systems/class_goVirusServer.inc @@ -66,7 +66,7 @@ class govirusserver extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } @@ -147,10 +147,10 @@ class govirusserver extends goService{ } if($this->initially_was_account){ $this->handle_post_events("modify"); - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ $this->handle_post_events("add"); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/anti virus with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/systems/class_gosaLogServer.inc b/plugins/admin/systems/class_gosaLogServer.inc index 6bb2b60ce..4f40407a9 100644 --- a/plugins/admin/systems/class_gosaLogServer.inc +++ b/plugins/admin/systems/class_gosaLogServer.inc @@ -35,7 +35,7 @@ class gosaLogServer extends goService{ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } $tmp = $this->plInfo(); diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc index aa78ad9e0..c5d35fe87 100644 --- a/plugins/admin/systems/class_phoneGeneric.inc +++ b/plugins/admin/systems/class_phoneGeneric.inc @@ -115,7 +115,7 @@ class phoneGeneric extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","phone/".get_class($this),$this->dn); + new log("view","phone/".get_class($this),$this->dn); } /* Do we represent a valid phone? */ @@ -273,7 +273,7 @@ class phoneGeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap->rmdir($this->dn); - @log::log("remove","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system phone/generic with dn '%s' failed."),$this->dn)); $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); @@ -401,7 +401,7 @@ class phoneGeneric extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); } else { if ($this->orig_dn != $this->dn){ @@ -411,7 +411,7 @@ class phoneGeneric extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); // $user_phone_reload $ldap->cd ($this->config->current['BASE']); diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 52ae6e345..2dfbc4cd4 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -255,7 +255,7 @@ class printgeneric extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","printer/".get_class($this),$this->dn); + new log("view","printer/".get_class($this),$this->dn); } @@ -594,7 +594,7 @@ class printgeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap->rmdir($this->dn); - @log::log("remove","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system print/generic with dn '%s' failed."),$this->dn)); $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); @@ -832,13 +832,13 @@ class printgeneric extends plugin $ldap->add($this->attrs); $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); - @log::log("create","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } else { $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); - @log::log("modify","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of system print/generic with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/systems/class_servDHCP.inc b/plugins/admin/systems/class_servDHCP.inc index 5f04fbbf1..42eaf2b9c 100644 --- a/plugins/admin/systems/class_servDHCP.inc +++ b/plugins/admin/systems/class_servDHCP.inc @@ -25,7 +25,7 @@ class servdhcp extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /* Fill templating stuff */ @@ -54,7 +54,7 @@ class servdhcp extends plugin function remove_from_parent() { /* This cannot be removed... */ - @log::log("remove","unknown/".get_class($this),$this->dn); + new log("remove","unknown/".get_class($this),$this->dn); } @@ -79,7 +79,7 @@ class servdhcp extends plugin function save() { plugin::save(); - @log::log("modfiy","unknown/".get_class($this),$this->dn); + new log("modfiy","unknown/".get_class($this),$this->dn); /* Optionally execute a command after we're done */ #$this->handle_post_events($mode); diff --git a/plugins/admin/systems/class_servDNS.inc b/plugins/admin/systems/class_servDNS.inc index 485eede2b..50cdb38d0 100644 --- a/plugins/admin/systems/class_servDNS.inc +++ b/plugins/admin/systems/class_servDNS.inc @@ -63,7 +63,7 @@ class servdns extends goService if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /* Fill templating stuff @@ -300,7 +300,7 @@ class servdns extends goService foreach($tmp['zoneUpdates'] as $dn => $attrs){ $ldap->cd($dn); $ldap->modify($attrs); - @log::log("modfiy","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modfiy","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Updating of system server/dns with dn '%s' failed."),$this->dn)); } } @@ -310,7 +310,7 @@ class servdns extends goService foreach($tmp['del'] as $dn => $del){ $ldap->cd($dn); $ldap->rmdir_recursive($dn); - @log::log("remove","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/dns with dn '%s' failed."),$this->dn)); } diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index a9e93f5a5..d44b6763b 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -92,7 +92,7 @@ class servgeneric extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /* Do we represent a valid server? */ @@ -240,7 +240,7 @@ class servgeneric extends plugin $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); - @log::log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/generic with dn '%s' failed."),$this->dn)); @@ -334,7 +334,7 @@ class servgeneric extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $mode= "add"; } else { @@ -354,7 +354,7 @@ class servgeneric extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $mode= "modify"; } diff --git a/plugins/admin/systems/class_servKolab.inc b/plugins/admin/systems/class_servKolab.inc index 8c8198442..aa57ad1ae 100644 --- a/plugins/admin/systems/class_servKolab.inc +++ b/plugins/admin/systems/class_servKolab.inc @@ -87,7 +87,7 @@ class servkolab extends goService { if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /*************** @@ -214,7 +214,7 @@ class servkolab extends goService { show_ldap_error($ldap->get_error(), sprintf(_("Removing host entry from system server/kolab with dn '%s' failed."),$this->dn)); } - @log::log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); @@ -351,9 +351,9 @@ class servkolab extends goService { $ldap->$mode($this->attrs); if($mode == "add"){ - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving system server/kolab with dn '%s' failed."),$this->dn)); diff --git a/plugins/admin/systems/class_servNfs.inc b/plugins/admin/systems/class_servNfs.inc index 15d15f68b..fbacff142 100644 --- a/plugins/admin/systems/class_servNfs.inc +++ b/plugins/admin/systems/class_servNfs.inc @@ -86,7 +86,7 @@ class servnfs extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } /* Fill templating stuff */ diff --git a/plugins/admin/systems/class_servRepository.inc b/plugins/admin/systems/class_servRepository.inc index 27bb610f7..e188062e5 100644 --- a/plugins/admin/systems/class_servRepository.inc +++ b/plugins/admin/systems/class_servRepository.inc @@ -93,7 +93,7 @@ class servrepository extends goService if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","server/".get_class($this),$this->dn); + new log("view","server/".get_class($this),$this->dn); } if(!$this->fai_activated){ @@ -354,9 +354,9 @@ class servrepository extends goService } if($this->initially_was_account){ - @log::log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index b3e614ea4..f20efe5a8 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -405,7 +405,7 @@ class systems extends plugin $attrs['gotoRootPasswd']= crypt($_POST['new_password'],substr(session_id(),0,2)); } $ldap->modify($attrs); - @log::log("security","systems/".get_class($this),$this->dn,array_keys($attrs),$ldap->get_error()); + new log("security","systems/".get_class($this),$this->dn,array_keys($attrs),$ldap->get_error()); }else{ print_red(_("You are not allowed to change the password for this object.")); } @@ -519,7 +519,7 @@ class systems extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this component!")); - @log::log("security","systems/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","systems/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ del_lock ($dn); @@ -653,7 +653,7 @@ class systems extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this component!")); - @log::log("security","systems/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","systems/".get_class($this),$dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index d6b04fff5..f12666aa6 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -97,7 +97,7 @@ class termDNS extends plugin $this->initially_was_account = $this->DNS_is_account; if($this->DNS_is_account){ - @log::log("view","unknown/".get_class($this),$this->dn); + new log("view","unknown/".get_class($this),$this->dn); } } @@ -271,7 +271,7 @@ class termDNS extends plugin foreach($tmp['del'] as $dn => $del){ $ldap->cd($dn); $ldap->rmdir_recursive($dn); - @log::log("remove","unknown/".get_class($this),$dn); + new log("remove","unknown/".get_class($this),$dn); } } } @@ -486,7 +486,7 @@ class termDNS extends plugin } } - @log::log("modify","unknown/".get_class($this),$dn,array_keys($attrs),$ldap->get_error()); + new log("modify","unknown/".get_class($this),$dn,array_keys($attrs),$ldap->get_error()); /* Display errors */ diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 312b6f6cd..36afa8cbe 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -146,7 +146,7 @@ class termgeneric extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","terminal/".get_class($this),$this->dn); + new log("view","terminal/".get_class($this),$this->dn); } /* Do we need to flip is_account state? */ @@ -352,7 +352,7 @@ class termgeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap->rmDir($this->dn); - @log::log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of object system terminal/generic with dn '%s' failed."),$this->dn)); @@ -519,13 +519,13 @@ class termgeneric extends plugin unset($this->attrs['gotoNtpServer']); } $ldap->add($this->attrs); - @log::log("create","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); } else { $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); } diff --git a/plugins/admin/systems/class_terminalInfo.inc b/plugins/admin/systems/class_terminalInfo.inc index ae731aec9..7ce3d2bb9 100644 --- a/plugins/admin/systems/class_terminalInfo.inc +++ b/plugins/admin/systems/class_terminalInfo.inc @@ -64,7 +64,7 @@ class terminfo extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","terminal/".get_class($this),$this->dn); + new log("view","terminal/".get_class($this),$this->dn); } /* Do we represent a valid terminal? */ diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc index 25751532b..5f798720c 100644 --- a/plugins/admin/systems/class_terminalService.inc +++ b/plugins/admin/systems/class_terminalService.inc @@ -253,7 +253,7 @@ class termservice extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","terminal/".get_class($this),$this->dn); + new log("view","terminal/".get_class($this),$this->dn); } /* Do we need to flip is_account state? */ @@ -352,7 +352,7 @@ class termservice extends plugin function remove_from_parent() { - @log::log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs)); + new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs)); $this->handle_post_events("remove"); } @@ -460,7 +460,7 @@ class termservice extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/service with dn '%s' failed."),$this->dn)); $this->handle_post_events("modify"); diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index 7c4533480..fa71aba61 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -154,7 +154,7 @@ class termstartup extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","terminal/".get_class($this),$this->dn); + new log("view","terminal/".get_class($this),$this->dn); } /* Do we need to flip is_account state? */ @@ -295,7 +295,7 @@ class termstartup extends plugin { if($this->acl_is_removeable()){ $this->handle_post_events("remove"); - @log::log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs)); + new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs)); } } @@ -405,7 +405,7 @@ class termstartup extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Saving of system terminal/startup with dn '%s' failed."),$this->dn)); $this->handle_post_events("modify"); diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc index 020256dd2..dcf6e2051 100644 --- a/plugins/admin/systems/class_winGeneric.inc +++ b/plugins/admin/systems/class_winGeneric.inc @@ -86,7 +86,7 @@ class wingeneric extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","winworkstation/".get_class($this),$this->dn); + new log("view","winworkstation/".get_class($this),$this->dn); } @@ -151,7 +151,7 @@ class wingeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); - @log::log("remove","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system wingeneric/generic with dn '%s' failed."),$this->dn)); $this->handle_post_events("remove"); @@ -251,7 +251,7 @@ class wingeneric extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("add"); } else { if ($this->orig_dn != $this->dn){ @@ -261,7 +261,7 @@ class wingeneric extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("modify"); } diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index d28d106bc..26050acde 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -152,7 +152,7 @@ class workgeneric extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","workstation/".get_class($this),$this->dn); + new log("view","workstation/".get_class($this),$this->dn); } /* Do we need to flip is_account state? */ @@ -338,7 +338,7 @@ class workgeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); - @log::log("remove","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system workstation/generic with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ @@ -498,7 +498,7 @@ class workgeneric extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn)); if(!$this->didAction){ $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); @@ -510,7 +510,7 @@ class workgeneric extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); if(!$this->didAction){ $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber)); diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc index 370253fbe..d0d45262f 100644 --- a/plugins/admin/systems/class_workstationService.inc +++ b/plugins/admin/systems/class_workstationService.inc @@ -244,7 +244,7 @@ class workservice extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","workstation/".get_class($this),$this->dn); + new log("view","workstation/".get_class($this),$this->dn); } /* Do we need to flip is_account state? */ @@ -350,7 +350,7 @@ class workservice extends plugin function remove_from_parent() { $this->handle_post_events("remove"); - @log::log("remove","workstation/".get_class($this),$this->dn); + new log("remove","workstation/".get_class($this),$this->dn); } /* Save data to object */ @@ -447,7 +447,7 @@ class workservice extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/service with dn '%s' failed."),$this->dn)); $this->handle_post_events("modify"); } diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index 4ce45768e..6991b3bb7 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -490,7 +490,7 @@ class workstartup extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","workstation/".get_class($this),$this->dn); + new log("view","workstation/".get_class($this),$this->dn); } /* Do we need to flip is_account state? */ @@ -810,7 +810,7 @@ class workstartup extends plugin function remove_from_parent() { $this->handle_post_events("remove"); - @log::log("remove","workstation/".get_class($this),$this->dn); + new log("remove","workstation/".get_class($this),$this->dn); } function generateDNSyn($release) @@ -1092,7 +1092,7 @@ class workstartup extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/startup with dn '%s' failed."),$this->dn)); $this->handle_post_events("modify"); diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 7f02cf168..63ba95115 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -258,7 +258,7 @@ class userManagement extends plugin if (isset($config->data['MAIN']['EXTERNALPWDHOOK'])){ exec($config->data['MAIN']['EXTERNALPWDHOOK']." ".$username." ".$_POST['new_password'], $resarr); } - @log::log("modify","users/".get_class($this),$this->usertab->dn,array(),"Password has been changed"); + new log("modify","users/".get_class($this),$this->usertab->dn,array(),"Password has been changed"); unset($this->usertab); $this->usertab= NULL; } @@ -268,7 +268,7 @@ class userManagement extends plugin exec($config->data['MAIN']['EXTERNALPWDHOOK']." ".$username." ".$_POST['new_password'], $resarr); } - @log::log("modify","users/".get_class($this),$this->dn,array(),"Password has been changed"); + new log("modify","users/".get_class($this),$this->dn,array(),"Password has been changed"); } } else { @@ -345,7 +345,7 @@ class userManagement extends plugin } else { print_red (sprintf(_("You are not allowed to delete the user '%s'!"),$dn)); if(isset($this->ui->uid)){ - @log::log("security","users/".get_class($this),$dn,array(),"Tried to trick deletion."); + new log("security","users/".get_class($this),$dn,array(),"Tried to trick deletion."); } } /* Remove lock file after successfull deletion */ @@ -422,7 +422,7 @@ class userManagement extends plugin print_red (_("You are not allowed to delete this user!")); if(isset($this->ui->uid)){ - @log::log("security","users/".get_class($this),$this->dn,array(),"Tried to trick deletion."); + new log("security","users/".get_class($this),$this->dn,array(),"Tried to trick deletion."); } } diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index 8c9fde577..277622633 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -326,7 +326,7 @@ class blocklist extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* set Account states, this is nescessary for get_allowed_bases */ @@ -525,7 +525,7 @@ class blocklist extends plugin $ldap= $this->config->get_ldap_link(); $ldap->rmDir($this->dn); - @log::log("remove","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of blocklist with dn '%s' failed."),$this->dn)); $this->clear_fields(); @@ -631,14 +631,14 @@ class blocklist extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify($this->attrs); - @log::log("modify","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("modify"); } else { $ldap->cd($this->config->current['BASE']); $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - @log::log("create","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events("add"); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of blocklist with dn '%s' failed."),$this->dn)); diff --git a/plugins/gofax/faxaccount/class_gofaxAccount.inc b/plugins/gofax/faxaccount/class_gofaxAccount.inc index 50a3c9b37..985c13e07 100644 --- a/plugins/gofax/faxaccount/class_gofaxAccount.inc +++ b/plugins/gofax/faxaccount/class_gofaxAccount.inc @@ -116,7 +116,7 @@ class gofaxAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Hickert : 11.11.05 @@ -629,7 +629,7 @@ class gofaxAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/fax account with dn '%s' failed."),$this->dn)); @@ -753,9 +753,9 @@ class gofaxAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/fax account with dn '%s' failed."),$this->dn)); diff --git a/plugins/gofax/faxreports/class_faxreport.inc b/plugins/gofax/faxreports/class_faxreport.inc index 2bc248c5d..d0d2b18ff 100644 --- a/plugins/gofax/faxreports/class_faxreport.inc +++ b/plugins/gofax/faxreports/class_faxreport.inc @@ -68,7 +68,7 @@ class faxreport extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /************ diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index 41e574419..4eba32b46 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -151,7 +151,7 @@ class conference extends plugin /* Log last action */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","gofonconference/".get_class($this),$this->dn); + new log("view","gofonconference/".get_class($this),$this->dn); } $smarty= get_smarty(); @@ -256,7 +256,7 @@ class conference extends plugin $ldap->cd ($this->dn); $ldap->recursive_remove(); - @log::log("remove","gofonconference/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","gofonconference/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -315,14 +315,14 @@ class conference extends plugin $cfg_Current = $this->goFonHomeServers[$this->goFonHomeServer]; $r_current = @mysql_pconnect($cfg_Current['SERVER'],$cfg_Current['LOGIN'],$cfg_Current['PASSWORD']); if(!$r_current){ - @log::log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_current)); + new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_current)); return(sprintf(_("The MySQL home server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), $cfg_Current['SERVER'],$cfg_Current['LOGIN'])); } $db_current = @mysql_select_db($cfg_Current['DB'],$r_current); if(!$db_current){ - @log::log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_current)); + new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_current)); mysql_close($r_current); return( sprintf(_("Can't select database '%s' on home server '%s'."),$cfg_Current['DB'],$cfg_Current['SERVER'])); } @@ -335,14 +335,14 @@ class conference extends plugin $cfg_Init = $this->goFonHomeServers[$this->init_HomeServer] ; $r_init = @mysql_pconnect($cfg_Init['SERVER'],$cfg_Init['LOGIN'],$cfg_Init['PASSWORD']); if(!$r_init){ - @log::log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); + new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); return(sprintf(_("The MySQL initial home server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), $cfg_Init['SERVER'],$cfg_Init['LOGIN'])); } $db_init = @mysql_select_db($cfg_Init['DB'],$r_init); if(!$db_init){ - @log::log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); + new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); mysql_close($r_init); return( sprintf(_("Can't select database '%s' on initial home server '%s'."),$cfg_Init['DB'],$cfg_Init['SERVER'])); } @@ -431,7 +431,7 @@ class conference extends plugin $query = "SELECT id FROM ".$cfg_Current['EXT_TABLE']." WHERE exten='".$this->telephoneNumber."' OR '".$this->cn."';"; $res = @mysql_query($query,$res_cur); if(!$res){ - @log::log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($res_cur)); + new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($res_cur)); return(_("Can not check if there are already some entries with given telephone number and/or cn in the destination home server."). " "._("Please have a look a the gosa logfiles.")); } @@ -443,7 +443,7 @@ class conference extends plugin /* Query and ensure that everything went fine */ $res = @mysql_query($SQL,$res_cur); if(!$res){ - @log::log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($res_cur)); + new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($res_cur)); return(_("Can not remove entries with some telephone number and/or cn from destination home server."). " "._("Please have a look a the gosa logfiles.")); } @@ -561,7 +561,7 @@ class conference extends plugin $query = "SELECT id FROM ".$cfg_Init['EXT_TABLE']." WHERE exten='".$this->old_tele_number."' OR '".$this->old_cn."';"; $res = @mysql_query($query,$r_init); if(!$res){ - @log::log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); + new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); return(_("Can not check if entry exists in old database. Please have a look a the gosa logfiles.")); } @@ -574,7 +574,7 @@ class conference extends plugin /* Query and ensure that everything went fine */ $res = @mysql_query($SQL,$r_init); if(!$res){ - @log::log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); + new log("debug","gofonconference/".get_class($this),"",array(),@mysql_error($r_init)); return(_("Can not remove old entries from initial home server. Please have a look a the gosa logfiles.")); } @@ -673,9 +673,9 @@ class conference extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","gofonconference/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","gofonconference/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","gofonconference/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","gofonconference/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of goFonConference/generic with dn '%s' failed."),$this->dn)); diff --git a/plugins/gofon/fonreports/class_fonreport.inc b/plugins/gofon/fonreports/class_fonreport.inc index 7c58872b4..dc72ddd94 100644 --- a/plugins/gofon/fonreports/class_fonreport.inc +++ b/plugins/gofon/fonreports/class_fonreport.inc @@ -107,7 +107,7 @@ class fonreport extends plugin /* Log view */ if(!$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","gofon/".get_class($this),$this->dn); + new log("view","gofon/".get_class($this),$this->dn); } /***************** diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index 3163ec45a..05f761b0d 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -100,7 +100,7 @@ class macro extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","gofonmacro/".get_class($this),$this->dn); + new log("view","gofonmacro/".get_class($this),$this->dn); } /* Variables */ @@ -200,13 +200,13 @@ class macro extends plugin foreach($this->goFonHomeServers as $goFonHomeServer => $cfg_Current){ $r_current = @mysql_pconnect($cfg_Current['SERVER'],$cfg_Current['LOGIN'],$cfg_Current['PASSWORD']); if(!$r_current){ - @log::log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); + new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); return(sprintf(_("The MySQL home server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), $cfg_Current['SERVER'],$cfg_Current['LOGIN'])); } $db_current = @mysql_select_db($cfg_Current['DB'],$r_current); if(!$db_current){ - @log::log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); + new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); mysql_close($r_current); return( sprintf(_("Can't select database '%s' on home server '%s'."),$cfg_Current['DB'],$cfg_Current['SERVER'])); } @@ -237,7 +237,7 @@ class macro extends plugin $db_current = @mysql_select_db($Server['DB'],$r_current); $res = @mysql_query($query,$r_current); if(!$res){ - @log::log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); + new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_current)); return(sprintf(_("Removing macro from '%s' failed. Check GOsa log for mysql error."),$Server['SERVER'])); } @mysql_close($r_current); @@ -345,7 +345,7 @@ class macro extends plugin $query = preg_replace("/%TABLENAME%/",$cfg['EXT_TABLE'],$sql); $res = @mysql_query($query,$r_con); if(!$res){ - @log::log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_con)); + new log("debug","gofonmacro/".get_class($this),"",array(),@mysql_error($r_con)); return(sprintf(_("Insert of new macro failed for server '%s'."),$cfg['SERVER'])); } @mysql_close($r_con); @@ -488,7 +488,7 @@ class macro extends plugin /* Remove phone macro */ $ldap->rmDir($this->dn); - @log::log("remove","gofonmacro/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","gofonmacro/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of goFonMacro/generic account with dn '%s' failed."),$this->dn)); /* Delete references to object groups */ @@ -536,9 +536,9 @@ class macro extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","gofonmacro/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","gofonmacro/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","gofonmacro/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","gofonmacro/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } } } diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index 8312702cb..f7a0e337f 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -314,7 +314,7 @@ class gofonMacro extends plugin /* Normally this shouldn't be reached, send some extra logs to notify the administrator */ print_red (_("You are not allowed to delete this macro!")); - @log::log("security","gofonmacro/".get_class($this),$this->dn,array(),"Tried to trick deletion."); + new log("security","gofonmacro/".get_class($this),$this->dn,array(),"Tried to trick deletion."); } /* Remove lock file after successfull deletion */ del_lock ($this->dn); diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 61ae399ed..0387abb0f 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -119,12 +119,12 @@ class phoneAccount extends plugin if(!$r_con){ print_red( sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), $cur_cfg['SERVER'],$cur_cfg['LOGIN'])); - @log::log("debug","gofonreport/".get_class($this),"",array(),@mysql_error()); + new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error()); } $db = @mysql_select_db($cur_cfg['DB'],$r_con); if(!$db){ print_red(sprintf(_("Can't select database %s on %s."),$cur_cfg['DB'],$cur_cfg['SERVER'])); - @log::log("debug","gofonreport/".get_class($this),"",array(),@mysql_error()); + new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error()); } $first = false; @@ -436,7 +436,7 @@ class phoneAccount extends plugin $this->generate_error = sprintf( _("The MySQL Server '%s' isn't reachable as user '%s'. Abort saving entries to keep the database consistent, check GOsa log for mysql error."), $a_New['SERVER'],$a_New['LOGIN']); - @log::log("debug","gofonreport/".get_class($this),"",array(),@mysql_error($new_connection)); + new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error($new_connection)); return false; } $new_database = @mysql_select_db($a_New['DB'],$new_connection); @@ -444,7 +444,7 @@ class phoneAccount extends plugin $this->generate_error = sprintf( _("Can't select database %s on %s. Abort saving entries to keep the database consistent, check GOsa log for mysql error."), $a_New['DB'],$a_New['SERVER']); - @log::log("debug","gofonreport/".get_class($this),"",array(),@mysql_error($new_connection)); + new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error($new_connection)); return false; } @@ -463,7 +463,7 @@ class phoneAccount extends plugin $this->generate_error = sprintf( _("The old MySQL home server '%s' isn't reachable as user '%s'. Abort saving entries to keep the database consistent, check GOsa log for mysql error."), $a_Remove['SERVER'],$a_Remove['LOGIN']); - @log::log("debug","gofonreport/".get_class($this),"",array(),@mysql_error($old_connection)); + new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error($old_connection)); return false; } $old_database = @mysql_select_db($a_Remove['DB'],$old_connection); @@ -471,7 +471,7 @@ class phoneAccount extends plugin $this->generate_error = sprintf( _("Can't select database %s on %s. Abort saving entries to keep the database consistent, check GOsa log for mysql error."), $a_Remove['DB'],$a_Remove['SERVER']); - @log::log("debug","gofonreport/".get_class($this),"",array(),@mysql_error($old_connection)); + new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error($old_connection)); return false; } } @@ -793,7 +793,7 @@ class phoneAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } $display = ""; @@ -1238,9 +1238,9 @@ class phoneAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/phone account with dn '%s' failed."),$this->dn)); @@ -1295,7 +1295,7 @@ class phoneAccount extends plugin if(!$r_con){ print_red(sprintf(_("The MySQL Server '%s' isn't reachable as user '%s', check GOsa log for mysql error."), $a_SETUP['SERVER'],$a_SETUP['LOGIN'])); - @log::log("debug","gofonreport/".get_class($this),"",array(),@mysql_error()); + new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error()); return false; } @@ -1305,7 +1305,7 @@ class phoneAccount extends plugin // Test if we have the database selected correctly if(!$db){ print_red(sprintf(_("Can't select database %s on %s."),$a_SETUP['DB'],$a_SETUP['SERVER'])); - @log::log("debug","gofonreport/".get_class($this),"",array(),@mysql_error()); + new log("debug","gofonreport/".get_class($this),"",array(),@mysql_error()); return false; } @@ -1380,7 +1380,7 @@ class phoneAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/phone account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ diff --git a/plugins/personal/connectivity/class_intranetAccount.inc b/plugins/personal/connectivity/class_intranetAccount.inc index 202970f79..20b3d784b 100644 --- a/plugins/personal/connectivity/class_intranetAccount.inc +++ b/plugins/personal/connectivity/class_intranetAccount.inc @@ -63,7 +63,7 @@ class intranetAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } $display= ""; @@ -116,7 +116,7 @@ class intranetAccount extends plugin $ldap->modify ($this->attrs); /* Log last action */ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/intranet account with dn '%s' failed."),$this->dn)); @@ -178,9 +178,9 @@ class intranetAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/intranet account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc index 9fbb6fb83..5e83d5f14 100644 --- a/plugins/personal/connectivity/class_kolabAccount.inc +++ b/plugins/personal/connectivity/class_kolabAccount.inc @@ -79,7 +79,7 @@ class kolabAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Show tab dialog headers */ @@ -296,7 +296,7 @@ class kolabAccount extends plugin $ldap->modify($this->attrs); /* Log last action */ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); $this->handle_post_events('remove',array("uid" => $this->uid)); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/kolab account with dn '%s' failed."),$this->dn)); @@ -423,9 +423,9 @@ class kolabAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/kolab account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/connectivity/class_opengwAccount.inc b/plugins/personal/connectivity/class_opengwAccount.inc index f40453605..4d1879418 100644 --- a/plugins/personal/connectivity/class_opengwAccount.inc +++ b/plugins/personal/connectivity/class_opengwAccount.inc @@ -125,7 +125,7 @@ class opengwAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Show tab dialog headers */ @@ -244,7 +244,7 @@ class opengwAccount extends plugin $this->handle->SetInfos($this->info); $this->handle->Perform("REMOVE"); - @log::log("remove","users/".get_class($this),$this->dn); + new log("remove","users/".get_class($this),$this->dn); } } @@ -310,10 +310,10 @@ class opengwAccount extends plugin $this->handle->checkInfos(); if($this->initialy_was_account){ $this->handle->Perform("EDIT"); - @log::log("modify","users/".get_class($this),$this->dn); + new log("modify","users/".get_class($this),$this->dn); }else{ $this->handle->Perform("ADD"); - @log::log("create","users/".get_class($this),$this->dn); + new log("create","users/".get_class($this),$this->dn); } } diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc index 847b34311..e76cb2cd4 100644 --- a/plugins/personal/connectivity/class_oxchangeAccount.inc +++ b/plugins/personal/connectivity/class_oxchangeAccount.inc @@ -609,7 +609,7 @@ class oxchangeAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } $display=""; @@ -746,7 +746,7 @@ class oxchangeAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/oxchange addressbook account with dn '%s' failed."),$this->dn)); @@ -852,9 +852,9 @@ class oxchangeAccount extends plugin $ldap->modify ($this->attrs); if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/oxchange account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc index 40ecbbe40..bd3036422 100644 --- a/plugins/personal/connectivity/class_phpgwAccount.inc +++ b/plugins/personal/connectivity/class_phpgwAccount.inc @@ -36,7 +36,7 @@ class phpgwAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Show tab dialog headers */ @@ -84,7 +84,7 @@ class phpgwAccount extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPgw account with dn '%s' failed."),$this->dn)); - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); /* Optionally execute a command after we're done */ $this->handle_post_events('remove',array("uid" => $this->uid)); @@ -131,9 +131,9 @@ class phpgwAccount extends plugin $ldap->modify ($this->attrs); if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPgw account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/plugins/personal/connectivity/class_phpscheduleitAccount.inc index 597f254a5..627229452 100644 --- a/plugins/personal/connectivity/class_phpscheduleitAccount.inc +++ b/plugins/personal/connectivity/class_phpscheduleitAccount.inc @@ -43,7 +43,7 @@ class phpscheduleitAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Show tab dialog headers */ @@ -85,7 +85,7 @@ class phpscheduleitAccount extends plugin show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPscheduleit account with dn '%s' failed."),$this->dn)); if($this->is_account){ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } /* Optionally execute a command after we're done */ $this->handle_post_events('remove',array("uid" => $this->uid)); @@ -132,9 +132,9 @@ class phpscheduleitAccount extends plugin $ldap->modify ($this->attrs); if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPscheduleit account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/connectivity/class_pptpAccount.inc b/plugins/personal/connectivity/class_pptpAccount.inc index d9f1945de..1efe423c9 100644 --- a/plugins/personal/connectivity/class_pptpAccount.inc +++ b/plugins/personal/connectivity/class_pptpAccount.inc @@ -52,7 +52,7 @@ class pptpAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Show tab dialog headers */ @@ -96,7 +96,7 @@ class pptpAccount extends plugin $ldap->modify ($this->attrs); /* Log last action */ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PPTP account with dn '%s' failed."),$this->dn)); @@ -147,9 +147,9 @@ class pptpAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PPTP account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc index c11a16c6d..feeabd9e6 100644 --- a/plugins/personal/connectivity/class_proxyAccount.inc +++ b/plugins/personal/connectivity/class_proxyAccount.inc @@ -41,7 +41,7 @@ class proxyAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } $display= ""; @@ -162,7 +162,7 @@ class proxyAccount extends plugin $ldap->modify ($this->attrs); /* Log last action */ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/proxy account with dn '%s' failed."),$this->dn)); @@ -281,9 +281,9 @@ class proxyAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/proxy account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc index 4b62d10d7..c0ad64358 100644 --- a/plugins/personal/connectivity/class_pureftpdAccount.inc +++ b/plugins/personal/connectivity/class_pureftpdAccount.inc @@ -41,7 +41,7 @@ class pureftpdAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Show tab dialog headers */ @@ -111,7 +111,7 @@ class pureftpdAccount extends plugin $ldap->modify ($this->attrs); /* Log last action */ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/pureftpd account with dn '%s' failed."),$this->dn)); @@ -207,9 +207,9 @@ class pureftpdAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/pureftpd account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc index c14eee425..e3e588e2d 100644 --- a/plugins/personal/connectivity/class_webdavAccount.inc +++ b/plugins/personal/connectivity/class_webdavAccount.inc @@ -31,7 +31,7 @@ class webdavAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Show tab dialog headers */ @@ -79,7 +79,7 @@ class webdavAccount extends plugin $ldap->modify ($this->attrs); /* Log last action */ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/webDAV account with dn '%s' failed."),$this->dn)); @@ -130,9 +130,9 @@ class webdavAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/webDAV account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index a2313aaf4..d0ffa9484 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -260,9 +260,9 @@ class environment extends plugin if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; if(in_array("gosaAccount",$this->attrs['objectClass'])){ - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); }else{ - @log::log("view","groups/".get_class($this),$this->dn); + new log("view","groups/".get_class($this),$this->dn); } } @@ -944,9 +944,9 @@ class environment extends plugin $ldap->modify ($this->attrs); if($this->is_group){ - @log::log("remove","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/environment account with dn '%s' failed."),$this->dn)); @@ -1210,9 +1210,9 @@ class environment extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify",$cat."/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify",$cat."/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create",$cat."/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create",$cat."/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/environment account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index f5f4cc2dd..19f7e5ed9 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -220,7 +220,7 @@ class user extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } $smarty= get_smarty(); @@ -598,7 +598,7 @@ class user extends plugin $ldap->rmdir ($this->dn); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/generic account with dn '%s' failed."),$this->dn)); - @log::log("remove","users/".get_class($this),$this->dn,$this->attributes,$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,$this->attributes,$ldap->get_error()); /* Delete references to groups */ $ldap->cd ($this->config->current['BASE']); @@ -881,22 +881,22 @@ class user extends plugin /* Load the new uploaded Photo */ if(!$handle = imagick_blob2image($this->photoData)) { - @log::log("debug","users/".get_class($this),"",array(),"Could not access uploaded image"); + new log("debug","users/".get_class($this),"",array(),"Could not access uploaded image"); } /* Resizing image to 147x200 and blur */ if(!imagick_resize($handle,147,200,IMAGICK_FILTER_GAUSSIAN,0)){ - @log::log("debug","users/".get_class($this),"",array(),"Could not resize uploaded image"); + new log("debug","users/".get_class($this),"",array(),"Could not resize uploaded image"); } /* Converting image to JPEG */ if(!imagick_convert($handle,"JPEG")) { - @log::log("debug","users/".get_class($this),"",array(),"Could not convert uploaded image to jepg"); + new log("debug","users/".get_class($this),"",array(),"Could not convert uploaded image to jepg"); } /* Creating binary Code for the Image */ if(!$dump = imagick_image2blob($handle)){ - @log::log("debug","users/".get_class($this),"",array(),"Could not create new user image"); + new log("debug","users/".get_class($this),"",array(),"Could not create new user image"); } /* Sending Image */ @@ -950,9 +950,9 @@ class user extends plugin } if($mode == "modify"){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } /* Remove cert? diff --git a/plugins/personal/generic/main.inc b/plugins/personal/generic/main.inc index 7bf40176c..b54dab249 100644 --- a/plugins/personal/generic/main.inc +++ b/plugins/personal/generic/main.inc @@ -94,7 +94,7 @@ if (!$remove_lock){ return ($display); } change_password ($user->dn, $_POST['new_password'], 0, $user->pw_storage); - @log::log("modify","users/".get_class($this),"",array(),"Password has been changed"); + new log("modify","users/".get_class($this),"",array(),"Password has been changed"); } else { diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index b8af3484a..ef48fdd07 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -231,7 +231,7 @@ class mailAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Initialise vars */ @@ -683,7 +683,7 @@ class mailAccount extends plugin $ldap->modify ($this->attrs); /* Add "view" to logging class */ - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/mail account with dn '%s' failed."),$this->dn)); @@ -843,9 +843,9 @@ class mailAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } /* Only do IMAP actions if we are not a template */ diff --git a/plugins/personal/nagios/class_nagiosAccount.inc b/plugins/personal/nagios/class_nagiosAccount.inc index a01b4a87b..2650ab093 100644 --- a/plugins/personal/nagios/class_nagiosAccount.inc +++ b/plugins/personal/nagios/class_nagiosAccount.inc @@ -88,7 +88,7 @@ class nagiosAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Load templating engine */ @@ -170,9 +170,9 @@ class nagiosAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/nagios account with dn '%s' failed."),$this->dn)); @@ -256,7 +256,7 @@ class nagiosAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("view","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("view","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/nagios account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/netatalk/class_netatalk.inc b/plugins/personal/netatalk/class_netatalk.inc index f1ed25a34..b322a151f 100644 --- a/plugins/personal/netatalk/class_netatalk.inc +++ b/plugins/personal/netatalk/class_netatalk.inc @@ -157,7 +157,7 @@ class netatalk extends plugin { /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Use the smarty templating engine here... */ @@ -286,9 +286,9 @@ class netatalk extends plugin { $ldap->modify($this->attrs); if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/netatalk account with dn '%s' failed."),$this->dn)); @@ -351,7 +351,7 @@ class netatalk extends plugin { $this->cleanup(); $ldap->modify($this->attrs); - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/netatalk account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/password/main.inc b/plugins/personal/password/main.inc index 1954e2ed6..10b1cbd57 100644 --- a/plugins/personal/password/main.inc +++ b/plugins/personal/password/main.inc @@ -94,7 +94,7 @@ if (!$remove_lock){ show_errors($message); } else { change_password ($ui->dn, $_POST['new_password']); - @log::log("modify","users/".get_class($this),$ui->dn,array(),"User has been changed"); + new log("modify","users/".get_class($this),$ui->dn,array(),"User has been changed"); $ui->password= $_POST['new_password']; $_SESSION['ui']= $ui; $display= $smarty->fetch(get_template_path("changed.tpl", TRUE)); diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index 31cbc42de..999cf1665 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -230,7 +230,7 @@ class posixAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Department has changed? */ @@ -619,7 +619,7 @@ class posixAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/posix account with dn '%s' failed."),$this->dn)); @@ -860,9 +860,9 @@ class posixAccount extends plugin /* Log last action */ if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/posix account with dn '%s' failed."),$this->dn)); diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index ad90cce5d..862d63108 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -199,7 +199,7 @@ class sambaAccount extends plugin /* Log view */ if($this->is_account && !$this->view_logged){ $this->view_logged = TRUE; - @log::log("view","users/".get_class($this),$this->dn); + new log("view","users/".get_class($this),$this->dn); } /* Do we need to flip is_account state? */ @@ -669,7 +669,7 @@ class sambaAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - @log::log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/samba account with dn '%s' failed."),$this->dn)); @@ -1020,9 +1020,9 @@ class sambaAccount extends plugin $ldap->modify ($this->attrs); if($this->initially_was_account){ - @log::log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); }else{ - @log::log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); + new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error()); } show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/samba account with dn '%s' failed."),$this->dn)); diff --git a/setup/class_setupStep_Migrate.inc b/setup/class_setupStep_Migrate.inc index 864cee4f1..671dd5fbb 100644 --- a/setup/class_setupStep_Migrate.inc +++ b/setup/class_setupStep_Migrate.inc @@ -462,7 +462,7 @@ class Step_Migrate extends setup_step $res = $ldap->add($testEntry); $ldap->cat($dn); if(!$ldap->count()){ - @log::log("view","setup/".get_class($this),$dn,array(),$ldap->get_error()); + new log("view","setup/".get_class($this),$dn,array(),$ldap->get_error()); $this->checks['permissions']['STATUS'] = FALSE; $this->checks['permissions']['STATUS_MSG']= _("Failed"); @@ -476,7 +476,7 @@ class Step_Migrate extends setup_step $res = $ldap->rmDir($dn); $ldap->cat($dn); if($ldap->count()){ - @log::log("view","setup/".get_class($this),$dn,array(),$ldap->get_error()); + new log("view","setup/".get_class($this),$dn,array(),$ldap->get_error()); $this->checks['permissions']['STATUS'] = FALSE; $this->checks['permissions']['STATUS_MSG']= _("Failed"); $this->checks['permissions']['ERROR_MSG'] =