r41788 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41787‎ | r41788 | r41789 >
Date:00:30, 7 October 2008
Author:aaron
Status:old (Comments)
Tags:
Comment:
Add handy $time parameter to wfLocalFile()
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2790,8 +2790,8 @@
27912791 * Get an object referring to a locally registered file.
27922792 * Returns a valid placeholder object if the file does not exist.
27932793 */
2794 -function wfLocalFile( $title ) {
2795 - return RepoGroup::singleton()->getLocalRepo()->newFile( $title );
 2794+function wfLocalFile( $title, $time = false ) {
 2795+ return RepoGroup::singleton()->getLocalRepo()->newFile( $title, $time );
27962796 }
27972797
27982798 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r41792Tweak r41788 - Use findFile() to check current version if $time givenaaron02:22, 7 October 2008
r41793Use $time param from r41788 to avoid extra queriesaaron02:25, 7 October 2008
r41822Revert r41788 and make flaggedrevs do the findFile call itselfaaron21:42, 7 October 2008

Comments

#Comment by Voice of All (talk | contribs)   02:23, 7 October 2008

Tweaked in r41792

#Comment by Brion VIBBER (talk | contribs)   22:21, 8 October 2008

r41822 reverted this

Status & tagging log