diff options
author | Chris Smith <toonarmy@phpbb.com> | 2009-06-04 15:37:53 +0000 |
---|---|---|
committer | Chris Smith <toonarmy@phpbb.com> | 2009-06-04 15:37:53 +0000 |
commit | cd1c5de3a508ec851b11baf4095449c66ee6c770 (patch) | |
tree | 230f6769dbc5939fd206431bca79002ead3a9eca /phpBB | |
parent | 710604caa328be820d6240cb9cfccf568bc874d2 (diff) | |
download | forums-cd1c5de3a508ec851b11baf4095449c66ee6c770.tar forums-cd1c5de3a508ec851b11baf4095449c66ee6c770.tar.gz forums-cd1c5de3a508ec851b11baf4095449c66ee6c770.tar.bz2 forums-cd1c5de3a508ec851b11baf4095449c66ee6c770.tar.xz forums-cd1c5de3a508ec851b11baf4095449c66ee6c770.zip |
Finished I hope, appropriate errors when modules are missing.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9540 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/acm/acm_apc.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_eaccelerator.php | 2 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_memcache.php | 17 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_memory.php | 7 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_xcache.php | 2 |
5 files changed, 20 insertions, 10 deletions
diff --git a/phpBB/includes/acm/acm_apc.php b/phpBB/includes/acm/acm_apc.php index cbda86bec0..14159f6826 100644 --- a/phpBB/includes/acm/acm_apc.php +++ b/phpBB/includes/acm/acm_apc.php @@ -28,6 +28,8 @@ if (!class_exists('acm_memory')) */ class acm extends acm_memory { + var $extension = 'apc'; + function acm() { // Call the parent constructor diff --git a/phpBB/includes/acm/acm_eaccelerator.php b/phpBB/includes/acm/acm_eaccelerator.php index 3697fb5202..bce6c53f1c 100644 --- a/phpBB/includes/acm/acm_eaccelerator.php +++ b/phpBB/includes/acm/acm_eaccelerator.php @@ -29,6 +29,8 @@ if (!class_exists('acm_memory')) */ class acm extends acm_memory { + var $extension = 'eaccelerator'; + var $serialize_header = '#phpbb-serialized#'; function acm() diff --git a/phpBB/includes/acm/acm_memcache.php b/phpBB/includes/acm/acm_memcache.php index 1ec37f1b3b..0544d23996 100644 --- a/phpBB/includes/acm/acm_memcache.php +++ b/phpBB/includes/acm/acm_memcache.php @@ -16,16 +16,6 @@ if (!defined('IN_PHPBB')) exit; } -if (!extension_loaded('memcache') || !defined('PHPBB_ACM_MEMCACHE_HOST')) -{ - // Memcached will not work, include the null ACM at least the - // board will still work. - // @todo Could change this for a simple error though. - require("${phpbb_root_path}includes/acm/acm_null.$phpEx"); - - return; -} - // Include the abstract base if (!class_exists('acm_memory')) { @@ -48,6 +38,8 @@ if (!defined('PHPBB_ACM_MEMCACHE_COMPRESS')) */ class acm extends acm_memory { + var $extension = 'memcache'; + var $memcache; var $flags = 0; @@ -56,6 +48,11 @@ class acm extends acm_memory // Call the parent constructor parent::acm_memory(); + if (!defined('PHPBB_ACM_MEMCACHE_HOST')) + { + trigger_error('Missing required constant [PHPBB_ACM_MEMCACHE_HOST] for memcache ACM module.', E_USER_ERROR); + } + $this->memcache = new Memcache; $this->memcache->connect(PHPBB_ACM_MEMCACHE_HOST, PHPBB_ACM_MEMCACHE_PORT); $this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0; diff --git a/phpBB/includes/acm/acm_memory.php b/phpBB/includes/acm/acm_memory.php index a97f680d1e..85e7a7b9d7 100644 --- a/phpBB/includes/acm/acm_memory.php +++ b/phpBB/includes/acm/acm_memory.php @@ -37,6 +37,13 @@ class acm_memory global $phpbb_root_path; $this->cache_dir = $phpbb_root_path . 'cache/'; + + if (!isset($this->extension) || !extension_loaded($this->extension)) + { + global $acm_type; + + trigger_error("Could not find required extension [{$this->extension}] for the ACM module $acm_type.", E_USER_ERROR); + } } /** diff --git a/phpBB/includes/acm/acm_xcache.php b/phpBB/includes/acm/acm_xcache.php index 36a32c167e..5b4ecd68d8 100644 --- a/phpBB/includes/acm/acm_xcache.php +++ b/phpBB/includes/acm/acm_xcache.php @@ -28,6 +28,8 @@ if (!class_exists('acm_memory')) */ class acm extends acm_memory { + var $extension = 'xcache'; + function acm() { // Call the parent constructor |