More globals rewritten, see ticket #100
[mailer.git] / inc / libs / surfbar_functions.php
index 5280fc06a1fc1d14ce5c9130619e52c0b31564f9..6babc26648a71476ff46913158b757cd07042a6d 100644 (file)
@@ -519,10 +519,8 @@ function SURFBAR_LOOKUP_BY_URL ($url, $uid) {
 
 // Load URL data by given search term and column
 function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="ASC", $group="id", $add="") {
 
 // Load URL data by given search term and column
 function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="ASC", $group="id", $add="") {
-       global $lastUrlData;
-
        // By default nothing is found
        // By default nothing is found
-       $lastUrlData = array();
+       $GLOBALS['last_url_data'] = array();
 
        // Is the column an id number?
        if (($column == "id") || ($column == "userid")) {
 
        // Is the column an id number?
        if (($column == "id") || ($column == "userid")) {
@@ -551,10 +549,10 @@ ORDER BY %s %s
                        // Shall we group these results?
                        if ($group == "id") {
                                // Add the row by id as index
                        // Shall we group these results?
                        if ($group == "id") {
                                // Add the row by id as index
-                               $lastUrlData[$dataRow['id']] = $dataRow;
+                               $GLOBALS['last_url_data'][$dataRow['id']] = $dataRow;
                        } else {
                                // Group entries
                        } else {
                                // Group entries
-                               $lastUrlData[$dataRow[$group]][$dataRow['id']] = $dataRow;
+                               $GLOBALS['last_url_data'][$dataRow[$group]][$dataRow['id']] = $dataRow;
                        }
                } // END - while
        } // END - if
                        }
                } // END - while
        } // END - if
@@ -563,7 +561,7 @@ ORDER BY %s %s
        SQL_FREERESULT($result);
 
        // Return the result
        SQL_FREERESULT($result);
 
        // Return the result
-       return $lastUrlData;
+       return $GLOBALS['last_url_data'];
 }
 
 // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first!
 }
 
 // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first!