Author: david
Date: Wed Aug 24 14:28:29 2011
New Revision: 9585
Log:
Revert to asset paths relative to sf_web_dir
Modified:
trunk/lib/task/migrate/QubitMigrate110.class.php
Modified: trunk/lib/task/migrate/QubitMigrate110.class.php
==============================================================================
--- trunk/lib/task/migrate/QubitMigrate110.class.php Wed Aug 24 14:25:51
2011 (r9584)
+++ trunk/lib/task/migrate/QubitMigrate110.class.php Wed Aug 24 14:28:29
2011 (r9585)
@@ -660,18 +660,18 @@
// Move entire info object directory (e.g. 'uploads/3/1/318/' to
// 'uploads/r/repo-name/3/1/318')
$old = substr($item2['path'], 0, 10); // e.g. '/uploads/3'
- $new = str_replace('uploads', 'r/'.$repo['slug'], $old);
+ $new = str_replace('uploads', 'uploads/r/'.$repo['slug'], $old);
if (file_exists(sfConfig::get('sf_web_dir').$old))
{
- if (!rename(sfConfig::get('sf_web_dir').$old,
sfConfig::get('sf_upload_dir').$new))
+ if (!rename(sfConfig::get('sf_web_dir').$old,
sfConfig::get('sf_web_dir').$new))
{
continue; // If rename fails, don't update path
}
}
// Update path in yaml file
- $item2['path'] = str_replace('uploads', 'r/'.$repo['slug'],
$item2['path']);
+ $item2['path'] = str_replace('uploads', 'uploads/r/'.$repo['slug'],
$item2['path']);
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.