Skip to content

Commit

Permalink
WIP - Removing unneccessary closing tags to prevent potential issues. (
Browse files Browse the repository at this point in the history
…#223)

* Part 1

Removing closing tags when no HTML or other output comes after the last PHP codeblock.

* Further removals

* nothing

---------

Co-authored-by: slawkens <slawkens@gmail.com>
  • Loading branch information
SRNT-GG and slawkens committed Jun 15, 2023
1 parent 171c114 commit 76bfab1
Show file tree
Hide file tree
Showing 89 changed files with 11 additions and 144 deletions.
3 changes: 2 additions & 1 deletion admin/includes/functions.php
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<?php// nothing yet here?>
<?php
// nothing yet here
2 changes: 0 additions & 2 deletions admin/pages/pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,5 +258,3 @@ static public function toggleHidden($id, &$errors, &$status)
return !count($errors);
}
}

?>
1 change: 0 additions & 1 deletion admin/pages/statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@
'account_type' => (USE_ACCOUNT_NAME ? 'name' : 'number'),
'points' => $points
));
?>
1 change: 0 additions & 1 deletion admin/pages/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ function version_revert($version)
$release = $version;
return $major . '.' . $minor . '.' . $release;
}*/
?>
1 change: 0 additions & 1 deletion admin/tools/phpinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
die('phpinfo() disabled on this web server.');

phpinfo();
?>
1 change: 0 additions & 1 deletion install/includes/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@
$error = true;
}
}
?>
1 change: 0 additions & 1 deletion install/steps/2-license.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@
'license' => file_get_contents(BASE . 'LICENSE'),
'buttons' => next_buttons()
));
?>
1 change: 0 additions & 1 deletion install/steps/4-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
'errors' => isset($errors) ? $errors : null,
'buttons' => next_buttons()
));
?>
1 change: 0 additions & 1 deletion system/counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,3 @@
updateDatabaseConfig('views_counter', $views_counter); // update counter
}
}
?>
2 changes: 1 addition & 1 deletion system/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
$config['data_path'] = $foundValue;
unset($foundValue);

// new config values for compability
// new config values for compatibility
if(!isset($config['highscores_ids_hidden']) || count($config['highscores_ids_hidden']) == 0) {
$config['highscores_ids_hidden'] = array(0);
}
Expand Down
1 change: 0 additions & 1 deletion system/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ function outputItem($id = 100, $count = 1)
$file_name = Items_Images::$outputDir . $file_name . '.gif';
readfile($file_name);
}
?>
1 change: 0 additions & 1 deletion system/libs/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ public function update($data, $where)
return $db->update($this->table, $data, $where);
}
}
?>
2 changes: 0 additions & 2 deletions system/libs/pot/E_OTS_ErrorCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ public function __construct($code, $message = '')
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/E_OTS_Generic.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ class E_OTS_Generic extends E_OTS_ErrorCode
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/E_OTS_NotAContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ class E_OTS_NotAContainer extends Exception
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/E_OTS_OTBMError.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ class E_OTS_OTBMError extends E_OTS_ErrorCode
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/E_OTS_ReadOnly.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ class E_OTS_ReadOnly extends Exception
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/IOTS_Cipher.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,3 @@ public function decrypt($message);
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/IOTS_DataDisplay.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,3 @@ public function displaySpellsList(OTS_SpellsList $spellsList);
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/IOTS_Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,3 @@ public function displayGuildRanksList(OTS_GuildRanks_List $guildRanksList);
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/IOTS_GuildAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,3 @@ public function submitRequest(OTS_Player $player);
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -1198,5 +1198,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_AccountBans_List.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ public function __construct()
$this->setFilter($filter);
}
}

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -735,5 +735,3 @@ public function __wakeup()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Bans_List.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,3 @@ public function current()
}
}
}

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Base_DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,3 @@ public function getLog() {
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_BinaryTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,3 @@ public static function int2Bin($number)
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,3 @@ public function __clone()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_FileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,5 +357,3 @@ public function __set($name, $value)
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,5 +671,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Guild.php
Original file line number Diff line number Diff line change
Expand Up @@ -837,5 +837,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_GuildRanks_List.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_House.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,5 +529,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_IPBans_List.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ public function __construct()
$this->setFilter($filter);
}
}

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_InfoRespond.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,5 +387,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_ItemsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -676,5 +676,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_MapCoords.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,3 @@ public function __get($name)
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_MonstersList.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -3627,5 +3627,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_PlayerBans_List.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,3 @@ public function __construct()
$this->setFilter($filter);
}
}

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Row_DAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,3 @@ abstract public function find($name);
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_SQLField.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_ServerInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,3 @@ public function __get($name)
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Spell.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,5 +482,3 @@ public function __toString()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_Toolbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,3 @@ public static function bannedAccounts()
}

/**#@-*/

?>
2 changes: 0 additions & 2 deletions system/libs/pot/OTS_XTEA.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,3 @@ public function decrypt($message)
}

/**#@-*/

?>
1 change: 0 additions & 1 deletion system/libs/rfc6238.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,3 @@ private static function oath_truncate($hash, $length = 6, $debug=false) {
return $result;
}
}
?>
1 change: 0 additions & 1 deletion system/libs/validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -451,4 +451,3 @@ public static function getLastError() {
return self::$lastError;
}
}
?>
1 change: 0 additions & 1 deletion system/locale/de/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
* @author Slawkens <slawkens@gmail.com>
*/
$locale['title'] = 'MyAAC Admin';
?>
3 changes: 1 addition & 2 deletions system/locale/de/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
$locale['direction']= 'ltr';

$locale['error404'] = 'Diese Seite konnte nicht gefunden werden.';
$locale['news'] = 'Neuesten Nachrichten';
?>
$locale['news'] = 'Neuesten Nachrichten';
1 change: 0 additions & 1 deletion system/locale/en/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,3 @@
$locale['step_finish_desc'] = 'Congratulations! <b>MyAAC</b> is ready to use!<br/>You can now login to $ADMIN_PANEL$, or visit $HOMEPAGE$.<br/><br/>
<span style="color: red">Please delete install/ directory.</span><br/><br/>
Post bugs and suggestions at $LINK$, thanks!';
?>
1 change: 0 additions & 1 deletion system/locale/pl/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
* @author Slawkens <slawkens@gmail.com>
*/
$locale['title'] = 'MyAAC Admin';
?>
2 changes: 1 addition & 1 deletion system/locale/pl/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@

$locale['error404'] = 'Strona nie została odnaleziona.';
$locale['news'] = 'Ostatnie newsy';
$locale['loaded_in_ms'] = 'w $TIME$ ms';
$locale['loaded_in_ms'] = 'w $TIME$ ms';
1 change: 0 additions & 1 deletion system/locale/pt_br/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@
$locale['step_finish_title'] = 'Instalação terminada!';
$locale['step_finish_desc'] = 'Parabéns! <b>MyAAC</b> está pronto para uso!<br/>Agora você pode fazer login em $ADMIN_PANEL$ ou visitar $HOMEPAGE$.<br/><br/>
<span style = "color: red">Por favor remova a pasta install/.</span><br/><br/>Postar bugs e sugestões em $LINK$, obrigado!';
?>
1 change: 0 additions & 1 deletion system/locale/sv/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
* @author Sizaro <sizaro@live.se>
*/
$locale['title'] = 'MyAAC Admin';
?>
1 change: 0 additions & 1 deletion system/locale/sv/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@

$locale['error404'] = 'Sidan kunde inte hittas.';
$locale['news'] = 'Senaste nyheterna';
?>
1 change: 0 additions & 1 deletion system/migrations/11.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
'thumb' => str_replace('/screenshots/', '/gallery/', $item['thumb']),
), array('id' => $item['id']));
}
?>
3 changes: 1 addition & 2 deletions system/migrations/13.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php
if($db->hasColumn(TABLE_PREFIX . 'spells', 'spell'))
$db->query("ALTER TABLE `" . TABLE_PREFIX . "spells` DROP COLUMN `spell`;");
?>
$db->query("ALTER TABLE `" . TABLE_PREFIX . "spells` DROP COLUMN `spell`;");
1 change: 0 additions & 1 deletion system/migrations/15.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
if(!$db->hasColumn(TABLE_PREFIX . 'forum_boards', 'access')) {
$db->query("ALTER TABLE `" . TABLE_PREFIX . "forum_boards` ADD `access` TINYINT(1) NOT NULL DEFAULT 0 AFTER `guild`;");
}
?>
1 change: 0 additions & 1 deletion system/migrations/17.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,3 @@
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Shop History', 'gifts/history', 6, 2);
");
}
?>
3 changes: 1 addition & 2 deletions system/migrations/19.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<?php
// this migration has been removed, but file kept for compability
?>
// this migration has been removed, but file kept for compatibility
1 change: 0 additions & 1 deletion system/migrations/2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
$db->query("ALTER TABLE `" . TABLE_PREFIX . "movies` MODIFY `title` VARCHAR(100) NOT NULL DEFAULT '';");
$db->query("ALTER TABLE `" . TABLE_PREFIX . "news` MODIFY `title` VARCHAR(100) NOT NULL DEFAULT '';");
$db->query("ALTER TABLE `" . TABLE_PREFIX . "news` MODIFY `body` TEXT NOT NULL DEFAULT '';");
?>
1 change: 0 additions & 1 deletion system/migrations/20.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ function databaseMigration20(&$content = '') {
file_put_contents($config_file, $content, FILE_APPEND);
return true;
}
?>
3 changes: 1 addition & 2 deletions system/migrations/4.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php
if(!$db->hasColumn(TABLE_PREFIX . 'monsters', 'id'))
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;");
?>
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;");
3 changes: 1 addition & 2 deletions system/migrations/6.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php
if(!$db->hasColumn(TABLE_PREFIX . 'hooks', 'enabled'))
$db->query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `enabled` INT(1) NOT NULL DEFAULT 1;");
?>
$db->query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `enabled` INT(1) NOT NULL DEFAULT 1;");
3 changes: 1 addition & 2 deletions system/migrations/8.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@

foreach($boards as $id => $board)
$db->query('UPDATE `' . TABLE_PREFIX . 'forum_boards` SET `ordering` = ' . $id . ' WHERE `name` = ' . $db->quote($board));
}
?>
}
Loading

0 comments on commit 76bfab1

Please sign in to comment.