From ca9869174d209dfd6566f2419f90f3312b4a846b Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 28 Oct 2007 12:31:31 +0000 Subject: [PATCH] replaced some for loops by foreach loops --- lam/lib/modules.inc | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 8909fcc5..60f02c0f 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -1138,37 +1138,37 @@ class accountContainer { $attr_names = array_keys($attributes); $orig_names = array_keys($orig); // find deleted attributes (in $orig but no longer in $attributes) - for ($i = 0; $i < sizeof($orig_names); $i++) { - if (!isset($attributes[$orig_names[$i]])) { - $torem[$orig_names[$i]] = $orig[$orig_names[$i]]; + foreach ($orig_names as $i => $value) { + if (!isset($attributes[$value])) { + $torem[$value] = $orig[$value]; } } // find changed attributes - for ($i=0; $i $name) { // find deleted attributes - for ($j=0; $j