nuclear_eclipse | 6 Oct 20:03

SF.net SVN: mantisbt:[5632] trunk/mantisbt

Revision: 5632
          http://mantisbt.svn.sourceforge.net/mantisbt/?rev=5632&view=rev
Author:   nuclear_eclipse
Date:     2008-10-06 18:04:45 +0000 (Mon, 06 Oct 2008)

Log Message:
-----------
Revert "Move bug_create() validation to bug_report.php so that form security tokens work right."
With the changes to form_api, this commit has been superceded.

Modified Paths:
--------------
    trunk/mantisbt/bug_report.php
    trunk/mantisbt/core/bug_api.php

Modified: trunk/mantisbt/bug_report.php
===================================================================
--- trunk/mantisbt/bug_report.php	2008-10-05 22:11:51 UTC (rev 5631)
+++ trunk/mantisbt/bug_report.php	2008-10-06 18:04:45 UTC (rev 5632)
@@ -94,24 +94,6 @@
 		}
 	}

-	# Summary cannot be blank
-	if ( is_blank( $t_bug_data->summary ) ) {
-		error_parameters( lang_get( 'summary' ) );
-		trigger_error( ERROR_EMPTY_FIELD, ERROR );
-	}
-
-	# Description cannot be blank
-	if ( is_blank( $t_bug_data->description ) ) {
-		error_parameters( lang_get( 'description' ) );
-		trigger_error( ERROR_EMPTY_FIELD, ERROR );
-	}
-
-	# Make sure a category is set
-	if ( 0 == $t_bug_data->category_id && !config_get( 'allow_no_category' ) ) {
-		error_parameters( lang_get( 'category' ) );
-		trigger_error( ERROR_EMPTY_FIELD, ERROR );
-	}
-
 	helper_call_custom_function( 'issue_create_validate', array( $t_bug_data ) );

 	# Validate the custom fields before adding the bug.

Modified: trunk/mantisbt/core/bug_api.php
===================================================================
--- trunk/mantisbt/core/bug_api.php	2008-10-05 22:11:51 UTC (rev 5631)
+++ trunk/mantisbt/core/bug_api.php	2008-10-06 18:04:45 UTC (rev 5632)
@@ -480,6 +480,24 @@
 		$c_sponsorship_total 	= 0;
 		$c_sticky 				= 0;		

+		# Summary cannot be blank
+		if ( is_blank( $c_summary ) ) {
+			error_parameters( lang_get( 'summary' ) );
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+		}
+
+		# Description cannot be blank
+		if ( is_blank( $c_description ) ) {
+			error_parameters( lang_get( 'description' ) );
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+		}
+
+		# Make sure a category is set
+		if ( 0 == $c_category_id && !config_get( 'allow_no_category' ) ) {
+			error_parameters( lang_get( 'category' ) );
+			trigger_error( ERROR_EMPTY_FIELD, ERROR );
+		}
+
 		# Only set target_version if user has access to do so
 		if ( access_has_project_level( config_get( 'roadmap_update_threshold' ) ) ) {
 			$c_target_version	= $p_bug_data->target_version;

This was sent by the SourceForge.net collaborative development platform, the world's largest Open
Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane