// needed if we include globalfunctions from install.php\r
global $nucleus, $CONF, $DIR_LIBS, $DIR_LANG, $manager, $member;\r
\r
-$nucleus['version'] = 'v3.61';\r
+$nucleus['version'] = 'v3.62';\r
$nucleus['codename'] = '';\r
\r
// check and die if someone is trying to override internal globals (when register_globals turn on)\r
ACTIONLOG::add(INFO, "Login successful for $login (sharedpc=$shared)");\r
} else {\r
// errormessage for [%errordiv%]\r
- $errormessage = 'Login failed for ' . $login;\r
-\r
+ $trimlogin = trim($login);\r
+ if (empty($trimlogin))\r
+ {\r
+ $errormessage = "Please enter a username.";\r
+ }\r
+ else \r
+ {\r
+ $errormessage = 'Login failed for ' . $login;\r
+ } \r
$manager->notify('LoginFailed', array('username' => $login) );\r
ACTIONLOG::add(INFO, $errormessage);\r
}\r
* returns the currently used version (100 = 1.00, 101 = 1.01, etc...)\r
*/\r
function getNucleusVersion() {\r
- return 361;\r
+ return 362;\r
}\r
\r
/**\r
{\r
return $text;\r
}\r
-\r
+ \r
if (is_array($expression) && (count($expression) == 0) )\r
{\r
return $text;\r
}\r
-\r
+ \r
// add a tag in front (is needed for preg_match_all to work correct)\r
$text = '<!--h-->' . $text;\r
-\r
+ \r
// split the HTML up so we have HTML tags\r
// $matches[0][i] = HTML + text\r
// $matches[1][i] = HTML\r
// $matches[2][i] = text\r
preg_match_all('/(<[^>]+>)([^<>]*)/', $text, $matches);\r
-\r
+ \r
// throw it all together again while applying the highlight to the text pieces\r
$result = '';\r
$count_matches = count($matches[2]);\r
{\r
$result .= $matches[1][$i];\r
}\r
-\r
+ \r
if (is_array($expression) )\r
{\r
foreach ($expression as $regex)\r
{\r
if ($regex)\r
{\r
- $matches[2][$i] = @eregi_replace($regex, $highlight, $matches[2][$i]);\r
+ //$matches[2][$i] = @eregi_replace($regex, $highlight, $matches[2][$i]);\r
+ $matches[2][$i] = @preg_replace("#".$regex."#i", $highlight, $matches[2][$i]);\r
}\r
}\r
-\r
+ \r
$result .= $matches[2][$i];\r
}\r
else\r
{\r
- $result .= @eregi_replace($expression, $highlight, $matches[2][$i]);\r
+ //$result .= @eregi_replace($expression, $highlight, $matches[2][$i]);\r
+ $result .= @preg_replace("#".$expression."#i", $highlight, $matches[2][$i]);\r
}\r
}\r
-\r
+ \r
return $result;\r
}\r
\r
}\r
else\r
{\r
- if ( !($uri=serverVar('PHP_SELF')) ) {\r
+ if ( !($uri=serverVar('PHP_SELF')) )\r
+ {\r
$uri=serverVar('SCRIPT_NAME');\r
}\r
$qstring=serverVar('QUERY_STRING');\r
$cleaner[] = array('expression'=>"/[ç]/",'replace'=>"c");\r
\r
$str = strtolower($str);\r
- $ext_point = strripos($str,".");\r
+ $ext_point = strrpos($str,".");\r
if ($ext_point===false) return false;\r
$ext = substr($str,$ext_point,strlen($str));\r
$str = substr($str,0,$ext_point);\r
\r
- foreach( $cleaner as $cv ) $str = preg_replace($cv["expression"],$cv["replace"],$str);\r
+ //foreach( $cleaner as $cv ) $str = preg_replace($cv["expression"],$cv["replace"],$str);\r
\r
return preg_replace("/[^a-z0-9-]/","_",$str).$ext;\r
}\r