r35828 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35827‎ | r35828 | r35829 >
Date:23:46, 3 June 2008
Author:brion
Status:old
Tags:
Comment:
Revert r35819 -- broke thumbnailing.

10 previously passing test(s) now FAILING! :(
* Thumbnail image caption with a free URL [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* BUG 1887: A ISBN with a thumbnail [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* BUG 1887: A RFC with a thumbnail [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* BUG 1887: A mailto link with a thumbnail [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
so math is not stripped and turns up as escaped &lt;math&gt; tags. [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* BUG 1887, part 2: A <math> with a thumbnail- math enabled [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* Image caption containing another image [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* Bug 3090: External links other than http: in image captions [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* Width + Height sized image (using px) (height is ignored) [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
* <references> after <gallery> (bug 6164) [Introduced between 03-Jun-2008 19:49:16, 1.13alpha (r35816) and 03-Jun-2008 23:42:22, 1.13alpha (r35827)]
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -1706,48 +1706,7 @@
17071707 return true;
17081708 if( file_exists( $fullDir ) )
17091709 return true;
1710 -
1711 - # Go back through the paths to find the first directory that exists
1712 - $currentDir = $fullDir;
1713 - $createList = array();
1714 - while ( strval( $currentDir ) !== '' && !file_exists( $currentDir ) ) {
1715 - # Strip trailing slashes
1716 - $currentDir = rtrim( $currentDir, '/\\' );
1717 -
1718 - # Add to create list
1719 - $createList[] = $currentDir;
1720 -
1721 - # Find next delimiter searching from the end
1722 - $p = max( strrpos( $currentDir, '/' ), strrpos( $currentDir, '\\' ) );
1723 - if ( $p === false ) {
1724 - $currentDir = false;
1725 - } else {
1726 - $currentDir = substr( $currentDir, 0, $p );
1727 - }
1728 - }
1729 -
1730 - if ( count( $createList ) == 0 ) {
1731 - # Directory specified already exists
1732 - return true;
1733 - } elseif ( $currentDir === false ) {
1734 - # Went all the way back to root and it apparently doesn't exist
1735 - return false;
1736 - }
1737 -
1738 - # Now go forward creating directories
1739 - $createList = array_reverse( $createList );
1740 - foreach ( $createList as $dir ) {
1741 - # Check first to avoid spamming with warnings
1742 - if ( !is_writable( $dir ) ) {
1743 - return false;
1744 - }
1745 - # use chmod to override the umask, as suggested by the PHP manual
1746 - if ( !mkdir( $dir, $mode ) || !chmod( $dir, $mode ) ) {
1747 - wfDebugLog( 'mkdir', "Unable to create directory $dir\n" );
1748 - return false;
1749 - }
1750 - }
1751 - return true;
 1710+ return mkdir( str_replace( '/', DIRECTORY_SEPARATOR, $fullDir ), $mode, true );
17521711 }
17531712
17541713 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r9548* (bug 1887) Applying attachment 461avar13:48, 21 June 2005
r10464Parser test for bug 3090imsop22:51, 12 August 2005
r10465Parser test for bug 3090 (I knew I'd get CVS wrong)imsop23:46, 12 August 2005
r10661(Bug 3090) mask all external links in image captions against double-parsing, ...imsop12:44, 20 August 2005
r10662(Bug 3090) mask all external links in image captions against double-parsing, ...imsop12:51, 20 August 2005
r13307Collected updates:...gabrielwicke17:10, 24 March 2006
r14531Add regression test for bug 6164brion21:11, 1 June 2006
r14532* (bug 6164) Fix regression with <gallery> resetting <ref> statebrion21:22, 1 June 2006
r16954* (bug 6164) Avoid smashing Cite state if message transformation triggers...brion01:07, 12 October 2006
r17481Fix parserTests regression introduced in r17479....nickj06:03, 8 November 2006
r35816Remove bullshit "deprecated" warnings about MediaWiki:Monobook.js...brion19:33, 3 June 2008
r35819* Revert wfMkdirParents back to old method not using recursive mkdir...nikerabbit20:28, 3 June 2008
r35827Revert r35812 (link icons for RTL)....brion23:36, 3 June 2008

Status & tagging log