r101203 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101202‎ | r101203 | r101204 >
Date:21:20, 28 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/phase3 (modified) (history)
  • /branches/REL1_18/phase3/includes (modified) (history)
  • /branches/REL1_18/phase3/includes/CategoryPage.php (modified) (history)
  • /branches/REL1_18/phase3/includes/Import.php (modified) (history)
  • /branches/REL1_18/phase3/includes/SpecialPageFactory.php (modified) (history)
  • /branches/REL1_18/phase3/resources/jquery/jquery.tablesorter.js (modified) (history)
  • /branches/REL1_18/phase3/resources/jquery/jquery.textSelection.js (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/SpecialPageFactory.php
@@ -339,11 +339,9 @@
340340 $pages = array();
341341 foreach ( self::getList() as $name => $rec ) {
342342 $page = self::getPage( $name );
343 - if ( $page->isListed()
344 - && (
345 - !$page->isRestricted()
346 - || $page->userCanExecute( $wgUser )
347 - )
 343+ if ( $page // not null
 344+ && $page->isListed()
 345+ && ( !$page->isRestricted() || $page->userCanExecute( $wgUser ) )
348346 ) {
349347 $pages[$name] = $page;
350348 }
Property changes on: branches/REL1_18/phase3/includes/SpecialPageFactory.php
___________________________________________________________________
Modified: svn:mergeinfo
351349 Merged /trunk/phase3/includes/SpecialPageFactory.php:r99286,99332,100398,100701,101010
Index: branches/REL1_18/phase3/includes/CategoryPage.php
@@ -68,14 +68,27 @@
6969 // Use these as defaults for back compat --catrope
7070 $oldFrom = $wgRequest->getVal( 'from' );
7171 $oldUntil = $wgRequest->getVal( 'until' );
 72+
 73+ $reqArray = $wgRequest->getValues();
7274
7375 $from = $until = array();
7476 foreach ( array( 'page', 'subcat', 'file' ) as $type ) {
7577 $from[$type] = $wgRequest->getVal( "{$type}from", $oldFrom );
7678 $until[$type] = $wgRequest->getVal( "{$type}until", $oldUntil );
 79+
 80+ // Do not want old-style from/until propagating in nav links.
 81+ if ( !isset( $reqArray["{$type}from"] ) && isset( $reqArray["from"] ) ) {
 82+ $reqArray["{$type}from"] = $reqArray["from"];
 83+ }
 84+ if ( !isset( $reqArray["{$type}to"] ) && isset( $reqArray["to"] ) ) {
 85+ $reqArray["{$type}to"] = $reqArray["to"];
 86+ }
7787 }
7888
79 - $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $wgRequest->getValues() );
 89+ unset( $reqArray["from"] );
 90+ unset( $reqArray["to"] );
 91+
 92+ $viewer = new $this->mCategoryViewerClass( $this->mTitle, $from, $until, $reqArray );
8093 $wgOut->addHTML( $viewer->getHTML() );
8194 }
8295 }
Property changes on: branches/REL1_18/phase3/includes/CategoryPage.php
___________________________________________________________________
Modified: svn:mergeinfo
8396 Merged /trunk/phase3/includes/CategoryPage.php:r99332,100398,100701,101010
Index: branches/REL1_18/phase3/includes/Import.php
@@ -1286,7 +1286,7 @@
12871287 # quicker and sorts out user-agent problems which might
12881288 # otherwise prevent importing from large sites, such
12891289 # as the Wikimedia cluster, etc.
1290 - $data = Http::request( $method, $url );
 1290+ $data = Http::request( $method, $url, array( 'followRedirects' => true ) );
12911291 if( $data !== false ) {
12921292 $file = tmpfile();
12931293 fwrite( $file, $data );
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
12941294 Merged /trunk/phase3/includes:r99286,99332,100398,100701,101010
Index: branches/REL1_18/phase3/resources/jquery/jquery.textSelection.js
@@ -205,12 +205,20 @@
206206 * Get the position (in resolution of bytes not nessecarily characters)
207207 * in a textarea
208208 *
 209+ * Will focus the textarea in some browsers (IE/Opera)
 210+ *
209211 * @fixme document the options parameters
210212 */
211213 getCaretPosition: function( options ) {
212214 function getCaret( e ) {
213215 var caretPos = 0, endPos = 0;
214216 if ( $.browser.msie ) {
 217+ // IE doesn't properly report non-selected caret position through
 218+ // the selection ranges when textarea isn't focused. This can
 219+ // lead to saving a bogus empty selection, which then screws up
 220+ // whatever we do later (bug 31847).
 221+ e.focus();
 222+
215223 // IE Support
216224 var preFinished = false;
217225 var periFinished = false;
Index: branches/REL1_18/phase3/resources/jquery/jquery.tablesorter.js
@@ -584,8 +584,13 @@
585585 cacheRegexs();
586586
587587 // Apply event handling to headers
588 - // this is to big, perhaps break it out?
 588+ // this is too big, perhaps break it out?
589589 $headers.click( function( e ) {
 590+ if ( e.target.nodeName.toLowerCase() == 'a' ) {
 591+ // The user clicked on a link inside a table header
 592+ // Do nothing and let the default link click action continue
 593+ return true;
 594+ }
590595
591596 if ( firstTime ) {
592597 firstTime = false;
@@ -667,12 +672,7 @@
668673 };
669674 return false;
670675 }
671 - } )
672 - // Allow links in headers to be clicked
673 - .find( 'a' ).click( function( e ) {
674 - e.stopPropagation();
675676 } );
676 -
677677 } );
678678 },
679679
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
680680 Merged /trunk/phase3:r99286,99332,100398,100701,101010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99286Fixed getUsablePages() to account for the fact that getPage() can return nullaaron00:16, 8 October 2011
r99332(bug 31549; follow-up r83563) Do not include old-style from links in nav link...bawolff03:50, 9 October 2011
r100398* (bug 31847) Fix positioning of WikiEditor 'header' insertions when selectio...brion00:15, 21 October 2011
r100701(bug 31514) Followup r99031: allow clicking of links in table headers in a di...catrope14:41, 25 October 2011
r101010Fixes Bug #28277 by allowing redirects on the stream reader. Fixes a...mah17:58, 27 October 2011

Status & tagging log