mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
* remove unnecessary parentheses in include/require
This commit is contained in:
@@ -4,11 +4,11 @@ if(php_sapi_name() != "cli") {
|
||||
die('This script can be run only in command line mode.');
|
||||
}
|
||||
|
||||
require_once('../../common.php');
|
||||
require_once(SYSTEM . 'functions.php');
|
||||
require_once(SYSTEM . 'init.php');
|
||||
require_once(SYSTEM . 'hooks.php');
|
||||
require_once(LIBS . 'plugins.php');
|
||||
require_once '../../common.php';
|
||||
require_once SYSTEM . 'functions.php';
|
||||
require_once SYSTEM . 'init.php';
|
||||
require_once SYSTEM . 'hooks.php';
|
||||
require_once LIBS . 'plugins.php';
|
||||
|
||||
if($argc != 2) {
|
||||
exit('This command expects one parameter: zip file name (plugin)' . PHP_EOL);
|
||||
|
@@ -47,7 +47,7 @@ class Hook
|
||||
|
||||
global $db, $config, $template_path, $ots, $content, $twig;
|
||||
if(file_exists(BASE . $this->_file)) {
|
||||
$ret = require(BASE . $this->_file);
|
||||
$ret = require BASE . $this->_file;
|
||||
}
|
||||
|
||||
return $ret === null || $ret == 1 || $ret;
|
||||
|
@@ -120,9 +120,9 @@ if(!isset($config['highscores_ids_hidden']) || count($config['highscores_ids_hid
|
||||
}
|
||||
|
||||
// POT
|
||||
require_once(SYSTEM . 'libs/pot/OTS.php');
|
||||
require_once SYSTEM . 'libs/pot/OTS.php';
|
||||
$ots = POT::getInstance();
|
||||
require_once(SYSTEM . 'database.php');
|
||||
require_once SYSTEM . 'database.php';
|
||||
|
||||
define('USE_ACCOUNT_NAME', $db->hasColumn('accounts', 'name'));
|
||||
// load vocation names
|
||||
|
@@ -8,7 +8,7 @@
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
require_once(SYSTEM . 'libs/items_images.php');
|
||||
require_once SYSTEM . 'libs/items_images.php';
|
||||
|
||||
Items_Images::$files = array(
|
||||
'otb' => SYSTEM . 'data/items.otb',
|
||||
|
@@ -19,27 +19,27 @@ class Cache
|
||||
if(!self::$instance) {
|
||||
switch(strtolower($engine)) {
|
||||
case 'apc':
|
||||
require('cache_apc.php');
|
||||
require 'cache_apc.php';
|
||||
self::$instance = new Cache_APC($prefix);
|
||||
break;
|
||||
|
||||
case 'apcu':
|
||||
require('cache_apcu.php');
|
||||
require 'cache_apcu.php';
|
||||
self::$instance = new Cache_APCu($prefix);
|
||||
break;
|
||||
|
||||
case 'eaccelerator':
|
||||
require('cache_eaccelerator.php');
|
||||
require 'cache_eaccelerator.php';
|
||||
self::$instance = new Cache_eAccelerator($prefix);
|
||||
break;
|
||||
|
||||
case 'xcache':
|
||||
require('cache_xcache.php');
|
||||
require 'cache_xcache.php';
|
||||
self::$instance = new Cache_XCache($prefix);
|
||||
break;
|
||||
|
||||
case 'file':
|
||||
require('cache_file.php');
|
||||
require 'cache_file.php';
|
||||
self::$instance = new Cache_File($prefix, CACHE);
|
||||
break;
|
||||
|
||||
|
@@ -236,7 +236,7 @@ class Plugins {
|
||||
if (isset($plugin['install'])) {
|
||||
if (file_exists(BASE . $plugin['install'])) {
|
||||
$db->revalidateCache();
|
||||
require(BASE . $plugin['install']);
|
||||
require BASE . $plugin['install'];
|
||||
$db->revalidateCache();
|
||||
}
|
||||
else
|
||||
|
@@ -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';
|
||||
}
|
||||
?>
|
||||
|
@@ -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.');
|
||||
|
@@ -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');
|
||||
|
||||
|
@@ -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.';
|
||||
|
@@ -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');
|
||||
|
||||
|
@@ -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;
|
||||
?>
|
||||
|
@@ -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) {
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
|
@@ -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.');
|
||||
|
@@ -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;
|
||||
|
@@ -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']))
|
||||
{
|
||||
|
@@ -9,5 +9,5 @@
|
||||
* @link http://my-aac.org
|
||||
*/
|
||||
$_GET['archive'] = true;
|
||||
require('news.php');
|
||||
require 'news.php';
|
||||
?>
|
||||
|
@@ -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'))
|
||||
|
@@ -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())
|
||||
|
Reference in New Issue
Block a user