From 806b4de54ffd1dd682ec7b42a5be8343a464e5f0 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 14 Jan 2015 21:38:35 +0100 Subject: Add mechanism at (un)install of an extension Test if the install or uninstall has been successfully performed. If these methods return true, all is ok but if a string is returned, the string must explain the problem. This problem is stored in log file. A feedback is given to explain to check log file. This commit fix a problem in the english translation of feedback.sub.feed.internal_problem. --- lib/Minz/Extension.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/Minz/Extension.php') diff --git a/lib/Minz/Extension.php b/lib/Minz/Extension.php index b3991c129..ac7231e9c 100644 --- a/lib/Minz/Extension.php +++ b/lib/Minz/Extension.php @@ -51,16 +51,26 @@ class Minz_Extension { * Used when installing an extension (e.g. update the database scheme). * * It must be redefined by child classes. + * + * @return true if the extension has been installed or a string explaining + * the problem. */ - public function install() {} + public function install() { + return true; + } /** * Used when uninstalling an extension (e.g. revert the database scheme to * cancel changes from install). * * It must be redefined by child classes. + * + * @return true if the extension has been uninstalled or a string explaining + * the problem. */ - public function uninstall() {} + public function uninstall() { + return true; + } /** * Call at the initialization of the extension (i.e. when the extension is -- cgit v1.2.3