Admin user details extended, DEBUG_LOG() rewritten, random userid on refid=0 added
[mailer.git] / inc / modules / admin / admin-inc.php
index 395bc3e64e50062e582130f7f90849cd89c33f7b..b99efa4a150b4e6a4a65dddc33818e3759984183 100644 (file)
@@ -913,7 +913,11 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions,
                        $content['sw'] = $SW;
 
                        // Then list it
-                       $OUT .= LOAD_TEMPLATE("admin_".$listType."_".$table."_row", true, $content);
+                       $OUT .= LOAD_TEMPLATE(sprintf("admin_%s_%s_row",
+                                       $listType,
+                                       $table
+                               ), true, $content
+                       );
 
                        // Switch color
                        $SW = 3 - $SW;
@@ -924,7 +928,11 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions,
        } // END - foreach
 
        // Load master template
-       LOAD_TEMPLATE("admin_".$listType."_".$table."", false, $OUT);
+       LOAD_TEMPLATE(sprintf("admin_%s_%s",
+                       $listType,
+                       $table
+               ), false, $OUT
+       );
 }
 // Change status of "build" list
 function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray) {
@@ -984,7 +992,12 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
                        } // END - if
 
                        // Finish SQL statement
-                       $SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".bigintval($id)." AND ".$statusColumn."='".$oldStatus."' LIMIT 1";
+                       $SQL = substr($SQL, 0, -1) . sprintf(" WHERE %s=%s AND %s='%s' LIMIT 1",
+                               $idColumn,
+                               bigintval($id),
+                               $statusColumn,
+                               $oldStatus
+                       );
 
                        // Run the SQL
                        SQL_QUERY($SQL, __FILE__, __LINE__);