From 7c6276adb95ef664307d22a13c6ec7d024c8a00a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 12 May 2009 21:48:29 +0000 Subject: Deal with the user-entered g2 embed.php path a little more sanely so that if the user enters the path to G2 itself, we find the embed.php path from there. --- modules/g2_import/helpers/g2_import.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/g2_import/helpers') diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php index ef8065ad..7eb7724f 100644 --- a/modules/g2_import/helpers/g2_import.php +++ b/modules/g2_import/helpers/g2_import.php @@ -52,6 +52,10 @@ class g2_import_Core { * Initialize the embedded Gallery2 instance. Call this before any other Gallery2 calls. */ static function init_embed($embed_path) { + if (!is_file($embed_path)) { + return false; + } + require($embed_path); if (!class_exists("GalleryEmbed")) { return false; -- cgit v1.2.3