summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d31d95e)
raw | patch | inline | side by side (parent: d31d95e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Jun 2007 12:34:42 +0000 (12:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Jun 2007 12:34:42 +0000 (12:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6533 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/addons/logview/class_gosa_logview.inc | patch | blob | history | |
plugins/addons/logview/gosa_log_contents.tpl | patch | blob | history |
diff --git a/plugins/addons/logview/class_gosa_logview.inc b/plugins/addons/logview/class_gosa_logview.inc
index 92c572559246d06efbbb71ffd81835f698eaf7ce..41903b60e9415f4a08957aa48d3fe1fac2995354 100644 (file)
var $sort = 2;
var $sort_direction = "down";
- var $fields = array("action","timestamp","user","result");
+ var $fields = array("action","timestamp","user","result","repeated");
var $range = 25;
var $view_logged = FALSE;
$smarty->assign("mode1", "");
$smarty->assign("mode2", "");
$smarty->assign("mode3", "");
+ $smarty->assign("mode4", "");
/* Assign select option content */
foreach( array("server", "action", "time", "regex") as $type){
}
/* Query results */
- $query= "SELECT *".$query_base." ORDER BY ".$this->fields[$this->sort]." $desc LIMIT ".$this->start.",".$this->range.";";
+ $query= "SELECT count(`action`) as 'repeated',`user`,`result`,`timestamp`,`action`,`action`,`objecttype`,`object`".$query_base." GROUP BY `action`,`result`,`timestamp` 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);
$res.=" <td>".date("H:i:s d.m.Y",$line['timestamp'])."</td>";
$res.=" <td title='".$line['object']."'>".preg_replace("/,/",", ",$line['user'])."</td>";
$res.=" <td>".$line['result']."</td>";
+ $res.=" <td>".$line['repeated']."</td>";
$res.=" </tr>\n";
}
mysql_close($link);
}
$this->sort= (int)$_GET['sort'];
- if ($this->sort < 0 || $this->sort > 3){
+ if ($this->sort < 0 || $this->sort > 4){
$this->sort= 0;
}
}
diff --git a/plugins/addons/logview/gosa_log_contents.tpl b/plugins/addons/logview/gosa_log_contents.tpl
index f2c4b34082e21e0c14d50841d9cf381c14eb2978..992aef986c259d3daa7431902a507be8bb39725b 100644 (file)
<td><a href=main.php{$plug}&sort=2&direction={$direction}>{t}Date{/t} {$mode2}</a></td>
<td><a href=main.php{$plug}&sort=1&direction={$direction}>{t}User{/t} {$mode1}</a></td>
<td><a href=main.php{$plug}&sort=3&direction={$direction}>{t}Message{/t} {$mode3}</a></td>
+ <td><a href=main.php{$plug}&sort=4&direction={$direction}>{t}Repeated{/t} {$mode4}</a></td>
</tr>
{$search_result}
</table>