prepare menu maintenance const
and removed html to tpl
This commit is contained in:
parent
38c19fc150
commit
627e400a02
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
@define('MAINTAIN_TITLE', 'Maintenance');
|
||||
@define('MAINTAIN_CLEANCOMPILE_PASS', '<span class="perm_name">[smarty clearCompiledTemplate(%s)]</span>');
|
||||
@define('MAINTAIN_CLEANCOMPILE_FAIL', 'Error: %s not allowed / not available!');
|
||||
@define('MAINTAIN_CLEANCOMPILE_TITLE', 'Clear compiled Template');
|
||||
@define('MAINTAIN_CLEANCOMPILE_INFO', 'This will purge compiled files of this template only, but will leave the used runtime files by this current template file.');
|
||||
@define('MENU_MAINTENANCE', 'Maintenance');
|
||||
@define('MENU_MAINTENANCE_CLEANCOMPILE_PASS', '[smarty clearCompiledTemplate(%s)]');
|
||||
@define('MENU_MAINTENANCE_CLEANCOMPILE_FAIL', 'No clearance or compiled template files available!');
|
||||
@define('MENU_MAINTENANCE_CLEANCOMPILE_TITLE', 'Clear compiled Template');
|
||||
@define('MENU_MAINTENANCE_CLEANCOMPILE_INFO', 'This will purge compiled files of this template only, but will leave the used runtime files by this current template file.');
|
||||
|
||||
$data = array();
|
||||
|
||||
@ -31,14 +31,10 @@ switch($serendipity['GET']['adminAction']) {
|
||||
// to not have the following automated recompile, force the servers memory to get exhausted,
|
||||
// when using plugins like serendipity_event_gravatar plugin, which can eat up some MB...
|
||||
// Restriction to template means: leave the page we are on: ../admin/index.tpl and all others, which are set, included and compiled by runtime. (plugins, etc. this can be quite some..!)
|
||||
$finish = null;
|
||||
if(method_exists($serendipity['smarty'], 'clearCompiledTemplate')) {
|
||||
if( $serendipity['smarty']->clearCompiledTemplate(null, $serendipity['template']) ) {
|
||||
$finish = true;
|
||||
} else { $finish = false; }
|
||||
}
|
||||
$data['cleanup_finish'] = (int)$serendipity['smarty']->clearCompiledTemplate(null, $serendipity['template']);
|
||||
$data['cleanup_template'] = $serendipity['template'];
|
||||
$data['cleanup_finish'] = $finish;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -20,11 +20,11 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $cleanup_finish === true}
|
||||
<span class="msg_success"><span class="icon-ok-circled"></span>{$CONST.DONE}! {$CONST.MAINTAIN_CLEANCOMPILE_PASS|sprintf:$cleanup_template}</span>
|
||||
{if $cleanup_finish > 0}
|
||||
<span class="msg_success"><span class="icon-ok-circled"></span>{$CONST.DONE}! <span class="perm_name">{$CONST.MENU_MAINTENANCE_CLEANCOMPILE_PASS|sprintf:$cleanup_template}</span></span>
|
||||
{/if}
|
||||
{if $cleanup_finish === false}
|
||||
<span class="msg_error"><span class="icon-attention-circled"></span>{$CONST.MAINTAIN_CLEANCOMPILE_FAIL|sprintf:($CONST.MAINTAIN_CLEANCOMPILE_PASS|sprintf:$cleanup_template)}</span>
|
||||
{if $cleanup_finish === 0}
|
||||
<span class="msg_error"><span class="icon-attention-circled"></span>{$CONST.MENU_MAINTENANCE_CLEANCOMPILE_FAIL}</span>
|
||||
{/if}
|
||||
|
||||
{if 'siteConfiguration'|checkPermission || 'blogConfiguration'|checkPermission}
|
||||
@ -37,11 +37,11 @@
|
||||
|
||||
{if 'adminTemplates'|checkPermission}
|
||||
<section id="maintenance_cleanup" class="equal_heights quick_list">
|
||||
<h3>{$CONST.MAINTAIN_CLEANCOMPILE_TITLE}</h3>
|
||||
<h3>{$CONST.MENU_MAINTENANCE_CLEANCOMPILE_TITLE}</h3>
|
||||
|
||||
<a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=maintenance&serendipity[adminAction]=runcleanup" title="{$CONST.MAINTAIN_CLEANCOMPILE_TITLE}"><span>{$CONST.MAINTAIN_CLEANCOMPILE_TITLE}</span></a>
|
||||
<a class="button_link" href="?serendipity[action]=admin&serendipity[adminModule]=maintenance&serendipity[adminAction]=runcleanup" title="{$CONST.MENU_MAINTENANCE_CLEANCOMPILE_TITLE}"><span>{$CONST.MENU_MAINTENANCE_CLEANCOMPILE_TITLE}</span></a>
|
||||
<button class="toggle_info button_link" type="button" data-href="#cleanup_info"><span class="icon-info-circled"></span><span class="visuallyhidden"> More</span></button>
|
||||
<span id="cleanup_info" class="comment_status additional_info">{$CONST.MAINTAIN_CLEANCOMPILE_INFO}</span>
|
||||
<span id="cleanup_info" class="comment_status additional_info">{$CONST.MENU_MAINTENANCE_CLEANCOMPILE_INFO}</span>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user