diff --git a/config.default.php b/config.default.php index 60c0b83a..3c0ac880 100644 --- a/config.default.php +++ b/config.default.php @@ -240,6 +240,12 @@ if (!defined('ALLOW_PAGE_REFRESH')) define ('ALLOW_PAGE_REFRESH',true); */ if (!defined('ALLOW_RESPONDENT_SELECTOR')) define ('ALLOW_RESPONDENT_SELECTOR',true); + +/** + * Number of log records to display + */ +if (!defined('PROCESS_LOG_LIMIT')) define('PROCESS_LOG_LIMIT', 500); + /** * Database configuration for queXS */ diff --git a/functions/functions.process.php b/functions/functions.process.php index aabd0258..5d251b21 100644 --- a/functions/functions.process.php +++ b/functions/functions.process.php @@ -207,10 +207,11 @@ function process_get_data($process_id) { global $db; - $sql = "SELECT process_log_id,datetime,data + $sql = "SELECT process_log_id,DATE_FORMAT(datetime,'" . DATE_TIME_FORMAT ."') as datetime,data FROM `process_log` WHERE `process_id` = '$process_id' - ORDER BY process_log_id DESC"; + ORDER BY process_log_id DESC + LIMIT " . PROCESS_LOG_LIMIT; $rs = $db->GetAll($sql);