Index: branches/REL1_17/phase3/maintenance/minify.php |
— | — | @@ -17,6 +17,9 @@ |
18 | 18 | "Directory for output. If this is not specified, and neither is --outfile, then the\n" . |
19 | 19 | "output files will be sent to the same directories as the input files.", |
20 | 20 | false, true ); |
| 21 | + $this->addOption( 'minify-vertical-space', |
| 22 | + "Boolean value for minifying the vertical space for javascript.", |
| 23 | + false, true ); |
21 | 24 | $this->mDescription = "Minify a file or set of files.\n\n" . |
22 | 25 | "If --outfile is not specified, then the output file names will have a .min extension\n" . |
23 | 26 | "added, e.g. jquery.js -> jquery.min.js."; |
— | — | @@ -78,6 +81,8 @@ |
79 | 82 | } |
80 | 83 | |
81 | 84 | public function minify( $inPath, $outPath ) { |
| 85 | + global $wgResourceLoaderMinifyJSVerticalSpace; |
| 86 | + |
82 | 87 | $extension = $this->getExtension( $inPath ); |
83 | 88 | $this->output( basename( $inPath ) . ' -> ' . basename( $outPath ) . '...' ); |
84 | 89 | |
— | — | @@ -94,7 +99,7 @@ |
95 | 100 | |
96 | 101 | switch ( $extension ) { |
97 | 102 | case 'js': |
98 | | - $outText = JSMin::minify( $inText ); |
| 103 | + $outText = JavaScriptDistiller::stripWhiteSpace( $inText, $this->getOption( 'minify-vertical-space', $wgResourceLoaderMinifyJSVerticalSpace ) ); |
99 | 104 | break; |
100 | 105 | case 'css': |
101 | 106 | $outText = CSSMin::minify( $inText ); |
Index: branches/REL1_17/phase3/maintenance/install.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | * @see wfWaitForSlaves() |
22 | 22 | */ |
23 | 23 | |
24 | | -define( 'MW_CONFIG_CALLBACK', 'CoreInstaller::overrideConfig' ); |
| 24 | +define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); |
25 | 25 | |
26 | 26 | require_once( dirname( dirname( __FILE__ ) )."/maintenance/Maintenance.php" ); |
27 | 27 | |
Index: branches/REL1_17/phase3/maintenance/language/messages.inc |
— | — | @@ -1010,6 +1010,10 @@ |
1011 | 1011 | 'prefs-displaywatchlist', |
1012 | 1012 | 'prefs-diffs', |
1013 | 1013 | ), |
| 1014 | + 'preferences-email' => array( |
| 1015 | + 'email-address-validity-valid', |
| 1016 | + 'email-address-validity-invalid', |
| 1017 | + ), |
1014 | 1018 | 'userrights' => array( |
1015 | 1019 | 'userrights', |
1016 | 1020 | 'userrights-summary', |
— | — | @@ -3296,6 +3300,7 @@ |
3297 | 3301 | 'opensearch' => 'OpenSearch description', |
3298 | 3302 | 'quickbar' => 'Quickbar', |
3299 | 3303 | 'preferences' => 'Preferences page', |
| 3304 | + 'preferences-email' => 'User preference: e-mail validation using jQuery', |
3300 | 3305 | 'userrights' => 'User rights', |
3301 | 3306 | 'group' => 'Groups', |
3302 | 3307 | 'group-member' => '', |
Index: branches/REL1_17/phase3/maintenance/showStats.php |
— | — | @@ -32,6 +32,7 @@ |
33 | 33 | |
34 | 34 | class ShowStats extends Maintenance { |
35 | 35 | public function __construct() { |
| 36 | + parent::__construct(); |
36 | 37 | $this->mDescription = "Show the cached statistics"; |
37 | 38 | } |
38 | 39 | public function execute() { |
Index: branches/REL1_17/phase3/maintenance/dumpTextPass.php |
— | — | @@ -95,18 +95,28 @@ |
96 | 96 | } |
97 | 97 | |
98 | 98 | function processFileOpt( $val, $param ) { |
99 | | - switch( $val ) { |
100 | | - case "file": |
101 | | - return $param; |
102 | | - case "gzip": |
103 | | - return "compress.zlib://$param"; |
104 | | - case "bzip2": |
105 | | - return "compress.bzip2://$param"; |
106 | | - case "7zip": |
107 | | - return "mediawiki.compress.7z://$param"; |
108 | | - default: |
109 | | - return $val; |
| 99 | + $fileURIs = explode(';',$param); |
| 100 | + foreach ( $fileURIs as $URI ) { |
| 101 | + switch( $val ) { |
| 102 | + case "file": |
| 103 | + $newURI = $URI; |
| 104 | + break; |
| 105 | + case "gzip": |
| 106 | + $newURI = "compress.zlib://$URI"; |
| 107 | + break; |
| 108 | + case "bzip2": |
| 109 | + $newURI = "compress.bzip2://$URI"; |
| 110 | + break; |
| 111 | + case "7zip": |
| 112 | + $newURI = "mediawiki.compress.7z://$URI"; |
| 113 | + break; |
| 114 | + default: |
| 115 | + $newURI = $URI; |
| 116 | + } |
| 117 | + $newFileURIs[] = $newURI; |
110 | 118 | } |
| 119 | + $val = implode( ';', $newFileURIs ); |
| 120 | + return $val; |
111 | 121 | } |
112 | 122 | |
113 | 123 | /** |
Index: branches/REL1_17/phase3/maintenance/backupPrefetch.inc |
— | — | @@ -27,9 +27,12 @@ |
28 | 28 | var $atPageEnd = false; |
29 | 29 | var $lastPage = 0; |
30 | 30 | var $lastRev = 0; |
| 31 | + var $infiles = null; |
31 | 32 | |
32 | 33 | function BaseDump( $infile ) { |
| 34 | + $this->infiles = explode(';',$infile); |
33 | 35 | $this->reader = new XMLReader(); |
| 36 | + $infile = array_shift($this->infiles); |
34 | 37 | $this->reader->open( $infile ); |
35 | 38 | } |
36 | 39 | |
— | — | @@ -83,7 +86,12 @@ |
84 | 87 | $this->atPageEnd = false; |
85 | 88 | } |
86 | 89 | } else { |
87 | | - $this->atEnd = true; |
| 90 | + $this->close(); |
| 91 | + if (count($this->infiles)) { |
| 92 | + $infile = array_shift($this->infiles); |
| 93 | + $this->reader->open( $infile ); |
| 94 | + $this->atEnd = false; |
| 95 | + } |
88 | 96 | } |
89 | 97 | } |
90 | 98 | |
Index: branches/REL1_17/phase3/includes/User.php |
— | — | @@ -666,9 +666,13 @@ |
667 | 667 | if( !wfRunHooks( 'isValidEmailAddr', array( $addr, &$result ) ) ) { |
668 | 668 | return $result; |
669 | 669 | } |
670 | | - $rfc5322_atext = "a-z0-9!#$%&'*+-\/=?^_`{|}~" ; |
671 | | - $rfc1034_ldh_str = "a-z0-9-" ; |
672 | 670 | |
| 671 | + // Please note strings below are enclosed in brackets [], this make the |
| 672 | + // hyphen "-" a range indicator. Hence it is double backslashed below. |
| 673 | + // See bug 26948 |
| 674 | + $rfc5322_atext = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~" ; |
| 675 | + $rfc1034_ldh_str = "a-z0-9\\-" ; |
| 676 | + |
673 | 677 | $HTML5_email_regexp = "/ |
674 | 678 | ^ # start of string |
675 | 679 | [$rfc5322_atext\\.]+ # user part which is liberal :p |
Index: branches/REL1_17/phase3/includes/parser/Parser.php |
— | — | @@ -444,7 +444,7 @@ |
445 | 445 | * Expand templates and variables in the text, producing valid, static wikitext. |
446 | 446 | * Also removes comments. |
447 | 447 | */ |
448 | | - function preprocess( $text, $title, $options, $revid = null ) { |
| 448 | + function preprocess( $text, Title $title, ParserOptions $options, $revid = null ) { |
449 | 449 | wfProfileIn( __METHOD__ ); |
450 | 450 | $this->mOptions = $options; |
451 | 451 | $this->clearState(); |
— | — | @@ -467,7 +467,7 @@ |
468 | 468 | * <noinclude>, <includeonly> etc. are parsed as for template transclusion, |
469 | 469 | * comments, templates, arguments, tags hooks and parser functions are untouched. |
470 | 470 | */ |
471 | | - public function getPreloadText( $text, $title, $options ) { |
| 471 | + public function getPreloadText( $text, Title $title, ParserOptions $options ) { |
472 | 472 | # Parser (re)initialisation |
473 | 473 | $this->mOptions = $options; |
474 | 474 | $this->clearState(); |
— | — | @@ -4205,7 +4205,7 @@ |
4206 | 4206 | * Set up some variables which are usually set up in parse() |
4207 | 4207 | * so that an external function can call some class members with confidence |
4208 | 4208 | */ |
4209 | | - public function startExternalParse( &$title, $options, $outputType, $clearState = true ) { |
| 4209 | + public function startExternalParse( Title $title = null, ParserOptions $options, $outputType, $clearState = true ) { |
4210 | 4210 | $this->setTitle( $title ); |
4211 | 4211 | $this->mOptions = $options; |
4212 | 4212 | $this->setOutputType( $outputType ); |
— | — | @@ -4232,7 +4232,13 @@ |
4233 | 4233 | $executing = true; |
4234 | 4234 | |
4235 | 4235 | wfProfileIn( __METHOD__ ); |
4236 | | - $text = $this->preprocess( $text, $wgTitle, $options ); |
| 4236 | + $title = $wgTitle; |
| 4237 | + if ( !$title ) { |
| 4238 | + # It's not uncommon having a null $wgTitle in scripts. See r80898 |
| 4239 | + # Create a ghost title in such case |
| 4240 | + $title = Title::newFromText( 'Dwimmerlaik' ); |
| 4241 | + } |
| 4242 | + $text = $this->preprocess( $text, $title, $options ); |
4237 | 4243 | |
4238 | 4244 | $executing = false; |
4239 | 4245 | wfProfileOut( __METHOD__ ); |
— | — | @@ -5074,7 +5080,7 @@ |
5075 | 5081 | /** |
5076 | 5082 | * strip/replaceVariables/unstrip for preprocessor regression testing |
5077 | 5083 | */ |
5078 | | - function testSrvus( $text, $title, $options, $outputType = self::OT_HTML ) { |
| 5084 | + function testSrvus( $text, $title, ParserOptions $options, $outputType = self::OT_HTML ) { |
5079 | 5085 | $this->mOptions = $options; |
5080 | 5086 | $this->clearState(); |
5081 | 5087 | if ( !$title instanceof Title ) { |
Property changes on: branches/REL1_17/phase3/includes/parser/Parser.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
5082 | 5088 | Merged /trunk/phase3/includes/parser/Parser.php:r79915,79957,79964,79990,80687,80999,81006,81011,81101,81105,81138,81141,81146,81149-81150,81166,81171 |
Index: branches/REL1_17/phase3/includes/ImagePage.php |
— | — | @@ -330,7 +330,7 @@ |
331 | 331 | $height_orig = $this->displayImg->getHeight( $page ); |
332 | 332 | $height = $height_orig; |
333 | 333 | |
334 | | - $longDesc = $this->displayImg->getLongDesc(); |
| 334 | + $longDesc = wfMsgExt( 'parentheses', 'parseinline', $this->displayImg->getLongDesc() ); |
335 | 335 | |
336 | 336 | wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this, &$wgOut ) ); |
337 | 337 | |
Index: branches/REL1_17/phase3/includes/installer/WebInstaller.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | * @ingroup Deployment |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
16 | | -class WebInstaller extends CoreInstaller { |
| 16 | +class WebInstaller extends Installer { |
17 | 17 | |
18 | 18 | /** |
19 | 19 | * @var WebInstallerOutput |
Index: branches/REL1_17/phase3/includes/installer/Installer.php |
— | — | @@ -104,7 +104,184 @@ |
105 | 105 | 'envCheckLibicu' |
106 | 106 | ); |
107 | 107 | |
| 108 | + /** |
| 109 | + * MediaWiki configuration globals that will eventually be passed through |
| 110 | + * to LocalSettings.php. The names only are given here, the defaults |
| 111 | + * typically come from DefaultSettings.php. |
| 112 | + * |
| 113 | + * @var array |
| 114 | + */ |
| 115 | + protected $defaultVarNames = array( |
| 116 | + 'wgSitename', |
| 117 | + 'wgPasswordSender', |
| 118 | + 'wgLanguageCode', |
| 119 | + 'wgRightsIcon', |
| 120 | + 'wgRightsText', |
| 121 | + 'wgRightsUrl', |
| 122 | + 'wgMainCacheType', |
| 123 | + 'wgEnableEmail', |
| 124 | + 'wgEnableUserEmail', |
| 125 | + 'wgEnotifUserTalk', |
| 126 | + 'wgEnotifWatchlist', |
| 127 | + 'wgEmailAuthentication', |
| 128 | + 'wgDBtype', |
| 129 | + 'wgDiff3', |
| 130 | + 'wgImageMagickConvertCommand', |
| 131 | + 'IP', |
| 132 | + 'wgScriptPath', |
| 133 | + 'wgScriptExtension', |
| 134 | + 'wgMetaNamespace', |
| 135 | + 'wgDeletedDirectory', |
| 136 | + 'wgEnableUploads', |
| 137 | + 'wgLogo', |
| 138 | + 'wgShellLocale', |
| 139 | + 'wgSecretKey', |
| 140 | + 'wgUseInstantCommons', |
| 141 | + 'wgUpgradeKey', |
| 142 | + 'wgDefaultSkin', |
| 143 | + ); |
| 144 | + |
108 | 145 | /** |
| 146 | + * Variables that are stored alongside globals, and are used for any |
| 147 | + * configuration of the installation process aside from the MediaWiki |
| 148 | + * configuration. Map of names to defaults. |
| 149 | + * |
| 150 | + * @var array |
| 151 | + */ |
| 152 | + protected $internalDefaults = array( |
| 153 | + '_UserLang' => 'en', |
| 154 | + '_Environment' => false, |
| 155 | + '_CompiledDBs' => array(), |
| 156 | + '_SafeMode' => false, |
| 157 | + '_RaiseMemory' => false, |
| 158 | + '_UpgradeDone' => false, |
| 159 | + '_InstallDone' => false, |
| 160 | + '_Caches' => array(), |
| 161 | + '_InstallUser' => 'root', |
| 162 | + '_InstallPassword' => '', |
| 163 | + '_SameAccount' => true, |
| 164 | + '_CreateDBAccount' => false, |
| 165 | + '_NamespaceType' => 'site-name', |
| 166 | + '_AdminName' => '', // will be set later, when the user selects language |
| 167 | + '_AdminPassword' => '', |
| 168 | + '_AdminPassword2' => '', |
| 169 | + '_AdminEmail' => '', |
| 170 | + '_Subscribe' => false, |
| 171 | + '_SkipOptional' => 'continue', |
| 172 | + '_RightsProfile' => 'wiki', |
| 173 | + '_LicenseCode' => 'none', |
| 174 | + '_CCDone' => false, |
| 175 | + '_Extensions' => array(), |
| 176 | + '_MemCachedServers' => '', |
| 177 | + '_UpgradeKeySupplied' => false, |
| 178 | + '_ExistingDBSettings' => false, |
| 179 | + ); |
| 180 | + |
| 181 | + /** |
| 182 | + * The actual list of installation steps. This will be initialized by getInstallSteps() |
| 183 | + * |
| 184 | + * @var array |
| 185 | + */ |
| 186 | + private $installSteps = array(); |
| 187 | + |
| 188 | + /** |
| 189 | + * Extra steps for installation, for things like DatabaseInstallers to modify |
| 190 | + * |
| 191 | + * @var array |
| 192 | + */ |
| 193 | + protected $extraInstallSteps = array(); |
| 194 | + |
| 195 | + /** |
| 196 | + * Known object cache types and the functions used to test for their existence. |
| 197 | + * |
| 198 | + * @var array |
| 199 | + */ |
| 200 | + protected $objectCaches = array( |
| 201 | + 'xcache' => 'xcache_get', |
| 202 | + 'apc' => 'apc_fetch', |
| 203 | + 'eaccel' => 'eaccelerator_get', |
| 204 | + 'wincache' => 'wincache_ucache_get' |
| 205 | + ); |
| 206 | + |
| 207 | + /** |
| 208 | + * User rights profiles. |
| 209 | + * |
| 210 | + * @var array |
| 211 | + */ |
| 212 | + public $rightsProfiles = array( |
| 213 | + 'wiki' => array(), |
| 214 | + 'no-anon' => array( |
| 215 | + '*' => array( 'edit' => false ) |
| 216 | + ), |
| 217 | + 'fishbowl' => array( |
| 218 | + '*' => array( |
| 219 | + 'createaccount' => false, |
| 220 | + 'edit' => false, |
| 221 | + ), |
| 222 | + ), |
| 223 | + 'private' => array( |
| 224 | + '*' => array( |
| 225 | + 'createaccount' => false, |
| 226 | + 'edit' => false, |
| 227 | + 'read' => false, |
| 228 | + ), |
| 229 | + ), |
| 230 | + ); |
| 231 | + |
| 232 | + /** |
| 233 | + * License types. |
| 234 | + * |
| 235 | + * @var array |
| 236 | + */ |
| 237 | + public $licenses = array( |
| 238 | + 'cc-by-sa' => array( |
| 239 | + 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/', |
| 240 | + 'icon' => '{$wgStylePath}/common/images/cc-by-sa.png', |
| 241 | + ), |
| 242 | + 'cc-by-nc-sa' => array( |
| 243 | + 'url' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/', |
| 244 | + 'icon' => '{$wgStylePath}/common/images/cc-by-nc-sa.png', |
| 245 | + ), |
| 246 | + 'pd' => array( |
| 247 | + 'url' => 'http://creativecommons.org/licenses/publicdomain/', |
| 248 | + 'icon' => '{$wgStylePath}/common/images/public-domain.png', |
| 249 | + ), |
| 250 | + 'gfdl-old' => array( |
| 251 | + 'url' => 'http://www.gnu.org/licenses/old-licenses/fdl-1.2.html', |
| 252 | + 'icon' => '{$wgStylePath}/common/images/gnu-fdl.png', |
| 253 | + ), |
| 254 | + 'gfdl-current' => array( |
| 255 | + 'url' => 'http://www.gnu.org/copyleft/fdl.html', |
| 256 | + 'icon' => '{$wgStylePath}/common/images/gnu-fdl.png', |
| 257 | + ), |
| 258 | + 'none' => array( |
| 259 | + 'url' => '', |
| 260 | + 'icon' => '', |
| 261 | + 'text' => '' |
| 262 | + ), |
| 263 | + 'cc-choose' => array( |
| 264 | + // Details will be filled in by the selector. |
| 265 | + 'url' => '', |
| 266 | + 'icon' => '', |
| 267 | + 'text' => '', |
| 268 | + ), |
| 269 | + ); |
| 270 | + |
| 271 | + /** |
| 272 | + * URL to mediawiki-announce subscription |
| 273 | + */ |
| 274 | + protected $mediaWikiAnnounceUrl = 'https://lists.wikimedia.org/mailman/subscribe/mediawiki-announce'; |
| 275 | + |
| 276 | + /** |
| 277 | + * Supported language codes for Mailman |
| 278 | + */ |
| 279 | + protected $mediaWikiAnnounceLanguages = array( |
| 280 | + 'ca', 'cs', 'da', 'de', 'en', 'es', 'et', 'eu', 'fi', 'fr', 'hr', 'hu', |
| 281 | + 'it', 'ja', 'ko', 'lt', 'nl', 'no', 'pl', 'pt', 'pt-br', 'ro', 'ru', |
| 282 | + 'sl', 'sr', 'sv', 'tr', 'uk' |
| 283 | + ); |
| 284 | + |
| 285 | + /** |
109 | 286 | * UI interface for displaying a short message |
110 | 287 | * The parameters are like parameters to wfMsg(). |
111 | 288 | * The messages will be in wikitext format, which will be converted to an |
— | — | @@ -113,12 +290,58 @@ |
114 | 291 | public abstract function showMessage( $msg /*, ... */ ); |
115 | 292 | |
116 | 293 | /** |
| 294 | + * Show a message to the installing user by using a Status object |
| 295 | + * @param $status Status |
| 296 | + */ |
| 297 | + public abstract function showStatusMessage( Status $status ); |
| 298 | + |
| 299 | + /** |
117 | 300 | * Constructor, always call this from child classes. |
118 | 301 | */ |
119 | 302 | public function __construct() { |
| 303 | + global $wgExtensionMessagesFiles, $wgUser, $wgHooks; |
| 304 | + |
120 | 305 | // Disable the i18n cache and LoadBalancer |
121 | 306 | Language::getLocalisationCache()->disableBackend(); |
122 | 307 | LBFactory::disableBackend(); |
| 308 | + |
| 309 | + // Load the installer's i18n file. |
| 310 | + $wgExtensionMessagesFiles['MediawikiInstaller'] = |
| 311 | + dirname( __FILE__ ) . '/Installer.i18n.php'; |
| 312 | + |
| 313 | + // Having a user with id = 0 safeguards us from DB access via User::loadOptions(). |
| 314 | + $wgUser = User::newFromId( 0 ); |
| 315 | + |
| 316 | + // Set our custom <doclink> hook. |
| 317 | + $wgHooks['ParserFirstCallInit'][] = array( $this, 'registerDocLink' ); |
| 318 | + |
| 319 | + $this->settings = $this->internalDefaults; |
| 320 | + |
| 321 | + foreach ( $this->defaultVarNames as $var ) { |
| 322 | + $this->settings[$var] = $GLOBALS[$var]; |
| 323 | + } |
| 324 | + |
| 325 | + foreach ( self::getDBTypes() as $type ) { |
| 326 | + $installer = $this->getDBInstaller( $type ); |
| 327 | + |
| 328 | + if ( !$installer->isCompiled() ) { |
| 329 | + continue; |
| 330 | + } |
| 331 | + |
| 332 | + $defaults = $installer->getGlobalDefaults(); |
| 333 | + |
| 334 | + foreach ( $installer->getGlobalNames() as $var ) { |
| 335 | + if ( isset( $defaults[$var] ) ) { |
| 336 | + $this->settings[$var] = $defaults[$var]; |
| 337 | + } else { |
| 338 | + $this->settings[$var] = $GLOBALS[$var]; |
| 339 | + } |
| 340 | + } |
| 341 | + } |
| 342 | + |
| 343 | + $this->parserTitle = Title::newFromText( 'Installer' ); |
| 344 | + $this->parserOptions = new ParserOptions; // language will be wrong :( |
| 345 | + $this->parserOptions->setEditSection( false ); |
123 | 346 | } |
124 | 347 | |
125 | 348 | /** |
— | — | @@ -521,12 +744,8 @@ |
522 | 745 | return true; |
523 | 746 | } |
524 | 747 | |
525 | | - $n = intval( $limit ); |
| 748 | + $n = wfShorthandToInteger( $limit ); |
526 | 749 | |
527 | | - if( preg_match( '/^([0-9]+)[Mm]$/', trim( $limit ), $m ) ) { |
528 | | - $n = intval( $m[1] * ( 1024 * 1024 ) ); |
529 | | - } |
530 | | - |
531 | 750 | if( $n < $this->minMemorySize * 1024 * 1024 ) { |
532 | 751 | $newLimit = "{$this->minMemorySize}M"; |
533 | 752 | |
— | — | @@ -907,4 +1126,347 @@ |
908 | 1127 | return false; |
909 | 1128 | } |
910 | 1129 | |
| 1130 | + /** |
| 1131 | + * Register tag hook below. |
| 1132 | + * |
| 1133 | + * @todo Move this to WebInstaller with the two things below? |
| 1134 | + * |
| 1135 | + * @param $parser Parser |
| 1136 | + */ |
| 1137 | + public function registerDocLink( Parser &$parser ) { |
| 1138 | + $parser->setHook( 'doclink', array( $this, 'docLink' ) ); |
| 1139 | + return true; |
| 1140 | + } |
| 1141 | + |
| 1142 | + /** |
| 1143 | + * ParserOptions are constructed before we determined the language, so fix it |
| 1144 | + */ |
| 1145 | + public function setParserLanguage( $lang ) { |
| 1146 | + $this->parserOptions->setTargetLanguage( $lang ); |
| 1147 | + $this->parserOptions->setUserLang( $lang->getCode() ); |
| 1148 | + } |
| 1149 | + |
| 1150 | + /** |
| 1151 | + * Extension tag hook for a documentation link. |
| 1152 | + */ |
| 1153 | + public function docLink( $linkText, $attribs, $parser ) { |
| 1154 | + $url = $this->getDocUrl( $attribs['href'] ); |
| 1155 | + return '<a href="' . htmlspecialchars( $url ) . '">' . |
| 1156 | + htmlspecialchars( $linkText ) . |
| 1157 | + '</a>'; |
| 1158 | + } |
| 1159 | + |
| 1160 | + /** |
| 1161 | + * Overridden by WebInstaller to provide lastPage parameters. |
| 1162 | + */ |
| 1163 | + protected function getDocUrl( $page ) { |
| 1164 | + return "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page ); |
| 1165 | + } |
| 1166 | + |
| 1167 | + /** |
| 1168 | + * Finds extensions that follow the format /extensions/Name/Name.php, |
| 1169 | + * and returns an array containing the value for 'Name' for each found extension. |
| 1170 | + * |
| 1171 | + * @return array |
| 1172 | + */ |
| 1173 | + public function findExtensions() { |
| 1174 | + if( $this->getVar( 'IP' ) === null ) { |
| 1175 | + return false; |
| 1176 | + } |
| 1177 | + |
| 1178 | + $exts = array(); |
| 1179 | + $dir = $this->getVar( 'IP' ) . '/extensions'; |
| 1180 | + $dh = opendir( $dir ); |
| 1181 | + |
| 1182 | + while ( ( $file = readdir( $dh ) ) !== false ) { |
| 1183 | + if( file_exists( "$dir/$file/$file.php" ) ) { |
| 1184 | + $exts[] = $file; |
| 1185 | + } |
| 1186 | + } |
| 1187 | + |
| 1188 | + return $exts; |
| 1189 | + } |
| 1190 | + |
| 1191 | + /** |
| 1192 | + * Installs the auto-detected extensions. |
| 1193 | + * |
| 1194 | + * @return Status |
| 1195 | + */ |
| 1196 | + protected function includeExtensions() { |
| 1197 | + $exts = $this->getVar( '_Extensions' ); |
| 1198 | + $path = $this->getVar( 'IP' ) . '/extensions'; |
| 1199 | + |
| 1200 | + foreach( $exts as $e ) { |
| 1201 | + require( "$path/$e/$e.php" ); |
| 1202 | + } |
| 1203 | + |
| 1204 | + return Status::newGood(); |
| 1205 | + } |
| 1206 | + |
| 1207 | + /** |
| 1208 | + * Get an array of install steps. Should always be in the format of |
| 1209 | + * array( |
| 1210 | + * 'name' => 'someuniquename', |
| 1211 | + * 'callback' => array( $obj, 'method' ), |
| 1212 | + * ) |
| 1213 | + * There must be a config-install-$name message defined per step, which will |
| 1214 | + * be shown on install. |
| 1215 | + * |
| 1216 | + * @param $installer DatabaseInstaller so we can make callbacks |
| 1217 | + * @return array |
| 1218 | + */ |
| 1219 | + protected function getInstallSteps( DatabaseInstaller &$installer ) { |
| 1220 | + $coreInstallSteps = array( |
| 1221 | + array( 'name' => 'database', 'callback' => array( $installer, 'setupDatabase' ) ), |
| 1222 | + array( 'name' => 'tables', 'callback' => array( $this, 'installTables' ) ), |
| 1223 | + array( 'name' => 'interwiki', 'callback' => array( $installer, 'populateInterwikiTable' ) ), |
| 1224 | + array( 'name' => 'secretkey', 'callback' => array( $this, 'generateSecretKey' ) ), |
| 1225 | + array( 'name' => 'upgradekey', 'callback' => array( $this, 'generateUpgradeKey' ) ), |
| 1226 | + array( 'name' => 'sysop', 'callback' => array( $this, 'createSysop' ) ), |
| 1227 | + array( 'name' => 'mainpage', 'callback' => array( $this, 'createMainpage' ) ), |
| 1228 | + ); |
| 1229 | + |
| 1230 | + // Build the array of install steps starting from the core install list, |
| 1231 | + // then adding any callbacks that wanted to attach after a given step |
| 1232 | + foreach( $coreInstallSteps as $step ) { |
| 1233 | + $this->installSteps[] = $step; |
| 1234 | + if( isset( $this->extraInstallSteps[ $step['name'] ] ) ) { |
| 1235 | + $this->installSteps = array_merge( |
| 1236 | + $this->installSteps, |
| 1237 | + $this->extraInstallSteps[ $step['name'] ] |
| 1238 | + ); |
| 1239 | + } |
| 1240 | + } |
| 1241 | + |
| 1242 | + // Prepend any steps that want to be at the beginning |
| 1243 | + if( isset( $this->extraInstallSteps['BEGINNING'] ) ) { |
| 1244 | + $this->installSteps = array_merge( |
| 1245 | + $this->extraInstallSteps['BEGINNING'], |
| 1246 | + $this->installSteps |
| 1247 | + ); |
| 1248 | + } |
| 1249 | + |
| 1250 | + // Extensions should always go first, chance to tie into hooks and such |
| 1251 | + if( count( $this->getVar( '_Extensions' ) ) ) { |
| 1252 | + array_unshift( $this->installSteps, |
| 1253 | + array( 'name' => 'extensions', 'callback' => array( $this, 'includeExtensions' ) ) |
| 1254 | + ); |
| 1255 | + } |
| 1256 | + return $this->installSteps; |
| 1257 | + } |
| 1258 | + |
| 1259 | + /** |
| 1260 | + * Actually perform the installation. |
| 1261 | + * |
| 1262 | + * @param $startCB A callback array for the beginning of each step |
| 1263 | + * @param $endCB A callback array for the end of each step |
| 1264 | + * |
| 1265 | + * @return Array of Status objects |
| 1266 | + */ |
| 1267 | + public function performInstallation( $startCB, $endCB ) { |
| 1268 | + $installResults = array(); |
| 1269 | + $installer = $this->getDBInstaller(); |
| 1270 | + $installer->preInstall(); |
| 1271 | + $steps = $this->getInstallSteps( $installer ); |
| 1272 | + foreach( $steps as $stepObj ) { |
| 1273 | + $name = $stepObj['name']; |
| 1274 | + call_user_func_array( $startCB, array( $name ) ); |
| 1275 | + |
| 1276 | + // Perform the callback step |
| 1277 | + $status = call_user_func_array( $stepObj['callback'], array( &$installer ) ); |
| 1278 | + |
| 1279 | + // Output and save the results |
| 1280 | + call_user_func_array( $endCB, array( $name, $status ) ); |
| 1281 | + $installResults[$name] = $status; |
| 1282 | + |
| 1283 | + // If we've hit some sort of fatal, we need to bail. |
| 1284 | + // Callback already had a chance to do output above. |
| 1285 | + if( !$status->isOk() ) { |
| 1286 | + break; |
| 1287 | + } |
| 1288 | + } |
| 1289 | + if( $status->isOk() ) { |
| 1290 | + $this->setVar( '_InstallDone', true ); |
| 1291 | + } |
| 1292 | + return $installResults; |
| 1293 | + } |
| 1294 | + |
| 1295 | + /** |
| 1296 | + * Generate $wgSecretKey. Will warn if we had to use mt_rand() instead of |
| 1297 | + * /dev/urandom |
| 1298 | + * |
| 1299 | + * @return Status |
| 1300 | + */ |
| 1301 | + protected function generateSecretKey() { |
| 1302 | + return $this->generateSecret( 'wgSecretKey' ); |
| 1303 | + } |
| 1304 | + |
| 1305 | + /** |
| 1306 | + * Generate a secret value for a variable using either |
| 1307 | + * /dev/urandom or mt_rand() Produce a warning in the later case. |
| 1308 | + * |
| 1309 | + * @return Status |
| 1310 | + */ |
| 1311 | + protected function generateSecret( $secretName, $length = 64 ) { |
| 1312 | + if ( wfIsWindows() ) { |
| 1313 | + $file = null; |
| 1314 | + } else { |
| 1315 | + wfSuppressWarnings(); |
| 1316 | + $file = fopen( "/dev/urandom", "r" ); |
| 1317 | + wfRestoreWarnings(); |
| 1318 | + } |
| 1319 | + |
| 1320 | + $status = Status::newGood(); |
| 1321 | + |
| 1322 | + if ( $file ) { |
| 1323 | + $secretKey = bin2hex( fread( $file, $length / 2 ) ); |
| 1324 | + fclose( $file ); |
| 1325 | + } else { |
| 1326 | + $secretKey = ''; |
| 1327 | + |
| 1328 | + for ( $i = 0; $i < $length / 8; $i++ ) { |
| 1329 | + $secretKey .= dechex( mt_rand( 0, 0x7fffffff ) ); |
| 1330 | + } |
| 1331 | + |
| 1332 | + $status->warning( 'config-insecure-secret', '$' . $secretName ); |
| 1333 | + } |
| 1334 | + |
| 1335 | + $this->setVar( $secretName, $secretKey ); |
| 1336 | + |
| 1337 | + return $status; |
| 1338 | + } |
| 1339 | + |
| 1340 | + /** |
| 1341 | + * Generate a default $wgUpgradeKey. Will warn if we had to use |
| 1342 | + * mt_rand() instead of /dev/urandom |
| 1343 | + * |
| 1344 | + * @return Status |
| 1345 | + */ |
| 1346 | + public function generateUpgradeKey() { |
| 1347 | + if ( strval( $this->getVar( 'wgUpgradeKey' ) ) === '' ) { |
| 1348 | + return $this->generateSecret( 'wgUpgradeKey', 16 ); |
| 1349 | + } |
| 1350 | + return Status::newGood(); |
| 1351 | + } |
| 1352 | + |
| 1353 | + /** |
| 1354 | + * Create the first user account, grant it sysop and bureaucrat rights |
| 1355 | + * |
| 1356 | + * @return Status |
| 1357 | + */ |
| 1358 | + protected function createSysop() { |
| 1359 | + $name = $this->getVar( '_AdminName' ); |
| 1360 | + $user = User::newFromName( $name ); |
| 1361 | + |
| 1362 | + if ( !$user ) { |
| 1363 | + // We should've validated this earlier anyway! |
| 1364 | + return Status::newFatal( 'config-admin-error-user', $name ); |
| 1365 | + } |
| 1366 | + |
| 1367 | + if ( $user->idForName() == 0 ) { |
| 1368 | + $user->addToDatabase(); |
| 1369 | + |
| 1370 | + try { |
| 1371 | + $user->setPassword( $this->getVar( '_AdminPassword' ) ); |
| 1372 | + } catch( PasswordError $pwe ) { |
| 1373 | + return Status::newFatal( 'config-admin-error-password', $name, $pwe->getMessage() ); |
| 1374 | + } |
| 1375 | + |
| 1376 | + $user->addGroup( 'sysop' ); |
| 1377 | + $user->addGroup( 'bureaucrat' ); |
| 1378 | + if( $this->getVar( '_AdminEmail' ) ) { |
| 1379 | + $user->setEmail( $this->getVar( '_AdminEmail' ) ); |
| 1380 | + } |
| 1381 | + $user->saveSettings(); |
| 1382 | + } |
| 1383 | + $status = Status::newGood(); |
| 1384 | + |
| 1385 | + if( $this->getVar( '_Subscribe' ) && $this->getVar( '_AdminEmail' ) ) { |
| 1386 | + $this->subscribeToMediaWikiAnnounce( $status ); |
| 1387 | + } |
| 1388 | + |
| 1389 | + return $status; |
| 1390 | + } |
| 1391 | + |
| 1392 | + private function subscribeToMediaWikiAnnounce( Status $s ) { |
| 1393 | + $params = array( |
| 1394 | + 'email' => $this->getVar( '_AdminEmail' ), |
| 1395 | + 'language' => 'en', |
| 1396 | + 'digest' => 0 |
| 1397 | + ); |
| 1398 | + |
| 1399 | + // Mailman doesn't support as many languages as we do, so check to make |
| 1400 | + // sure their selected language is available |
| 1401 | + $myLang = $this->getVar( '_UserLang' ); |
| 1402 | + if( in_array( $myLang, $this->mediaWikiAnnounceLanguages ) ) { |
| 1403 | + $myLang = $myLang == 'pt-br' ? 'pt_BR' : $myLang; // rewrite to Mailman's pt_BR |
| 1404 | + $params['language'] = $myLang; |
| 1405 | + } |
| 1406 | + |
| 1407 | + $res = Http::post( $this->mediaWikiAnnounceUrl, array( 'postData' => $params ) ); |
| 1408 | + if( !$res ) { |
| 1409 | + $s->warning( 'config-install-subscribe-fail' ); |
| 1410 | + } |
| 1411 | + } |
| 1412 | + |
| 1413 | + /** |
| 1414 | + * Insert Main Page with default content. |
| 1415 | + * |
| 1416 | + * @return Status |
| 1417 | + */ |
| 1418 | + protected function createMainpage( DatabaseInstaller &$installer ) { |
| 1419 | + $status = Status::newGood(); |
| 1420 | + try { |
| 1421 | + $article = new Article( Title::newMainPage() ); |
| 1422 | + $article->doEdit( wfMsgForContent( 'mainpagetext' ) . "\n\n" . |
| 1423 | + wfMsgForContent( 'mainpagedocfooter' ), |
| 1424 | + '', |
| 1425 | + EDIT_NEW, |
| 1426 | + false, |
| 1427 | + User::newFromName( 'MediaWiki Default' ) ); |
| 1428 | + } catch (MWException $e) { |
| 1429 | + //using raw, because $wgShowExceptionDetails can not be set yet |
| 1430 | + $status->fatal( 'config-install-mainpage-failed', $e->getMessage() ); |
| 1431 | + } |
| 1432 | + |
| 1433 | + return $status; |
| 1434 | + } |
| 1435 | + |
| 1436 | + /** |
| 1437 | + * Override the necessary bits of the config to run an installation. |
| 1438 | + */ |
| 1439 | + public static function overrideConfig() { |
| 1440 | + define( 'MW_NO_SESSION', 1 ); |
| 1441 | + |
| 1442 | + // Don't access the database |
| 1443 | + $GLOBALS['wgUseDatabaseMessages'] = false; |
| 1444 | + // Debug-friendly |
| 1445 | + $GLOBALS['wgShowExceptionDetails'] = true; |
| 1446 | + // Don't break forms |
| 1447 | + $GLOBALS['wgExternalLinkTarget'] = '_blank'; |
| 1448 | + |
| 1449 | + // Extended debugging |
| 1450 | + $GLOBALS['wgShowSQLErrors'] = true; |
| 1451 | + $GLOBALS['wgShowDBErrorBacktrace'] = true; |
| 1452 | + |
| 1453 | + // Allow multiple ob_flush() calls |
| 1454 | + $GLOBALS['wgDisableOutputCompression'] = true; |
| 1455 | + |
| 1456 | + // Use a sensible cookie prefix (not my_wiki) |
| 1457 | + $GLOBALS['wgCookiePrefix'] = 'mw_installer'; |
| 1458 | + |
| 1459 | + // Some of the environment checks make shell requests, remove limits |
| 1460 | + $GLOBALS['wgMaxShellMemory'] = 0; |
| 1461 | + } |
| 1462 | + |
| 1463 | + /** |
| 1464 | + * Add an installation step following the given step. |
| 1465 | + * |
| 1466 | + * @param $callback Array A valid installation callback array, in this form: |
| 1467 | + * array( 'name' => 'some-unique-name', 'callback' => array( $obj, 'function' ) ); |
| 1468 | + * @param $findStep String the step to find. Omit to put the step at the beginning |
| 1469 | + */ |
| 1470 | + public function addInstallStep( $callback, $findStep = 'BEGINNING' ) { |
| 1471 | + $this->extraInstallSteps[$findStep][] = $callback; |
| 1472 | + } |
911 | 1473 | } |
Index: branches/REL1_17/phase3/includes/installer/Installer.i18n.php |
— | — | @@ -372,7 +372,7 @@ |
373 | 373 | More complex user rights configurations are available after installation, see the [http://www.mediawiki.org/wiki/Manual:User_rights relevant manual entry].", |
374 | 374 | 'config-license' => 'Copyright and license:', |
375 | 375 | 'config-license-none' => 'No license footer', |
376 | | - 'config-license-cc-by-sa' => 'Creative Commons Attribution Share Alike (Wikipedia-compatible)', |
| 376 | + 'config-license-cc-by-sa' => 'Creative Commons Attribution Share Alike', |
377 | 377 | 'config-license-cc-by-nc-sa' => 'Creative Commons Attribution Non-Commercial Share Alike', |
378 | 378 | 'config-license-gfdl-old' => 'GNU Free Documentation License 1.2', |
379 | 379 | 'config-license-gfdl-current' => 'GNU Free Documentation License 1.3 or later', |
Index: branches/REL1_17/phase3/includes/installer/CliInstaller.php |
— | — | @@ -12,7 +12,7 @@ |
13 | 13 | * @ingroup Deployment |
14 | 14 | * @since 1.17 |
15 | 15 | */ |
16 | | -class CliInstaller extends CoreInstaller { |
| 16 | +class CliInstaller extends Installer { |
17 | 17 | |
18 | 18 | private $optionMap = array( |
19 | 19 | 'dbtype' => 'wgDBtype', |
Index: branches/REL1_17/phase3/includes/media/Generic.php |
— | — | @@ -240,8 +240,8 @@ |
241 | 241 | |
242 | 242 | function getShortDesc( $file ) { |
243 | 243 | global $wgLang; |
244 | | - $nbytes = '(' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
245 | | - $wgLang->formatNum( $file->getSize() ) ) . ')'; |
| 244 | + $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
| 245 | + $wgLang->formatNum( $file->getSize() ) ); |
246 | 246 | return "$nbytes"; |
247 | 247 | } |
248 | 248 | |
— | — | @@ -255,8 +255,8 @@ |
256 | 256 | |
257 | 257 | static function getGeneralShortDesc( $file ) { |
258 | 258 | global $wgLang; |
259 | | - $nbytes = '(' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
260 | | - $wgLang->formatNum( $file->getSize() ) ) . ')'; |
| 259 | + $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
| 260 | + $wgLang->formatNum( $file->getSize() ) ); |
261 | 261 | return "$nbytes"; |
262 | 262 | } |
263 | 263 | |
Index: branches/REL1_17/phase3/includes/media/PNG.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | return $original; |
65 | 65 | |
66 | 66 | $info = array(); |
67 | | - $info[] = substr( $original, 1, strlen( $original )-2 ); |
| 67 | + $info[] = $original; |
68 | 68 | |
69 | 69 | if ($metadata['loopCount'] == 0) |
70 | 70 | $info[] = wfMsgExt( 'file-info-png-looped', 'parseinline' ); |
— | — | @@ -76,9 +76,7 @@ |
77 | 77 | if ($metadata['duration']) |
78 | 78 | $info[] = $wgLang->formatTimePeriod( $metadata['duration'] ); |
79 | 79 | |
80 | | - $infoString = $wgLang->commaList( $info ); |
81 | | - |
82 | | - return "($infoString)"; |
| 80 | + return $wgLang->commaList( $info ); |
83 | 81 | } |
84 | 82 | |
85 | 83 | } |
Index: branches/REL1_17/phase3/includes/media/GIF.php |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | return $original; |
77 | 77 | |
78 | 78 | $info = array(); |
79 | | - $info[] = substr( $original, 1, strlen( $original )-2 ); |
| 79 | + $info[] = $original; |
80 | 80 | |
81 | 81 | if ($metadata['looped']) |
82 | 82 | $info[] = wfMsgExt( 'file-info-gif-looped', 'parseinline' ); |
— | — | @@ -86,8 +86,6 @@ |
87 | 87 | if ($metadata['duration']) |
88 | 88 | $info[] = $wgLang->formatTimePeriod( $metadata['duration'] ); |
89 | 89 | |
90 | | - $infoString = $wgLang->commaList( $info ); |
91 | | - |
92 | | - return "($infoString)"; |
| 90 | + return $wgLang->commaList( $info ); |
93 | 91 | } |
94 | 92 | } |
Index: branches/REL1_17/phase3/includes/AutoLoader.php |
— | — | @@ -444,7 +444,6 @@ |
445 | 445 | # includes/installer |
446 | 446 | 'CliInstaller' => 'includes/installer/CliInstaller.php', |
447 | 447 | 'Installer' => 'includes/installer/Installer.php', |
448 | | - 'CoreInstaller' => 'includes/installer/CoreInstaller.php', |
449 | 448 | 'DatabaseInstaller' => 'includes/installer/DatabaseInstaller.php', |
450 | 449 | 'DatabaseUpdater' => 'includes/installer/DatabaseUpdater.php', |
451 | 450 | 'LBFactory_InstallerFake' => 'includes/installer/Installer.php', |
Property changes on: branches/REL1_17/phase3/includes/AutoLoader.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
452 | 451 | Merged /trunk/phase3/includes/AutoLoader.php:r79915,79957,79964,79990,80687,80999,81006,81011,81101,81105,81138,81141,81146,81149-81150,81166,81171 |
Index: branches/REL1_17/phase3/includes/Title.php |
— | — | @@ -4211,9 +4211,10 @@ |
4212 | 4212 | public function getCategorySortkey( $prefix = '' ) { |
4213 | 4213 | $unprefixed = $this->getText(); |
4214 | 4214 | if ( $prefix !== '' ) { |
4215 | | - # Separate with a null byte, so the unprefixed part is only used as |
4216 | | - # a tiebreaker when two pages have the exact same prefix -- null |
4217 | | - # sorts before everything else (hopefully). |
| 4215 | + # Separate with a line feed, so the unprefixed part is only used as |
| 4216 | + # a tiebreaker when two pages have the exact same prefix. |
| 4217 | + # In UCA, tab is the only character that can sort above LF |
| 4218 | + # so we strip both of them from the original prefix. |
4218 | 4219 | $prefix = strtr( $prefix, "\n\t", ' ' ); |
4219 | 4220 | return "$prefix\n$unprefixed"; |
4220 | 4221 | } |
Property changes on: branches/REL1_17/phase3/includes/Title.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
4221 | 4222 | Merged /trunk/phase3/includes/Title.php:r79915,79957,79964,79990,80687,80999,81006,81011,81101,81105,81138,81141,81146,81149-81150,81166,81171 |
Index: branches/REL1_17/phase3/includes/Collation.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | * Given a string, convert it to a (hopefully short) key that can be used |
28 | 28 | * for efficient sorting. A binary sort according to the sortkeys |
29 | 29 | * corresponds to a logical sort of the corresponding strings. Current |
30 | | - * code expects that a null character should sort before all others, but |
| 30 | + * code expects that a line feed character should sort before all others, but |
31 | 31 | * has no other particular expectations (and that one can be changed if |
32 | 32 | * necessary). |
33 | 33 | * |
— | — | @@ -130,6 +130,9 @@ |
131 | 131 | } |
132 | 132 | |
133 | 133 | function getSortKey( $string ) { |
| 134 | + // intl extension produces non null-terminated |
| 135 | + // strings. Appending '' fixes it so that it doesn't generate |
| 136 | + // a warning on each access in debug php. |
134 | 137 | wfSuppressWarnings(); |
135 | 138 | $key = $this->mainCollator->getSortKey( $string ) . ''; |
136 | 139 | wfRestoreWarnings(); |
Index: branches/REL1_17/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -587,7 +587,7 @@ |
588 | 588 | if( $img ) { |
589 | 589 | $thumb = $img->transform( array( 'width' => 120, 'height' => 120 ) ); |
590 | 590 | if( $thumb ) { |
591 | | - $desc = $img->getShortDesc(); |
| 591 | + $desc = wfMsgExt( 'parentheses', 'parseinline', $img->getShortDesc() ); |
592 | 592 | wfProfileOut( __METHOD__ ); |
593 | 593 | // Float doesn't seem to interact well with the bullets. |
594 | 594 | // Table messes up vertical alignment of the bullets. |
Property changes on: branches/REL1_17/phase3/includes/specials/SpecialSearch.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
595 | 595 | Merged /trunk/phase3/includes/specials/SpecialSearch.php:r79915,79957,79964,79990,80687,80999,81006,81011,81101,81105,81138,81141,81146,81149-81150,81166,81171 |
Index: branches/REL1_17/phase3/config/index.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | * @file |
7 | 7 | */ |
8 | 8 | |
9 | | -define( 'MW_CONFIG_CALLBACK', 'CoreInstaller::overrideConfig' ); |
| 9 | +define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); |
10 | 10 | define( 'MEDIAWIKI_INSTALL', true ); |
11 | 11 | |
12 | 12 | chdir( ".." ); |
Index: branches/REL1_17/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1849,6 +1849,10 @@ |
1850 | 1850 | 'prefs-displaywatchlist' => 'Display options', |
1851 | 1851 | 'prefs-diffs' => 'Diffs', |
1852 | 1852 | |
| 1853 | +# User preference: email validation using JQuery |
| 1854 | +'email-address-validity-valid' => 'E-mail address appears valid', |
| 1855 | +'email-address-validity-invalid' => 'Enter a valid e-mail address', |
| 1856 | + |
1853 | 1857 | # User rights |
1854 | 1858 | 'userrights' => 'User rights management', |
1855 | 1859 | 'userrights-summary' => '', # do not translate or duplicate this message to other languages |
— | — | @@ -3581,10 +3585,10 @@ |
3582 | 3586 | 'thumbsize' => 'Thumbnail size:', |
3583 | 3587 | 'widthheight' => '$1×$2', # only translate this message to other languages if you have to change it |
3584 | 3588 | 'widthheightpage' => '$1×$2, $3 {{PLURAL:$3|page|pages}}', |
3585 | | -'file-info' => '(file size: $1, MIME type: $2)', |
3586 | | -'file-info-size' => '($1 × $2 pixels, file size: $3, MIME type: $4)', |
| 3589 | +'file-info' => 'file size: $1, MIME type: $2', |
| 3590 | +'file-info-size' => '$1 × $2 pixels, file size: $3, MIME type: $4', |
3587 | 3591 | 'file-nohires' => '<small>No higher resolution available.</small>', |
3588 | | -'svg-long-desc' => '(SVG file, nominally $1 × $2 pixels, file size: $3)', |
| 3592 | +'svg-long-desc' => 'SVG file, nominally $1 × $2 pixels, file size: $3', |
3589 | 3593 | 'show-big-image' => 'Full resolution', |
3590 | 3594 | 'show-big-image-thumb' => '<small>Size of this preview: $1 × $2 pixels</small>', |
3591 | 3595 | 'file-info-gif-looped' => 'looped', |
Index: branches/REL1_17/phase3/resources/mediawiki.util/mediawiki.util.js |
— | — | @@ -353,7 +353,7 @@ |
354 | 354 | "|" / "}" / |
355 | 355 | "~" |
356 | 356 | */ |
357 | | - var rfc5322_atext = "a-z0-9!#$%&'*+-/=?^_`{|}~", |
| 357 | + var rfc5322_atext = "a-z0-9!#$%&'*+\\-/=?^_`{|}~", |
358 | 358 | |
359 | 359 | /** |
360 | 360 | * Next define the RFC 1034 'ldh-str' |
— | — | @@ -364,14 +364,14 @@ |
365 | 365 | * <let-dig-hyp> ::= <let-dig> | "-" |
366 | 366 | * <let-dig> ::= <letter> | <digit> |
367 | 367 | */ |
368 | | - rfc1034_ldh_str = "a-z0-9-", |
| 368 | + rfc1034_ldh_str = "a-z0-9\\-", |
369 | 369 | |
370 | 370 | HTML5_email_regexp = new RegExp( |
371 | 371 | // start of string |
372 | 372 | '^' |
373 | 373 | + |
374 | 374 | // User part which is liberal :p |
375 | | - '[' + rfc5322_atext + '\\.' + ']' + '+' |
| 375 | + '[' + rfc5322_atext + '\\.]+' |
376 | 376 | + |
377 | 377 | // "at" |
378 | 378 | '@' |
Index: branches/REL1_17/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -978,7 +978,7 @@ |
979 | 979 | */ |
980 | 980 | this.element = function( name, attrs, contents ) { |
981 | 981 | var s = '<' + name; |
982 | | - for ( attrName in attrs ) { |
| 982 | + for ( var attrName in attrs ) { |
983 | 983 | s += ' ' + attrName + '="' + this.escape( attrs[attrName] ) + '"'; |
984 | 984 | } |
985 | 985 | if ( typeof contents == 'undefined' || contents === null ) { |
— | — | @@ -988,7 +988,7 @@ |
989 | 989 | } |
990 | 990 | // Regular open tag |
991 | 991 | s += '>'; |
992 | | - if (typeof contents === 'string') { |
| 992 | + if ( typeof contents === 'string') { |
993 | 993 | // Escaped |
994 | 994 | s += this.escape( contents ); |
995 | 995 | } else if ( contents instanceof this.Raw ) { |
Property changes on: branches/REL1_17/phase3/resources/mediawiki/mediawiki.js |
___________________________________________________________________ |
Modified: svn:mergeinfo |
996 | 996 | Merged /trunk/phase3/resources/mediawiki/mediawiki.js:r79915,79957,79964,79990,80687,80999,81006,81011,81101,81105,81138,81141,81146,81149-81150,81166,81171 |