Changing for-loops to use pre-calculated values.

Rather than calculating the value each time.
This commit is contained in:
green-ponies (jgen)
2012-01-16 00:07:04 -05:00
parent 8252534cff
commit cd7de93a0a
10 changed files with 44 additions and 23 deletions

View File

@@ -15,7 +15,9 @@ class UploadTheme extends Themelet {
// Uploader 2.0!
$upload_list = "";
for($i=0; $i<$config->get_int('upload_count'); $i++)
$upload_count = $config->get_int('upload_count');
for($i=0; $i<$upload_count; $i++)
{
$a=$i+1;
$s=$i-1;
@@ -244,7 +246,9 @@ class UploadTheme extends Themelet {
global $config;
$upload_list = "";
for($i=0; $i<$config->get_int('upload_count'); $i++) {
$upload_count = $config->get_int('upload_count');
for($i=0; $i<$upload_count; $i++) {
if($i == 0) $style = ""; // "style='display:visible'";
else $style = "style='display:none'";
$upload_list .= "<input size='10' ".