// In the deleted zone, seed new directories with a blank
// index.html, to prevent crawling
if ( $dstZone == 'deleted' ) {
- file_put_contents( "$dstDir/index.html", '' );
+ $this->file_put_contents( "$dstDir/index.html", '' );
}
}
if ( $flags & self::DELETE_SOURCE ) {
if ( $deleteDest ) {
- unlink( $dstPath );
+ $this->unlink( $dstPath );
}
if ( !rename( $srcPath, $dstPath ) ) {
$status->error( 'filerenameerror', $srcPath, $dstPath );
}
}
if ( $good ) {
- chmod( $dstPath, 0644 );
+ $this->chmod( $dstPath, 0644 );
$status->successCount++;
} else {
$status->failCount++;
return strtr( $param, $this->simpleCleanPairs );
}
+ function file_put_contents( $fileName, $contents ) {
+ file_put_contents( $fileName, $contents );
+ }
+
+
}
self::$instance = null;
}
+ /**
+ * Set the singleton instance to a given object
+ */
+ static function setSingleton( $instance ) {
+ self::$instance = $instance;
+ }
+
/**
* Construct a group of file repositories.
* @param array $data Array of repository info arrays.