diff options
| author | 2015-01-14 21:38:35 +0100 | |
|---|---|---|
| committer | 2015-01-14 21:38:35 +0100 | |
| commit | 806b4de54ffd1dd682ec7b42a5be8343a464e5f0 (patch) | |
| tree | 05e74724c0c80d32c2073d51d06c3bc9cd4b2f33 /lib/Minz/Extension.php | |
| parent | f1ffdd8b9d1f3d8742f1328dfa805664a66e34aa (diff) | |
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.
Diffstat (limited to 'lib/Minz/Extension.php')
| -rw-r--r-- | lib/Minz/Extension.php | 14 |
1 files changed, 12 insertions, 2 deletions
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 |
