1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-08 15:35:11 +02:00

[ticket/10631] Stagger the enable/disable/purge for extensions

PHPBB3-10631
This commit is contained in:
Nathan Guse 2012-07-22 22:54:27 -05:00 committed by Unknown Bliss
parent bf6e91b5f3
commit 28ca2d6a5f
5 changed files with 118 additions and 88 deletions

View File

@ -16,7 +16,11 @@
<input class="button1" type="submit" name="{L_DISABLE}" value="{L_DISABLE}" /> <input class="button1" type="submit" name="{L_DISABLE}" value="{L_DISABLE}" />
</fieldset> </fieldset>
</form> </form>
<!-- ELSE IF --> <!-- ELSEIF S_NEXT_STEP -->
<div class="errorbox">
<p>{L_DISABLE_IN_PROGRESS}</p>
</div>
<!-- ELSE -->
<div class="successbox"> <div class="successbox">
<p>{L_DISABLE_SUCCESS}</p> <p>{L_DISABLE_SUCCESS}</p>
<br /> <br />

View File

@ -16,7 +16,11 @@
<input class="button1" type="submit" name="{L_ENABLE}" value="{L_ENABLE}" /> <input class="button1" type="submit" name="{L_ENABLE}" value="{L_ENABLE}" />
</fieldset> </fieldset>
</form> </form>
<!-- ELSE IF --> <!-- ELSEIF S_NEXT_STEP -->
<div class="errorbox">
<p>{L_ENABLE_IN_PROGRESS}</p>
</div>
<!-- ELSE -->
<div class="successbox"> <div class="successbox">
<p>{L_ENABLE_SUCCESS}</p> <p>{L_ENABLE_SUCCESS}</p>
<br /> <br />

View File

@ -16,7 +16,11 @@
<input class="button1" type="submit" name="{L_PURGE}" value="{L_PURGE}" /> <input class="button1" type="submit" name="{L_PURGE}" value="{L_PURGE}" />
</fieldset> </fieldset>
</form> </form>
<!-- ELSE IF --> <!-- ELSEIF S_NEXT_STEP -->
<div class="errorbox">
<p>{L_PURGE_IN_PROGRESS}</p>
</div>
<!-- ELSE -->
<div class="successbox"> <div class="successbox">
<p>{L_PURGE_SUCCESS}</p> <p>{L_PURGE_SUCCESS}</p>
<br /> <br />

View File

@ -56,7 +56,12 @@ class acp_extensions
break; break;
case 'enable': case 'enable':
$phpbb_extension_manager->enable($ext_name); if ($phpbb_extension_manager->enable_step($ext_name))
{
$template->assign_var('S_NEXT_STEP', true);
meta_refresh(0, $this->u_action . '&amp;action=enable&amp;ext_name=' . $ext_name);
}
$this->tpl_name = 'acp_ext_enable'; $this->tpl_name = 'acp_ext_enable';
@ -75,7 +80,12 @@ class acp_extensions
break; break;
case 'disable': case 'disable':
$phpbb_extension_manager->disable($ext_name); if ($phpbb_extension_manager->disable_step($ext_name))
{
$template->assign_var('S_NEXT_STEP', true);
meta_refresh(0, $this->u_action . '&amp;action=disable&amp;ext_name=' . $ext_name);
}
$this->tpl_name = 'acp_ext_disable'; $this->tpl_name = 'acp_ext_disable';
@ -94,7 +104,12 @@ class acp_extensions
break; break;
case 'purge': case 'purge':
$phpbb_extension_manager->purge($ext_name); if ($phpbb_extension_manager->purge_step($ext_name))
{
$template->assign_var('S_NEXT_STEP', true);
meta_refresh(0, $this->u_action . '&amp;action=purge&amp;ext_name=' . $ext_name);
}
$this->tpl_name = 'acp_ext_purge'; $this->tpl_name = 'acp_ext_purge';

View File

@ -60,10 +60,13 @@ $lang = array_merge($lang, array(
'PURGE_EXPLAIN' => 'Purging an extension clears an extensions data while retaining its files.', 'PURGE_EXPLAIN' => 'Purging an extension clears an extensions data while retaining its files.',
'DELETE_EXPLAIN' => 'Deleting an extension removes all of its files and settings. Log entries will remain, although any language variables added by the extension will not be available.', 'DELETE_EXPLAIN' => 'Deleting an extension removes all of its files and settings. Log entries will remain, although any language variables added by the extension will not be available.',
'ENABLE_SUCESS' => 'The extension was enabled successfully', 'DISABLE_IN_PROGRESS' => 'The extension is currently being disabled, please do not leave this page or refresh until it is completed.',
'DISABLE_SUCESS' => 'The extension was disabled successfully', 'ENABLE_IN_PROGRESS' => 'The extension is currently being installed, please do not leave this page or refresh until it is completed.',
'PURGE_SUCESS' => 'The extension was purged successfully', 'PURGE_IN_PROGRESS' => 'The extension is currently being purged, please do not leave this page or refresh until it is completed.',
'DELETE_SUCESS' => 'The extension was deleted successfully', 'ENABLE_SUCCESS' => 'The extension was enabled successfully',
'DISABLE_SUCCESS' => 'The extension was disabled successfully',
'PURGE_SUCCESS' => 'The extension was purged successfully',
'DELETE_SUCCESS' => 'The extension was deleted successfully',
'ENABLE_FAIL' => 'The extension could not be enabled', 'ENABLE_FAIL' => 'The extension could not be enabled',
'DISABLE_FAIL' => 'The extension could not be disabled', 'DISABLE_FAIL' => 'The extension could not be disabled',