re-added code that needs PHP 5.2 / 5.3

This commit is contained in:
following
2013-03-25 23:16:03 +01:00
parent d7c8f86553
commit eea5dcb3f2
2 changed files with 5 additions and 4 deletions

View File

@ -70,12 +70,12 @@ function cracklib_checkpw($pw, $addwords)
// $pw may not contain one of $addwords[]
foreach ($wordlist AS $v)
if (mb_strpos($pw_lc, $v) !== false)
if (mb_stripos($pw_lc, $v) !== false) // mb_stripos needs PHP 5.2
return false;
// one of $addwords[] may not contain $pw
foreach ($wordlist AS $v)
if (mb_strpos($v, $pw_lc) !== false)
if (mb_stripos($v, $pw_lc) !== false)
return false;
// words from pw library are not allowed

View File

@ -75,7 +75,7 @@
$queryid = 0;
}
// newquery: -- goto needs PHP 5.3
newquery:
if ($queryid == 0)
{
// das Suchformular wird initialisiert (keine Vorbelegungen vorhanden)
@ -107,8 +107,9 @@
if (mysql_num_rows($query_rs) == 0)
{
// can happen if logged out after query was created (fix for #3915)
$queryid = 0;
// goto newquery; - needs PHP 5.3 // can happen if logged out after query was created (fix for #3915)
goto newquery; // goto needs PHP 5.3
$tplname = 'error';
tpl_set_var('tplname', 'search.php');
tpl_set_var('error_msg', $error_query_not_found);