Merge "Allow setting default thumb size in parser tests"
[lhc/web/wiklou.git] / includes / search / SearchPostgres.php
index c9f5466..142e5fd 100644 (file)
@@ -3,7 +3,7 @@
  * PostgreSQL search engine
  *
  * Copyright © 2006-2007 Greg Sabino Mullane <greg@turnstep.com>
- * http://www.mediawiki.org/
+ * https://www.mediawiki.org/
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -140,8 +140,8 @@ class SearchPostgres extends SearchDatabase {
                $searchstring = $this->parseQuery( $term );
 
                ## We need a separate query here so gin does not complain about empty searches
-               $SQL = "SELECT to_tsquery($searchstring)";
-               $res = $this->db->query( $SQL );
+               $sql = "SELECT to_tsquery($searchstring)";
+               $res = $this->db->query( $sql );
                if ( !$res ) {
                        ## TODO: Better output (example to catch: one 'two)
                        die( "Sorry, that was not a valid search string. Please go back and try again" );
@@ -196,10 +196,10 @@ class SearchPostgres extends SearchDatabase {
 
        function update( $pageid, $title, $text ) {
                ## We don't want to index older revisions
-               $SQL = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN " .
+               $sql = "UPDATE pagecontent SET textvector = NULL WHERE old_id IN " .
                                "(SELECT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) .
                                " ORDER BY rev_text_id DESC OFFSET 1)";
-               $this->db->query( $SQL );
+               $this->db->query( $sql );
                return true;
        }
 
@@ -217,6 +217,7 @@ class PostgresSearchResult extends SearchResult {
                parent::__construct( $row );
                $this->score = $row->score;
        }
+
        function getScore() {
                return $this->score;
        }