r107956 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107955‎ | r107956 | r107957 >
Date:22:45, 3 January 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.18wmf1 (modified) (history)
  • /branches/wmf/1.18wmf1/includes (modified) (history)
  • /branches/wmf/1.18wmf1/includes/OutputPage.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/api (modified) (history)
  • /branches/wmf/1.18wmf1/includes/api/ApiQueryExtLinksUsage.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/specials (modified) (history)
  • /branches/wmf/1.18wmf1/includes/specials/SpecialLinkSearch.php (modified) (history)
  • /branches/wmf/1.18wmf1/resources/jquery/jquery.collapsibleTabs.js (modified) (history)
  • /branches/wmf/1.18wmf1/skins/simple/main.css (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/skins/simple/main.css
@@ -312,9 +312,9 @@
313313 text-decoration: line-through;
314314 }
315315 /**
316 -+ * Overrides text justification (user preference)
317 -+ * See bug 31990
318 -+ */
 316+ * Overrides text justification (user preference)
 317+ * See bug 31990
 318+ */
319319 #catlinks {
320320 text-align: center;
321321 }
Index: branches/wmf/1.18wmf1/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 )
@@ -2970,7 +2971,11 @@
29712972 $styles = array( 'other' => array(), 'user' => array(), 'site' => array(), 'private' => array(), 'noscript' => array() );
29722973 $resourceLoader = $this->getResourceLoader();
29732974 foreach ( $this->getModuleStyles() as $name ) {
2974 - $group = $resourceLoader->getModule( $name )->getGroup();
 2975+ $module = $resourceLoader->getModule( $name );
 2976+ if ( !$module ) {
 2977+ continue;
 2978+ }
 2979+ $group = $module->getGroup();
29752980 // Modules in groups named "other" or anything different than "user", "site" or "private"
29762981 // will be placed in the "other" group
29772982 $styles[isset( $styles[$group] ) ? $group : 'other'][] = $name;
Property changes on: branches/wmf/1.18wmf1/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
29782983 Merged /trunk/phase3/includes/OutputPage.php:r104030,104033,104146,104671
Index: branches/wmf/1.18wmf1/includes/api/ApiQueryExtLinksUsage.php
@@ -182,7 +182,9 @@
183183 global $wgUrlProtocols;
184184 $protocols = array( '' );
185185 foreach ( $wgUrlProtocols as $p ) {
186 - $protocols[] = substr( $p, 0, strpos( $p, ':' ) );
 186+ if ( $p !== '//' ) {
 187+ $protocols[] = substr( $p, 0, strpos( $p, ':' ) );
 188+ }
187189 }
188190 return $protocols;
189191 }
Property changes on: branches/wmf/1.18wmf1/includes/api
___________________________________________________________________
Modified: svn:mergeinfo
190192 Merged /trunk/phase3/includes/api:r104033,104146,104671
Index: branches/wmf/1.18wmf1/includes/specials/SpecialLinkSearch.php
@@ -57,7 +57,9 @@
5858
5959 $protocols_list = array();
6060 foreach( $wgUrlProtocols as $prot ) {
61 - $protocols_list[] = $prot;
 61+ if ( $prot !== '//' ) {
 62+ $protocols_list[] = $prot;
 63+ }
6264 }
6365
6466 $target2 = $target;
@@ -76,13 +78,13 @@
7779 // default
7880 $protocol = 'http://';
7981 }
80 - if ( !in_array( $protocol, $protocols_list ) ) {
 82+ if ( $protocol != '' && !in_array( $protocol, $protocols_list ) ) {
8183 // unsupported protocol, show original search request
8284 $target2 = $target;
8385 $protocol = '';
8486 }
8587
86 - $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLang()->commaList( $wgUrlProtocols ) . '</nowiki>' );
 88+ $out->addWikiMsg( 'linksearch-text', '<nowiki>' . $this->getLanguage()->commaList( $protocols_list ) . '</nowiki>' );
8789 $s = Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) .
8890 Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
8991 '<fieldset>' .
Property changes on: branches/wmf/1.18wmf1/includes/specials
___________________________________________________________________
Modified: svn:mergeinfo
9092 Merged /trunk/phase3/includes/specials:r104033,104146,104671
Property changes on: branches/wmf/1.18wmf1/includes
___________________________________________________________________
Modified: svn:mergeinfo
9193 Merged /trunk/phase3/includes:r104030,104033,104146,104671
Index: branches/wmf/1.18wmf1/resources/jquery/jquery.collapsibleTabs.js
@@ -24,7 +24,7 @@
2525 // if we haven't already bound our resize hanlder, bind it now
2626 if( !$.collapsibleTabs.boundEvent ) {
2727 $( window )
28 - .delayedBind( '500', 'resize', function( ) { $.collapsibleTabs.handleResize(); } );
 28+ .delayedBind( '500', 'resize', null, function( ) { $.collapsibleTabs.handleResize(); } );
2929 }
3030 // call our resize handler to setup the page
3131 $.collapsibleTabs.handleResize();
Property changes on: branches/wmf/1.18wmf1
___________________________________________________________________
Modified: svn:mergeinfo
3232 Merged /trunk/phase3:r104030,104033,104146,104671

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104030(bug 29569) Avoid fatal errors in OutputPage when nonexistent module names ar...catrope13:27, 23 November 2011
r104033Followup r102951: per CR, remove duplicated empty string from API extlinks mo...catrope13:41, 23 November 2011
r104146fix comment prefixed by '+' introduced in r103679hashar09:46, 24 November 2011
r104671(bug 31212) History tab not collapsed when the screen is narrow. Patch by Mic...catrope13:16, 30 November 2011

Status & tagging log