public static function getAllActiveNewsByLanguage($lang = 'en') { $sids = SJB_DB::query("SELECT `sid` FROM `news` WHERE `language` = ?s AND active = 1 ORDER BY `date` DESC", $lang); $articles = array(); foreach ($sids as $item) { $articleInfo = SJB_NewsDBManager::getObjectInfo('news', $item['sid']); $articleObj = new SJB_NewsArticle($articleInfo); $articleObj->setSID($item['sid']); $articles[$item['sid']] = $articleObj; } return $articles; }
public static function getNewsArticleInfoBySid($sid) { return SJB_NewsDBManager::getObjectInfo('news', $sid); }