From 19dffe09b447b4c20becdbed07c6bb22ca76d884 Mon Sep 17 00:00:00 2001 From: Yuriy Pikhtarev Date: Mon, 30 Jan 2017 22:36:51 +0300 Subject: [PATCH] Incorrect case close operands --- ajax.php | 2 +- configs/main.php | 4 +++- library/ajax/change_torrent.php | 14 +++++++------- library/ajax/posts.php | 4 ++-- library/includes/classes/emailer.php | 8 ++++++-- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/ajax.php b/ajax.php index 3a1d3baa4..106ea4d8f 100644 --- a/ajax.php +++ b/ajax.php @@ -81,7 +81,7 @@ switch ($ajax->action) { require(INC_DIR . 'functions_group.php'); break; - case 'sitemap'; + case 'sitemap': require(CLASS_DIR . 'sitemap.php'); break; } diff --git a/configs/main.php b/configs/main.php index 93d59f085..c19396a61 100644 --- a/configs/main.php +++ b/configs/main.php @@ -34,7 +34,9 @@ return [ 'hostname' => '127.0.0.1', 'database' => 'tp_220', 'username' => 'user', - 'password' => function() { return 'pass'; }, + 'password' => function () { + return 'pass'; + }, 'charset' => 'utf8' ], diff --git a/library/ajax/change_torrent.php b/library/ajax/change_torrent.php index f0ce9c9c1..0d27252db 100644 --- a/library/ajax/change_torrent.php +++ b/library/ajax/change_torrent.php @@ -45,9 +45,9 @@ $type = (string)$this->request['type']; $title = $url = ''; switch ($type) { - case 'set_gold'; - case 'set_silver'; - case 'unset_silver_gold'; + case 'set_gold': + case 'set_silver': + case 'unset_silver_gold': if ($type == 'set_silver') { $tor_type = TOR_TYPE_SILVER; } elseif ($type == 'set_gold') { @@ -60,17 +60,17 @@ switch ($type) { $title = $lang['CHANGE_TOR_TYPE']; break; - case 'reg'; + case 'reg': tracker_register($topic_id); $url = (TOPIC_URL . $topic_id); break; - case 'unreg'; + case 'unreg': tracker_unregister($topic_id); $url = (TOPIC_URL . $topic_id); break; - case 'del_torrent'; + case 'del_torrent': if (empty($this->request['confirmed'])) { $this->prompt_for_confirm($lang['DEL_TORRENT']); } @@ -78,7 +78,7 @@ switch ($type) { $url = make_url(TOPIC_URL . $topic_id); break; - case 'del_torrent_move_topic'; + case 'del_torrent_move_topic': if (empty($this->request['confirmed'])) { $this->prompt_for_confirm($lang['DEL_MOVE_TORRENT']); } diff --git a/library/ajax/posts.php b/library/ajax/posts.php index 1a759d1ed..0868b2e86 100644 --- a/library/ajax/posts.php +++ b/library/ajax/posts.php @@ -74,7 +74,7 @@ if (!defined('WORD_LIST_OBTAINED')) { } switch ($this->request['type']) { - case 'delete'; + case 'delete': if ($post['post_id'] != $post['topic_first_post_id'] && $is_auth['auth_delete'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $post['poster_id'] && $post['topic_last_post_id'] == $post['post_id'] && $post['post_time'] + 3600 * 3 > TIMENOW))) { if (empty($this->request['confirmed'])) { $this->prompt_for_confirm($lang['CONFIRM_DELETE']); @@ -91,7 +91,7 @@ switch ($this->request['type']) { } break; - case 'reply'; + case 'reply': if (bf($userdata['user_opt'], 'user_opt', 'dis_post')) { $this->ajax_die(strip_tags($lang['RULES_REPLY_CANNOT'])); } elseif (!$is_auth['auth_reply']) { diff --git a/library/includes/classes/emailer.php b/library/includes/classes/emailer.php index b365147c7..8032894a0 100644 --- a/library/includes/classes/emailer.php +++ b/library/includes/classes/emailer.php @@ -29,8 +29,12 @@ if (!defined('BB_ROOT')) { class emailer { - public $msg, $subject, $extra_headers; - public $addresses, $reply_to, $from; + public $msg; + public $subject; + public $extra_headers; + public $addresses; + public $reply_to; + public $from; public $use_smtp; public $tpl_msg = array();