Fixes in changing URLs in surfbar extension. Resolves #40/#41
authorRoland Häder <roland@mxchange.org>
Wed, 18 Feb 2009 23:03:51 +0000 (23:03 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 18 Feb 2009 23:03:51 +0000 (23:03 +0000)
inc/modules/admin/what-list_surfbar_urls.php

index 3a25ee7..dabf40b 100644 (file)
@@ -43,15 +43,24 @@ ADD_DESCR("admin", __FILE__);
 // By default show the list...
 $show = true;
 
+// Check for 'id' element
+if ((count($_POST) > 0) && ((!isset($_POST['id'])) || (!is_array($_POST['id'])) || (count($_POST['id']) == 0))) {
+       // Not found so output message
+       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_NO_SELECTIONS);
+
+       // Abort here
+       return;
+}
+
 // Edit or delete button hit?
 if (isset($_POST['edit'])) {
        // Show entries for editing
        ADMIN_EDIT_ENTRIES_CONFIRM(
                $_POST['id'],
                "surfbar_urls",
-               array("id", "userid", "url", "reward", "costs"),
-               array("bigintval", "ADD_MEMBER_SELECTION_BOX", "", "TRANSLATE_COMMA", "TRANSLATE_COMMA"),
-               array("", array(false, true, true), "", "", "")
+               array("id", "userid", "url"),
+               array("bigintval", "ADD_MEMBER_SELECTION_BOX", ""),
+               array("", array(false, true, true), "")
        );
        $show = false;
 } elseif (isset($_POST['do_edit'])) {