r43670 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43669‎ | r43670 | r43671 >
Date:12:11, 18 November 2008
Author:demon
Status:ok
Tags:
Comment:
Cleanup to r43657, don't really need strlen() here.
Modified paths:
  • /trunk/phase3/includes/filerepo/ForeignAPIRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php
@@ -128,8 +128,7 @@
129129 $foreignUrl = $this->getThumbUrl( $name, $width, $height );
130130
131131 // We need the same filename as the remote one :)
132 - $fileName = ltrim( substr( $foreignUrl, strrpos( $foreignUrl, '/' ),
133 - strlen ( $foreignUrl ) ), '/' );
 132+ $fileName = ltrim( substr( $foreignUrl, strrpos( $foreignUrl, '/' ) ), '/' );
134133 $path = 'thumb/' . $this->getHashPath( $name ) . $name . "/";
135134 if ( !is_dir($wgUploadDirectory . '/' . $path) ) {
136135 wfMkdirParents($wgUploadDirectory . '/' . $path);

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r43657Bit of path cleanup per comments on code review (r43316). Construct proper ha...demon02:03, 18 November 2008

Status & tagging log