Version 0.9.9

- Code cleaning
This commit is contained in:
football
2021-04-06 23:39:05 +02:00
parent 80e99f7a11
commit 75c02e1eb8
42 changed files with 165 additions and 164 deletions

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Check Prediction League authorisation
if ( !$this->auth->acl_get('u_use_football') )
{
@@ -225,5 +230,3 @@ $template->assign_vars(array(
'POINTS' => $config['football_win_name'],
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -526,5 +526,3 @@ $template->assign_vars(array(
'S_DISPLAY_RATING' => $display_rating,
)
);
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages?
if (!$config['football_guest_view'])
{
@@ -389,4 +394,3 @@ $template->set_filenames(array(
);
page_footer();
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -71,5 +71,3 @@ $template->assign_vars(array(
'S_DATA_DELIVERY' => $data_delivery,
)
);
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$this->user->add_lang_ext('football/football', 'info_acp_bank');
// Check Prediction League authorisation

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$this->user->add_lang_ext('football/football', 'info_acp_bank');
// Check Prediction League authorisation
@@ -96,4 +101,3 @@ else
exit_handler();
}
}
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Check Prediction League authorisation
if ( !$this->auth->acl_get('u_use_football') )
{

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$vert = 9;
$start = 22;
$end = 28;
@@ -1342,4 +1347,3 @@ $template->set_filenames(array(
);
page_footer();
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -146,5 +146,3 @@ $template->assign_vars(array(
'S_USER_IS_MEMBER' => $user_is_member,
)
);
?>

View File

@@ -62,5 +62,3 @@ $template->assign_vars(array(
'S_DISPLAY_LAST_USERS' => $display_last_users,
'S_LAST_USERS' => true,
));
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -320,5 +320,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -331,4 +331,3 @@ $template->assign_vars(array(
'USERNAME4' => $username4,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -382,5 +382,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -195,4 +195,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -169,5 +169,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -422,5 +422,3 @@ $template->assign_vars(array(
'USERNAME' => $username,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -212,5 +212,3 @@ $template->assign_vars(array(
'S_DATA_ODDS' => $data_odds,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -91,4 +91,3 @@ if ($league <> 0)
)
);
}
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -424,5 +424,3 @@ $template->assign_vars(array(
'S_EDIT_MODE' => $edit_mode,
)
);
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages?
if (!$config['football_guest_view'])
{

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -142,4 +142,3 @@ else
)
);
}
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -160,5 +160,3 @@ $template->assign_vars(array(
'LEAGUE' => $league,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -136,5 +136,3 @@ $template->assign_vars(array(
'LEAGUE' => $league,
)
);
?>

View File

@@ -7,7 +7,7 @@
*
*/
if (!defined('IN_PHPBB') OR !defined('IN_FOOTBALL'))
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -436,5 +436,3 @@ $template->assign_vars(array(
'TEXT_FORM' => $text_form,
)
);
?>

View File

@@ -8,7 +8,7 @@
*
*/
if ( !defined('IN_PHPBB') OR !defined('IN_FOOTBALL') )
if (!defined('IN_PHPBB'))
{
exit;
}
@@ -19,5 +19,3 @@ $template->assign_vars(array(
'S_DISPLAY_UNDER_CONSTRUCTION' => true,
)
);
?>

View File

@@ -7,6 +7,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
// Can this user view Prediction Leagues pages?
if (!$config['football_guest_view'])
{
@@ -293,5 +298,3 @@ $template->set_filenames(array(
);
page_footer();
?>

View File

@@ -5,7 +5,7 @@
"homepage" : "http://football.bplaced.net",
"version" : "0.9.9",
"time" : "2021-04-04",
"license" : "GPL-2.0",
"license" : "GPL-2.0-only",
"authors" : [{
"name" : "J. Helmke",
"email" : "phpBB3.football@gmx.de",

View File

@@ -122,7 +122,6 @@ class download
{
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message);
exit;
}
// Can this user view Prediction Leagues pages?

View File

@@ -137,7 +137,6 @@ class main
{
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message);
exit;
}
// Can this user view Prediction Leagues pages?

View File

@@ -128,7 +128,6 @@ class popup
{
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message);
exit;
}
// Can this user view Prediction Leagues pages?

View File

@@ -105,7 +105,6 @@ class xmlplan
{
$message = (!empty($config['football_disable_msg'])) ? $config['football_disable_msg'] : 'FOOTBALL_DISABLED';
trigger_error($message);
exit;
}

View File

@@ -333,4 +333,3 @@ class football_remember extends \phpbb\cron\task\base
}
}
}
?>

View File

@@ -9,6 +9,11 @@
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$values1 = ( isset($_GET['v1']) ) ? $_GET['v1'] : 0;
$graphvalues1 = explode(",",$values1);
$matchdays = sizeof($graphvalues1);
@@ -63,4 +68,3 @@ for ($i = 0; $i < $count_values; $i++)
// Output graph and clear image from memory
imagepng($image);
imagedestroy($image);
?>

View File

@@ -8,6 +8,11 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$matchdays = ( isset($_GET['m']) ) ? intval($_GET['m']) : 0;
$values1 = ( isset($_GET['v1']) ) ? $_GET['v1'] : 0;
@@ -123,4 +128,3 @@ for ($i = 1; $i < $count_values; $i++)
// Output graph and clear image from memory
imagepng($image);
imagedestroy($image);
?>

View File

@@ -8,6 +8,11 @@
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
if (!defined('IN_PHPBB'))
{
exit;
}
$numb_users = ( isset($_GET['t']) ) ? intval($_GET['t']) : 0;
$matchdays = ( isset($_GET['m']) ) ? intval($_GET['m']) : 0;
@@ -94,4 +99,3 @@ for ($i = 1; $i < $count_values; $i++)
// Output graph and clear image from memory
imagepng($image);
imagedestroy($image);
?>

View File

@@ -42,4 +42,3 @@ define('UP_WINS', 1);
define('UP_POINTS', 2);
define('LEAGUE_CHAMP', 1);
define('LEAGUE_KO', 2);
?>

View File

@@ -11,8 +11,6 @@
* Automatically write the league as XML-file
*/
if (!defined('IN_PHPBB'))
{
// Stuff required to work with phpBB3
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../../../../';
@@ -36,7 +34,7 @@ if (!defined('IN_PHPBB'))
$league = $request->variable('league', 0);
if (!$season or !$league)
{
exit;
trigger_error('Keine gültige Saison oder Liga gewählt.');
}
$download = $request->variable('d', false);
@@ -71,7 +69,6 @@ if (!defined('IN_PHPBB'))
header ("content-type: text/xml");
echo $xml_string;
}
}
function xml_data($season, $league)
{

View File

@@ -11,8 +11,6 @@
* Automatically write the seasons and leagues as XML-file
*/
if (!defined('IN_PHPBB'))
{
// Stuff required to work with phpBB3
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../../../../';
@@ -49,7 +47,6 @@ if (!defined('IN_PHPBB'))
header ("content-type: text/xml");
echo $string;
}
function xml_seasons()
{