More globals rewritten, see ticket #100
[mailer.git] / inc / libs / surfbar_functions.php
index 5280fc0..6babc26 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="") {
-       global $lastUrlData;
-
        // By default nothing is found
-       $lastUrlData = array();
+       $GLOBALS['last_url_data'] = array();
 
        // 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
-                               $lastUrlData[$dataRow['id']] = $dataRow;
+                               $GLOBALS['last_url_data'][$dataRow['id']] = $dataRow;
                        } else {
                                // Group entries
-                               $lastUrlData[$dataRow[$group]][$dataRow['id']] = $dataRow;
+                               $GLOBALS['last_url_data'][$dataRow[$group]][$dataRow['id']] = $dataRow;
                        }
                } // END - while
        } // END - if
@@ -563,7 +561,7 @@ ORDER BY %s %s
        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!