aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/captcha/plugins
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-01-24 13:40:42 +0100
committerMarc Alexander <admin@m-a-styles.de>2015-01-24 13:40:42 +0100
commit874f3584e2713cd332215b159b740e53330a900c (patch)
tree4788c8c08885472920a488cce0f998b96f9650eb /phpBB/phpbb/captcha/plugins
parent9a03b3aab6033b52492296730c30849f96f430bf (diff)
downloadforums-874f3584e2713cd332215b159b740e53330a900c.tar
forums-874f3584e2713cd332215b159b740e53330a900c.tar.gz
forums-874f3584e2713cd332215b159b740e53330a900c.tar.bz2
forums-874f3584e2713cd332215b159b740e53330a900c.tar.xz
forums-874f3584e2713cd332215b159b740e53330a900c.zip
[ticket/13522] Remove unused variables and unexpected returns
PHPBB3-13522
Diffstat (limited to 'phpBB/phpbb/captcha/plugins')
-rw-r--r--phpBB/phpbb/captcha/plugins/qa.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/phpBB/phpbb/captcha/plugins/qa.php b/phpBB/phpbb/captcha/plugins/qa.php
index 13ff3d7f91..12da64c750 100644
--- a/phpBB/phpbb/captcha/plugins/qa.php
+++ b/phpBB/phpbb/captcha/plugins/qa.php
@@ -125,7 +125,7 @@ class qa
*/
public function is_available()
{
- global $config, $db, $phpbb_root_path, $phpEx, $user;
+ global $config, $db, $user;
// load language file for pretty display in the ACP dropdown
$user->add_lang('captcha_qa');
@@ -263,7 +263,7 @@ class qa
*/
function garbage_collect($type = 0)
{
- global $db, $config;
+ global $db;
$sql = 'SELECT c.confirm_id
FROM ' . $this->table_qa_confirm . ' c
@@ -310,8 +310,6 @@ class qa
$db_tool = new \phpbb\db\tools($db);
- $tables = array($this->table_captcha_questions, $this->table_captcha_answers, $this->table_qa_confirm);
-
$schemas = array(
$this->table_captcha_questions => array (
'COLUMNS' => array(
@@ -366,7 +364,7 @@ class qa
*/
function validate()
{
- global $config, $db, $user;
+ global $user;
$error = '';
@@ -414,7 +412,7 @@ class qa
if (!sizeof($this->question_ids))
{
- return false;
+ return;
}
$this->confirm_id = md5(unique_id($user->ip));
$this->question = (int) array_rand($this->question_ids);
@@ -440,7 +438,7 @@ class qa
if (!sizeof($this->question_ids))
{
- return false;
+ return;
}
$this->question = (int) array_rand($this->question_ids);
@@ -611,8 +609,8 @@ class qa
*/
function acp_page($id, &$module)
{
- global $db, $user, $auth, $template;
- global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
+ global $user, $template;
+ global $config;
$user->add_lang('acp/board');
$user->add_lang('captcha_qa');
@@ -674,7 +672,6 @@ class qa
else
{
// okay, show the editor
- $error = false;
$input_question = request_var('question_text', '', true);
$input_answers = request_var('answers', '', true);
$input_lang = request_var('lang_iso', '', true);
@@ -819,6 +816,8 @@ class qa
return $question;
}
+
+ return false;
}
/**