r107907 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107906‎ | r107907 | r107908 >
Date:17:34, 3 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/phase3 (modified) (history)
  • /branches/REL1_18/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /branches/REL1_18/phase3/includes (modified) (history)
  • /branches/REL1_18/phase3/includes/DefaultSettings.php (modified) (history)
  • /branches/REL1_18/phase3/includes/OutputPage.php (modified) (history)
  • /branches/REL1_18/phase3/includes/Wiki.php (modified) (history)
  • /branches/REL1_18/phase3/maintenance/postgres/tables.sql (modified) (history)
  • /branches/REL1_18/phase3/maintenance/update.php (modified) (history)
  • /branches/REL1_18/phase3/resources/Resources.php (modified) (history)
  • /branches/REL1_18/phase3/skins/common/mwsuggest.js (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/maintenance/update.php
@@ -78,7 +78,7 @@
7979 function execute() {
8080 global $wgVersion, $wgTitle, $wgLang, $wgMiserMode;
8181
82 - if( $wgMiserMode && !$this->hasOption( 'force' ) ) {
 82+ if( !$wgAllowSchemaUpdates && !$this->hasOption( 'force' ) ) {
8383 $this->error( "Do not run update.php on this wiki. If you're seeing this you should\n"
8484 . "probably ask for some help in performing your schema updates.\n\n"
8585 . "If you know what you are doing, you can continue with --force", true );
Index: branches/REL1_18/phase3/maintenance/postgres/tables.sql
@@ -358,11 +358,11 @@
359359 CREATE INDEX fa_notime ON filearchive (fa_deleted_timestamp);
360360 CREATE INDEX fa_nouser ON filearchive (fa_deleted_user);
361361
362 -CREATE SEQUENCE uploadstash_us_id_seq;
 362+CREATE SEQUENCE us_id_seq;
363363 CREATE TYPE media_type AS ENUM ('UNKNOWN','BITMAP','DRAWING','AUDIO','VIDEO','MULTIMEDIA','OFFICE','TEXT','EXECUTABLE','ARCHIVE');
364364
365365 CREATE TABLE uploadstash (
366 - us_id INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('uploadstash_us_id_seq'),
 366+ us_id INTEGER PRIMARY KEY NOT NULL DEFAULT nextval('us_id_seq'),
367367 us_user INTEGER,
368368 us_key TEXT,
369369 us_orig_path TEXT,
Index: branches/REL1_18/phase3/skins/common/mwsuggest.js
@@ -50,18 +50,15 @@
5151 window.os_enabled = true;
5252
5353 /**
54 - * <datalist> is a new HTML5 element that allows you to manually supply
55 - * suggestion lists and have them rendered according to the right platform
56 - * conventions. Opera as of version 11 has a fatal problem: the suggestion
57 - * lags behind what the user types by one keypress. (Reported as DSK-276870 to
58 - * Opera's secret bug tracker.) However, Firefox 4 supports it without
59 - * problems, so Opera is just blacklisted here. Ideally we wouldn't blacklist
60 - * future versions, in case they fix it, but the fallback isn't bad at all and
61 - * the failure if they don't fix it is very annoying, so in this case we'll
62 - * blacklist future versions too.
 54+ * <datalist> is a new HTML5 element that allows you to manually
 55+ * supply suggestion lists and have them rendered according to the
 56+ * right platform conventions. Opera as of version 11 has a fatal
 57+ * problem: the suggestion lags behind what the user types by one
 58+ * keypress. (Reported as DSK-276870 to Opera's secret bug tracker.)
 59+ * There are also problems with other browsers, including Firefox and
 60+ * Safari: See bug 31602 for details.
6361 */
64 -window.os_use_datalist = 'list' in document.createElement( 'input' )
65 - && $.client.profile().name != 'opera';
 62+window.os_use_datalist = false;
6663
6764 /** Timeout timer class that will fetch the results */
6865 window.os_Timer = function( id, r, query ) {
Property changes on: branches/REL1_18/phase3/skins/common/mwsuggest.js
___________________________________________________________________
Modified: svn:mergeinfo
6966 Merged /trunk/phase3/skins/common/mwsuggest.js:r100348,100640
Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18
@@ -175,8 +175,6 @@
176176 create a page or new section.
177177 * (bug 8130) Query pages should limit to content namespaces, not just main
178178 namespace.
179 -* Search suggestions (other than in the Vector skin) will now use the HTML5
180 - datalist feature where supported, currently only Firefox 4.
181179 * Special:Contribs now redirects to Special:Contributions.
182180 * (bug 6672) Images are now autorotated according to their EXIF orientation.
183181 This only affects thumbnails; the source remains unrotated.
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18
___________________________________________________________________
Modified: svn:mergeinfo
184182 Merged /trunk/phase3/RELEASE-NOTES-1.18:r100348,100640
Index: branches/REL1_18/phase3/includes/OutputPage.php
@@ -2402,7 +2402,8 @@
24032403 foreach ( (array) $modules as $name ) {
24042404 $module = $resourceLoader->getModule( $name );
24052405 # Check that we're allowed to include this module on this page
2406 - if ( ( $module->getOrigin() > $this->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS )
 2406+ if ( !$module
 2407+ || ( $module->getOrigin() > $this->getAllowedModules( ResourceLoaderModule::TYPE_SCRIPTS )
24072408 && $only == ResourceLoaderModule::TYPE_SCRIPTS )
24082409 || ( $module->getOrigin() > $this->getAllowedModules( ResourceLoaderModule::TYPE_STYLES )
24092410 && $only == ResourceLoaderModule::TYPE_STYLES )
@@ -2973,7 +2974,11 @@
29742975 $styles = array( 'other' => array(), 'user' => array(), 'site' => array(), 'private' => array(), 'noscript' => array() );
29752976 $resourceLoader = $this->getResourceLoader();
29762977 foreach ( $this->getModuleStyles() as $name ) {
2977 - $group = $resourceLoader->getModule( $name )->getGroup();
 2978+ $module = $resourceLoader->getModule( $name );
 2979+ if ( !$module ) {
 2980+ continue;
 2981+ }
 2982+ $group = $module->getGroup();
29782983 // Modules in groups named "other" or anything different than "user", "site" or "private"
29792984 // will be placed in the "other" group
29802985 $styles[isset( $styles[$group] ) ? $group : 'other'][] = $name;
Property changes on: branches/REL1_18/phase3/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
29812986 Merged /trunk/phase3/includes/OutputPage.php:r104030
Index: branches/REL1_18/phase3/includes/Wiki.php
@@ -78,7 +78,12 @@
7979 $ret = Title::newMainPage();
8080 } else {
8181 $ret = Title::newFromURL( $title );
82 - // check variant links so that interwiki links don't have to worry
 82+ // Alias NS_MEDIA page URLs to NS_FILE...we only use NS_MEDIA
 83+ // in wikitext links to tell Parser to make a direct file link
 84+ if ( !is_null( $ret ) && $ret->getNamespace() == NS_MEDIA ) {
 85+ $ret = Title::makeTitle( NS_FILE, $ret->getDBkey() );
 86+ }
 87+ // Check variant links so that interwiki links don't have to worry
8388 // about the possible different language variants
8489 if ( count( $wgContLang->getVariants() ) > 1
8590 && !is_null( $ret ) && $ret->getArticleID() == 0 )
Index: branches/REL1_18/phase3/includes/DefaultSettings.php
@@ -1410,6 +1410,8 @@
14111411 $wgWantedPagesThreshold = 1;
14121412 /** Enable slow parser functions */
14131413 $wgAllowSlowParserFunctions = false;
 1414+/** Allow schema updates */
 1415+$wgAllowSchemaUpdates = true;
14141416
14151417 /**
14161418 * Do DELETE/INSERT for link updates instead of incremental
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
14171419 Merged /trunk/phase3/includes:r100640,101656,101867,101869,104030
Index: branches/REL1_18/phase3/resources/Resources.php
@@ -658,7 +658,7 @@
659659 'scripts' => 'common/mwsuggest.js',
660660 'remoteBasePath' => $GLOBALS['wgStylePath'],
661661 'localBasePath' => $GLOBALS['wgStyleDirectory'],
662 - 'dependencies' => array( 'mediawiki.legacy.wikibits', 'jquery.client' ),
 662+ 'dependencies' => 'mediawiki.legacy.wikibits',
663663 'messages' => array( 'search-mwsuggest-enabled', 'search-mwsuggest-disabled' ),
664664 ),
665665 'mediawiki.legacy.preview' => array(
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
666666 Merged /trunk/phase3:r100348,100640,101656,101867,101869,104030

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100348Revert r79363, r79364, and r79369 to disable datalists support entirely based...mah14:46, 20 October 2011
r100640Update Postgres with missing uploadstash tablesoverlordq19:43, 24 October 2011
r101656Alias NS_MEDIA page views to NS_FILE. Fixes bug 32032.aaron18:47, 2 November 2011
r101867*grumble grumble* know it alls think I'm abusing $wgMiserMode. So fine, have ...demon20:15, 3 November 2011
r104030(bug 29569) Avoid fatal errors in OutputPage when nonexistent module names ar...catrope13:27, 23 November 2011

Status & tagging log