preferring get_rrows over get_rows to fix SQL error in timesheet merge

This commit is contained in:
Ralf Becker 2021-09-13 18:02:39 +02:00
parent 47e35c4034
commit 7d08ac4936

View File

@ -2472,8 +2472,8 @@ abstract class Merge
return $ui->get_all_ids();
}
// Try cache
if( method_exists($ui_class, 'get_rows'))
// Try cache, preferring get_rrows over get_rows
if (method_exists($ui_class, $get_rows='get_rrows') || method_exists($ui_class, $get_rows='get_rows'))
{
foreach($locations as $location)
{
@ -2486,7 +2486,7 @@ abstract class Merge
$rows = $readonlys = array();
@set_time_limit(0); // switch off the execution time limit, as it's for big selections to small
$session['num_rows'] = -1; // all
$ui->get_rows($session, $rows, $readonlys);
$ui->$get_rows($session, $rows, $readonlys);
foreach($rows as $row_number => $row)
{
if(!is_numeric($row_number)) continue;