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.

This commit is contained in:
Bharat Mediratta
2009-05-12 21:48:29 +00:00
parent b1ea27a1b9
commit 7c6276adb9
2 changed files with 8 additions and 0 deletions

View File

@@ -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;