mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#1418)
* Minor improvements * Update viewforum.tpl * Update manage_user.php * Update manage_user.php * Update manage_admin.php * Update manage_user.php * Update CHANGELOG.md
This commit is contained in:
parent
96d076f9d1
commit
5a8f431215
4 changed files with 14 additions and 36 deletions
|
@ -21,7 +21,7 @@
|
|||
- Show poll prefix for guests [\#1417](https://github.com/torrentpier/torrentpier/pull/1417) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Used hashing for filenames generation [\#1385](https://github.com/torrentpier/torrentpier/pull/1385) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Hide quote button if topic locked [\#1416](https://github.com/torrentpier/torrentpier/pull/1416) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398), [\#1405](https://github.com/torrentpier/torrentpier/pull/1405), [\#1406](https://github.com/torrentpier/torrentpier/pull/1406), [\#1408](https://github.com/torrentpier/torrentpier/pull/1408), [\#1409](https://github.com/torrentpier/torrentpier/pull/1409), [\#1410](https://github.com/torrentpier/torrentpier/pull/1410), [\#1411](https://github.com/torrentpier/torrentpier/pull/1411) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398), [\#1405](https://github.com/torrentpier/torrentpier/pull/1405), [\#1406](https://github.com/torrentpier/torrentpier/pull/1406), [\#1408](https://github.com/torrentpier/torrentpier/pull/1408), [\#1409](https://github.com/torrentpier/torrentpier/pull/1409), [\#1410](https://github.com/torrentpier/torrentpier/pull/1410), [\#1411](https://github.com/torrentpier/torrentpier/pull/1411), [\#1418](https://github.com/torrentpier/torrentpier/pull/1418) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Some bugfixes [\#1380](https://github.com/torrentpier/torrentpier/pull/1380) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Updated deps [\#1414](https://github.com/torrentpier/torrentpier/pull/1414), [\#1415](https://github.com/torrentpier/torrentpier/pull/1415), [\#1421](https://github.com/torrentpier/torrentpier/pull/1421) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- New Crowdin updates [\#1384](https://github.com/torrentpier/torrentpier/pull/1384), [\#1389](https://github.com/torrentpier/torrentpier/pull/1389), [\#1392](https://github.com/torrentpier/torrentpier/pull/1392), [\#1402](https://github.com/torrentpier/torrentpier/pull/1402), [\#1403](https://github.com/torrentpier/torrentpier/pull/1403), [\#1412](https://github.com/torrentpier/torrentpier/pull/1412), [\#1420](https://github.com/torrentpier/torrentpier/pull/1420) ([Exileum](https://github.com/Exileum))
|
||||
|
|
|
@ -25,7 +25,6 @@ switch ($mode) {
|
|||
|
||||
$this->response['cache_html'] = '<span class="seed bold">' . $lang['ALL_CACHE_CLEARED'] . '</span>';
|
||||
break;
|
||||
|
||||
case 'clear_datastore':
|
||||
global $datastore;
|
||||
|
||||
|
@ -33,7 +32,6 @@ switch ($mode) {
|
|||
|
||||
$this->response['datastore_html'] = '<span class="seed bold">' . $lang['DATASTORE_CLEARED'] . '</span>';
|
||||
break;
|
||||
|
||||
case 'clear_template_cache':
|
||||
global $template;
|
||||
|
||||
|
@ -49,7 +47,6 @@ switch ($mode) {
|
|||
|
||||
$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);
|
||||
|
||||
|
@ -68,32 +65,23 @@ switch ($mode) {
|
|||
|
||||
$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:
|
||||
$this->ajax_die('Invalid mode: ' . $mode);
|
||||
}
|
||||
|
|
|
@ -35,55 +35,46 @@ switch ($mode) {
|
|||
$this->prompt_for_confirm($lang['USER_DELETE_CONFIRM']);
|
||||
}
|
||||
|
||||
if ($user_id != BOT_UID) {
|
||||
if (!in_array($user_id, explode(',', EXCLUDED_USERS))) {
|
||||
\TorrentPier\Sessions::delete_user_sessions($user_id);
|
||||
\TorrentPier\Legacy\Admin\Common::user_delete($user_id);
|
||||
|
||||
$user_id = $userdata['user_id']; // Store self user_id for redirect after successful deleting
|
||||
$this->response['info'] = $lang['USER_DELETED'];
|
||||
} else {
|
||||
$this->ajax_die($lang['USER_DELETE_CSV']);
|
||||
}
|
||||
break;
|
||||
case 'delete_topics':
|
||||
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) {
|
||||
if ($userdata['user_id'] == $user_id) {
|
||||
$this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
|
||||
}
|
||||
if (empty($this->request['confirmed'])) {
|
||||
$this->prompt_for_confirm($lang['DELETE_USER_ALL_POSTS_CONFIRM']);
|
||||
}
|
||||
|
||||
if (IS_ADMIN) {
|
||||
$user_topics = DB()->fetch_rowset("SELECT topic_id FROM " . BB_TOPICS . " WHERE topic_poster = $user_id", 'topic_id');
|
||||
$deleted_topics = \TorrentPier\Legacy\Admin\Common::topic_delete($user_topics);
|
||||
$deleted_posts = \TorrentPier\Legacy\Admin\Common::post_delete('user', $user_id);
|
||||
|
||||
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
||||
} else {
|
||||
$this->ajax_die($lang['NOT_ADMIN']);
|
||||
}
|
||||
$user_topics = DB()->fetch_rowset("SELECT topic_id FROM " . BB_TOPICS . " WHERE topic_poster = $user_id", 'topic_id');
|
||||
$deleted_topics = \TorrentPier\Legacy\Admin\Common::topic_delete($user_topics);
|
||||
$deleted_posts = \TorrentPier\Legacy\Admin\Common::post_delete('user', $user_id);
|
||||
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
||||
break;
|
||||
case 'delete_message':
|
||||
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) {
|
||||
if ($userdata['user_id'] == $user_id) {
|
||||
$this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
|
||||
}
|
||||
if (empty($this->request['confirmed'])) {
|
||||
$this->prompt_for_confirm($lang['DELETE_USER_POSTS_CONFIRM']);
|
||||
}
|
||||
|
||||
if (IS_ADMIN) {
|
||||
\TorrentPier\Legacy\Admin\Common::post_delete('user', $user_id);
|
||||
|
||||
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
||||
} else {
|
||||
$this->ajax_die($lang['NOT_ADMIN']);
|
||||
}
|
||||
\TorrentPier\Legacy\Admin\Common::post_delete('user', $user_id);
|
||||
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
||||
break;
|
||||
case 'user_activate':
|
||||
if (empty($this->request['confirmed'])) {
|
||||
$this->prompt_for_confirm($lang['DEACTIVATE_CONFIRM']);
|
||||
}
|
||||
|
||||
DB()->query("UPDATE " . BB_USERS . " SET user_active = '1' WHERE user_id = " . $user_id);
|
||||
DB()->query("UPDATE " . BB_USERS . " SET user_active = 1 WHERE user_id = " . $user_id);
|
||||
$this->response['info'] = $lang['USER_ACTIVATE_ON'];
|
||||
break;
|
||||
case 'user_deactivate':
|
||||
|
@ -94,11 +85,10 @@ switch ($mode) {
|
|||
$this->prompt_for_confirm($lang['ACTIVATE_CONFIRM']);
|
||||
}
|
||||
|
||||
DB()->query("UPDATE " . BB_USERS . " SET user_active = '0' WHERE user_id = " . $user_id);
|
||||
DB()->query("UPDATE " . BB_USERS . " SET user_active = 0 WHERE user_id = " . $user_id);
|
||||
\TorrentPier\Sessions::delete_user_sessions($user_id);
|
||||
$this->response['info'] = $lang['USER_ACTIVATE_OFF'];
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ td.topic_id { cursor: pointer; }
|
|||
<td class="tCenter small nowrap" style="padding: 3px 4px 2px;">
|
||||
<p>
|
||||
<span title="{L_REPLIES}: {t.REPLIES}">{t.REPLIES}</span>
|
||||
<!-- IF t.REPLIES and t.VIEWS --><span class="small"> | </span><!-- ENDIF -->
|
||||
<!-- IF t.STATUS != MOVED --><span class="small"> | </span><!-- ENDIF -->
|
||||
<span title="{L_VIEWS}: {t.VIEWS}">{t.VIEWS}</span>
|
||||
</p>
|
||||
<!-- BEGIN tor -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue