function wcProfileFavCats($userid) { require_once GWF_CORE_PATH . 'module/WeChall/WC_FavCats.php'; $cats = WC_FavCats::getFavCats($userid); if (count($cats) === 0) { return ''; } $back = gwfProfileRow('<hr/>') . sprintf('<tr><th colspan="2">%s</th></tr>', WC_HTML::lang('th_favcats')); foreach ($cats as $cat) { $back .= gwfProfileRow(htmlspecialchars($cat)); } return $back; }
private function onRemFavCat($cat) { $userid = GWF_Session::getUserID(); if (false === WC_FavCats::removeFavCat($userid, $cat)) { return ''; } return $this->module->message('msg_rem_favcat', array(htmlspecialchars($cat))); }