table_forum_forum_plugin.php 832 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: table_forum_forum_plugin.php 29366 2012-04-09 03:00:26Z zhouxiaobo $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class table_forum_forum_plugin extends discuz_table {
  12. public function __construct() {
  13. $this->_table = 'forum_forum';
  14. $this->_pk = 'fid';
  15. parent::__construct();
  16. }
  17. public function fetch_all_forum_by_formula_for_plugin() {
  18. $statusql = 'f.status<>\'3\'';
  19. return DB::fetch_all("SELECT f.*, ff.*, a.uid FROM ".DB::table($this->_table)." f LEFT JOIN ".DB::table('forum_forumfield')." ff ON ff.fid=f.fid LEFT JOIN ".DB::table('forum_access')." a ON a.fid=f.fid AND a.allowview>'0' WHERE $statusql AND formulaperm<>'' ORDER BY f.type, f.displayorder");
  20. }
  21. }