Moved globals $utfCombiningClass, $utfCanonicalComp, $utfCanonicalDecomp, $utfCheckNF...
[lhc/web/wiklou.git] / includes / api / ApiQueryExternalLinks.php
index bc33f33..082b340 100644 (file)
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  */
 
@@ -63,11 +63,10 @@ class ApiQueryExternalLinks extends ApiQueryBase {
                        $this->addOption( 'OFFSET', $params['offset'] );
                }
 
-               $db = $this->getDB();
                $res = $this->select( __METHOD__ );
 
                $count = 0;
-               while ( $row = $db->fetchObject( $res ) ) {
+               foreach ( $res as $row ) {
                        if ( ++$count > $params['limit'] ) {
                                // We've reached the one extra which shows that
                                // there are additional pages to be had. Stop here...
@@ -84,6 +83,10 @@ class ApiQueryExternalLinks extends ApiQueryBase {
                }
        }
 
+       public function getCacheMode( $params ) {
+               return 'public';
+       }
+
        public function getAllowedParams() {
                return array(
                        'limit' => array(
@@ -118,4 +121,4 @@ class ApiQueryExternalLinks extends ApiQueryBase {
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
-}
\ No newline at end of file
+}