コード例 #1
0
	public function testNotSpam()
	{
		$this->login('uberadmin');
		
		$this->request('admin/blog/comment/notspam', array('commentID' => '666',
		                                           'from' => 'blog/admin/comment/index/3'));

		$comment = BlogComment::get(666);
		$this->assertEquals(PropertySpamStatus::OK, $comment->spamStatus);
		$this->assertFlashNotice('Comment unmarked as spam');
		$this->assertRedirected('blog/admin/comment/index/3');
	}
コード例 #2
0
	protected function findComment($ID)
	{	
		$this->_comment = BlogComment::get($ID);
		return $this->_comment;
	}
コード例 #3
0
	protected function findComment($ID)
	{
		$this->_comment = BlogComment::get($ID);
		if ($this->_comment)
		{
			$year = date('Y', $this->_comment->blogDatePosted);
			$month = date('m', $this->_comment->blogDatePosted);
			$day = date('d', $this->_comment->blogDatePosted);
			$this->_blog = Blog::getBlog($year, $month, $day,
			                             $this->_comment->blogID,
			                             $this->_comment->blogLanguage);
			return true;
		}
		else
		{
			return false;
		}
	}