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:
parent
752ed60890
commit
8e44cc55ab
@ -32,4 +32,13 @@ class themeroller_installer {
|
|||||||
/* @todo Put database table drops here */
|
/* @todo Put database table drops here */
|
||||||
module::delete("themeroller");
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user