function logm($message)
{
$t = strval(date('Y/m/d_H:i:s')).' - '.$_SERVER["REMOTE_ADDR"].' - '.strval($message)."\n";
- file_put_contents($GLOBAL['config']['LOG_FILE'], $t, FILE_APPEND);
+ file_put_contents($GLOBALS['config']['LOG_FILE'], $t, FILE_APPEND);
}
- // In a string, converts URLs to clickable links.
- // Function inspired from http://www.php.net/manual/en/function.preg-replace.php#85722
- function text2clickable($url)
- {
- $redir = empty($GLOBALS['redirector']) ? '' : $GLOBALS['redirector'];
- return preg_replace('!(((?:https?|ftp|file)://|apt:|magnet:)\S+[[:alnum:]]/?)!si','<a href="'.$redir.'$1" rel="nofollow">$1</a>',$url);
- }
-
- // This function inserts where relevant so that multiple spaces are properly displayed in HTML
- // even in the absence of <pre> (This is used in description to keep text formatting)
- function keepMultipleSpaces($text)
- {
- return str_replace(' ',' ',$text);
-
- }
// ------------------------------------------------------------------------------------------
// Sniff browser language to display dates in the right format automatically.
// (Note that is may not work on your server if the corresponding local is not installed.)