* remove unnecessary parentheses in include/require

This commit is contained in:
slawkens
2018-05-29 21:00:56 +02:00
parent e1ddf58119
commit 42d23e9b37
42 changed files with 554 additions and 554 deletions

View File

@@ -11,6 +11,6 @@
defined('MYAAC') or die('Direct access not allowed!');
if($action == 'confirm_email') {
require_once(PAGES . 'account/confirm_email.php');
require_once PAGES . 'account/confirm_email.php';
}
?>

View File

@@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$title = 'Account Management';
if($config['account_country'])
require(SYSTEM . 'countries.conf.php');
require SYSTEM . 'countries.conf.php';
$groups = new OTS_Groups_List();
@@ -30,7 +30,7 @@ if(ACTION == "logout" && !isset($_REQUEST['account_login'])) {
if(!$logged)
{
if(ACTION == 'confirm_email') {
require(PAGES . 'account/' . ACTION . '.php');
require PAGES . 'account/' . ACTION . '.php';
return;
}
@@ -137,7 +137,7 @@ $errors = array();
error('Error: Action contains illegal characters.');
}
else if(file_exists(PAGES . 'account/' . $action . '.php')) {
require(PAGES . 'account/' . $action . '.php');
require PAGES . 'account/' . $action . '.php';
}
else {
error('This page does not exists.');

View File

@@ -10,8 +10,8 @@
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Load items.xml';
require(LIBS . 'items.php');
require(LIBS . 'weapons.php');
require LIBS . 'items.php';
require LIBS . 'weapons.php';
echo $twig->render('admin.items.html.twig');

View File

@@ -49,7 +49,7 @@ if(isset($_REQUEST['template'])) {
$file = TEMPLATES . $template . '/config.php';
if(file_exists($file)) {
require_once($file);
require_once $file;
}
else {
echo 'Cannot find template config.php file.';

View File

@@ -10,7 +10,7 @@
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Plugin manager';
require(LIBS . 'plugins.php');
require LIBS . 'plugins.php';
echo $twig->render('admin.plugins.form.html.twig');

View File

@@ -25,5 +25,5 @@ if(preg_match("/[^A-z0-9_\-]/", $tool))
$file = BASE . 'admin/pages/tools/' . $tool . '.php';
if(!@file_exists($file))
require($file);
require $file;
?>

View File

@@ -18,7 +18,7 @@ You can enable it by editing this configurable in <b>config.local.php</b> file:<
return;
endif;
require(SYSTEM . 'libs/visitors.php');
require SYSTEM . 'libs/visitors.php';
$visitors = new Visitors($config['visitors_counter_ttl']);
function compare($a, $b) {

View File

@@ -11,7 +11,7 @@
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Characters';
require_once(SYSTEM . 'item.php');
require_once SYSTEM . 'item.php';
$groups = new OTS_Groups_List();
function generate_search_form($autofocus = false)

View File

@@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$title = 'Create Account';
if($config['account_country'])
require(SYSTEM . 'countries.conf.php');
require SYSTEM . 'countries.conf.php';
if($logged)
{

View File

@@ -26,7 +26,7 @@ if(strtolower($config['forum']) != 'site')
if(!$logged)
echo 'You are not logged in. <a href="?subtopic=accountmanagement&redirect=' . BASE_URL . urlencode('?subtopic=forum') . '">Log in</a> to post on the forum.<br /><br />';
require_once(LIBS . 'forum.php');
require_once LIBS . 'forum.php';
$canEdit = Forum::isModerator();
if($canEdit)

View File

@@ -20,14 +20,14 @@ define('MOTD_EXISTS', $db->hasColumn('guilds', 'motd'));
//show list of guilds
if(empty($action)) {
require(PAGES . 'guilds/list_of_guilds.php');
require PAGES . 'guilds/list_of_guilds.php';
}
else {
if(!ctype_alnum(str_replace(array('-', '_'), '', $action))) {
error('Error: Action contains illegal characters.');
}
else if(file_exists(PAGES . 'guilds/' . $action . '.php')) {
require(PAGES . 'guilds/' . $action . '.php');
require PAGES . 'guilds/' . $action . '.php';
}
else {
error('This page does not exists.');

View File

@@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$title = 'Highscores';
if($config['account_country'] && $config['highscores_country_box'])
require(SYSTEM . 'countries.conf.php');
require SYSTEM . 'countries.conf.php';
$list = isset($_GET['list']) ? $_GET['list'] : '';
$_page = isset($_GET['page']) ? $_GET['page'] : 0;

View File

@@ -10,7 +10,7 @@
*/
defined('MYAAC') or die('Direct access not allowed!');
require_once(LIBS . 'forum.php');
require_once LIBS . 'forum.php';
if(isset($_GET['archive']))
{

View File

@@ -9,5 +9,5 @@
* @link http://my-aac.org
*/
$_GET['archive'] = true;
require('news.php');
require 'news.php';
?>

View File

@@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$title = 'Who is online?';
if($config['account_country'])
require(SYSTEM . 'countries.conf.php');
require SYSTEM . 'countries.conf.php';
$promotion = '';
if($db->hasColumn('players', 'promotion'))

View File

@@ -12,7 +12,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$title = 'Gamemasters List';
if($config['account_country'])
require(SYSTEM . 'countries.conf.php');
require SYSTEM . 'countries.conf.php';
$groups = new OTS_Groups_List();
if(!$groups->count())