From 050c5a0383b6b1729dbd828d820d5eb347d1b795 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 30 Jun 2009 17:58:33 -0700 Subject: 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. --- modules/g2_import/helpers/g2_import.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/g2_import/helpers/g2_import.php') 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); } -- cgit v1.2.3