Esempio n. 1
0
	/**
	 * Associate a new thread with this content, and clean the cache entry for the content
	 *
	 * @return int								- The threadid of the new thread
	 */
	protected function associateThread()
	{
		if ($id = $this->createAssociatedThread(vB::$vbulletin->options['vbcmsforumid'], $this->content))
		{
			if (!$this->content->setAssociatedThread($id))
			{
				throw new vB_Exception_Content('Could not set comments thread for content');
			}

			// clean the article cache
			vB_Cache::instance()->event($this->content->getContentCacheEvent());
			vB_Cache::instance()->cleanNow();
		}

		return $id;
	}