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

« back to all changes in this revision

Viewing changes to includes/api/ApiQueryLangLinks.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:
71
71
                $this->addOption('LIMIT', $params['limit'] + 1);
72
72
                $res = $this->select(__METHOD__);
73
73
 
74
 
                $data = array();
75
 
                $lastId = 0;    // database has no ID 0
76
74
                $count = 0;
77
75
                $db = $this->getDB();
78
76
                while ($row = $db->fetchObject($res)) {
82
80
                                $this->setContinueEnumParameter('continue', "{$row->ll_from}|{$row->ll_lang}");
83
81
                                break;
84
82
                        }
85
 
                        if ($lastId != $row->ll_from) {
86
 
                                if($lastId != 0) {
87
 
                                        $this->addPageSubItems($lastId, $data);
88
 
                                        $data = array();
89
 
                                }
90
 
                                $lastId = $row->ll_from;
91
 
                        }
92
 
 
93
83
                        $entry = array('lang' => $row->ll_lang);
94
84
                        ApiResult :: setContent($entry, $row->ll_title);
95
 
                        $data[] = $entry;
96
 
                }
97
 
 
98
 
                if($lastId != 0) {
99
 
                        $this->addPageSubItems($lastId, $data);
100
 
                }
101
 
 
 
85
                        $fit = $this->addPageSubItem($row->ll_from, $entry);
 
86
                        if(!$fit)
 
87
                        {
 
88
                                $this->setContinueEnumParameter('continue', "{$row->ll_from}|{$row->ll_lang}");
 
89
                                break;
 
90
                        }
 
91
                }
102
92
                $db->freeResult($res);
103
93
        }
104
94
 
134
124
        }
135
125
 
136
126
        public function getVersion() {
137
 
                return __CLASS__ . ': $Id: ApiQueryLangLinks.php 43271 2008-11-06 22:38:42Z siebrand $';
 
127
                return __CLASS__ . ': $Id: ApiQueryLangLinks.php 46845 2009-02-05 14:30:59Z catrope $';
138
128
        }
139
 
}
 
129
}
 
 
b'\\ No newline at end of file'