[pLog-svn] r5053 - plog/branches/lifetype-1.2
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Mar 11 18:20:28 EDT 2007
Author: oscar
Date: 2007-03-11 18:20:28 -0400 (Sun, 11 Mar 2007)
New Revision: 5053
Modified:
plog/branches/lifetype-1.2/wizard.php
Log:
Fixed issue http://bugs.lifetype.net/view.php?id=1213, now wizard.php checks if the source resource file exists before attempting to move it (to avoid unnecessary warning messages)
Modified: plog/branches/lifetype-1.2/wizard.php
===================================================================
--- plog/branches/lifetype-1.2/wizard.php 2007-03-11 22:14:30 UTC (rev 5052)
+++ plog/branches/lifetype-1.2/wizard.php 2007-03-11 22:20:28 UTC (rev 5053)
@@ -1784,10 +1784,12 @@
//print( "Renaming file: $fileName --- $destFileName<br/>" );
// skip the rename if we already did it
- if( !File::exists( $destFileName)) {
- if( !File::rename( $fileName, $destFileName )) {
- $this->message .= "Error updating resource file with id ".$row["id"].", while attempting to rename file from $fileName to $destFileName<br/>";
- }
+ if( File::exists( $fileName )) {
+ if( !File::exists( $destFileName)) {
+ if( !File::rename( $fileName, $destFileName )) {
+ $this->message .= "Error updating resource file with id ".$row["id"].", while attempting to rename file from $fileName to $destFileName<br/>";
+ }
+ }
}
@@ -1815,12 +1817,16 @@
//print(" -- renaming preview: $previewFileName -- $destPreviewFileName<br/>");
//print(" -- renaming medium preview: $medPreviewFileName -- $destMedPreviewFileName<br/>");
- if( !File::exists( $destPreviewFileName)) {
- File::rename( $previewFileName, $destPreviewFileName );
- }
- if( !File::exists( $destMedPreviewFileName)) {
- File::rename( $medPreviewFileName, $destMedPreviewFileName );
- }
+ if( File::exists( $previewFileName )) {
+ if( !File::exists( $destPreviewFileName)) {
+ File::rename( $previewFileName, $destPreviewFileName );
+ }
+ }
+ if( File::eixsts( $medPreviewFileName )) {
+ if( !File::exists( $destMedPreviewFileName)) {
+ File::rename( $medPreviewFileName, $destMedPreviewFileName );
+ }
+ }
}
More information about the pLog-svn
mailing list