From: leon Date: Wed, 2 Aug 2023 05:09:42 +0000 (+0800) Subject: DataObjects/Core_templatestr.php X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=90ba6e1d9b0cd26476418f7bb86a8b297b4b7d9d;p=Pman.Core DataObjects/Core_templatestr.php --- diff --git a/DataObjects/Core_templatestr.php b/DataObjects/Core_templatestr.php index c9524b97..efcff9c8 100644 --- a/DataObjects/Core_templatestr.php +++ b/DataObjects/Core_templatestr.php @@ -748,4 +748,37 @@ class Pman_Core_DataObjects_Core_templatestr extends DB_DataObject return $ret; } + + function postListFilter($ar, $au, $req) + { + var_dump($ar); + die('test'); + + // if (empty($req['query']['collapse_translation'])) { + // return $ar; + // } + + // $parent_ids = array(); + // $ret = array(); + + // foreach($ar as &$v) { + // array_push($parent_ids, $v['id']); + // $v['children'] = array(); + // $ret[$v['id']] = &$v; + // } + + // $pe = DB_DataObject::factory('pressrelease_entry'); + // $pe->whereAddIn('parent_id', $parent_ids, 'int'); + // $pe->selectAddAllExcept(array('content', 'word_text')); + // if (!empty($req['query']['with_distr_summary'])) { + // $pe->selectAddDistSummary(); + // } + // $pe->find(); + // while($pe->fetch()) { + // $ret[$pe->parent_id]['children'][] = $pe->toArray(); + // } + + return $ar; + + } }