diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ebfb0dfeb7..b15a9bc4a6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2011-07-20 Dario Rodriguez + + * godmode/setup/links.php: Fixed a wrong code to work with an empty array. + 2011-07-20 Sergio Martin * include/styles/dialog.css: Fixed wrong path in the diff --git a/pandora_console/godmode/setup/links.php b/pandora_console/godmode/setup/links.php index 0d12aff6aa..7bb78cd3a1 100644 --- a/pandora_console/godmode/setup/links.php +++ b/pandora_console/godmode/setup/links.php @@ -116,29 +116,35 @@ if ((isset($_GET["form_add"])) or (isset($_GET["form_edit"]))){ echo ''; } else { // Main list view for Links editor - echo ""; - echo ""; - echo ""; $rows = db_get_all_rows_in_table('tlink', 'name'); if ($rows === false) { $rows = array(); } + + if (empty($rows)) { + echo "

".__("There isn't links")."

"; + } else { + echo "
".__('Link name')."".__('Delete')."
"; + echo ""; + echo ""; - $color=1; - foreach ($rows as $row) { - if ($color == 1){ - $tdcolor = "datos"; - $color = 0; + $color=1; + foreach ($rows as $row) { + if ($color == 1){ + $tdcolor = "datos"; + $color = 0; + } + else { + $tdcolor = "datos2"; + $color = 1; + } + echo ""; + echo ''; } - else { - $tdcolor = "datos2"; - $color = 1; - } - echo ""; - echo ''; + echo "
".__('Link name')."".__('Delete')."
".$row["name"]."' . html_print_image("images/cross.png", true) . '
".$row["name"]."' . html_print_image("images/cross.png", true) . '
"; } - echo ""; + echo ""; echo "
"; echo "
";