aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/extension/base.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-08-29 17:17:40 -0400
committerNils Adermann <naderman@naderman.de>2011-09-29 15:42:48 +0200
commitc7a986eccdac183cc81b3da486092f4ab82109ba (patch)
tree6a0d855eda1a083fb94d09b0d60bce530805c868 /phpBB/includes/extension/base.php
parent897063d3e269a7c11ef6d6602abc37ec30266a72 (diff)
downloadforums-c7a986eccdac183cc81b3da486092f4ab82109ba.tar
forums-c7a986eccdac183cc81b3da486092f4ab82109ba.tar.gz
forums-c7a986eccdac183cc81b3da486092f4ab82109ba.tar.bz2
forums-c7a986eccdac183cc81b3da486092f4ab82109ba.tar.xz
forums-c7a986eccdac183cc81b3da486092f4ab82109ba.zip
[feature/extension-manager] Use an incremental process for enable and purge
The enable or purge operation of an extension could take a long time if an expensive operation needs to be executed on a large set of data. To allow this to succeed from a web interface with max_execution_time set in the webserver's php configuration, subsequent requests must continue the operation started earlier. So individual enable and purge implementations must be able to spread their work across multiple steps. PHPBB3-10323
Diffstat (limited to 'phpBB/includes/extension/base.php')
-rw-r--r--phpBB/includes/extension/base.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/phpBB/includes/extension/base.php b/phpBB/includes/extension/base.php
index 0e6c89491d..8228364d44 100644
--- a/phpBB/includes/extension/base.php
+++ b/phpBB/includes/extension/base.php
@@ -16,20 +16,38 @@ if (!defined('IN_PHPBB'))
}
/**
+* A base class for extensions without custom enable/disbale/purge code.
*
* @package extension
*/
class phpbb_extension_base implements phpbb_extension_interface
{
- public function enable()
+ /**
+ * Single enable step that does nothing
+ *
+ * @return false Indicates no further steps are required
+ */
+ public function enable_step($old_state)
{
+ return false;
}
+ /**
+ * Empty disable method
+ *
+ * @return null
+ */
public function disable()
{
}
- public function purge()
+ /**
+ * Single purge step that does nothing
+ *
+ * @return false Indicates no further steps are required
+ */
+ public function purge_step($old_state)
{
+ return false;
}
}