summaryrefslogtreecommitdiff
path: root/edit.php
diff options
context:
space:
mode:
authorMW <joasch@users.sourceforge.net>2007-11-10 10:51:19 +0000
committerMW <joasch@users.sourceforge.net>2007-11-10 10:51:19 +0000
commit78cd6eb6976542b4e6d3168faaeca48b9e35748a (patch)
tree44834371839e96a567c39dfc32bf1407f82cff20 /edit.php
parentcfa5f3447da81535c335df685b897b22f0a0202a (diff)
downloadarticles-78cd6eb6976542b4e6d3168faaeca48b9e35748a.tar.gz
articles-78cd6eb6976542b4e6d3168faaeca48b9e35748a.tar.bz2
articles-78cd6eb6976542b4e6d3168faaeca48b9e35748a.zip
Fixing captcha for articles submition
Diffstat (limited to 'edit.php')
-rw-r--r--edit.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/edit.php b/edit.php
index 46b2ccc..c9190ed 100644
--- a/edit.php
+++ b/edit.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_articles/edit.php,v 1.41 2007/10/10 18:07:14 wjames5 Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_articles/edit.php,v 1.42 2007/11/10 10:51:19 joasch Exp $
* @package article
* @subpackage functions
*/
@@ -44,13 +44,14 @@ if( !empty( $_REQUEST['remove_image'] ) ) {
$_REQUEST['preview'] = 1;
}
-// random image code
-if( !( $gContent->hasUserPermission( 'p_articles_approve_submission' ) || $gContent->hasUserPermission( 'p_articles_auto_approve' ) ) && !empty( $_REQUEST["save"] ) && $gBitSystem->isFeatureActive( 'articles_submissions_rnd_img' ) && ( !isset( $_SESSION['random_number'] ) || $_SESSION['random_number'] != $_REQUEST['rnd_img'] ) ) {
- $feedback['error'] = tra( "You need to supply the correct code to submit." );
- $_REQUEST['preview'] = TRUE;
- unset( $_REQUEST['save'] );
+if( isset( $_REQUEST["save"] ) ) {
+ // random image code
+ if( !( $gContent->hasUserPermission( 'p_articles_approve_submission' ) || $gContent->hasUserPermission( 'p_articles_auto_approve' ) ) && $gBitSystem->isFeatureActive( 'articles_submissions_rnd_img' ) && !$gBitUser->verifyCaptcha( $_REQUEST['captcha'] ) ) {
+ $feedback['error'] = tra( "You need to supply the correct code to submit." );
+ $_REQUEST['preview'] = TRUE;
+ unset( $_REQUEST['save'] );
+ }
}
-
// If we are in preview mode then preview it!
if( !empty( $_REQUEST['preview'] ) ) {
$article = $gContent->preparePreview( $_REQUEST );