Move ksort out of the inner loop

This was the culprit for the timeout reported in #116.
This commit is contained in:
bleistivt 2016-03-25 08:01:27 +01:00
parent e12ea58706
commit 2bd781d250

View File

@ -368,11 +368,10 @@ class ActedModel extends Gdn_Model {
foreach($Section as $Item) {
$ItemField = GetValue($Field, $Item);
$Interleaved[$ItemField] = array_merge($Item, array('ItemType' => $SectionType));
ksort($Interleaved);
}
}
ksort($Interleaved);
$Interleaved = array_reverse($Interleaved);
return $Interleaved;
}