Code

Added pChart classes and GOsa mapping class to enable auto-include
[gosa.git] / gosa-core / include / php_setup.inc
index a8147654f04d1c0c72a19231916104515db23c6b..c1e7184a548eb1fda0474ae8f27bf46235672077 100644 (file)
@@ -69,6 +69,12 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
     new log("debug","all",$errfile,array(),"Type:".$errno.", Message:".$errstr.", File:".$errfile.", Line: ".$errline);
   }
 
+  // Log errors in usage DB
+  if(class_exists('stats') && !preg_match("/No such object/",$errstr)){
+      stats::log('error', $class = 'ERROR', $category = array(),  $action = __FUNCTION__, 
+              $amount = 1, $duration = 0, $errno);
+  }
+
   /* Create header as needed */
   if ($error_collector == ""){
 
@@ -101,7 +107,7 @@ function gosaRaiseError($errno, $errstr, $errfile, $errline)
            <td><span>"._("Generating this page caused the PHP interpreter to raise some errors!")."</span></td>
            <td align='right'>
             <a href=\"mailto:gosa-bugs@oss.gonicus.de?subject=GOsa%20bugreport&amp;body=%BUGBODY%\">
-                ".image('images/mailto.png')."&nbsp;"._("Send bugreport")."
+                ".image('images/mailto.png')."&nbsp;"._("Send bug report")."
             </a>
            </td>
            <td align='right'>
@@ -272,7 +278,7 @@ error_reporting (E_ALL | E_STRICT);
 $error_collector= "";
 $error_collector_mailto= "";
 
-#set_error_handler('gosaRaiseError', E_WARNING |  E_NOTICE | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT) ;
+set_error_handler('gosaRaiseError', E_WARNING |  E_NOTICE | E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE | E_STRICT) ;
 
 $variables_order= "ES";
 ini_set("register_globals",0);