Merge "jquery.getAttrs: Replace deprecated nodeName/nodeValue with Attr.name/value"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 4 Nov 2014 09:53:11 +0000 (09:53 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 4 Nov 2014 09:53:11 +0000 (09:53 +0000)
includes/DefaultSettings.php
includes/MovePage.php
includes/debug/logger/Logger.php
includes/htmlform/HTMLTagFilter.php
includes/page/WikiPage.php
resources/src/mediawiki.ui/components/checkbox.less
tests/phpunit/MediaWikiTestCase.php

index cfc8438..29d653d 100644 (file)
@@ -7297,13 +7297,21 @@ $wgPagePropsHaveSortkey = true;
 $wgHttpsPort = 443;
 
 /**
- * Secret and algorithm for hmac-based key derivation function (fast,
+ * Secret for hmac-based key derivation function (fast,
  * cryptographically secure random numbers).
  * This should be set in LocalSettings.php, otherwise wgSecretKey will
  * be used.
+ * See also: $wgHKDFAlgorithm
  * @since 1.24
  */
 $wgHKDFSecret = false;
+
+/**
+ * Algorithm for hmac-based key derivation function (fast,
+ * cryptographically secure random numbers).
+ * See also: $wgHKDFSecret
+ * @since 1.24
+ */
 $wgHKDFAlgorithm = 'sha256';
 
 /**
index 7bad3f9..994be91 100644 (file)
@@ -439,6 +439,9 @@ class MovePage {
 
                $dbw = wfGetDB( DB_MASTER );
 
+               $oldpage = WikiPage::factory( $this->oldTitle );
+               $oldcountable = $oldpage->isCountable();
+
                $newpage = WikiPage::factory( $nt );
 
                if ( $moveOverRedirect ) {
@@ -486,7 +489,8 @@ class MovePage {
                wfRunHooks( 'NewRevisionFromEditComplete',
                        array( $newpage, $nullRevision, $nullRevision->getParentId(), $user ) );
 
-               $newpage->doEditUpdates( $nullRevision, $user, array( 'changed' => false ) );
+               $newpage->doEditUpdates( $nullRevision, $user,
+                       array( 'changed' => false, 'moved' => true, 'oldcountable' => $oldcountable ) );
 
                if ( !$moveOverRedirect ) {
                        WikiPage::onArticleCreate( $nt );
index 7164bfa..f5d2445 100644 (file)
  * @file
  */
 
+if ( !interface_exists( '\Psr\Log\LoggerInterface' ) ) {
+       $message = <<<TXT
+MediaWiki requires the <a href="https://github.com/php-fig/log">PSR-3 logging library</a> to be present. This library is not embedded directly in MediaWiki's git repository and must be installed separately by the end user.
+
+Please see <a href="https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries">mediawiki.org</a> for help on installing the required components.
+TXT;
+       echo $message;
+       trigger_error( $message, E_USER_ERROR );
+       die( 1 );
+}
+
 /**
  * PSR-3 logging service.
  *
index da5e85c..eac9423 100644 (file)
@@ -10,6 +10,6 @@ class HTMLTagFilter extends HTMLFormField {
                        // we only need the select field, HTMLForm should handle the label
                        return $tagFilterSelector;
                }
-               return;
+               return '';
        }
 }
index 81c93a1..bd6fabc 100644 (file)
@@ -2142,6 +2142,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @param array $options Array of options, following indexes are used:
         * - changed: boolean, whether the revision changed the content (default true)
         * - created: boolean, whether the revision created the page (default false)
+        * - moved: boolean, whether the page was moved (default false)
         * - oldcountable: boolean or null (default null):
         *   - boolean: whether the page was counted as an article before that
         *     revision, only used in changed is true and created is false
@@ -2152,7 +2153,12 @@ class WikiPage implements Page, IDBAccessObject {
 
                wfProfileIn( __METHOD__ );
 
-               $options += array( 'changed' => true, 'created' => false, 'oldcountable' => null );
+               $options += array(
+                       'changed' => true,
+                       'created' => false,
+                       'moved' => false,
+                       'oldcountable' => null
+               );
                $content = $revision->getContent();
 
                // Parse the text
@@ -2201,7 +2207,7 @@ class WikiPage implements Page, IDBAccessObject {
                $title = $this->mTitle->getPrefixedDBkey();
                $shortTitle = $this->mTitle->getDBkey();
 
-               if ( !$options['changed'] ) {
+               if ( !$options['changed'] && !$options['moved'] ) {
                        $good = 0;
                } elseif ( $options['created'] ) {
                        $good = (int)$this->isCountable( $editInfo );
index 4204c29..929cf61 100644 (file)
                // the pseudo before element of the label after the checkbox now looks like a checkbox
                & + label {
                        cursor: pointer;
-                       margin: 0 .4em;
+                       margin: 0 0.4em;
 
                        &::before {
-                                               content: '';
-                                               position: absolute;
-                                               left: 0;
-                                               display: inline-block;
-                                               border-radius: @borderRadius;
-                                               margin-right: 18px;
-                                               width: @checkboxSize;
-                                               height: @checkboxSize;
-                                               background-color: #fff;
-                                               border: 1px solid grey;
-                                       }
+                               content: '';
+                               position: absolute;
+                               left: 0;
+                               display: inline-block;
+                               border-radius: @borderRadius;
+                               margin-right: 18px;
+                               width: @checkboxSize;
+                               height: @checkboxSize;
+                               background-color: #fff;
+                               border: 1px solid grey;
+                       }
                }
 
                // when the input is checked, style the label pseudo before element that followed as a checked checkbox
index 8bcfee0..95d3c40 100644 (file)
@@ -223,6 +223,8 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                        $this->db->ignoreErrors( false );
                }
 
+               DeferredUpdates::clearPendingUpdates();
+
                wfProfileOut( __METHOD__ );
        }