From: Andrew Garrett Date: Fri, 12 Jan 2007 12:46:01 +0000 (+0000) Subject: "Two" X-Git-Tag: 1.31.0-rc.0~54465 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=b91b0492086bf918b285cf7bef07f18bb2941fc9;p=lhc%2Fweb%2Fwiklou.git "Two" --- 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) {