diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-30 17:58:33 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-06-30 17:58:33 -0700 |
commit | 050c5a0383b6b1729dbd828d820d5eb347d1b795 (patch) | |
tree | c167c5042ee24b3925ff54410f9201d619d6a31b | |
parent | 8ed6d1183b50de62d495361ff37be71fcc00d48b (diff) |
Unlink the old rewritten path files in var/modules/g2_import when we
validate the embed path. This resolves an issue with b1 installs
which had versions of the rewritten code that were buggy and can be
replaced.
-rw-r--r-- | modules/g2_import/helpers/g2_import.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index 91ca1e63..910f9342 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -46,6 +46,10 @@ class g2_import_Core { } static function is_valid_embed_path($embed_path) { + $mod_path = VARPATH . "modules/g2_import/" . md5($embed_path); + if (file_exists($mod_path)) { + dir::unlink($mod_path); + } return file_exists($embed_path) && g2_import::init_embed($embed_path); } |