Index: branches/REL1_18/phase3/includes/upload/UploadFromUrl.php |
— | — | @@ -145,7 +145,9 @@ |
146 | 146 | $this->mRemoveTempFile = true; |
147 | 147 | $this->mFileSize = 0; |
148 | 148 | |
149 | | - $req = MWHttpRequest::factory( $this->mUrl ); |
| 149 | + $req = MWHttpRequest::factory( $this->mUrl, array( |
| 150 | + 'followRedirects' => true |
| 151 | + ) ); |
150 | 152 | $req->setCallback( array( $this, 'saveTempFileChunk' ) ); |
151 | 153 | $status = $req->execute(); |
152 | 154 | |
Index: branches/REL1_18/phase3/includes/ProtectionForm.php |
— | — | @@ -357,7 +357,7 @@ |
358 | 358 | $msg = wfMessage( 'restriction-' . $action ); |
359 | 359 | $out .= "<tr><td>". |
360 | 360 | Xml::openElement( 'fieldset' ) . |
361 | | - Xml::element( 'legend', null, $msg->exists() ? $action : $msg->text() ) . |
| 361 | + Xml::element( 'legend', null, $msg->exists() ? $msg->text() : $action ) . |
362 | 362 | Xml::openElement( 'table', array( 'id' => "mw-protect-table-$action" ) ) . |
363 | 363 | "<tr><td>" . $this->buildSelector( $action, $selected ) . "</td></tr><tr><td>"; |
364 | 364 | |
— | — | @@ -569,7 +569,7 @@ |
570 | 570 | return wfMsg( 'protect-default' ); |
571 | 571 | } else { |
572 | 572 | $msg = wfMessage( "protect-level-{$permission}" ); |
573 | | - if( !$msg->exists() ) { |
| 573 | + if( $msg->exists() ) { |
574 | 574 | return $msg->text(); |
575 | 575 | } |
576 | 576 | return wfMsg( 'protect-fallback', $permission ); |
Index: branches/REL1_18/phase3/includes/objectcache/MemcachedClient.php |
— | — | @@ -344,6 +344,16 @@ |
345 | 345 | return false; |
346 | 346 | } |
347 | 347 | |
| 348 | + public function lock( $key, $timeout = 0 ) { |
| 349 | + /* stub */ |
| 350 | + return true; |
| 351 | + } |
| 352 | + |
| 353 | + public function unlock( $key ) { |
| 354 | + /* stub */ |
| 355 | + return true; |
| 356 | + } |
| 357 | + |
348 | 358 | // }}} |
349 | 359 | // {{{ disconnect_all() |
350 | 360 | |
Index: branches/REL1_18/phase3/includes/Linker.php |
— | — | @@ -1218,7 +1218,9 @@ |
1219 | 1219 | # Media link; trail not supported. |
1220 | 1220 | $linkRegexp = '/\[\[(.*?)\]\]/'; |
1221 | 1221 | $title = Title::makeTitleSafe( NS_FILE, $submatch[1] ); |
1222 | | - $thelink = self::makeMediaLinkObj( $title, $text ); |
| 1222 | + if ( $title ) { |
| 1223 | + $thelink = self::makeMediaLinkObj( $title, $text ); |
| 1224 | + } |
1223 | 1225 | } else { |
1224 | 1226 | # Other kind of link |
1225 | 1227 | if ( preg_match( $wgContLang->linkTrail(), $match[4], $submatch ) ) { |
Index: branches/REL1_18/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -918,6 +918,15 @@ |
919 | 919 | } |
920 | 920 | $caches[] = 'memcached'; |
921 | 921 | |
| 922 | + // We'll hide/show this on demand when the value changes, see config.js. |
| 923 | + $cacheval = $this->getVar( 'wgMainCacheType' ); |
| 924 | + if (!$cacheval) { |
| 925 | + // We need to set a default here; but don't hardcode it |
| 926 | + // or we lose it every time we reload the page for validation |
| 927 | + // or going back! |
| 928 | + $cacheval = 'none'; |
| 929 | + } |
| 930 | + $hidden = ($cacheval == 'memcached') ? '' : 'display: none'; |
922 | 931 | $this->addHTML( |
923 | 932 | # Advanced settings |
924 | 933 | $this->getFieldSetStart( 'config-advanced-settings' ) . |
— | — | @@ -927,10 +936,10 @@ |
928 | 937 | 'label' => 'config-cache-options', |
929 | 938 | 'itemLabelPrefix' => 'config-cache-', |
930 | 939 | 'values' => $caches, |
931 | | - 'value' => 'none', |
| 940 | + 'value' => $cacheval, |
932 | 941 | ) ) . |
933 | 942 | $this->parent->getHelpBox( 'config-cache-help' ) . |
934 | | - '<div id="config-memcachewrapper">' . |
| 943 | + "<div id=\"config-memcachewrapper\" style=\"$hidden\">" . |
935 | 944 | $this->parent->getTextArea( array( |
936 | 945 | 'var' => '_MemCachedServers', |
937 | 946 | 'label' => 'config-memcached-servers', |
— | — | @@ -1079,8 +1088,10 @@ |
1080 | 1089 | } |
1081 | 1090 | |
1082 | 1091 | foreach( $memcServers as $server ) { |
1083 | | - $memcParts = explode( ":", $server ); |
1084 | | - if( !IP::isValid( $memcParts[0] ) ) { |
| 1092 | + $memcParts = explode( ":", $server, 2 ); |
| 1093 | + if ( !isset( $memcParts[0] ) |
| 1094 | + || ( !IP::isValid( $memcParts[0] ) |
| 1095 | + && ( gethostbyname( $memcParts[0] ) == $memcParts[0] ) ) ) { |
1085 | 1096 | $this->parent->showError( 'config-memcache-badip', $memcParts[0] ); |
1086 | 1097 | return false; |
1087 | 1098 | } elseif( !isset( $memcParts[1] ) ) { |