FU r106752: use "media-" instead of "images-" in container names. Long live books...
[lhc/web/wiklou.git] / includes / api / ApiBase.php
index cbf79d2..e1ba493 100644 (file)
@@ -187,6 +187,7 @@ abstract class ApiBase extends ContextSource {
         * @return DerivativeContext
         */
        public function createContext() {
+               wfDeprecated( __METHOD__, '1.19' );
                return new DerivativeContext( $this->getContext() );
        }
 
@@ -463,7 +464,7 @@ abstract class ApiBase extends ContextSource {
                // This is necessary to make stuff like ApiMain::getVersion()
                // returning the version string for ApiBase work
                if ( $path ) {
-                       return "{$matches[0]}\n   http://svn.wikimedia.org/" .
+                       return "{$matches[0]}\n   https://svn.wikimedia.org/" .
                                "viewvc/mediawiki/trunk/" . dirname( $path ) .
                                "/{$matches[2]}";
                }
@@ -539,7 +540,7 @@ abstract class ApiBase extends ContextSource {
         */
        public function getFinalDescription() {
                $desc = $this->getDescription();
-               wfRunHooks( 'ApiGetDescription', array( &$this, &$desc ) );
+               wfRunHooks( 'APIGetDescription', array( &$this, &$desc ) );
                return $desc;
        }
 
@@ -673,6 +674,7 @@ abstract class ApiBase extends ContextSource {
         * @return array
         */
        public static function getValidNamespaces() {
+               wfDeprecated( __METHOD__, '1.17' );
                return MWNamespace::getValidNamespaces();
        }
 
@@ -1498,6 +1500,13 @@ abstract class ApiBase extends ContextSource {
                return $this->mDBTime;
        }
 
+       /**
+        * @return DatabaseBase
+        */
+       protected function getDB() {
+               return wfGetDB( DB_SLAVE, 'api' );
+       }
+
        /**
         * Debugging function that prints a value and an optional backtrace
         * @param $value mixed Value to print