summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 60cd0b3)
raw | patch | inline | side by side (parent: 60cd0b3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 May 2007 12:26:02 +0000 (12:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 May 2007 12:26:02 +0000 (12:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6456 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_log.inc | patch | blob | history | |
plugins/addons/logview/class_logview.inc | patch | blob | history |
diff --git a/include/class_log.inc b/include/class_log.inc
index e10b25ad468965d348e9cdf4904a87bbf4d68f63..c2f05639157eacd1ee871a10ea50c1984da2c364 100644 (file)
--- a/include/class_log.inc
+++ b/include/class_log.inc
# $msgs[] = "Currently active user is empty.";
# }
- if(!isset($entry['action']) || !in_array($entry['action'],array("modify","create","remove","copy","snapshot","view","security"))){
+ if(!isset($entry['action']) || !in_array($entry['action'],array("modify","create","remove","copy","snapshot","view","security","debug"))){
$msgs[] = "Invalid option specified '".$entry['action']."'";
}
index 1a00f4d1eed2a91daac51ef4b7b14e6b658f0681..abf4af9f9c98c3efa87bd10a08798d0d07e3d20b 100644 (file)
$link = @mysql_pconnect($cfg['SERVER'], $cfg['LOGIN'], $cfg['PASSWORD']);
if ($link === FALSE){
print_red(_("Can't connect to log database, no logs can be shown!"));
+ new log("debug","logview","",array(),@mysql_error());
return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
}
/* check of log database is available */
if (! @mysql_select_db("gomon")){
print_red(_("Can't select log database for log generation!"));
+ new log("debug","logview","",array(),@mysql_error());
return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
}
$result = @mysql_query($query);
if ($result === false){
print_red(_("Query for log database failed!. Requesting host names failed."));
+ new log("debug","logview","",array(),@mysql_error());
return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
}
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__, $query, "Database query");
$result = @mysql_query($query);
if ($result === false){
+ new log("debug","logview","",array(),@mysql_error());
print_red(_("Query for log database failed!"));
return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
}
/* Test connection object && create up query string */
if ($link === FALSE){
print_red(_("Can't connect to log database, no logs can be shown!"));
+ new log("debug","logview","",array(),@mysql_error());
} else {
if (! @mysql_select_db("gomon")){
print_red(_("Can't select log database for log generation!"));
+ new log("debug","logview","",array(),@mysql_error());
} else {
/* Assemble time query */
/* Get number of entries */
$query= "SELECT COUNT(*)".$query_base.";";
$result = @mysql_query($query);
+ if(!$result){
+ new log("debug","logview","",array(),@mysql_error());
+ }
$line= mysql_fetch_array($result, MYSQL_ASSOC);
$count= $line['COUNT(*)'];
if ($count > 25){
$query= "SELECT *".$query_base." ORDER BY ".$this->fields[$this->sort]." $desc LIMIT ".$this->start.",".$this->range.";";
@DEBUG (DEBUG_MYSQL, __LINE__, __FUNCTION__, __FILE__, $query, "Database query");
$result = @mysql_query($query);
-
+ if(!$result){
+ new log("debug","logview","",array(),@mysql_error());
+ }
/* Display results */
$mod= 0;