Skip to content

Commit

Permalink
re-added code that needs PHP 5.2 / 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
following committed Mar 25, 2013
1 parent d7c8f86 commit eea5dcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions htdocs/lib2/logic/cracklib.inc.php
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions htdocs/search.php
Expand Up @@ -75,7 +75,7 @@
$queryid = 0;
}

// newquery: -- goto needs PHP 5.3
newquery:
if ($queryid == 0)
{
// das Suchformular wird initialisiert (keine Vorbelegungen vorhanden)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit eea5dcb

Please sign in to comment.