Removed the use of TemplateDefault::filter()

This commit is contained in:
Deon George
2013-06-10 21:48:06 +10:00
parent 66ea9babf4
commit 114ac8eb38
7 changed files with 90 additions and 105 deletions

View File

@@ -50,27 +50,6 @@ class Controller_TemplateDefault extends lnApp_Controller_TemplateDefault {
parent::after();
}
/**
* This will filter a search query to only return those accounts for a reseller
*
* @param $o Our ORM Object that we are searching on
* @param $fl Our array of items that we must return
* @param $flid The ID that must be in the $fl
* @param $sort Sort the results
*/
protected function filter($o,array $fl,$flid,$sort=NULL) {
$result = array();
foreach ($o as $x)
if (! is_null($flid) AND isset($x->$flid) AND in_array($x->$flid,$fl))
array_push($result,$x);
if ($sort)
Sort::MAsort($result,$sort);
return $result;
}
protected function setup(array $config_items=array()) {
$module = Request::current()->controller();