Index: trunk/phase3/includes/api/ApiQueryCategoryInfo.php |
— | — | @@ -69,17 +69,15 @@ |
70 | 70 | $this->addWhere(array('cat_title' => $cattitles)); |
71 | 71 | if(!is_null($params['continue'])) |
72 | 72 | { |
73 | | - // We need to set a LIMIT in order to be able to set |
74 | | - // an OFFSET |
75 | | - $this->addOption('LIMIT', count($titles)); |
76 | | - $this->addOption('OFFSET', $params['continue']); |
77 | | - } |
| 73 | + $title = $this->getDB()->addQuotes($params['continue']); |
| 74 | + $this->addWhere("cat_title >= $title"); |
| 75 | + } |
| 76 | + $this->addOption('ORDER BY', 'cat_title'); |
78 | 77 | |
79 | 78 | $db = $this->getDB(); |
80 | 79 | $res = $this->select(__METHOD__); |
81 | 80 | |
82 | 81 | $catids = array_flip($cattitles); |
83 | | - $count = (int)@$params['continue']; |
84 | 82 | while($row = $db->fetchObject($res)) |
85 | 83 | { |
86 | 84 | $vals = array(); |
— | — | @@ -92,10 +90,9 @@ |
93 | 91 | $fit = $this->addPageSubItems($catids[$row->cat_title], $vals); |
94 | 92 | if(!$fit) |
95 | 93 | { |
96 | | - $this->setContinueEnumParameter('continue', $count); |
| 94 | + $this->setContinueEnumParameter('continue', $row->cat_title); |
97 | 95 | break; |
98 | 96 | } |
99 | | - $count++; |
100 | 97 | } |
101 | 98 | $db->freeResult($res); |
102 | 99 | } |