Merge "PHPUnit/Framework.php was removed in 2010"
[lhc/web/wiklou.git] / includes / User.php
index 309d755..de34bfc 100644 (file)
@@ -2046,7 +2046,9 @@ class User {
        /**
         * Set the password and reset the random token unconditionally.
         *
-        * @param $str String New password to set
+        * @param $str string|null New password to set or null to set an invalid
+        *        password hash meaning that the user will not be able to log in
+        *        through the web interface.
         */
        public function setInternalPassword( $str ) {
                $this->load();
@@ -2874,6 +2876,10 @@ class User {
         * the next change of any watched page.
         */
        public function clearAllNotifications() {
+               if ( wfReadOnly() ) {
+                       return;
+               }
+
                global $wgUseEnotif, $wgShowUpdatedMarker;
                if ( !$wgUseEnotif && !$wgShowUpdatedMarker ) {
                        $this->setNewtalk( false );
@@ -3264,7 +3270,7 @@ class User {
        public function getPageRenderingHash() {
                wfDeprecated( __METHOD__, '1.17' );
 
-               global $wgUseDynamicDates, $wgRenderHashAppend, $wgLang, $wgContLang;
+               global $wgRenderHashAppend, $wgLang, $wgContLang;
                if( $this->mHash ) {
                        return $this->mHash;
                }
@@ -3275,9 +3281,6 @@ class User {
 
                $confstr =        $this->getOption( 'math' );
                $confstr .= '!' . $this->getStubThreshold();
-               if ( $wgUseDynamicDates ) { # This is wrong (bug 24714)
-                       $confstr .= '!' . $this->getDatePreference();
-               }
                $confstr .= '!' . ( $this->getOption( 'numberheadings' ) ? '1' : '' );
                $confstr .= '!' . $wgLang->getCode();
                $confstr .= '!' . $this->getOption( 'thumbsize' );