r69001 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69000‎ | r69001 | r69002 >
Date:14:42, 4 July 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Work on porting WP filesystem abstraction classes
Modified paths:
  • /trunk/extensions/Deployment/includes/filesystems/DirectFilesystem.php (modified) (history)
  • /trunk/extensions/Deployment/includes/filesystems/FtpFilesystem.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Deployment/includes/filesystems/FtpFilesystem.php
@@ -482,7 +482,7 @@
483483 * @see Filesystem::touch
484484 */
485485 public function touch( $file, $time = 0, $atime = 0 ) {
486 -
 486+ return false;
487487 }
488488
489489 /**
Index: trunk/extensions/Deployment/includes/filesystems/DirectFilesystem.php
@@ -454,7 +454,19 @@
455455 * @see Filesystem::touch
456456 */
457457 public function touch( $file, $time = 0, $atime = 0 ) {
458 -
 458+ if ( $time == 0 ) {
 459+ $time = time();
 460+ }
 461+
 462+ if ( $atime == 0 ) {
 463+ $atime = time();
 464+ }
 465+
 466+ wfSuppressWarnings();
 467+ $result = (bool)touch( $file, $time, $atime );
 468+ wfRestoreWarnings();
 469+
 470+ return $result;
459471 }
460472
461473 /**

Status & tagging log