mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10631] Stagger the enable/disable/purge for extensions
PHPBB3-10631
This commit is contained in:
parent
bf6e91b5f3
commit
28ca2d6a5f
5 changed files with 118 additions and 88 deletions
|
@ -1,27 +1,31 @@
|
||||||
<!-- INCLUDE overall_header.html -->
|
<!-- INCLUDE overall_header.html -->
|
||||||
|
|
||||||
<a name="maincontent"></a>
|
<a name="maincontent"></a>
|
||||||
|
|
||||||
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
||||||
|
|
||||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||||
<p>{L_ENABLE_EXPLAIN}</p>
|
<p>{L_ENABLE_EXPLAIN}</p>
|
||||||
|
|
||||||
<!-- IF PRE -->
|
<!-- IF PRE -->
|
||||||
<p>{L_DISABLE_CONFIRM}</p>
|
<p>{L_DISABLE_CONFIRM}</p>
|
||||||
|
|
||||||
<form id="acp_extensions" method="post" action="{U_DISABLE}">
|
<form id="acp_extensions" method="post" action="{U_DISABLE}">
|
||||||
<fieldset class="submit-buttons">
|
<fieldset class="submit-buttons">
|
||||||
<legend>{L_DISABLE}</legend>
|
<legend>{L_DISABLE}</legend>
|
||||||
<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="successbox">
|
<div class="errorbox">
|
||||||
<p>{L_DISABLE_SUCCESS}</p>
|
<p>{L_DISABLE_IN_PROGRESS}</p>
|
||||||
<br />
|
</div>
|
||||||
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
|
<!-- ELSE -->
|
||||||
</div>
|
<div class="successbox">
|
||||||
<!-- ENDIF -->
|
<p>{L_DISABLE_SUCCESS}</p>
|
||||||
|
<br />
|
||||||
<!-- INCLUDE overall_footer.html -->
|
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
|
||||||
|
</div>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- INCLUDE overall_footer.html -->
|
||||||
|
|
|
@ -1,27 +1,31 @@
|
||||||
<!-- INCLUDE overall_header.html -->
|
<!-- INCLUDE overall_header.html -->
|
||||||
|
|
||||||
<a name="maincontent"></a>
|
<a name="maincontent"></a>
|
||||||
|
|
||||||
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
||||||
|
|
||||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||||
<p>{L_ENABLE_EXPLAIN}</p>
|
<p>{L_ENABLE_EXPLAIN}</p>
|
||||||
|
|
||||||
<!-- IF PRE -->
|
<!-- IF PRE -->
|
||||||
<p>{L_ENABLE_CONFIRM}</p>
|
<p>{L_ENABLE_CONFIRM}</p>
|
||||||
|
|
||||||
<form id="acp_extensions" method="post" action="{U_ENABLE}">
|
<form id="acp_extensions" method="post" action="{U_ENABLE}">
|
||||||
<fieldset class="submit-buttons">
|
<fieldset class="submit-buttons">
|
||||||
<legend>{L_ENABLE}</legend>
|
<legend>{L_ENABLE}</legend>
|
||||||
<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="successbox">
|
<div class="errorbox">
|
||||||
<p>{L_ENABLE_SUCCESS}</p>
|
<p>{L_ENABLE_IN_PROGRESS}</p>
|
||||||
<br />
|
</div>
|
||||||
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
|
<!-- ELSE -->
|
||||||
</div>
|
<div class="successbox">
|
||||||
<!-- ENDIF -->
|
<p>{L_ENABLE_SUCCESS}</p>
|
||||||
|
<br />
|
||||||
<!-- INCLUDE overall_footer.html -->
|
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
|
||||||
|
</div>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- INCLUDE overall_footer.html -->
|
||||||
|
|
|
@ -1,27 +1,31 @@
|
||||||
<!-- INCLUDE overall_header.html -->
|
<!-- INCLUDE overall_header.html -->
|
||||||
|
|
||||||
<a name="maincontent"></a>
|
<a name="maincontent"></a>
|
||||||
|
|
||||||
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
<h1>{L_EXTENSIONS_ADMIN}</h1>
|
||||||
|
|
||||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||||
<p>{L_ENABLE_EXPLAIN}</p>
|
<p>{L_ENABLE_EXPLAIN}</p>
|
||||||
|
|
||||||
<!-- IF PRE -->
|
<!-- IF PRE -->
|
||||||
<p>{L_PURGE_CONFIRM}</p>
|
<p>{L_PURGE_CONFIRM}</p>
|
||||||
|
|
||||||
<form id="acp_extensions" method="post" action="{U_PURGE}">
|
<form id="acp_extensions" method="post" action="{U_PURGE}">
|
||||||
<fieldset class="submit-buttons">
|
<fieldset class="submit-buttons">
|
||||||
<legend>{L_PURGE}</legend>
|
<legend>{L_PURGE}</legend>
|
||||||
<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="successbox">
|
<div class="errorbox">
|
||||||
<p>{L_PURGE_SUCCESS}</p>
|
<p>{L_PURGE_IN_PROGRESS}</p>
|
||||||
<br />
|
</div>
|
||||||
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
|
<!-- ELSE -->
|
||||||
</div>
|
<div class="successbox">
|
||||||
<!-- ENDIF -->
|
<p>{L_PURGE_SUCCESS}</p>
|
||||||
|
<br />
|
||||||
<!-- INCLUDE overall_footer.html -->
|
<p><a href="{U_RETURN}">{L_RETURN}</a></p>
|
||||||
|
</div>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- INCLUDE overall_footer.html -->
|
||||||
|
|
|
@ -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 . '&action=enable&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 . '&action=disable&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 . '&action=purge&ext_name=' . $ext_name);
|
||||||
|
}
|
||||||
|
|
||||||
$this->tpl_name = 'acp_ext_purge';
|
$this->tpl_name = 'acp_ext_purge';
|
||||||
|
|
||||||
|
|
|
@ -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',
|
||||||
|
|
Loading…
Add table
Reference in a new issue