2009-12-09 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: change the function "get_db_all_row_by_steps_sql", now it support more connection with parameter $new for new conection and $result for connection. * operation/events/export_csv.php: rewrite to adapt the new "get_db_all_row_by_steps_sql". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2190 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
df8d5dbf7d
commit
703b222d8a
|
@ -1,3 +1,12 @@
|
|||
2009-12-09 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_db.php: change the function
|
||||
"get_db_all_row_by_steps_sql", now it support more connection with
|
||||
parameter $new for new conection and $result for connection.
|
||||
|
||||
* operation/events/export_csv.php: rewrite to adapt the new
|
||||
"get_db_all_row_by_steps_sql".
|
||||
|
||||
2009-12-09 Raul Mateos <raulofpandora@gmail.com>
|
||||
|
||||
* images/god9.png: New image.
|
||||
|
|
|
@ -1876,13 +1876,13 @@ function get_db_all_rows_filter ($table, $filter, $fields = false, $where_join =
|
|||
* rest of times pass none for iterate in table and extract row by row, and
|
||||
* the end return false.
|
||||
*
|
||||
* @param bool $new Default true, if true start to query.
|
||||
* @param resource $result The resource of mysql for access to query.
|
||||
* @param string $sql
|
||||
* @return mixed The row or false in error.
|
||||
*/
|
||||
function get_db_all_row_by_steps_sql($sql = null) {
|
||||
static $result;
|
||||
|
||||
if ($sql !== null)
|
||||
function get_db_all_row_by_steps_sql($new = true, &$result, $sql = null) {
|
||||
if ($new == true)
|
||||
$result = mysql_query($sql);
|
||||
|
||||
return mysql_fetch_assoc($result);
|
||||
|
|
|
@ -73,9 +73,10 @@ $fields = array ('id_grupo', 'id_agente', 'evento', 'estado', 'id_usuario',
|
|||
'event_type', 'criticity', 'timestamp');
|
||||
|
||||
$sql = get_db_all_rows_filter ('tevento', $filter, $fields, 'AND', true);
|
||||
get_db_all_row_by_steps_sql($sql);
|
||||
|
||||
while ($event = get_db_all_row_by_steps_sql()) {
|
||||
$new = true;
|
||||
while ($event = get_db_all_row_by_steps_sql($new, $result, $sql)) {
|
||||
$new = false;
|
||||
if (! give_acl ($config["id_user"], $event["id_grupo"], "AR"))
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue