From 9e178afdab63f394a5cdf393afabeed5d8a74b5c Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 4 Nov 2009 01:51:53 -0500 Subject: [PATCH] Check for, and throw exception if Content_Tagger class cannot be found from base.php. Temporary measure until Content_* system is better integrated with framework/autoloading etc... Bug: 7936 --- kronolith/lib/Tagger.php | 7 ------- kronolith/lib/base.php | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/kronolith/lib/Tagger.php b/kronolith/lib/Tagger.php index 995ecdc52..f45c57830 100644 --- a/kronolith/lib/Tagger.php +++ b/kronolith/lib/Tagger.php @@ -8,13 +8,6 @@ * * @package Kronolith */ - -// NOTE: For now, autoloading depends on there being a registry entry for the -// 'content' application. - -Horde_Autoloader::addClassPattern('/^Content_/', - $GLOBALS['registry']->get('fileroot', 'content') . '/lib/'); - class Kronolith_Tagger { diff --git a/kronolith/lib/base.php b/kronolith/lib/base.php index 1774af71f..1414276b4 100644 --- a/kronolith/lib/base.php +++ b/kronolith/lib/base.php @@ -47,6 +47,14 @@ try { $conf = &$GLOBALS['conf']; define('KRONOLITH_TEMPLATES', $registry->get('templates')); +/* For now, autoloading the Content_* classes depend on there being a registry + * entry for the 'content' application that contains at least the fileroot + * entry. */ +Horde_Autoloader::addClassPattern('/^Content_/', $GLOBALS['registry']->get('fileroot', 'content') . '/lib/'); +if (!class_exists('Content_Tagger')) { + throw new Horde_Exception(_("The Content_Tagger class could not be found. Make sure the registry entry for the Content system is present.")); +} + /* Notification system. */ $GLOBALS['notification'] = Horde_Notification::singleton(); $GLOBALS['kronolith_notify'] = $GLOBALS['notification']->attach('status', null, 'Kronolith_Notification_Listener_Status'); -- 2.11.0