Skip to content

Commit e45f6d6

Browse files
committed
Enabled status field in sys datalog processing scripts.
1 parent 6e0b961 commit e45f6d6

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

interface/web/admin/datalog_list.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
$app->uses('listform_actions');
4848
//$app->listform_actions->SQLExtWhere = "wb = 'W'";
49+
$app->listform_actions->SQLOrderBy = "ORDER BY tstamp DESC, datalog_id DESC";
4950

5051
$app->listform_actions->onLoad();
5152

interface/web/admin/list/log.list.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
//* Enable auth
4040
$liste['auth'] = 'no';
4141

42-
$liste['sort_field'] = 'tstamp';
43-
$liste['sort_direction'] = 'ASC';
44-
4542
/*****************************************************
4643
* Suchfelder
4744
*****************************************************/

interface/web/admin/log_list.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
$app->uses('listform_actions');
4848
//$app->listform_actions->SQLExtWhere = "wb = 'W'";
4949

50+
$app->listform_actions->SQLOrderBy = "ORDER BY tstamp DESC, syslog_id DESC";
51+
5052
$app->listform_actions->onLoad();
5153

5254

interface/web/admin/templates/syslog_list.htm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ <h2><tmpl_var name="list_head_txt"></h2>
1515
</tr>
1616
<tr>
1717
<td class="tbl_col_tstamp">&nbsp;</td>
18-
<td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','admin/syslog_list.php');">{tmpl_var name='search_server_id'}</select></td>
19-
<td class="tbl_col_loglevel"><select name="search_loglevel" onChange="submitForm('pageForm','admin/syslog_list.php');">{tmpl_var name='search_loglevel'}</select></td>
18+
<td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','admin/log_list.php');">{tmpl_var name='search_server_id'}</select></td>
19+
<td class="tbl_col_loglevel"><select name="search_loglevel" onChange="submitForm('pageForm','admin/log_list.php');">{tmpl_var name='search_loglevel'}</select></td>
2020
<td class="tbl_col_message"><input type="text" name="search_message" value="{tmpl_var name='search_message'}" /></td>
21-
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','admin/syslog_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
21+
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','admin/log_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
2222
</tr>
2323
</thead>
2424
<tbody>

server/lib/classes/modules.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@ function processDatalog() {
144144
$this->raiseTableHook($d["dbtable"],$d["action"],$data);
145145
$app->dbmaster->query("DELETE FROM sys_datalog WHERE datalog_id = ".$d["datalog_id"]);
146146
$app->log("Deleting sys_datalog ID ".$d["datalog_id"],LOGLEVEL_DEBUG);
147+
$app->db->query("UPDATE sys_datalog SET status = 'ok' WHERE datalog_id = ".$d["datalog_id"]);
147148
} else {
148149
$app->log("Error in Repliction, changes were not processed.",LOGLEVEL_ERROR);
150+
$app->db->query("UPDATE sys_datalog SET status = 'error' WHERE datalog_id = ".$d["datalog_id"]);
149151
}
150152
}
151153

@@ -158,6 +160,7 @@ function processDatalog() {
158160
$this->raiseTableHook($rec["dbtable"],$rec["action"],$data);
159161
$app->db->query("DELETE FROM sys_datalog WHERE datalog_id = ".$rec["datalog_id"]);
160162
$app->log("Deleting sys_datalog ID ".$rec["datalog_id"],LOGLEVEL_DEBUG);
163+
$app->db->query("UPDATE sys_datalog SET status = 'ok' WHERE datalog_id = ".$rec["datalog_id"]);
161164
}
162165
}
163166

server/server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
*/
6868

6969
// Check if there is anything to update
70-
$tmp_rec = $app->dbmaster->queryOneRecord("SELECT count(server_id) as number from sys_datalog WHERE server_id = ".$conf["server_id"]);
70+
$tmp_rec = $app->dbmaster->queryOneRecord("SELECT count(server_id) as number from sys_datalog WHERE server_id = ".$conf["server_id"]." AND status = 'pending'");
7171
$tmp_num_records = $tmp_rec["number"];
7272
unset($tmp_rec);
7373

0 commit comments

Comments
 (0)