Skip to content

Commit cce3c1b

Browse files
author
Marius Cramer
committed
Fixed problem with AUTHSQL placeholder in tform
1 parent ebbe637 commit cce3c1b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

interface/lib/classes/tform_base.inc.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ protected function _getDatasourceData($field, $record, $api = false) {
270270
unset($tmp_recordid);
271271

272272
$querystring = str_replace("{AUTHSQL}", $this->getAuthSQL('r'), $querystring);
273-
$querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', "self::table_auth_sql", $querystring);
273+
$querystring = preg_replace_callback('@{AUTHSQL::(.+?)}@', array($this, 'table_auth_sql'), $querystring);
274274

275275
// Getting the records
276276
$tmp_records = $app->db->queryAllRecords($querystring);
@@ -312,6 +312,9 @@ protected function _getDatasourceData($field, $record, $api = false) {
312312

313313
}
314314

315+
function table_auth_sql($matches){
316+
return $this->getAuthSQL('r', $matches[1]);
317+
}
315318

316319
/**
317320
* Get the key => value array of a form filled from a datasource definitiom

0 commit comments

Comments
 (0)