aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2019-02-23 23:53:27 +0100
committerfilip <filip.komar@gmail.com>2019-02-23 23:53:27 +0100
commit0123feb83596fe3594b5c85582ab51f738ec9b4f (patch)
treea2b08ad2bae2368344d1a8a293dddfdc5b129a87
parent780875c4635276cfec1768a21d3b98fbf0483790 (diff)
small lint fixes
-rw-r--r--en/downloads/alternative/index.php41
1 files changed, 28 insertions, 13 deletions
diff --git a/en/downloads/alternative/index.php b/en/downloads/alternative/index.php
index 2ed7e88b7..1db510b51 100644
--- a/en/downloads/alternative/index.php
+++ b/en/downloads/alternative/index.php
@@ -51,21 +51,36 @@ $dictionary = read_translation_file($locale, array('cauldron', 'common_footer'))
$ini = parse_ini_file('../get/definitions.ini', true);
$ini = array_reverse($ini);
+$tableCurrent = "";
+$tableCauldron = "";
+$tableArchives = "";
foreach ($ini as $section => $values) {
-$release = explode("-", $section);
-$release = $release[1];
-$name = $values['name'];
-$torrent = $values['torrent'];
-$magnet = $values['magnet'];
-$size = $values['size'];
-
- if ($release == $current){
- $tableCurrent .= TableContent($section, $name, $torrent, $magnet, $size);
- }elseif ($release == $cauldron || $release == "Cauldron") {
- $tableCauldron .= TableContent($section, $name, $torrent, $magnet, $size);
- }else{
- $tableArchives .= TableContent($section, $name, $torrent, $magnet, $size);
+ $release = explode("-", $section);
+ if (isset($release[1])) {
+ $release = $release[1];
+ } else {
+ $release = "";
+ }
+ $name = $values['name'];
+ if (isset($values['torrent'])) {
+ $torrent = $values['torrent'];
+ } else {
+ $torrent = "";
+ }
+ if (isset($values['magnet'])) {
+ $magnet = $values['magnet'];
+ } else {
+ $magnet = "";
+ }
+ $size = $values['size'];
+
+ if ($release == $current) {
+ $tableCurrent .= TableContent($section, $name, $torrent, $magnet, $size);
+ } elseif ($release == $cauldron || $release == "Cauldron") {
+ $tableCauldron .= TableContent($section, $name, $torrent, $magnet, $size);
+ } else {
+ $tableArchives .= TableContent($section, $name, $torrent, $magnet, $size);
}
};