Bug fixed. See #106
authorRoland Häder <roland@mxchange.org>
Fri, 6 Mar 2009 20:18:31 +0000 (20:18 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 6 Mar 2009 20:18:31 +0000 (20:18 +0000)
inc/modules/admin/what-extensions.php
inc/request-functions.php

index 742ab1245634a3000a47df05d73236419da81229..6c55680ac2395048f65f52718cdec72c5cdea4d9 100644 (file)
@@ -85,8 +85,10 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                                // Load mode is modify
                                $EXT_LOAD_MODE = "modify";
 
                                // Load mode is modify
                                $EXT_LOAD_MODE = "modify";
 
-                               // Update extension's record
+                               // Get entry for 'active'
                                $active = REQUEST_POST('active', $ext_id);
                                $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",
                                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",
index 60a1addea0b10dc328f6b99c73738b245c505260..d314a2bee06c3d449abe332d7a2da452dbfc22e3 100644 (file)
@@ -64,11 +64,11 @@ function REQUEST_GET ($element) {
 }
 
 // Checks if an element in $_GET exists
 }
 
 // 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]));
        } 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
 }
 
 // Wrapper for elements in $_POST
-function REQUEST_POST ($element) {
+function REQUEST_POST ($element, $subElement=null) {
        // By default no element is there
        $value = 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];
        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
        } // END - if
 
        // Return value
@@ -120,11 +126,11 @@ function REQUEST_POST ($element) {
 }
 
 // Checks if an element in $_POST exists
 }
 
 // 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]));
        } else {
-               return (isset($_POST[$element][$extra]));
+               return (isset($_POST[$element][$subElement]));
        }
 }
 
        }
 }