~ubuntu-branches/ubuntu/maverick/mediawiki/maverick

« back to all changes in this revision

Viewing changes to includes/api/ApiQueryAllpages.php

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis
  • Date: 2009-06-19 01:38:50 UTC
  • mfrom: (16.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090619013850-dsn4lrxvs90ab4rx
Tags: 1:1.15.0-1
* New upstream release. 
* Upstream added support for OASIS documents.
Closes: #530328
* Refreshed quilt patches
* Bumped standards versions to 3.8.2
* Bumped compat to 7
* Pointed to GPL-2 in debian/copyright
* Added php5-sqlite to possible DB backend dependencies.
Closes: #501569
* Proofread README.Debian, upgrade is documented there.
Closes: #520121

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
                $this->addOption('LIMIT', $limit+1);
136
136
                $res = $this->select(__METHOD__);
137
137
 
138
 
                $data = array ();
139
138
                $count = 0;
 
139
                $result = $this->getResult();
140
140
                while ($row = $db->fetchObject($res)) {
141
141
                        if (++ $count > $limit) {
142
142
                                // We've reached the one extra which shows that there are additional pages to be had. Stop here...
147
147
 
148
148
                        if (is_null($resultPageSet)) {
149
149
                                $title = Title :: makeTitle($row->page_namespace, $row->page_title);
150
 
                                $data[] = array(
 
150
                                $vals = array(
151
151
                                        'pageid' => intval($row->page_id),
152
152
                                        'ns' => intval($title->getNamespace()),
153
153
                                        'title' => $title->getPrefixedText());
 
154
                                $fit = $result->addValue(array('query', $this->getModuleName()), null, $vals);
 
155
                                if(!$fit)
 
156
                                {
 
157
                                        $this->setContinueEnumParameter('from', $this->keyToTitle($row->page_title));
 
158
                                        break;
 
159
                                }
154
160
                        } else {
155
161
                                $resultPageSet->processDbRow($row);
156
162
                        }
158
164
                $db->freeResult($res);
159
165
 
160
166
                if (is_null($resultPageSet)) {
161
 
                        $result = $this->getResult();
162
 
                        $result->setIndexedTagName($data, 'p');
163
 
                        $result->addValue('query', $this->getModuleName(), $data);
 
167
                        $result->setIndexedTagName_internal(array('query', $this->getModuleName()), 'p');
164
168
                }
165
169
        }
166
170
 
264
268
        }
265
269
 
266
270
        public function getVersion() {
267
 
                return __CLASS__ . ': $Id: ApiQueryAllpages.php 44863 2008-12-20 23:54:04Z catrope $';
 
271
                return __CLASS__ . ': $Id: ApiQueryAllpages.php 46845 2009-02-05 14:30:59Z catrope $';
268
272
        }
269
 
}
 
273
}
 
 
b'\\ No newline at end of file'