mirror of
https://github.com/torrentpier/torrentpier
synced 2025-07-08 05:51:14 -07:00
Short syntax for applied operation.
This commit is contained in:
parent
a4965bfe3e
commit
a391e21f13
5 changed files with 8 additions and 8 deletions
|
@ -964,7 +964,7 @@ function get_prev_root_forum_id($forums, $curr_forum_order)
|
|||
if (isset($forums[$i]) && !$forums[$i]['forum_parent']) {
|
||||
return $forums[$i]['forum_id'];
|
||||
}
|
||||
$i = $i - 10;
|
||||
$i -= 10;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -979,7 +979,7 @@ function get_next_root_forum_id($forums, $curr_forum_order)
|
|||
if (isset($forums[$i]) && !$forums[$i]['forum_parent']) {
|
||||
return $forums[$i]['forum_id'];
|
||||
}
|
||||
$i = $i + 10;
|
||||
$i += 10;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -3175,7 +3175,7 @@ class Text_LangCorrect
|
|||
$ss = ' ' . $ss;
|
||||
} #beginning of word
|
||||
elseif ($pos === $limit - 1) {
|
||||
$ss = $ss . ' ';
|
||||
$ss .= ' ';
|
||||
} #ending of word
|
||||
if (array_key_exists($ss, $this->bigrams)) {
|
||||
return true;
|
||||
|
|
|
@ -170,7 +170,7 @@ class ReflectionTypeHint
|
|||
// Dummy frame before call_user_func*() frames.
|
||||
if (!isset($t['file']) && $next) {
|
||||
$t['over_function'] = $trace[$i + 1]['function'];
|
||||
$t = $t + $trace[$i + 1];
|
||||
$t += $trace[$i + 1];
|
||||
$trace[$i + 1] = null; // skip call_user_func on next iteration
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ class sitemap
|
|||
|
||||
if ($page) {
|
||||
--$page;
|
||||
$page = $page * 40000;
|
||||
$page *= 40000;
|
||||
$this->limit = " LIMIT {$page},40000";
|
||||
} else {
|
||||
if ($this->limit < 1) {
|
||||
|
|
|
@ -855,7 +855,7 @@ function declension($int, $expressions, $format = '%1$s %2$s')
|
|||
if ($count >= 5 && $count <= 20) {
|
||||
$result = $expressions['2'];
|
||||
} else {
|
||||
$count = $count % 10;
|
||||
$count %= 10;
|
||||
if ($count == 1) {
|
||||
$result = $expressions['0'];
|
||||
} elseif ($count >= 2 && $count <= 4) {
|
||||
|
@ -920,12 +920,12 @@ function humn_size($size, $rounder = null, $min = null, $space = ' ')
|
|||
$rnd = $rounders[0];
|
||||
|
||||
if ($min == 'KB' && $size < 1024) {
|
||||
$size = $size / 1024;
|
||||
$size /= 1024;
|
||||
$ext = 'KB';
|
||||
$rounder = 1;
|
||||
} else {
|
||||
for ($i = 1, $cnt = count($sizes); ($i < $cnt && $size >= 1024); $i++) {
|
||||
$size = $size / 1024;
|
||||
$size /= 1024;
|
||||
$ext = $sizes[$i];
|
||||
$rnd = $rounders[$i];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue