From b91b0492086bf918b285cf7bef07f18bb2941fc9 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 12 Jan 2007 12:46:01 +0000 Subject: [PATCH] "Two" --- includes/Title.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index cdcf64e02a..3511ce407e 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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) { -- 2.20.1