1
0

when the themeroller is activated, issue an error message if both the zlib or zip extensions are not installed (themeroller needs at least one of them).

Currently, only the zip extension is supported, but a future patch will support zlib."
This commit is contained in:
Tim Almdal 2010-08-15 16:37:04 -07:00
parent 752ed60890
commit 8e44cc55ab

View File

@ -32,4 +32,13 @@ class themeroller_installer {
/* @todo Put database table drops here */
module::delete("themeroller");
}
static function can_activate() {
$messages = array();
if (!(extension_loaded("zip") || extension_loaded("zlib"))) {
$messages["warn"][] = t("Themeroller requires either the '%zip' or '%zlib' extension to be loaded",
array("zip" => "zip", "zlib" => "zlib"));
}
return $messages;
}
}