예제 #1
0
 function getUserCategoriesHtml(&$vars)
 {
     $cats = CategoryInterests::getCategoryInterests();
     $html = "";
     if (sizeof($cats)) {
         $vars['cats'] = self::getCategoryDivs($cats);
         $vars['nocats_hidden'] = 'csui_hidden';
     }
     $suggested = self::getSuggestedCategoryDivs(CategoryInterests::suggestCategoryInterests());
     $vars['suggested_cats'] = $suggested;
 }
예제 #2
0
 function getUserInterests()
 {
     $interests = CategoryInterests::getCategoryInterests();
     $interests = array_merge($interests, CategoryInterests::getSubCategoryInterests($interests));
     $interests = array_values(array_unique($interests));
     $fn = function (&$value) {
         $dbr = wfGetDB(DB_SLAVE);
         $value = $dbr->strencode($value);
     };
     array_walk($interests, $fn);
     $sql = " AND c.cl_to IN ('" . implode("','", $interests) . "') ";
     return $sql;
 }