From f6ccb87413901e0352319385471134dd2d4ba966 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 18 Feb 2009 23:03:51 +0000 Subject: [PATCH] Fixes in changing URLs in surfbar extension. Resolves #40/#41 --- inc/modules/admin/what-list_surfbar_urls.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index 3a25ee7f01..dabf40bfe8 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -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'])) { -- 2.39.5