/**
  * 删除一个版块
  */
 public function deleteforumAction()
 {
     $fid = $this->getInput('fid');
     Wind::import('SRV:forum.srv.operation.PwDeleteForum');
     $forum = Wekit::loadDao('forum.dao.PwForumDao')->getForum($fid);
     $srv = new PwDeleteForum($fid, new PwUserBo($this->loginUser->uid));
     if (($result = $srv->execute()) instanceof PwError) {
         $this->showError($result->getError());
     }
     $foruminfo = $srv->forum->foruminfo;
     $foruminfo['logo'] && Pw::deleteAttach($foruminfo['logo']);
     $foruminfo['icon'] && Pw::deleteAttach($foruminfo['icon']);
     /* 删除生活服务表对应数据 */
     $configs = Wekit::C()->getValues('native');
     $life_cid = isset($configs['forum.life_fid']) && $configs['forum.life_fid'] ? $configs['forum.life_fid'] : 0;
     if ($life_cid) {
         if ($life_cid == $forum['parentid']) {
             Wekit::loadDao('native.dao.PwForumLifeDao')->deleteForumLife($fid);
         }
         if ($life_cid == $fid) {
             $config = new PwConfigSet('native');
             $config->set('forum.life_fid', '')->flush();
         }
     }
     $this->showMessage('success', 'bbs/setforum/run/', true);
 }
示例#2
0
 /**
  * 删除一个版块
  */
 public function deleteforumAction()
 {
     $fid = $this->getInput('fid');
     Wind::import('SRV:forum.srv.operation.PwDeleteForum');
     $srv = new PwDeleteForum($fid, new PwUserBo($this->adminUser->getUid()));
     if (($result = $srv->execute()) instanceof PwError) {
         $this->showError($result->getError());
     }
     $this->showMessage('success', 'bbs/setforum/run/', true);
 }
示例#3
0
 /**
  * 删除一个版块
  * lyl
  */
 public function deleteforumAction()
 {
     //		var_dump($_POST);exit;
     $fid = $this->getInput('fid');
     Wind::import('SRV:forum.srv.operation.PwDeleteForum');
     $srv = new PwDeleteForum($fid, new PwUserBo($this->loginUser->uid));
     if (($result = $srv->execute()) instanceof PwError) {
         $this->showError($result->getError());
     }
     $foruminfo = $srv->forum->foruminfo;
     $foruminfo['logo'] && Pw::deleteAttach($foruminfo['logo']);
     $foruminfo['icon'] && Pw::deleteAttach($foruminfo['icon']);
     /* 增加删除扩展表 */
     $forumLifeDao = Wekit::loadDao('native.dao.PwForumLifeDao');
     if (($result = $forumLifeDao->deleteForumLife($fid)) instanceof PwError) {
         $this->showError($result->getError(), 'native/life/run/');
     }
     $this->showMessage('success', 'native/life/run/', true);
 }
示例#4
0
	/**
	 * 删除一个版块
	 */
	public function deleteforumAction() {
		
		$fid = $this->getInput('fid');

		Wind::import('SRV:forum.srv.operation.PwDeleteForum');
		$srv = new PwDeleteForum($fid, new PwUserBo($this->loginUser->uid));
		if (($result = $srv->execute()) instanceof PwError) {
			$this->showError($result->getError());
		}
		$foruminfo = $srv->forum->foruminfo;
		$foruminfo['logo'] && Pw::deleteAttach($foruminfo['logo']);
		$foruminfo['icon'] && Pw::deleteAttach($foruminfo['icon']);
		$this->showMessage('success', 'bbs/setforum/run/', true);
	}