Skip to content

Commit

Permalink
Sonar Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
darknoon29 committed Jun 20, 2024
1 parent 14be2dd commit f889f52
Show file tree
Hide file tree
Showing 27 changed files with 619 additions and 620 deletions.
2 changes: 1 addition & 1 deletion includes/chart_js.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function create_curves($_player, $_date_min, $_date_max, $_comp)
{
$retour = "";

// todo quel est ce $contenur ?
// TODO quel est ce $contenur ?
if (!isset($_player)) {
$retour .= affiche_error($conteneur, 'erreur 3');
return $retour;
Expand Down
1 change: 1 addition & 0 deletions includes/config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
global $table_prefix;

/**
* Fichier de configuration communes
Expand Down
8 changes: 4 additions & 4 deletions includes/galaxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -1898,18 +1898,18 @@ function displayGalaxyTablethead()
<?php endif; ?>
</th>
<th>
<?php echo ($lang['GALAXY_PLANETS']); ?>
<?php echo $lang['GALAXY_PLANETS']; ?>
</th>
<th>
<?php if (is_null($link_order_ally)) : ?>
<?php echo ($lang['GALAXY_ALLIES']); ?>
<?php echo $lang['GALAXY_ALLIES']; ?>
<?php else : ?>
<?php echo $link_order_ally; ?>
<?php endif; ?>
</th>
<th>
<?php if (is_null($link_order_player)) : ?>
<?php echo ($lang['GALAXY_PLAYERS']); ?>
<?php echo $lang['GALAXY_PLAYERS']; ?>
<?php else : ?>
<?php echo $link_order_player; ?>
<?php endif; ?>
Expand All @@ -1927,7 +1927,7 @@ function displayGalaxyTablethead()
<th>&nbsp;</th>
<th>&nbsp;</th>
<th>
<?php echo ($lang['GALAXY_UPDATES']); ?>
<?php echo $lang['GALAXY_UPDATES']; ?>
</th>
</tr>
<?php
Expand Down
6 changes: 3 additions & 3 deletions install/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php global $ui_lang, $lang;

/**
* Fichier d'installation d'OGSpy
Expand Down Expand Up @@ -93,7 +93,7 @@
<td>&nbsp;</td>
</tr>
<?php
if (!(version_compare(PHP_VERSION, "7.4.0") >= 0)) {
if (version_compare(PHP_VERSION, "7.4.0") < 0) {
echo "<tr><td style='c'><span style=\"color: red\">" . $lang['INSTALL_PHPERROR'] . "</span></td></tr>";
echo "<tr><td><span style=\"color: blue; \">" . $lang['INSTALL_PHP_ADVISE'];
echo "<br><br>" . $lang['INSTALL_PHPVERSION'] . PHP_VERSION;
Expand Down Expand Up @@ -128,7 +128,7 @@
<tr align="center">
<td>
<div style="text-align: center;font-size: x-small;"><i><b>OGSpy</b> is an <b>OGSteam Software</b>
(c) 2005-2023</i></div>
(c) 2005-2024</i></div>
</td>
</tr>
</table>
Expand Down
12 changes: 7 additions & 5 deletions install/install.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php global $lang;

/**
* Fichier d'installation d'OGSpy : Script Installation
Expand Down Expand Up @@ -98,9 +98,11 @@ function error_sql($message)
* @param string $sgbd_tableprefix Préfixe à utiliser pour les tables ogspy
* @param string $admin_username Nom de l'Administrateur OGSpy
* @param string $admin_password Mot de passe Administrateur OGSpy
* @param int $num_of_galaxies Nombre de galaxies dans l'univers OGame de cet OGSp
* @param int $num_of_systems Nombre de systèmes dans l'univers OGame de cet OGSpy
* @param $ui_lang Langue
* @param int $num_of_galaxies Nombre de galaxies dans l'univers OGame de cet OGSp
* @param int $num_of_systems Nombre de systèmes dans l'univers OGame de cet OGSpy
* @param int $uni_speed
* @param string $ui_lang Langue
* @throws FileAccessException
*/

function installation_db($sgbd_server, $sgbd_dbname, $sgbd_username, $sgbd_password, $sgbd_tableprefix, $admin_username, $admin_password, $num_of_galaxies, $num_of_systems, $uni_speed, $ui_lang)
Expand Down Expand Up @@ -353,7 +355,7 @@ function generate_id($sgbd_server, $sgbd_dbname, $sgbd_username, $sgbd_password,
<tr align="center">
<td>
<div style="text-align: center;"><span style="font-size: x-small; "><i><b>OGSpy</b> is an
<b>OGSteam Software</b> (c)2005-2023</i><br />v <?= $ogspy_version ?></span></div>
<b>OGSteam Software</b> (c)2005-2024</i><br />v <?= $ogspy_version ?></span></div>
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion install/upgrade_to_latest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php global $db, $table_prefix;

/**
* OGSpy installation : Script Upgrade
Expand Down
7 changes: 1 addition & 6 deletions lang/bs/lang_message.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
* @version 3.3.0
*/

/*
* <?php echo($lang['ADMIN_DISPLAY_GALAXY_TITLE']); ?>
*
*/

/* message.php */
$lang['MSG_SYSTEM'] = "Sistemska poruka";
$lang['MSG_FORBIDDEN'] = "Nemate dovoljnu razinu prava za izvršenje ove akcije";
Expand Down Expand Up @@ -69,4 +64,4 @@
$lang['MSG_DB_OPTIM_AFTER'] = "Prostora korišteno nakon optimizacije";
$lang['MSG_EMPIRE_DATA_FAILURE'] = "Došlo je do problema prilikom dohvaćanja podataka o carstvu";
$lang['MSG_RATIO_RAZ'] = "Reset omjera je napravljen";
$lang['MSG_BACK'] = "Natrag";
$lang['MSG_BACK'] = "Natrag";
5 changes: 3 additions & 2 deletions lang/lang_main.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
global $ui_lang;
/**
* Language include file list
* @package OGSpy
Expand All @@ -12,7 +13,7 @@
function load_lang_file($ui_lang, $filename, $parent_dir = ".") {
global $lang;
if(empty($lang)) {
$lang = array();
$lang = array();
}
$default_language = 'fr';
$file_path = $parent_dir . "/lang/" . $ui_lang . "/" . $filename;
Expand Down Expand Up @@ -87,5 +88,5 @@ function lang_secure($s_lang) {
load_lang_file($ui_lang, "lang_help.php");
}

//TODO: Nettoyer les fichiers de lang avant !
//TODO: Nettoyer les fichiers de lang avant !
// $lang = lang_secure($lang);
1 change: 1 addition & 0 deletions views/about_ogsteam.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
global $lang;

/**
* Panneau d'affichage: A propos de l'OGsteam et des contributeurs à OGSpy
Expand Down
6 changes: 3 additions & 3 deletions views/admin.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php global $user_data, $lang;
/** $Id: admin.php 7596 2012-03-25 16:10:55Z ninety $ * */
/**
* Fonctions d'administrations
Expand Down Expand Up @@ -73,13 +73,13 @@
?>


<div class="page_administration">
<div class="page_administration">

<div class="nav-page-menu">
<?php if ($user_data["user_admin"] == 1 || $user_data["user_coadmin"] == 1) : //admin/co only ?>
<div class="nav-page-menu-item nav-page-menu-item-admin-infoserver <?php echo $tagactiveinfoserver; ?>">
<a class="nav-page-menu-link" href="index.php?action=administration&amp;subaction=infoserver">
<?php echo $lang['ADMIN_TITLE_GENERAL_INFO']; ?>
<?php echo $lang['ADMIN_TITLE_GENERAL_INFO']; ?>
</a>
</div>
<div class="nav-page-menu-item nav-page-menu-item-admin-parameter <?php echo $tagactiveparameter; ?>">
Expand Down
Loading

0 comments on commit f889f52

Please sign in to comment.