"Two"
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 12 Jan 2007 12:46:01 +0000 (12:46 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 12 Jan 2007 12:46:01 +0000 (12:46 +0000)
includes/Title.php

index cdcf64e..3511ce4 100644 (file)
@@ -1372,14 +1372,16 @@ class Title {
                        $where_clauses = array( 'tl_namespace' => $this->getNamespace(), 'tl_title' => $this->getDBkey(), 'tl_from=pr_page', 'pr_cascade' => 1 );
                }
 
+               $options = array ();
+
                if ( $get_pages ) {
                        $where_clauses[] = 'page_id=pr_page';
                        $tables[] = 'page';
+               } else {
+                       options[] = "LIMIT 1";
                }
 
-               #!$get_pages or die( var_dump( array( $cols, $tables, $where_clauses ) ) );
-
-               $res = $dbr->select( $tables, $cols, $where_clauses, __METHOD__);
+               $res = $dbr->select( $tables, $cols, $where_clauses, __METHOD__, $options);
 
                if ($dbr->numRows($res)) {
                        if ($get_pages) {