(bug 37183) Removed hard coded parentheses in SpecialListfiles.php
[lhc/web/wiklou.git] / includes / QueryPage.php
index 151cc76..4440aac 100644 (file)
@@ -1,6 +1,22 @@
 <?php
 /**
- * Contain a class for special pages
+ * Base code for "query" special pages.
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @file
  * @ingroup SpecialPage
  */
@@ -360,7 +376,7 @@ abstract class QueryPage extends SpecialPage {
                        $options = isset( $query['options'] ) ? (array)$query['options'] : array();
                        $join_conds = isset( $query['join_conds'] ) ? (array)$query['join_conds'] : array();
                        if ( count( $order ) ) {
-                               $options['ORDER BY'] = implode( ', ', $order );
+                               $options['ORDER BY'] = $order;
                        }
                        if ( $limit !== false ) {
                                $options['LIMIT'] = intval( $limit );
@@ -483,7 +499,7 @@ abstract class QueryPage extends SpecialPage {
                                        $updateddate = $lang->userDate( $ts, $user );
                                        $updatedtime = $lang->userTime( $ts, $user );
                                        $out->addMeta( 'Data-Cache-Time', $ts );
-                                       $out->addInlineScript( "var dataCacheTime = '$ts';" );
+                                       $out->addJsConfigVars( 'dataCacheTime', $ts );
                                        $out->addWikiMsg( 'perfcachedts', $updated, $updateddate, $updatedtime, $maxResults );
                                } else {
                                        $out->addWikiMsg( 'perfcached', $maxResults );
@@ -492,7 +508,7 @@ abstract class QueryPage extends SpecialPage {
                                # If updates on this page have been disabled, let the user know
                                # that the data set won't be refreshed for now
                                if ( is_array( $wgDisableQueryPageUpdate ) && in_array( $this->getName(), $wgDisableQueryPageUpdate ) ) {
-                                       $out->addWikiMsg( 'querypage-no-updates' );
+                                       $out->wrapWikiMsg( "<div class=\"mw-querypage-no-updates\">\n$1\n</div>", 'querypage-no-updates' );
                                }
                        }
                }
@@ -671,7 +687,7 @@ abstract class QueryPage extends SpecialPage {
                if ( !isset( $row->title ) ) {
                        return null;
                }
-               $title = Title::MakeTitle( intval( $row->namespace ), $row->title );
+               $title = Title::makeTitle( intval( $row->namespace ), $row->title );
                if ( $title ) {
                        $date = isset( $row->timestamp ) ? $row->timestamp : '';
                        $comments = '';