Ejemplo n.º 1
0
 private static function _getForumFids($key)
 {
     $fids = array();
     $config = WebUtils::getDzPluginAppbymeAppConfig($key);
     if ($config && ($config = unserialize($config))) {
         $config[0] != '' && ($fids = $config);
     } else {
         $fids = DzForumForum::getFids();
     }
     return $fids;
 }
Ejemplo n.º 2
0
 private function _getTopicTypeSortInfos()
 {
     $infos = array();
     $fields = DbUtils::getDzDbUtils(true)->queryAll('
         SELECT fid, threadtypes, threadsorts
         FROM %t
         WHERE fid IN (%n)
         ', array('forum_forumfield', DzForumForum::getFids()));
     foreach ($fields as $field) {
         if (!empty($field)) {
             $info = array('fid' => (int) $field['fid'], 'types' => array(), 'sorts' => array());
             $types = unserialize($field['threadtypes']);
             if (!empty($types['types'])) {
                 foreach ($types['types'] as $key => $value) {
                     // 控制管理组专用
                     // if ($types['moderators'][$key] == 1) {
                     // continue;
                     // }
                     $info['types'][] = array('id' => $key, 'title' => WebUtils::emptyHtml($value));
                 }
             }
             $sorts = unserialize($field['threadsorts']);
             if (!empty($sorts['types'])) {
                 foreach ($sorts['types'] as $key => $value) {
                     $info['sorts'][] = array('id' => $key, 'title' => WebUtils::emptyHtml($value));
                 }
             }
             $infos[$info['fid']] = $info;
         }
     }
     return $infos;
 }