Change for with count.

This commit is contained in:
Vasily Komrakov 2017-05-07 20:59:35 +03:00
commit 56540c893a
No known key found for this signature in database
GPG key ID: 558236680C20A69A
16 changed files with 73 additions and 73 deletions

View file

@ -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) {