Post by JNeuhoff » Fri Jan 25, 2008 6:17 pm

It seems no one has noticed that before. When, for a given category, the products are splitted up accross multiple pages, e.g. '1 of 12', '2 of 12', ...,'12 of 12', the text_results is wrong:

For example:
'1 of 12' shown as 'Results 1 - 9 of 100'
'2 of 12' shown as 'Results 9 - 18 of 100' instead of 'Results 10 - 18 of 100
....
'12 of 12' shown as 'Results 99 - 100 of 100' instead of 'Results 100 - 100'

Daniel, I think there might be a bug in the Database->splitQuery method! I'll take a closer look at it today, maybe I can fix it.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by JNeuhoff » Fri Jan 25, 2008 6:46 pm

OK, Here is how to fix it:

In file library/database/database.php, within the method splitQuery, replace the line containing

Code: Select all

$this->from  = (int)(($offset > 0 || $count['total'] == 0) ? $offset : '1');
with the corrected one:

Code: Select all

$this->from  = (int)(($offset > 0 || $count['total'] == 0) ? $offset+1 : '1');
Daniel, please make sure that future releases will contain this fix!

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK
Who is online

Users browsing this forum: No registered users and 8 guests