Skip to content

Commit b509d00

Browse files
author
Till Brehm
committed
Changed a function in tform.inc.php to make it compatible with php 5.1 (used in Centos 5.10).
1 parent 4e1eb63 commit b509d00

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

interface/lib/classes/tform.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ function getDatasourceData($field, $record) {
252252
unset($tmp_recordid);
253253

254254
$querystring = str_replace("{AUTHSQL}", $this->getAuthSQL('r'), $querystring);
255-
$querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', "self::table_auth_sql", $querystring);
255+
//$querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', "self::table_auth_sql", $querystring);
256+
//*Used the ld form to be compatible with php < 5.3
257+
$querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', create_function('$matches','global $app; $tmp = $app->tform->getAuthSQL("r", $matches[1]); return $tmp;'), $querystring);
256258

257259
// Getting the records
258260
$tmp_records = $app->db->queryAllRecords($querystring);
@@ -293,10 +295,12 @@ function getDatasourceData($field, $record) {
293295
return $values;
294296

295297
}
296-
298+
299+
/*
297300
function table_auth_sql($matches){
298301
return $this->getAuthSQL('r', $matches[1]);
299302
}
303+
*/
300304

301305
//* If the parameter 'valuelimit' is set
302306
function applyValueLimit($limit, $values) {

0 commit comments

Comments
 (0)