Exemplo n.º 1
0
 public static function addLog($strType, $intId, $strName, $strAction, $strDescription = "")
 {
     global $objLiveUser, $_CONF;
     if (Setting::selectByName("audit_enable")) {
         $objLog = new AuditLog();
         $objLog->setAccountId($_CONF['app']['account']->getId());
         $objLog->setType($strType);
         $objLog->setTypeId($intId);
         $objLog->setTypeName($strName);
         $objLog->setUserId($objLiveUser->getProperty("auth_user_id"));
         $objLog->setUserName($objLiveUser->getProperty("name"));
         $objLog->setAction($strAction);
         $objLog->setDescription($strDescription);
         $objLog->save();
     }
 }