2013-02-28 Miguel de Dios <miguel.dedios@artica.es>

* godmode/admin_access_logs.php: cleaned source code style.
	
	* include/functions_db.php: fixed the set ip in the function
	"db_pandora_audit".
	
	Fixes: #3606276




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7756 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-28 16:07:54 +00:00
parent 38cd6399c0
commit fafb8f2d5f
3 changed files with 34 additions and 13 deletions

View File

@ -1,3 +1,12 @@
2013-02-28 Miguel de Dios <miguel.dedios@artica.es>
* godmode/admin_access_logs.php: cleaned source code style.
* include/functions_db.php: fixed the set ip in the function
"db_pandora_audit".
Fixes: #3606276
2013-02-28 Miguel de Dios <miguel.dedios@artica.es>
* operation/events/events.php: fixed the javascript to use the

View File

@ -44,7 +44,8 @@ echo '<tr><td class="datost">';
echo '<div style="float: left; width: 400px;">';
echo '<b>'.__('Filter').'</b><br><br>';
$rows = db_get_all_rows_sql ("SELECT DISTINCT(accion) FROM tsesion");
$rows = db_get_all_rows_sql ("SELECT DISTINCT(accion)
FROM tsesion");
if (empty ($rows)) {
$rows = array ();
}
@ -53,7 +54,7 @@ $actions = array ();
foreach ($rows as $row) {
$actions[$row["accion"]] = $row["accion"];
}
echo '<form name="query_sel" method="post" action="index.php?sec=godmode&sec2=godmode/admin_access_logs">';
echo '<form name="query_sel" method="post" action="index.php?sec=glog&sec2=godmode/admin_access_logs">';
$table = null;
$table->width = '100%';
$table->data = array();
@ -135,16 +136,27 @@ ui_pagination ($count, $url);
switch ($config["dbtype"]) {
case "mysql":
$sql = sprintf ("SELECT * FROM tsesion %s ORDER BY fecha DESC LIMIT %d, %d", $filter, $offset, $config["block_size"]);
$sql = sprintf ("SELECT *
FROM tsesion
%s
ORDER BY fecha DESC
LIMIT %d, %d", $filter, $offset, $config["block_size"]);
break;
case "postgresql":
$sql = sprintf ("SELECT * FROM tsesion %s ORDER BY fecha DESC LIMIT %d OFFSET %d", $filter, $config["block_size"], $offset);
$sql = sprintf ("SELECT *
FROM tsesion
%s
ORDER BY fecha DESC
LIMIT %d OFFSET %d", $filter, $config["block_size"], $offset);
break;
case "oracle":
$set = array();
$set['limit'] = $config["block_size"];
$set['offset'] = $offset;
$sql = sprintf ("SELECT * FROM tsesion %s ORDER BY fecha DESC", $filter);
$sql = sprintf ("SELECT *
FROM tsesion
%s
ORDER BY fecha DESC", $filter);
$result = oracle_recode_query ($sql, $set);
break;
}

View File

@ -118,7 +118,7 @@ function db_escape_string_sql($string) {
*
* @return int Return the id of row in tsesion or false in case of fail.
*/
function db_pandora_audit($accion, $descripcion, $user_id = false, $ip = false, $info = '') {
function db_pandora_audit($accion, $descripcion, $user_id = false, $ip = true, $info = '') {
global $config;
if ($ip !== false) {