mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Change for with count.
This commit is contained in:
parent
32ca1d66fc
commit
56540c893a
16 changed files with 73 additions and 73 deletions
|
@ -288,7 +288,7 @@ if ($mode == 'cats') {
|
|||
$row = DB()->sql_fetchrowset($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
for ($i = 0; $i < count($row); $i++) {
|
||||
for ($i = 0, $iMax = count($row); $i < $iMax; $i++) {
|
||||
if ($row[$i]['cat_id'] == IMAGE_CAT) {
|
||||
$s_assigned_group_images[] = $row[$i]['group_name'];
|
||||
}
|
||||
|
@ -399,7 +399,7 @@ if ($submit && $mode == 'quota') {
|
|||
|
||||
$allowed_list = array();
|
||||
|
||||
for ($i = 0; $i < count($quota_change_list); $i++) {
|
||||
for ($i = 0, $iMax = count($quota_change_list); $i < $iMax; $i++) {
|
||||
$filesize_list[$i] = ($size_select_list[$i] == 'kb') ? round($filesize_list[$i] * 1024) : (($size_select_list[$i] == 'mb') ? round($filesize_list[$i] * 1048576) : $filesize_list[$i]);
|
||||
|
||||
$sql = 'UPDATE ' . BB_QUOTA_LIMITS . "
|
||||
|
@ -504,7 +504,7 @@ if ($mode == 'quota') {
|
|||
$rows = DB()->sql_fetchrowset($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
for ($i = 0; $i < count($rows); $i++) {
|
||||
for ($i = 0, $iMax = count($rows); $i < $iMax; $i++) {
|
||||
$size_format = ($rows[$i]['quota_limit'] >= 1048576) ? 'mb' : (($rows[$i]['quota_limit'] >= 1024) ? 'kb' : 'b');
|
||||
|
||||
if ($rows[$i]['quota_limit'] >= 1048576) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue