Skip to content

Commit 122be79

Browse files
committed
skipped t&c check
1 parent 539ad79 commit 122be79

File tree

1 file changed

+1
-30
lines changed

1 file changed

+1
-30
lines changed

easyblog/easyblog/comments.php

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public function post() {
7878

7979
if (!$blogId) {
8080
$this->plugin->setResponse( $this->getErrorResponse(404, 'Invalid Blog') );
81-
return;
8281
}
8382

8483
// @task: Cleanup posted values.
@@ -94,7 +93,6 @@ public function post() {
9493
if(! $this->_validateFields($post))
9594
{
9695
$this->plugin->setResponse( $this->getErrorResponse(500, $this->err[0]) );
97-
return;
9896
}
9997

10098
// @task: Akismet detection service.
@@ -111,7 +109,6 @@ public function post() {
111109
if( EasyBlogHelper::getHelper( 'Akismet' )->isSpam( $data ) )
112110
{
113111
$this->plugin->setResponse( $this->getErrorResponse(500, JText::_('COM_EASYBLOG_SPAM_DETECTED_IN_COMMENT')) );
114-
return false;
115112
}
116113
}
117114

@@ -131,11 +128,6 @@ public function post() {
131128
// @task: Bind posted values into the table.
132129
$comment->bindPost( $post );
133130

134-
if( !EasyBlogHelper::getHelper( 'Captcha' )->verify( $post ) )
135-
{
136-
return EasyBlogHelper::getHelper( 'Captcha' )->getError( $ajax , $post );
137-
}
138-
139131
// @task: Process registrations
140132
$registerUser = isset( $post[ 'esregister' ] ) ? true : false;
141133
$fullname = isset( $post[ 'name' ] ) ? $post['name'] : '';
@@ -151,11 +143,7 @@ public function post() {
151143

152144
if( !is_numeric( $state ) )
153145
{
154-
$ajax->script( "eblog.loader.doneLoading();" );
155-
$ajax->script( 'eblog.comment.displayInlineMsg( "error" , "' . $state . '");' );
156-
EasyBlogHelper::getHelper( 'Captcha' )->reload( $ajax , $post );
157-
158-
return $ajax->send();
146+
$this->plugin->setResponse( $this->getErrorResponse(500, $state) );
159147
}
160148

161149
$newUserId = $state;
@@ -201,13 +189,6 @@ public function post() {
201189
$this->plugin->setResponse( $this->getErrorResponse(500, 'There was a problem saving the comment') );
202190
}
203191

204-
$message = JText::_('COM_EASYBLOG_COMMENTS_SUCCESS');
205-
206-
if( $newUserId != 0 && $registerUser )
207-
{
208-
$message = JText::_('COM_EASYBLOG_COMMENTS_SUCCESS_AND_REGISTERED');
209-
}
210-
211192
// @rule: Process subscription for blog automatically when the user submits a new comment and wants to subscribe to the blog.
212193
if( $subscribeBlog && $config->get( 'main_subscription' ) && $blog->subscription )
213194
{
@@ -333,16 +314,6 @@ function _validateFields($post)
333314
}
334315
}
335316

336-
if($config->get('comment_tnc') == true && ( ( $config->get('comment_tnc_users') == 0 && $my->id <=0) || ( $config->get('comment_tnc_users') == 1 && $my->id >= 0) || ( $config->get('comment_tnc_users') == 2) ) )
337-
{
338-
if(empty($post['tnc']))
339-
{
340-
$this->err[0] = JText::_( 'COM_EASYBLOG_YOU_MUST_ACCEPT_TNC' );
341-
$this->err[1] = 'tnc';
342-
return false;
343-
}
344-
}
345-
346317
return true;
347318
}
348319

0 commit comments

Comments
 (0)