Minor improvements (#950)

This commit is contained in:
Roman Kelesidis 2023-10-05 09:36:46 +07:00 committed by GitHub
commit ca8a8a2036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 119 additions and 81 deletions

View file

@ -13,7 +13,9 @@ if (!defined('IN_AJAX')) {
global $userdata, $lang, $bb_cfg;
$mode = (string)$this->request['mode'];
if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
switch ($mode) {
case 'clear_cache':

View file

@ -13,8 +13,13 @@ if (!defined('IN_AJAX')) {
global $userdata, $lang, $bb_cfg;
$mode = (string)$this->request['mode'];
$user_id = $this->request['user_id'];
if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
if (!$user_id = (int)$this->request['user_id']) {
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
}
switch ($mode) {
case 'delete_profile':

View file

@ -13,7 +13,9 @@ if (!defined('IN_AJAX')) {
global $userdata, $bb_cfg, $lang, $datastore, $log_action;
$mode = (string)$this->request['mode'];
if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
switch ($mode) {
case 'tor_status':

View file

@ -13,7 +13,10 @@ if (!defined('IN_AJAX')) {
global $bb_cfg, $lang;
$mode = (string)$this->request['mode'];
if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
$map = new TorrentPier\Sitemap();
$html = '';

View file

@ -13,7 +13,9 @@ if (!defined('IN_AJAX')) {
global $bb_cfg, $lang, $userdata;
$mode = (string)$this->request['mode'];
if (!$mode = (string)$this->request['mode']) {
$this->ajax_die('invalid mode (empty)');
}
$html = '<img src="./styles/images/good.gif">';
switch ($mode) {