View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003330 | mantisbt | bugtracker | public | 2003-08-30 22:41 | 2003-12-13 04:35 |
| Reporter | robsmith | Assigned To | vboctor | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.18.0rc1 | ||||
| Summary | 0003330: "Required" fields on Account Profile page | ||||
| Description | On the Account Profile page (account_prof_menu_page.php) the "Additional Description" field has a "required" asterisk against it. I think this field should be optional. There is no actually no check that any of the fields are filled, so it's possible to file a blank profile. | ||||
| Tags | No tags attached. | ||||
| Attached Files | profiles_mandatory_fields.diff (3,548 bytes)
Index: account_prof_edit_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/account_prof_edit_page.php,v
retrieving revision 1.31
diff -u -r1.31 account_prof_edit_page.php
--- account_prof_edit_page.php 18 Feb 2003 02:18:00 -0000 1.31
+++ account_prof_edit_page.php 1 Sep 2003 22:47:06 -0000
@@ -66,7 +66,7 @@
</tr>
<tr class="row-1">
<td class="category" width="25%">
- <?php echo lang_get( 'platform' ) ?>
+ <span class="required">*</span><?php echo lang_get( 'platform' ) ?>
</td>
<td width="75%">
<input type="text" name="platform" size="32" maxlength="32" value="<?php echo string_attribute( $v_platform ) ?>" />
@@ -74,7 +74,7 @@
</tr>
<tr class="row-2">
<td class="category">
- <?php echo lang_get( 'operating_system' ) ?>
+ <span class="required">*</span><?php echo lang_get( 'operating_system' ) ?>
</td>
<td>
<input type="text" name="os" size="32" maxlength="32" value="<?php echo string_attribute( $v_os ) ?>" />
@@ -82,7 +82,7 @@
</tr>
<tr class="row-1">
<td class="category">
- <?php echo lang_get( 'version' ) ?>
+ <span class="required">*</span><?php echo lang_get( 'version' ) ?>
</td>
<td>
<input type="text" name="os_build" size="16" maxlength="16" value="<?php echo string_attribute( $v_os_build ) ?>" />
Index: account_prof_menu_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/account_prof_menu_page.php,v
retrieving revision 1.29
diff -u -r1.29 account_prof_menu_page.php
--- account_prof_menu_page.php 18 Feb 2003 02:18:00 -0000 1.29
+++ account_prof_menu_page.php 1 Sep 2003 22:47:06 -0000
@@ -76,7 +76,7 @@
</tr>
<tr class="row-2">
<td class="category">
- <span class="required">*</span><?php echo lang_get( 'additional_description' ) ?>
+ <?php echo lang_get( 'additional_description' ) ?>
</td>
<td>
<textarea name="description" cols="60" rows="8" wrap="virtual"></textarea>
Index: core/profile_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/profile_api.php,v
retrieving revision 1.3
diff -u -r1.3 profile_api.php
--- core/profile_api.php 3 Jan 2003 03:24:25 -0000 1.3
+++ core/profile_api.php 1 Sep 2003 22:47:07 -0000
@@ -25,7 +25,7 @@
# --------------------
# Create a new profile for the user, return the ID of the new profile
function profile_create( $p_user_id, $p_platform, $p_os, $p_os_build, $p_description ) {
- $c_user_id = db_prepare_string( $p_user_id );
+ $c_user_id = db_prepare_int( $p_user_id );
$c_platform = db_prepare_string( $p_platform );
$c_os = db_prepare_string( $p_os );
$c_os_build = db_prepare_string( $p_os_build );
@@ -33,6 +33,11 @@
user_ensure_unprotected( $p_user_id );
+ # platform, os, os_build cannot be blank
+ if ( is_blank( $c_platform ) || is_blank( $c_os ) || is_blank( $c_os_build ) ) {
+ trigger_error( ERROR_EMPTY_FIELD, ERROR );
+ }
+
$t_user_profile_table = config_get( 'mantis_user_profile_table' );
# Add profile
@@ -81,6 +86,11 @@
$c_description = db_prepare_string( $p_description );
user_ensure_unprotected( $p_user_id );
+
+ # platform, os, os_build cannot be blank
+ if ( is_blank( $c_platform ) || is_blank( $c_os ) || is_blank( $c_os_build ) ) {
+ trigger_error( ERROR_EMPTY_FIELD, ERROR );
+ }
$t_user_profile_table = config_get( 'mantis_user_profile_table' );
| ||||
|
Fixed in CVS, patch attached, and will be in next release.
|
|
|
MantisBT: master 1af07169 2003-09-01 18:52 Details Diff |
Fix 0003330: "Required" fields on Account Profile page. M account_prof_edit_page.php - Marked mandatory fields. M account_prof_menu_page.php - Marked Additional Description as non-mandatory M core/profile_api.php - Added checking for mandatory fields in create / update APIs. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2262 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9 |
Affected Issues 0003330 |
|
| mod - account_prof_menu_page.php | Diff File | ||
| mod - doc/ChangeLog | Diff File | ||
| mod - account_prof_edit_page.php | Diff File | ||
| mod - core/profile_api.php | Diff File | ||