mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#751)
This commit is contained in:
parent
eb604a566e
commit
e22d2a6254
4 changed files with 8 additions and 24 deletions
|
@ -17,7 +17,6 @@ $mode = (string)$this->request['mode'];
|
|||
|
||||
switch ($mode) {
|
||||
case 'clear_cache':
|
||||
|
||||
foreach ($bb_cfg['cache']['engines'] as $cache_name => $cache_val) {
|
||||
if (!in_array('db_sqlite', $cache_val)) {
|
||||
CACHE($cache_name)->rm();
|
||||
|
@ -25,21 +24,17 @@ switch ($mode) {
|
|||
}
|
||||
|
||||
$this->response['cache_html'] = '<span class="seed bold">' . $lang['ALL_CACHE_CLEARED'] . '</span>';
|
||||
|
||||
break;
|
||||
|
||||
case 'clear_datastore':
|
||||
|
||||
global $datastore;
|
||||
|
||||
$datastore->clean();
|
||||
|
||||
$this->response['datastore_html'] = '<span class="seed bold">' . $lang['DATASTORE_CLEARED'] . '</span>';
|
||||
|
||||
break;
|
||||
|
||||
case 'clear_template_cache':
|
||||
|
||||
global $template;
|
||||
|
||||
$match = XS_TPL_PREFIX;
|
||||
|
@ -54,11 +49,9 @@ switch ($mode) {
|
|||
closedir($res);
|
||||
|
||||
$this->response['template_cache_html'] = '<span class="seed bold">' . $lang['ALL_TEMPLATE_CLEARED'] . '</span>';
|
||||
|
||||
break;
|
||||
|
||||
case 'indexer':
|
||||
|
||||
exec("indexer --config {$bb_cfg['sphinx_config_path']} --all --rotate", $result);
|
||||
|
||||
if (!is_file($bb_cfg['sphinx_config_path'] . ".log")) {
|
||||
|
@ -75,40 +68,31 @@ switch ($mode) {
|
|||
file_put_contents($bb_cfg['sphinx_config_path'] . ".log", "\r\n", FILE_APPEND);
|
||||
|
||||
$this->response['indexer_html'] = '<span class="seed bold">' . $lang['INDEXER'] . '</span>';
|
||||
|
||||
break;
|
||||
|
||||
case 'update_user_level':
|
||||
|
||||
\TorrentPier\Legacy\Group::update_user_level('all');
|
||||
|
||||
$this->response['update_user_level_html'] = '<span class="seed bold">' . $lang['USER_LEVELS_UPDATED'] . '</span>';
|
||||
|
||||
break;
|
||||
|
||||
case 'sync_topics':
|
||||
|
||||
\TorrentPier\Legacy\Admin\Common::sync('topic', 'all');
|
||||
\TorrentPier\Legacy\Admin\Common::sync_all_forums();
|
||||
|
||||
$this->response['sync_topics_html'] = '<span class="seed bold">' . $lang['TOPICS_DATA_SYNCHRONIZED'] . '</span>';
|
||||
|
||||
break;
|
||||
|
||||
case 'sync_user_posts':
|
||||
|
||||
\TorrentPier\Legacy\Admin\Common::sync('user_posts', 'all');
|
||||
|
||||
$this->response['sync_user_posts_html'] = '<span class="seed bold">' . $lang['USER_POSTS_COUNT_SYNCHRONIZED'] . '</span>';
|
||||
|
||||
break;
|
||||
|
||||
case 'unlock_cron':
|
||||
|
||||
\TorrentPier\Helpers\CronHelper::enableBoard();
|
||||
|
||||
$this->response['unlock_cron_html'] = '<span class="seed bold">' . $lang['ADMIN_UNLOCKED'] . '</span>';
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -59,6 +59,7 @@ $lang['ENABLED'] = 'Enabled';
|
|||
$lang['DISABLED'] = 'Disabled';
|
||||
$lang['ERROR'] = 'Error';
|
||||
$lang['SELECT_ACTION'] = 'Select action';
|
||||
$lang['CLEAR'] = 'Clear';
|
||||
|
||||
$lang['NEXT_PAGE'] = 'Next';
|
||||
$lang['PREVIOUS_PAGE'] = 'Previous';
|
||||
|
@ -99,10 +100,8 @@ $lang['CLICK_RETURN_MODCP'] = 'Click %sHere%s to return to Moderator Control Pan
|
|||
$lang['CLICK_RETURN_GROUP'] = 'Click %sHere%s to return to group information';
|
||||
|
||||
$lang['ADMIN_PANEL'] = 'Go to Administration Panel';
|
||||
$lang['ALL_CACHE'] = 'All cache';
|
||||
$lang['ALL_CACHE_CLEARED'] = 'Cache has been cleared';
|
||||
$lang['ALL_TEMPLATE_CLEARED'] = 'Template cache has been cleared';
|
||||
$lang['DATASTORE'] = 'Datastore';
|
||||
$lang['DATASTORE_CLEARED'] = 'Datastore has been cleared';
|
||||
$lang['BOARD_DISABLE'] = 'Sorry, this forum is disabled. Try to come back later';
|
||||
$lang['BOARD_DISABLE_CRON'] = 'Forum is down for maintenance. Try to come back later';
|
||||
|
@ -1646,8 +1645,9 @@ $lang['GZIP_COMPRESSION'] = 'Gzip compression';
|
|||
$lang['NOT_AVAILABLE'] = 'Not available';
|
||||
|
||||
// Clear Cache
|
||||
$lang['DATASTORE'] = 'Datastore';
|
||||
$lang['CLEAR_CACHE'] = 'Clear Cache';
|
||||
$lang['TEMPLATES'] = 'Templates';
|
||||
$lang['CLEAR_TEMPLATES_CACHE'] = 'Templates cache';
|
||||
|
||||
// Update
|
||||
$lang['USER_LEVELS'] = 'User levels';
|
||||
|
|
|
@ -106,11 +106,11 @@
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><b>{L_CLEAR_CACHE}:</b></td>
|
||||
<td><b>{L_CLEAR}:</b></td>
|
||||
<td>
|
||||
<a href="#" id="datastore" onclick="ajax.manage_admin('clear_datastore'); return false;">{L_DATASTORE}</a>,
|
||||
<a href="#" id="cache" onclick="ajax.manage_admin('clear_cache'); return false;">{L_ALL_CACHE}</a>,
|
||||
<a href="#" id="template_cache" onclick="ajax.manage_admin('clear_template_cache'); return false;">{L_TEMPLATES}</a>
|
||||
<a href="#" id="datastore" onclick="ajax.manage_admin('clear_datastore'); return false;">{L_DATASTORE}</a> ·
|
||||
<a href="#" id="cache" onclick="ajax.manage_admin('clear_cache'); return false;">{L_CLEAR_CACHE}</a> ·
|
||||
<a href="#" id="template_cache" onclick="ajax.manage_admin('clear_template_cache'); return false;">{L_CLEAR_TEMPLATES_CACHE}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -76,7 +76,7 @@ ajax.callback.posts = function(data) {
|
|||
</span>
|
||||
|
||||
<div class="buttons floatR">
|
||||
<input type="reset" value="{L_CANCEL}" class="liteoption"/>
|
||||
<input type="reset" value="{L_CLEAR}" class="liteoption"/>
|
||||
<input type="button" value="+" onclick="$('#message').css({height: parseInt($('#message').css('height')) + 100}); return false;">
|
||||
<input type="button" value="-" onclick="$('#message').css({height: parseInt($('#message').css('height')) - 100}); return false;">
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue