summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6a5cd62)
raw | patch | inline | side by side (parent: 6a5cd62)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 30 Jun 2008 13:51:43 +0000 (13:51 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 30 Jun 2008 13:51:43 +0000 (13:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11483 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/log/addons/logview/class_gosa_logview.inc | patch | blob | history |
diff --git a/gosa-plugins/log/addons/logview/class_gosa_logview.inc b/gosa-plugins/log/addons/logview/class_gosa_logview.inc
index 7863936f5ee03516698191ffc76ac10c39f26f80..cb36d697363616cc529766d7aa71956324450517 100644 (file)
* Connect to currently selected server
****/
$cfg = $list_of_servers[$this->server];
+
$link = @mysql_pconnect($this->server, $cfg['USER'], $cfg['PWD']);
if ($link === FALSE){
msg_dialog::display(_("Error"), msgPool::dbconnect($this->server,@mysql_error(),"GOsa LOG"), ERROR_DIALOG);
$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){
msg_dialog::display(_("Error"), msgPool::dbquery("gosa_log",@mysql_error(), "GOsa LOG"), ERROR_DIALOG);
new log("debug","gosa_logging","querydb",array(),@mysql_error());
$res.=" <td>".date("H:i:s d.m.Y",($line['timestamp'] + $this->timezone_offset))."</td>";
$res.=" <td title='".$line['user']."'>".preg_replace("/,/",", ",$user)."</td>";
$res.=" <td title='".$line['objecttype']."'>".$line['objecttype']."</td>";
- $res.=" <td title='".$line['object']."'>".preg_replace("/,/",", ",$object)."</td>";
+ $res.=" <td title='".$line['object']."'>".preg_replace("/,/",", ",LDAP::fix($object))."</td>";
$res.=" <td>".$line['result']."</td>";
$res.=" </tr>\n";
}
$logfilter_changed = FALSE;
foreach( array("server", "action","time","regex") as $type){
if(isset($_POST[$type])){
- $this->$type = $_POST[$type];
+ if($type == "server" && $this->server != $_POST['server']){
+ $this->location_id = -1;
+ }
+ $this->$type = $_POST[$type];
}
}
/* Save attributes in Sessiob, so we are able to recontruct filter on plugin reload */
$logview = session::get('logview');
$logview['gosa_log'] = array();
+
foreach(array("action","server","time","regex") as $attr){
$logview['gosa_log'][$attr] = $this->$attr;
}