mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Callable calls in loops termination condition.
This commit is contained in:
parent
35043d8257
commit
f779fb3896
2 changed files with 3 additions and 3 deletions
|
@ -114,7 +114,7 @@ function auth_unpack($auth_cache)
|
||||||
$auth = [];
|
$auth = [];
|
||||||
$auth_len = 1;
|
$auth_len = 1;
|
||||||
|
|
||||||
for ($pos = 0; $pos < strlen($auth_cache); $pos += $auth_len) {
|
for ($pos = 0, $posMax = strlen($auth_cache); $pos < $posMax; $pos += $auth_len) {
|
||||||
$forum_auth = $auth_cache[$pos];
|
$forum_auth = $auth_cache[$pos];
|
||||||
if ($forum_auth == $one_char_encoding) {
|
if ($forum_auth == $one_char_encoding) {
|
||||||
$auth_len = 1;
|
$auth_len = 1;
|
||||||
|
@ -149,7 +149,7 @@ function is_forum_authed($auth_cache, $check_forum_id)
|
||||||
$auth = [];
|
$auth = [];
|
||||||
$auth_len = 1;
|
$auth_len = 1;
|
||||||
|
|
||||||
for ($pos = 0; $pos < strlen($auth_cache); $pos += $auth_len) {
|
for ($pos = 0, $posMax = strlen($auth_cache); $pos < $posMax; $pos += $auth_len) {
|
||||||
$forum_auth = $auth_cache[$pos];
|
$forum_auth = $auth_cache[$pos];
|
||||||
if ($forum_auth == $one_char_encoding) {
|
if ($forum_auth == $one_char_encoding) {
|
||||||
$auth_len = 1;
|
$auth_len = 1;
|
||||||
|
|
|
@ -1288,7 +1288,7 @@ if ($mode == 'read') {
|
||||||
$previous_days_text = array($lang['ALL_POSTS'], $lang['1_DAY'], $lang['7_DAYS'], $lang['2_WEEKS'], $lang['1_MONTH'], $lang['3_MONTHS'], $lang['6_MONTHS'], $lang['1_YEAR']);
|
$previous_days_text = array($lang['ALL_POSTS'], $lang['1_DAY'], $lang['7_DAYS'], $lang['2_WEEKS'], $lang['1_MONTH'], $lang['3_MONTHS'], $lang['6_MONTHS'], $lang['1_YEAR']);
|
||||||
|
|
||||||
$select_msg_days = '';
|
$select_msg_days = '';
|
||||||
for ($i = 0; $i < count($previous_days); $i++) {
|
for ($i = 0, $iMax = count($previous_days); $i < $iMax; $i++) {
|
||||||
$selected = ($msg_days == $previous_days[$i]) ? ' selected="selected"' : '';
|
$selected = ($msg_days == $previous_days[$i]) ? ' selected="selected"' : '';
|
||||||
$select_msg_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
|
$select_msg_days .= '<option value="' . $previous_days[$i] . '"' . $selected . '>' . $previous_days_text[$i] . '</option>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue