From: Andy S. <an...@us...> - 2005-05-28 12:21:45
|
Update of /cvsroot/gallery/gallery2/modules/core/classes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6848 Modified Files: GalleryEmbed.class Log Message: Fix: GalleryEmbed::getImageBlock() returns now an error when the imageblock module is not active. Index: GalleryEmbed.class =================================================================== RCS file: /cvsroot/gallery/gallery2/modules/core/classes/GalleryEmbed.class,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- GalleryEmbed.class 27 May 2005 17:53:15 -0000 1.8 +++ GalleryEmbed.class 28 May 2005 12:21:33 -0000 1.9 @@ -751,7 +751,8 @@ return array($ret->wrap(__FILE__, __LINE__), null); } - if (isset($moduleStatus[$moduleId]) && !empty($moduleStatus[$moduleId]['active'])) { + if (isset($moduleStatus[$moduleId]) && !empty($moduleStatus[$moduleId]['active']) + && $moduleStatus[$moduleId]['active']) { /* Load the G2 templating engine */ GalleryCoreApi::requireOnce(dirname(__FILE__) . '/GalleryTemplate.class'); $template = new GalleryTemplate(dirname(__FILE__) . '/../../..'); @@ -772,6 +773,8 @@ return array($ret->wrap(__FILE__, __LINE__), null); } } + } else { + return array(GalleryStatus::error(ERROR_CONFIGURATION_REQUIRED, __FILE__, __LINE__), null); } return array(GalleryStatus::success(), $blockHtml); } |