Code

Fixed logging
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 May 2007 09:26:57 +0000 (09:26 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 May 2007 09:26:57 +0000 (09:26 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6433 594d385d-05f5-0310-b6e9-bd551577e9d8

37 files changed:
plugins/admin/systems/class_componentGeneric.inc
plugins/admin/systems/class_glpiAccount.inc
plugins/admin/systems/class_glpiPrinterAccount.inc
plugins/admin/systems/class_goCupsServer.inc
plugins/admin/systems/class_goFaxServer.inc
plugins/admin/systems/class_goFonServer.inc
plugins/admin/systems/class_goGlpiServer.inc
plugins/admin/systems/class_goImapServer.inc
plugins/admin/systems/class_goKrbServer.inc
plugins/admin/systems/class_goLdapServer.inc
plugins/admin/systems/class_goLogDBServer.inc
plugins/admin/systems/class_goMailServer.inc
plugins/admin/systems/class_goNtpServer.inc
plugins/admin/systems/class_goService.inc
plugins/admin/systems/class_goShareServer.inc
plugins/admin/systems/class_goSpamServer.inc
plugins/admin/systems/class_goSpamServerRule.inc
plugins/admin/systems/class_goSyslogServer.inc
plugins/admin/systems/class_goTerminalServer.inc
plugins/admin/systems/class_goVirusServer.inc
plugins/admin/systems/class_gosaLogServer.inc
plugins/admin/systems/class_phoneGeneric.inc
plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/class_servDHCP.inc
plugins/admin/systems/class_servDNS.inc
plugins/admin/systems/class_servGeneric.inc
plugins/admin/systems/class_servKolab.inc
plugins/admin/systems/class_servNfs.inc
plugins/admin/systems/class_servRepository.inc
plugins/admin/systems/class_terminalGeneric.inc
plugins/admin/systems/class_terminalInfo.inc
plugins/admin/systems/class_terminalService.inc
plugins/admin/systems/class_terminalStartup.inc
plugins/admin/systems/class_winGeneric.inc
plugins/admin/systems/class_workstationGeneric.inc
plugins/admin/systems/class_workstationService.inc
plugins/admin/systems/class_workstationStartup.inc

index 22d218511eb64d3c5dc4a4faca52681d058779b0..ef4308c47d3e9985679c0913d443adc6f7adc93e 100644 (file)
@@ -21,6 +21,7 @@ class componentGeneric extends plugin
   var $attributes= array("cn", "description");
   var $objectclasses= array("top", "device", "ipHost", "ieee802Device");
   var $netConfigDNS;
+  var $view_logged  = FALSE;
 
   function componentgeneric ($config, $dn= NULL, $parent= NULL)
   {
@@ -37,16 +38,18 @@ class componentGeneric extends plugin
     $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses, true);
     /* Save dn for later references */
     $this->orig_dn= $this->dn;
-
-    if($this->is_account){
-      @log::log("view","component/".get_class($this),$this->dn);
-    }
   }
 
+
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
+
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","component/".get_class($this),$this->dn);
+    }
 
     /* Do we represent a valid phone? */
     if (!$this->is_account && $this->parent == NULL){
index 937323083d3a6aa346e565916c11ffd54955e831..03e5712dbbc2b2cdeda4bb43aada367d526e93ca 100644 (file)
@@ -39,6 +39,7 @@ class glpiAccount extends plugin
   var $renameTypeDialog   = false;
   var $renameOSDialog     = false;
   var $select_type        ;
+  var $view_logged = FALSE;
   
   /* Not necessary, cause we use mysql databse */
   var $objectclasses= array("whatever");
@@ -111,10 +112,6 @@ class glpiAccount extends plugin
     $this->name                 = $this->dn;
     $this->orig_dn              = $this->dn;
     $this->initially_was_account = $this->is_account;
-
-    if($this->is_account){
-      @log::log("view","undefined/".get_class($this),$this->dn);
-    }
   }
 
   function execute()
@@ -122,6 +119,11 @@ class glpiAccount extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","all/".get_class($this),$this->dn);
+    }
+
     /* Fill templating stuff */
     $smarty= get_smarty();
     $display= "";
index fb8ce7e49ac8acbeb2b17e9e5ccf35c24fa7efa1..dd69e23012037cbca7ad17228d75b1104330ca77 100644 (file)
@@ -66,6 +66,8 @@ class glpiPrinterAccount extends plugin
   var $usedAttachments  = array();  // Used Attachments 
   var $usedCartridges   = array();  // Used Cartridges
 
+  var $view_logged      = FALSE;
+
   /* Contructor 
      Sets default values and checks if we already have an existing glpi account
    */
@@ -125,10 +127,6 @@ class glpiPrinterAccount extends plugin
     $this->name                 = $this->dn;
     $this->orig_dn              = $this->dn;
     $this->initially_was_account = $this->is_account;
-
-    if($this->is_account){
-      @log::log("view","printer/".get_class($this),$this->dn); 
-    }
   }
 
   function execute()
@@ -136,6 +134,11 @@ class glpiPrinterAccount extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","printer/".get_class($this),$this->dn);
+    }
+
     /* Fill templating stuff */
     $smarty= get_smarty();
     $display= "";
index 62a15a9f3972be266e5b1c9ab6b2384f1de81586..b5d282a01dbd7c853a9b325b651e910788847087 100644 (file)
@@ -21,6 +21,7 @@ class goCupsServer extends goService{
   var $acl;
   var $cn                  = "";
   var $goCupsServerStatus  = "";
+  var $view_logged  =FALSE;
  
   function goCupsServer($config,$dn)
   {
@@ -31,6 +32,11 @@ class goCupsServer extends goService{
     
   function execute()
   { 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $smarty = get_smarty(); 
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
index f5628c10845a98ca040b181556832ca8489c9a51..c791b6eb8bf1cc45bac8cfdb198aa90ac2a3df23 100644 (file)
@@ -24,6 +24,7 @@ class goFaxServer extends goService {
   var $goFaxPassword      = "";
   var $goFaxServerStatus  = "";
   var $cn                 = "";
+  var $view_logged  =FALSE;
  
   function goFaxServer($config,$dn)
   {
@@ -36,6 +37,11 @@ class goFaxServer extends goService {
   { 
     $smarty = get_smarty(); 
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     /* Assign acls */
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation ){
index 37f4b8ac9caa09c09e1ed6239ba1458fb634142b..7457444c8e796beb03b2eaed7a447a50903adaaa 100644 (file)
@@ -26,6 +26,7 @@ class goFonServer extends goService{
   var $goFonAdmin         = "";
   var $goFonAreaCode      = "";
   var $goFonCountryCode   = "";
+  var $view_logged  =FALSE;
    
  
   function goFonServer($config,$dn)
@@ -37,6 +38,11 @@ class goFonServer extends goService{
 
   function execute()
   { 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $smarty = get_smarty(); 
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
index 152ed03d33d051f1d641fdbc9df79dea669461c9..ec35b1f24afc2d1d928ccc867a00a0bae0ae707b 100644 (file)
@@ -25,6 +25,7 @@ class goGlpiServer extends goService {
   var $goGlpiAdmin        ="";
   var $goGlpiDatabase     ="";
   var $goGlpiPassword     ="";
+  var $view_logged  =FALSE;
  
  
   function goGlpiServer($config,$dn)
@@ -36,6 +37,11 @@ class goGlpiServer extends goService {
 
   function execute()
   { 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $smarty = get_smarty(); 
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
index 95d5d87dc3755c73eef15ac6c2f7f51db827366d..d08972ca7c4a5c3375a0444930434217d695c67e 100644 (file)
@@ -37,6 +37,7 @@ class goImapServer extends goService {
   var $cyrusPop3            = false;
   var $cyrusPop3SSL         = false;
   var $is_account           = false;
+  var $view_logged  =FALSE;
 
   var $acl; 
 
@@ -59,7 +60,12 @@ class goImapServer extends goService {
   function execute()
   { 
     $smarty = get_smarty();
-  
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
     /* set new status */
     if(isset($_POST['ExecAction'])){
       if(isset($this->Actions[$_POST['action']])){
index edcc58f0f7598121ec2fbf113e955b2d0f0e1f2e..51802b1cdca591fcb4b91a5003f416ad26adba3d 100644 (file)
@@ -23,6 +23,7 @@ class goKrbServer extends goService{
   var $goKrbRealm     = "";
   var $goKrbAdmin     = "";
   var $goKrbPassword  ="";  
+  var $view_logged  =FALSE;
  
   function goKrbServer($config,$dn)
   {
@@ -35,6 +36,11 @@ class goKrbServer extends goService{
   { 
     $smarty = get_smarty(); 
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $tmp = $this->plinfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation){
       $smarty->assign($name."ACL",$this->getacl($name));
index f4b2dccf23d37d42348f0ef094b71897a7c99395..b8d151ee302d240185354e674cd58d134a6c9a9d 100644 (file)
@@ -21,6 +21,7 @@ class goLdapServer extends goService{
   var $cn                  = "";
   var $goLdapServerStatus  = "";
   var $goLdapBase          = ""; 
+  var $view_logged  =FALSE;
 
   function goLdapServer($config,$dn)
   {
@@ -31,6 +32,12 @@ class goLdapServer extends goService{
 
   function execute()
   { 
+
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $smarty = get_smarty(); 
     foreach($this->attributes as $attr){
       $smarty->assign($attr,$this->$attr);
index 77ac6250c8de2288e911d0dcd2c581636f7160e1..a28990812aa665c3363766540cc121b9b62ccc3c 100644 (file)
@@ -22,6 +22,7 @@ class goLogDBServer extends goService{
   var $goLogDBServerStatus  = "";
   var $goLogAdmin           = "";
   var $goLogPassword        = "";  
+  var $view_logged  =FALSE;
 
 
   function goLogDBServer($config,$dn)
@@ -35,6 +36,11 @@ class goLogDBServer extends goService{
   { 
     $smarty = get_smarty(); 
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation){
       $smarty->assign($name."ACL",$this->getacl($name));
index 0e28173b0aa80ac07cef411d43e74e1a5433e6eb..25d2fd827f0f50fac3b135c5aef5958039d4dd61 100644 (file)
@@ -39,6 +39,7 @@ class goMailServer extends goService{
   var $Actions                          = array();
   var $cn                               = "";
   var $conflicts                        = array("goMailServer","kolab");
+  var $view_logged  =FALSE;
 
   function goMailServer($config,$dn)
   {
@@ -192,6 +193,11 @@ class goMailServer extends goService{
   { 
     $smarty   = get_smarty();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation){
       $smarty->assign($name."ACL",$this->getacl($name));
index d64c45d2c69a5d89446ea3e6022bc86630248d76..26434eefba5236985f1b2d056803b40b35c0bb37 100644 (file)
@@ -22,6 +22,7 @@ class goNtpServer extends goService{
   var $goNtpServerStatus= "";
   var $acl;
   var $cn               = "";
+  var $view_logged  =FALSE;
 
   function goNtpServer($config,$dn)
   {
@@ -43,6 +44,11 @@ class goNtpServer extends goService{
   { 
     $smarty = get_smarty(); 
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     /* Here we add a new entry  */
     if(isset($_POST['NewNTPAdd']) && $_POST['NewNTPExport'] != "" && $this->acl_is_writeable("goTimeSource")) {
       $this->goTimeSource[$_POST['NewNTPExport']]= $_POST['NewNTPExport'];
index a73ff751e892762570f0c65d18844a3c0f74315d..bf4b63bcb6c9cfd0e010e468ff898100156cac71 100644 (file)
@@ -16,6 +16,7 @@ class goService extends plugin{
   var $dn                   = NULL;
   var $cn                   = "";
   var $DisplayName          = "";
+  var $view_logged  =FALSE;
 
    
   /* Construcktion */ 
@@ -23,16 +24,17 @@ class goService extends plugin{
   {
     plugin::plugin($config,$dn);
     $this->DisplayName = _("Empty service");
-
-    if($this->is_account){
-      @log::log("view","server/".get_class($this),$this->dn);
-    }
   }
 
   
   /* Create content */
   function execute()
   {
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $str ="<div style='width:100%; text-align:right;'>".
           "  <input type='submit' name='SaveService' value='"._("Save")."'>&nbsp;".
           "  <input type='submit' name='CancelService' value='"._("Cancel")."'>".
index 11ed781bac2a98c8a39129cd864a8cd4cf892469..18f9d747bc48228f74cc6a6888d85eda06501651 100644 (file)
@@ -24,6 +24,7 @@ class goShareServer extends goService{
   var $allow_mounts         = false;
   var $mounts_to_remove     = array();
   var $mounts_to_add        = array();
+  var $view_logged  =FALSE;
 
   function goShareServer($config,$dn)
   {
@@ -54,6 +55,11 @@ class goShareServer extends goService{
   { 
     $smarty = get_smarty(); 
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
 
     if((isset($_POST['DelNfsEnt']))&&(isset($_POST['goExportEntryList'])) && ($this->acl_is_writeable("name"))){
       if($this->allow_mounts){
index a7cb30dce991777a9de423b8bfd09755a0df1f63..55781fbbac9046696acae00253d9bf27a2f26d70 100644 (file)
@@ -41,6 +41,7 @@ class gospamserver extends goService{
   var $dialog           = NULL;
   var $ui               = NULL;
   var $acl              = NULL;
+  var $view_logged  =FALSE;
 
   function gospamserver($config,$dn, $parent= NULL)
   {
@@ -88,6 +89,11 @@ class gospamserver extends goService{
     $display ="";
     $smarty = get_smarty(); 
     
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     /* If displayed, it is ever true*/
     $this->is_account =true;
 
index 178269534bc3d159d37e6fa2290a0951ce15e588..2adc6886ee1f04ae2eed196a7943fd3f9d487202 100644 (file)
@@ -6,6 +6,7 @@ class goSpamServerRule extends plugin {
        var $rule = "";
        
        var $orig_name = "";
+  var $view_logged  =FALSE;
        
        function goSpamServerRule($config,$dn,$name = "",$rule ="")
        {
@@ -18,6 +19,12 @@ class goSpamServerRule extends plugin {
        function execute()
        {
                $smarty = get_smarty();
+
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
                foreach($this->attributes as $attr){
                        $smarty->assign($attr,$this->$attr);
                }
index 382d594f0b23d736c46809b3588853629ac33d30..4c242a3291b264190c0570b74f864aef14e83038 100644 (file)
@@ -21,6 +21,7 @@ class goSyslogServer extends goService{
   var $acl;
   var $cn                    = "";
   var $goSyslogServerStatus  = "";
+  var $view_logged  =FALSE;
  
   function goSyslogServer($config,$dn)
   {
@@ -31,6 +32,12 @@ class goSyslogServer extends goService{
 
   function execute()
   { 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
+
     $smarty = get_smarty(); 
     return($smarty->fetch(get_template_path("goSyslogServer.tpl",TRUE,dirname(__FILE__))));
   }
index 1b1eeecf5fa72a53953d8e33f155adb93229cd9d..d6afed9fac5f61145f59467c2ce5a1dae7ce3f2e 100644 (file)
@@ -23,6 +23,7 @@ class goTerminalServer extends goService{
   var $goTerminalServerStatus  = "";
   var $goXdmcpIsEnabled        = false;  
   var $goFontPath              = "";
+  var $view_logged  =FALSE;
 
 
   function goTerminalServer($config,$dn)
@@ -35,6 +36,12 @@ class goTerminalServer extends goService{
   function execute()
   { 
     $smarty = get_smarty();
+
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
   
     $tmp = $this->plinfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation){
index a469988f8cfde689a48031d4660db6041a38d3c1..287f915d5b0da40d0444d2923a474ce40a8e1839 100644 (file)
@@ -39,6 +39,7 @@ class govirusserver extends goService{
   var $avUser                       = "";
   var $avHttpProxyURL               = "";
   var $avDatabaseMirror             = "";
+  var $view_logged  =FALSE;
 
   function govirusserver($config,$dn, $parent= NULL)
   {
@@ -63,6 +64,12 @@ class govirusserver extends goService{
   {
     $smarty = get_smarty(); 
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
+
     /* Set acls */
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation) { 
index 8bd11cc1b3e148616c4339927deb1b360d15ba61..6bb2b60ced11ac3c7aff90e01c54979e6efd12fc 100644 (file)
@@ -19,6 +19,7 @@ class gosaLogServer extends goService{
   var $goLogDBUser        = "";
   var $goLogDBPassword    = "";  
   var $goLogDB            = "";  
+  var $view_logged  =FALSE;
 
 
   function gosaLogServer($config,$dn)
@@ -32,6 +33,11 @@ class gosaLogServer extends goService{
   { 
     $smarty = get_smarty(); 
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation){
       $smarty->assign($name."ACL",$this->getacl($name));
index 7b55449d99a83782c77be1c85c6586d0da3c75bc..aa78ad9e076c015c953a7a85c7b0077ba36b725e 100644 (file)
@@ -32,6 +32,7 @@ class phoneGeneric extends plugin
   var $goFonMSN         = "";
   var $selected_categorie    = 0;
   var $netConfigDNS;
+  var $view_logged      = FALSE;
 
   /* attribute list for save action */
   var $attributes= array("cn", "description",
@@ -92,10 +93,6 @@ class phoneGeneric extends plugin
 
     /* Save dn for later references */
     $this->orig_dn= $this->dn;
-
-    if($this->is_account){
-      @log::log("view","phone/".get_class($this),$this->dn);
-    }
   }
 
   function set_acl_base($base)
@@ -113,8 +110,13 @@ class phoneGeneric extends plugin
 
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
+
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","phone/".get_class($this),$this->dn);
+    }
 
     /* Do we represent a valid phone? */
     if (!$this->is_account && $this->parent == NULL){
index 132e5667b3728b5968dbbe6f24422d5a546dab5d..52ae6e3457764e92966855ae11ba0874eff734a8 100644 (file)
@@ -49,7 +49,7 @@ class printgeneric extends plugin
   var $attributes     = array("cn", "description", "l", "labeledURI", "gotoPrinterPPD","gotoUserPrinter", "macAddress", 
                               "gotoUserAdminPrinter","gotoGroupAdminPrinter","gotoUserPrinter","gotoGroupPrinter");
   var $objectclasses  = array("top", "gotoPrinter");
-
+  var $view_logged    = FALSE;
   var $parent;
 
   function printgeneric ($config, $dn,$parent_init,$parent)
@@ -151,10 +151,6 @@ class printgeneric extends plugin
         }
       }
     }
-    
-    if($this->is_account){
-      @log::log("view","printer/".get_class($this),$this->dn);
-    }
   }
 
   function set_acl_base($base)
@@ -257,6 +253,12 @@ class printgeneric extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","printer/".get_class($this),$this->dn);
+    }
+
+
     /* If type of printer couldn't be detected (because of missing parent object in construction) 
      * hide this tab.
      */
index 7796dc7201e2af683643bf61d076254635788d12..5f04fbbf1e71e0f980aae35f5233a1cc8f57f06a 100644 (file)
@@ -11,20 +11,22 @@ class servdhcp extends plugin
   var $ignore_account= TRUE;
   var $attributes= array();
   var $objectclasses= array("whatever");
+  var $view_logged  = FALSE;
 
   function servdhcp ($config, $dn= NULL, $parent= NULL)
   {
     plugin::plugin ($config, $dn, $parent);
-
-    if($this->is_account){
-      @log::log("view","unknown/".get_class($this),$this->dn);
-    }
   }
 
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
+
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
 
     /* Fill templating stuff */
     $smarty= get_smarty();
index c32ac192d20f3fa87a1867d16f2f6005d8779e8f..485eede2bd72ca312814574787f729ac4ad70cef 100644 (file)
@@ -26,6 +26,7 @@ class servdns extends goService
   var $conflicts        = array("servdns");
   var $DisplayName      = "";
   var $StatusFlag       = "";
+  var $view_logged      = FALSE;
 
   function servdns ($config, $dn= NULL, $parent= NULL)
   {
@@ -50,11 +51,6 @@ class servdns extends goService
     }else{
       $this->is_account = true;
     }
-  
-    if($this->is_account){
-      @log::log("view","unknown/".get_class($this),$this->dn);
-    }
-
     $this->initially_was_account = $this->is_account;
   }
 
@@ -65,6 +61,11 @@ class servdns extends goService
      */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     /* Fill templating stuff 
      */
     $smarty= get_smarty();
index 4fa00a01a0c9eaf9e36535f48623500ce6e68b10..a9e93f5a59c6686592181e893a259ba81deda838 100644 (file)
@@ -38,6 +38,7 @@ class servgeneric extends plugin
                             "sysinfo"         => "sysinfo");
 
   var $fai_activated  =FALSE;
+  var $view_logged = FALSE;
 
   function servgeneric ($config, $dn= NULL, $parent= NULL)
   {
@@ -64,10 +65,6 @@ class servgeneric extends plugin
     $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
     $this->netConfigDNS->set_acl_category("server");
     $this->netConfigDNS->set_acl_base($this->base);
-    if($this->is_account){
-      @log::log("view","server/".get_class($this),$this->dn);
-    }
        
     /* Save dn for later references */
     $this->orig_dn= $this->dn;
@@ -93,6 +90,11 @@ class servgeneric extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     /* Do we represent a valid server? */
     if (!$this->is_account && $this->parent == NULL){
       $display= "<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
index 3b666fd43bbae9848f4ebb8cfcc630909d4d4c81..5941bbc68eeb2515e674eb7448db590b0d17a339 100644 (file)
@@ -29,6 +29,7 @@ class servkolab extends goService {
   var $apache_http                      = "TRUE";
   var $kolabHost                        = array();
   var $orig_cn                          = "";
+  var $view_logged                      = FALSE;
 
   var $attributes =  array("postfix_mydomain", "postfix_mydestination", "proftpd_ftp", "k",
       "postfix_mynetworks", "postfix_enable_virus_scan", "postfix_relayhost", "apache_http",
@@ -76,10 +77,6 @@ class servkolab extends goService {
         $this->initially_was_account = true;
       }
     } 
-
-    if($this->is_account){
-      @log::log("view","server/".get_class($this),$this->dn);
-    }
   }
 
 
@@ -88,6 +85,11 @@ class servkolab extends goService {
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     /***************  
       Variable initialisation
      ***************/  
index c7b05c3621f7a1fe0e7aa8781fee7acf93982569..15d15f68b7afc2e75aefa292503a94930e0cbe14 100644 (file)
@@ -28,6 +28,7 @@ class servnfs extends plugin
   var $create_mount = false; //save mount entry
 
   var $parent       = NULL;
+  var $view_logged  = FALSE;
 
   function servnfs ($config, $parent,$entry= false,$mount =false)
   {
@@ -83,6 +84,11 @@ class servnfs extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     /* Fill templating stuff */
     $smarty= get_smarty();
 
index 740fdf0ea6a668b85825bcf73751db54c7b6ee25..27bb610f73c6c9257e7907199fc1c0a65c59c502 100644 (file)
@@ -26,7 +26,8 @@ class servrepository extends goService
   var $conflicts             = array("FAIrepositoryServer");
   var $DisplayName           = "";
   var $StatusFlag            = "";
-
+  
+  var $view_logged            = FALSE;
   var $fai_activated          = FALSE;
 
   function servrepository ($config, $dn= NULL, $parent= NULL)
@@ -83,10 +84,6 @@ class servrepository extends goService
         $this->repositories[$tmp[2]]=$tmp2;      
       }
     }
-
-    if($this->is_account){
-      @log::log("view","server/".get_class($this),$this->dn);
-    }
   }
 
   function execute()
@@ -94,6 +91,11 @@ class servrepository extends goService
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","server/".get_class($this),$this->dn);
+    }
+
     if(!$this->fai_activated){
       $str = "<h2>"._("You can't use this plugin until FAI is activated.")."</h2>";
       return $str;
index 51aa620bea0f7b5d36df4a0c146c1b30011d3c3b..312b6f6cd104363367287dc0947d3b948e519e35 100644 (file)
@@ -56,6 +56,7 @@ class termgeneric extends plugin
                             "sysinfo"         => "sysinfo");
 
   var $fai_activated = FALSE;
+  var $view_logged = FALSE;
 
   function termgeneric ($config, $dn= NULL, $parent= NULL)
   {
@@ -124,10 +125,6 @@ class termgeneric extends plugin
     }
 
     $this->orig_dn= $this->dn;
-    
-    if($this->is_account){
-      @log::log("view","terminal/".get_class($this),$this->dn);
-    }
   }
 
   function set_acl_base($base)
@@ -147,6 +144,11 @@ class termgeneric extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","terminal/".get_class($this),$this->dn);
+    }
+
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
       $this->is_account= !$this->is_account;
index 984c456ad6454676d7a5fb77f1024d506c1ecf85..ae731aec9caa3fee035a0df5911d0820ba65d03d 100644 (file)
@@ -25,6 +25,7 @@ class terminfo extends plugin
   /* Needed values and lists */
   var $base= "";
   var $cn= "";
+  var $view_logged = FALSE;
 
   /* attribute list for save action */
   var $ignore_account= TRUE;
@@ -61,6 +62,11 @@ class terminfo extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","terminal/".get_class($this),$this->dn);
+    }
+
     /* Do we represent a valid terminal? */
     if (!$this->is_account && $this->parent == NULL){
       echo "<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
index 2be95df7957e78c00dc78fec861bde405badcf05..25751532b6ccb8a95a52c6d3efd25172b72d80e9 100644 (file)
@@ -31,6 +31,7 @@ class termservice extends plugin
   var $goFonHardware= "automatic";
 
   var $AutoSync = false;
+  var $view_logged = FALSE;
 
   /* Needed values and lists */
   var $ignore_account= TRUE;
@@ -243,16 +244,17 @@ class termservice extends plugin
       $this->gotoXHsync = preg_replace("/\+/","-",$this->gotoXHsync);
       $this->gotoXVsync = preg_replace("/\+/","-",$this->gotoXVsync);
     }
-
-    if($this->is_account){
-      @log::log("view","terminal/".get_class($this),$this->dn);
-    }
   }
 
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
+
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","terminal/".get_class($this),$this->dn);
+    }
 
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
index dfae3014777783a594ef3e81bd8ba5dee3f04ce4..7c45334801baa1334479abddafb4320caf1f8001 100644 (file)
@@ -26,6 +26,7 @@ class termstartup extends plugin
   /* attribute list for save action */
   var $attributes= array("gotoLdapServer", "gotoBootKernel", "gotoKernelParameters","gotoModules");
   var $objectclasses= array("GOhard");
+  var $view_logged = FALSE;
 
   /* Helper */
   var $customParameters= "";
@@ -144,10 +145,6 @@ class termstartup extends plugin
         }
       }
     }
-
-    if($this->is_account){
-      @log::log("view","terminal/".get_class($this),$this->dn);
-    }
   }
 
   function execute()
@@ -155,6 +152,11 @@ class termstartup extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","terminal/".get_class($this),$this->dn);
+    }
+
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
       $this->is_account= !$this->is_account;
index fef7254f884fe0089f0e5b1a02255c339ec94fd5..020256dd24d77db22a6959b519a9d336d2ae9af6 100644 (file)
@@ -44,6 +44,7 @@ class wingeneric extends plugin
                             "sambaNTPassword","sambaPwdLastSet","sambaAcctFlags");
   var $objectclasses= array("posixAccount","person","organizationalPerson","inetOrgPerson","gosaAccount","shadowAccount","sambaSamAccount","top");
 
+  var $view_logged = FALSE;
 
   function wingeneric ($config, $dn= NULL, $parent= NULL)
   {
@@ -62,10 +63,6 @@ class wingeneric extends plugin
     $this->orig_dn= $this->dn;
 
     $this->cn= preg_replace("/\\\$\$/","",$this->cn);
-
-    if($this->is_account){
-      @log::log("view","winworkstation/".get_class($this),$this->dn);
-    }
   }
 
 
@@ -84,8 +81,14 @@ class wingeneric extends plugin
 
   function execute()
   {
-       /* Call parent execute */
-       plugin::execute();
+    /* Call parent execute */
+    plugin::execute();
+
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","winworkstation/".get_class($this),$this->dn);
+    }
+
 
     /* Do we represent a valid phone? */
     if (!$this->is_account && $this->parent == NULL){
index 4604c98a77c16c7965795458e083127982d3c129..d28d106bc26e309334efcc9d97dad67db422831f 100644 (file)
@@ -28,6 +28,7 @@ class workgeneric extends plugin
   var $FAIscript= "";
   var $didAction= FALSE;
   var $FAIstate= "";
+  var $view_logged = FALSE;
 
   /* Needed values and lists */
   var $base= "";
@@ -127,10 +128,6 @@ class workgeneric extends plugin
       $this->gotoSyslogServers[$server] = $visible;
     }
 
-    if($this->is_account){
-      @log::log("view","workstation/".get_class($this),$this->dn);
-    } 
-
     /* Save 'dn' for later referal */
     $this->orig_dn= $this->dn;
   }
@@ -153,6 +150,11 @@ class workgeneric extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","workstation/".get_class($this),$this->dn);
+    }
+
     /* Do we need to flip is_account state? */
     if(isset($_POST['modify_state'])){
       if($this->is_account && $this->acl_is_removeable()){
index 1eed7b90681e43171b52786b2e915a6f5300652d..370253fbe66bc39092295d892b797849a8dc2c05 100644 (file)
@@ -24,6 +24,7 @@ class workservice extends plugin
   var $gotoScannerClients= "";
   var $gotoScannerBackend= "";
   var $goFonHardware= "automatic";
+  var $view_logged = FALSE;
 
   /* Needed values and lists */
   var $ignore_account= TRUE;
@@ -234,10 +235,6 @@ class workservice extends plugin
       $this->MouseTypes= array('AUTO' => _("inherited"));
       $this->MousePorts= array('AUTO' => _("inherited"));
     }
-
-    if($this->is_account){
-      @log::log("view","workstation/".get_class($this),$this->dn);
-    }
   }
 
   function execute()
@@ -245,6 +242,11 @@ class workservice extends plugin
     /* Call parent execute */
     plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","workstation/".get_class($this),$this->dn);
+    }
+
     /* Do we need to flip is_account state? */
     if (isset($_POST['modify_state'])){
       $this->is_account= !$this->is_account;
index 2fbda70488236f0ae6e09bed98af62f0c586c684..4ce45768e3d2617db56bcf23390eeb6bac7d8b23 100644 (file)
@@ -42,7 +42,7 @@ class workstartup extends plugin
   var $FAIdebianMirror    = "auto";
 
   var $unresolved_classes = array();
-
+  var $view_logged        = FALSE;
   
   /* FAI class selection */
   var $InheritedFAIclass           = array();
@@ -367,10 +367,6 @@ class workstartup extends plugin
     if (!isset($this->gotoBootKernels['default-inherited']) && $this->gotoBootKernel == "default-inherited"){
       $this->gotoBootKernel= "default";
     }
-
-    if($this->is_account){
-      @log::log("view","workstation/".get_class($this),$this->dn);
-    }
   }
 
   
@@ -492,6 +488,11 @@ class workstartup extends plugin
        /* Call parent execute */
        plugin::execute();
 
+    if($this->is_account && !$this->view_logged){
+      $this->view_logged = TRUE;
+      @log::log("view","workstation/".get_class($this),$this->dn);
+    }
+
     /* Do we need to flip is_account state? */
     if(isset($_POST['modify_state'])){
       if($this->is_account && $this->acl_is_removeable()){