// 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")) {
// 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
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!