r68958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68957‎ | r68958 | r68959 >
Date:18:09, 3 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
@@ -193,18 +193,24 @@
194194 }
195195 }
196196
197 - if ( $success && $this->exists( $path ) && !@ftp_rmdir( $this->link, $path ) ) {
 197+ if ( $success && $this->exists( $path ) && !@ftp_rmdir( $this->connection, $path ) ) {
198198 $success = false;
199199 }
200200
201 - return $success;
 201+ return $success;
202202 }
203203
204204 /**
205205 * @see Filesystem::doCopy
206206 */
207207 protected function doCopy( $from, $to ) {
 208+ $content = $this->get_contents( $from );
208209
 210+ if ( $content === false ) {
 211+ return false;
 212+ }
 213+
 214+ return $this->writeToFile( $to, $content );
209215 }
210216
211217 /**
Index: trunk/extensions/Deployment/includes/filesystems/DirectFilesystem.php
@@ -154,14 +154,14 @@
155155 $success = false;
156156 }
157157
158 - return $success;
 158+ return $success;
159159 }
160160
161161 /**
162162 * @see Filesystem::doCopy
163163 */
164164 protected function doCopy( $from, $to ) {
165 -
 165+ return copy( $from, $to );
166166 }
167167
168168 /**

Status & tagging log