Merge "(bug 30963) Option to hide redirects in Allpages and Prefixindex"
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 29 Mar 2012 06:05:38 +0000 (06:05 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 29 Mar 2012 06:05:38 +0000 (06:05 +0000)
RELEASE-NOTES-1.19
RELEASE-NOTES-1.20
includes/HttpFunctions.php
includes/db/DatabasePostgres.php
includes/debug/Debug.php
includes/installer/PostgresUpdater.php
includes/logging/LogFormatter.php
resources/mediawiki/mediawiki.debug.js

index 7a5d50a..fa98036 100644 (file)
@@ -13,6 +13,8 @@ production.
 
 === Changes since 1.19 beta 2 ===
 * Special:Watchlist no longer sets links to feed when the user is anonymous
+* (bug 35565) Special:Log/patrol doesn't indicate whether patrolling was
+  automatic
 
 === Changes since 1.19 beta 1 ===
 * (bug 35014) Including a special page no longer sets the page's title to the
index 6fa5ff4..5e42184 100644 (file)
@@ -52,6 +52,8 @@ production.
   usages of -s and -n parameters depending on compression type
 * (bug 13896) Rendering of devanagari numbers in automatic '#' number lists
 * (bug 18704) Add an unique CSS class or ID to the tagfilter table row at RecentChanges 
+* (bug 33689) Upgrade to 1.19 on Postgres fails due to incomplete query when
+              trying to defer foreign key for externallinks
 
 === API changes in 1.20 ===
 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
index 8dd6525..a1d2e59 100644 (file)
@@ -800,7 +800,9 @@ class PhpHttpRequest extends MWHttpRequest {
                if ( $this->method == 'POST' ) {
                        // Required for HTTP 1.0 POSTs
                        $this->reqHeaders['Content-Length'] = strlen( $this->postData );
-                       $this->reqHeaders['Content-type'] = "application/x-www-form-urlencoded";
+                       if( !isset( $this->reqHeaders['Content-Type'] ) ) {
+                               $this->reqHeaders['Content-Type'] = "application/x-www-form-urlencoded";
+                       }
                }
 
                $options = array();
index e2b38f5..c7d64eb 100644 (file)
@@ -18,7 +18,7 @@ class PostgresField implements Field {
        static function fromText( $db, $table, $field ) {
                $q = <<<SQL
 SELECT
- attnotnull, attlen, COALESCE(conname, '') AS conname,
+ attnotnull, attlen, conname AS conname,
  COALESCE(condeferred, 'f') AS deferred,
  COALESCE(condeferrable, 'f') AS deferrable,
  CASE WHEN typname = 'int2' THEN 'smallint'
index e8ad526..418eede 100644 (file)
@@ -258,6 +258,8 @@ class MWDebug {
                $debugInfo = array(
                        'mwVersion' => $wgVersion,
                        'phpVersion' => PHP_VERSION,
+                       'gitRevision' => GitInfo::headSHA1(),
+                       'gitBranch' => GitInfo::currentBranch(),
                        'time' => microtime( true ) - $wgRequestTime,
                        'log' => self::$log,
                        'debugLog' => self::$debug,
index 6b3cb51..9a982f9 100644 (file)
@@ -514,9 +514,15 @@ END;
                }
                $this->output( "Altering column '$table.$field' to be DEFERRABLE INITIALLY DEFERRED\n" );
                $conname = $fi->conname();
-               $command = "ALTER TABLE $table DROP CONSTRAINT $conname";
-               $this->db->query( $command );
-               $command = "ALTER TABLE $table ADD CONSTRAINT $conname FOREIGN KEY ($field) REFERENCES $clause DEFERRABLE INITIALLY DEFERRED";
+               if ( $fi->conname() ) {
+                       $conclause = "CONSTRAINT \"$conname\"";
+                       $command = "ALTER TABLE $table DROP CONSTRAINT $conname";
+                       $this->db->query( $command );
+               } else {
+                       $this->output( "Column '$table.$field' does not have a foreign key constraint, will be added\n" );
+                       $conclause = "";
+               }
+               $command = "ALTER TABLE $table ADD $conclause FOREIGN KEY ($field) REFERENCES $clause DEFERRABLE INITIALLY DEFERRED";
                $this->db->query( $command );
        }
 
index d3354f5..e463c45 100644 (file)
@@ -662,7 +662,6 @@ class PatrolLogFormatter extends LogFormatter {
 
        protected function getMessageParameters() {
                $params = parent::getMessageParameters();
-               $newParams = array_slice( $params, 0, 3 );
 
                $target = $this->entry->getTarget();
                $oldid = $params[3];
@@ -680,8 +679,8 @@ class PatrolLogFormatter extends LogFormatter {
                        $revlink = htmlspecialchars( $revision );
                }
 
-               $newParams[3] = Message::rawParam( $revlink );
-               return $newParams;
+               $params[3] = Message::rawParam( $revlink );
+               return $params;
        }
 }
 
index a2bfbcb..2afcbc6 100644 (file)
 
                        paneTriggerBitDiv( 'includes', 'PHP includes', this.data.includes.length );
 
+                       var gitInfo = '';
+                       if ( this.data.gitRevision != false ) {
+                               gitInfo = ' (' + this.data.gitRevision.substring( 0, 7 ) + ')';
+                       }
+
                        bitDiv( 'mwversion' )
                                .append( $( '<a href="//www.mediawiki.org/"></a>' ).text( 'MediaWiki' ) )
-                               .append( ': ' + this.data.mwVersion );
+                               .append( ': ' + this.data.mwVersion + gitInfo );
+
+                       if ( this.data.gitBranch != false ) {
+                               bitDiv( 'gitbranch' ).text( 'Git branch: ' + this.data.gitBranch );
+                       }
 
                        bitDiv( 'phpversion' )
                                .append( $( '<a href="//www.php.net/"></a>' ).text( 'PHP' ) )