From: Roland Häder Date: Fri, 6 Mar 2009 20:18:31 +0000 (+0000) Subject: Bug fixed. See #106 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f39ec6e67b8a43bfa91212f0c6bd1c52e707f896;p=mailer.git Bug fixed. See #106 --- diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 742ab12456..6c55680ac2 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -85,8 +85,10 @@ if (REQUEST_ISSET_GET(('reg_ext'))) { // Load mode is modify $EXT_LOAD_MODE = "modify"; - // Update extension's record + // Get entry for 'active' $active = REQUEST_POST('active', $ext_id); + + // Update extension's record if (GET_EXT_VERSION("sql_patches") >= "0.0.6") { // Update also CSS column when extensions sql_patches is newer or exact v0.0.6 SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='%s', ext_active='%s' WHERE id=%s LIMIT 1", diff --git a/inc/request-functions.php b/inc/request-functions.php index 60a1addea0..d314a2bee0 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -64,11 +64,11 @@ function REQUEST_GET ($element) { } // Checks if an element in $_GET exists -function REQUEST_ISSET_GET ($element, $extra="") { - if (empty($extra)) { +function REQUEST_ISSET_GET ($element, $subElement="") { + if (empty($subElement)) { return (isset($_GET[$element])); } else { - return (isset($_GET[$element][$extra])); + return (isset($_GET[$element][$subElement])); } } @@ -105,7 +105,7 @@ function REQUEST_SET_GET ($element, $value) { } // Wrapper for elements in $_POST -function REQUEST_POST ($element) { +function REQUEST_POST ($element, $subElement=null) { // By default no element is there $value = null; @@ -113,6 +113,12 @@ function REQUEST_POST ($element) { if (REQUEST_ISSET_POST($element)) { // Then use it $value = $_POST[$element]; + + // Is $subElement set? + if ((!is_null($subElement)) && (REQUEST_ISSET_POST($element, $subElement))) { + // Then use this + $value = $value[$subElement]; + } // END - if } // END - if // Return value @@ -120,11 +126,11 @@ function REQUEST_POST ($element) { } // Checks if an element in $_POST exists -function REQUEST_ISSET_POST ($element, $extra="") { - if (empty($extra)) { +function REQUEST_ISSET_POST ($element, $subElement=null) { + if (is_null($subElement)) { return (isset($_POST[$element])); } else { - return (isset($_POST[$element][$extra])); + return (isset($_POST[$element][$subElement])); } }