From 42539643c396f9d8865dcf9a51b13dc869709d16 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Wed, 13 Aug 2014 07:16:50 -0400
Subject: [PATCH] Merge remote-tracking branch 'ispc/stable-3.0.5' into stable-3.0.5
---
interface/lib/classes/tform.inc.php | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index 5fc0627..4522304 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -252,7 +252,9 @@
unset($tmp_recordid);
$querystring = str_replace("{AUTHSQL}", $this->getAuthSQL('r'), $querystring);
- $querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', "self::table_auth_sql", $querystring);
+ //$querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', "self::table_auth_sql", $querystring);
+ //*Used the ld form to be compatible with php < 5.3
+ $querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', create_function('$matches','global $app; $tmp = $app->tform->getAuthSQL("r", $matches[1]); return $tmp;'), $querystring);
// Getting the records
$tmp_records = $app->db->queryAllRecords($querystring);
@@ -293,10 +295,12 @@
return $values;
}
-
+
+ /*
function table_auth_sql($matches){
return $this->getAuthSQL('r', $matches[1]);
}
+ */
//* If the parameter 'valuelimit' is set
function applyValueLimit($limit, $values) {
@@ -1509,7 +1513,7 @@
*/
function _getDateTimeHTML($form_element, $default_value, $display_seconds=false)
{
- $_datetime = strtotime($default_value);
+ $_datetime = ($default_value && $default_value != '0000-00-00 00:00:00' ? strtotime($default_value) : false);
$_showdate = ($_datetime === false) ? false : true;
$dselect = array('day', 'month', 'year', 'hour', 'minute');
--
Gitblit v1.9.1