Merge "Ported r112366 from 1.19wmf branch indefinitely."
authorReedy <reedy@wikimedia.org>
Wed, 2 May 2012 17:12:02 +0000 (17:12 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 2 May 2012 17:12:03 +0000 (17:12 +0000)
18 files changed:
includes/GitInfo.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryLangLinks.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiQueryUsers.php
includes/objectcache/APCBagOStuff.php
includes/objectcache/DBABagOStuff.php
includes/objectcache/EhcacheBagOStuff.php
includes/objectcache/EmptyBagOStuff.php
includes/objectcache/HashBagOStuff.php
includes/objectcache/MemcachedClient.php
includes/objectcache/MemcachedPhpBagOStuff.php
includes/objectcache/MultiWriteBagOStuff.php
includes/objectcache/ObjectCache.php
includes/objectcache/SqlBagOStuff.php
includes/objectcache/WinCacheBagOStuff.php
includes/objectcache/XCacheBagOStuff.php
skins/Vector.php

index 74c07cc..b15cedd 100644 (file)
@@ -70,7 +70,7 @@ class GitInfo {
                if ( preg_match( "/ref: (.*)/", $HEAD, $m ) ) {
                        return rtrim( $m[1] );
                } else {
-                       return $HEAD;
+                       return rtrim( $HEAD );
                }
        }
 
index 7bf97d3..268b1e4 100644 (file)
@@ -263,7 +263,7 @@ class ApiQueryFilearchive extends ApiQueryBase {
                                ' mime              - Adds MIME of the image',
                                ' metadata          - Lists EXIF metadata for the version of the image',
                                ' bitdepth          - Adds the bit depth of the version',
-            ),
+                       ),
                );
        }
 
index d505d72..21cc925 100644 (file)
@@ -70,8 +70,8 @@ class ApiQueryLangLinks extends ApiQueryBase {
                        );
                }
 
-           $dir = ( $params['dir'] == 'descending' ? ' DESC' : '' );
-           if ( isset( $params['lang'] ) ) {
+                       $dir = ( $params['dir'] == 'descending' ? ' DESC' : '' );
+                       if ( isset( $params['lang'] ) ) {
                        $this->addWhereFld( 'll_lang', $params['lang'] );
                        if ( isset( $params['title'] ) ) {
                                $this->addWhereFld( 'll_title', $params['title'] );
index 8e2f20d..1654382 100644 (file)
@@ -185,7 +185,7 @@ class ApiQueryContributions extends ApiQueryBase {
                if ( !is_null( $show ) ) {
                        $show = array_flip( $show );
                        if ( ( isset( $show['minor'] ) && isset( $show['!minor'] ) )
-                                       || ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) ) ) {
+                                       || ( isset( $show['patrolled'] ) && isset( $show['!patrolled'] ) ) ) {
                                $this->dieUsageMsg( 'show' );
                        }
 
index 31624bd..38244ff 100644 (file)
@@ -61,10 +61,10 @@ class ApiQueryUsers extends ApiQueryBase {
                return $this->tokenFunctions;
        }
 
-        /**
-         * @param $user User
-         * @return String
-         */
+       /**
+        * @param $user User
+        * @return String
+        */
        public static function getUserrightsToken( $user ) {
                global $wgUser;
                // Since the permissions check for userrights is non-trivial,
index dd4a76e..b9a6a69 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Object caching using PHP's APC accelerator.
+ *
+ * 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 Cache
+ */
 
 /**
  * This is a wrapper for APC's shared memory functions
index ade8c0a..d03771e 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Object caching using DBA backend.
+ *
+ * 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 Cache
+ */
 
 /**
  * Cache that uses DBA as a backend.
index 75aad27..fb31d5c 100644 (file)
@@ -1,8 +1,31 @@
 <?php
+/**
+ * Object caching using the Ehcache RESTful web service.
+ *
+ * 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 Cache
+ */
 
 /**
  * Client for the Ehcache RESTful web service - http://ehcache.org/documentation/cache_server.html
  * TODO: Simplify configuration and add to the installer.
+ *
+ * @ingroup Cache
  */
 class EhcacheBagOStuff extends BagOStuff {
        var $servers, $cacheName, $connectTimeout, $timeout, $curlOptions, 
index 2aee6b1..abc6bcf 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Dummy object caching.
+ *
+ * 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 Cache
+ */
 
 /**
  * A BagOStuff object with no objects in it. Used to provide a no-op object to calling code.
index 3677330..26b949f 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Object caching using PHP arrays.
+ *
+ * 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 Cache
+ */
 
 /**
  * This is a test of the interface, mainly. It stores things in an associative
index 1ddf3b9..e816078 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Memcached client for PHP.
+ *
  * +---------------------------------------------------------------------------+
  * | memcached client, PHP                                                     |
  * +---------------------------------------------------------------------------+
index d2c7a2d..79f3241 100644 (file)
@@ -1,7 +1,30 @@
 <?php
+/**
+ * Object caching using memcached.
+ *
+ * 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 Cache
+ */
 
 /**
  * A wrapper class for the pure-PHP memcached client, exposing a BagOStuff interface.
+ *
+ * @ingroup Cache
  */
 class MemcachedPhpBagOStuff extends BagOStuff {
 
index 9063093..fd60e72 100644 (file)
@@ -1,9 +1,32 @@
 <?php
+/**
+ * Wrapper for object caching in different caches.
+ *
+ * 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 Cache
+ */
 
 /**
  * A cache class that replicates all writes to multiple child caches. Reads 
  * are implemented by reading from the caches in the order they are given in 
  * the configuration until a cache gives a positive result.
+ *
+ * @ingroup Cache
  */
 class MultiWriteBagOStuff extends BagOStuff {
        var $caches;
index 6225bb2..a59ca05 100644 (file)
@@ -1,10 +1,31 @@
 <?php
 /**
- * Functions to get cache objects
+ * Functions to get cache objects.
+ *
+ * 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 Cache
  */
+
+/**
+ * Functions to get cache objects
+ *
+ * @ingroup Cache
+ */
 class ObjectCache {
        static $instances = array();
 
index 4dfa574..b244b07 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Object caching using a SQL database.
+ *
+ * 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 Cache
+ */
 
 /**
  * Class to store objects in the database
index 7f46494..4fd3cf4 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Object caching using WinCache.
+ *
+ * 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 Cache
+ */
 
 /**
  * Wrapper for WinCache object caching functions; identical interface
index 0ddf124..08f52b7 100644 (file)
@@ -1,4 +1,25 @@
 <?php
+/**
+ * Object caching using XCache.
+ *
+ * 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 Cache
+ */
 
 /**
  * Wrapper for XCache object caching functions; identical interface
index d1b51a6..404bbe7 100644 (file)
@@ -134,9 +134,7 @@ class VectorTemplate extends BaseTemplate {
                        <!-- /sitenotice -->
                        <?php endif; ?>
                        <!-- firstHeading -->
-                       <h1 id="firstHeading" class="firstHeading">
-                               <span dir="auto"><?php $this->html( 'title' ) ?></span>
-                       </h1>
+                       <h1 id="firstHeading" class="firstHeading"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
                        <!-- /firstHeading -->
                        <!-- bodyContent -->
                        <div id="bodyContent">