Back-ported to PHP4 (type-hints removed)
authorRoland Häder <roland@mxchange.org>
Thu, 31 Jan 2008 22:23:03 +0000 (22:23 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 31 Jan 2008 22:23:03 +0000 (22:23 +0000)
0.2.1/inc/db/lib-mysql3.php
0.2.1/inc/modules/admin/admin-inc.php

index 019c603c309b285619de8a5908190e0adc615dde..5d2cfd9cff4af3844c1da9e6dfd6eea876abc2c5 100644 (file)
@@ -263,7 +263,7 @@ function SQL_ESCAPE($str)
        }
 }
 // SELECT query string from table, columns and so on... ;-)
        }
 }
 // SELECT query string from table, columns and so on... ;-)
-function SQL_RESULT_FROM_ARRAY ($table, array $columns, $idRow, $id) {
+function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id) {
        // Prepare the SQL statement
        $SQL = "SELECT ".implode(", ", $columns)." FROM "._MYSQL_PREFIX."_".$table." WHERE ".$idRow."=%d LIMIT 1";
 
        // Prepare the SQL statement
        $SQL = "SELECT ".implode(", ", $columns)." FROM "._MYSQL_PREFIX."_".$table." WHERE ".$idRow."=%d LIMIT 1";
 
index 487eb2c3c7fec804f37a9d7d6a5db32e0161a1cd..2b957078b5ce73864c64e80c69404a9a42ef396b 100644 (file)
@@ -713,10 +713,10 @@ function ADMIN_CHECK_MENU_MODE()
        return $MODE;
 }
 // Change activation status
        return $MODE;
 }
 // Change activation status
-function ADMIN_CHANGE_ACTIVATION_STATUS (array $IDs, $table, $row, $idRow = "id") {
+function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
        global $CONFIG;
        $cnt = 0; $newStatus = "Y";
        global $CONFIG;
        $cnt = 0; $newStatus = "Y";
-       if (count($IDs) > 0) {
+       if ((is_array($IDs)) && (count($IDs) > 0)) {
                // "Walk" all through and count them
                foreach ($IDs as $id=>$selected) {
                        // Secure the ID number
                // "Walk" all through and count them
                foreach ($IDs as $id=>$selected) {
                        // Secure the ID number
@@ -755,10 +755,10 @@ function ADMIN_CHANGE_ACTIVATION_STATUS (array $IDs, $table, $row, $idRow = "id"
        }
 }
 // Delete rows by given ID numbers
        }
 }
 // Delete rows by given ID numbers
-function ADMIN_DELETE_ENTRIES_CONFIRM (array $IDs, $table, $row, array $columns = array(), array $filterFunctions = array(), $deleteNow=false, $idRow="id") {
+function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $row, $columns = array(), $filterFunctions = array(), $deleteNow=false, $idRow="id") {
        global $CONFIG;
        $OUT = ""; $SW = 2;
        global $CONFIG;
        $OUT = ""; $SW = 2;
-       if (count($IDs) > 0) {
+       if ((is_array($IDs)) && (count($IDs) > 0)) {
                // "Walk" through all entries and count them
                if ($deleteNow) {
                        // Delete them
                // "Walk" through all entries and count them
                if ($deleteNow) {
                        // Delete them