Changeset 2976 for branches/plugin/bbp-includes/bbp-topic-functions.php
- Timestamp:
- 04/01/2011 09:01:00 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-topic-functions.php
r2975 r2976 73 73 74 74 // Handle Title 75 if ( empty( $_POST['bbp_topic_title'] ) || !$topic_title = esc_attr( strip_tags( $_POST['bbp_topic_title']) ) )75 if ( isset( $_POST['bbp_topic_title'] ) && ( !$topic_title = esc_attr( strip_tags( $_POST['bbp_topic_title'] ) ) ) ) 76 76 $bbp->errors->add( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) ); 77 77 … … 79 79 80 80 // Handle Content 81 if ( empty( $_POST['bbp_topic_content'] ) || !$topic_content = $_POST['bbp_topic_content'])81 if ( isset( $_POST['bbp_topic_content'] ) && ( !$topic_content = $_POST['bbp_topic_content'] ) ) 82 82 $bbp->errors->add( 'bbp_topic_content', __( '<strong>ERROR</strong>: Your topic needs some content.', 'bbpress' ) ); 83 83 … … 85 85 86 86 // Handle Forum id to append topic to 87 if ( empty( $_POST['bbp_forum_id'] ) || !$forum_id = $_POST['bbp_forum_id']) {87 if ( isset( $_POST['bbp_forum_id'] ) && ( !$forum_id = $_POST['bbp_forum_id'] ) ) { 88 88 $bbp->errors->add( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) ); 89 89 } else { … … 108 108 // Handle Tags 109 109 if ( !empty( $_POST['bbp_topic_tags'] ) ) { 110 110 111 // Escape tag input 111 112 $terms = esc_attr( strip_tags( $_POST['bbp_topic_tags'] ) ); … … 254 255 255 256 // Handle Forum id to append topic to 256 if ( empty( $_POST['bbp_forum_id'] ) || !$forum_id = $_POST['bbp_forum_id']) {257 if ( isset( $_POST['bbp_forum_id'] ) && ( !$forum_id = $_POST['bbp_forum_id'] ) ) { 257 258 $bbp->errors->add( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) ); 258 259 } elseif ( $forum_id != $topic->post_parent ) { … … 268 269 269 270 // Handle Title 270 if ( empty( $_POST['bbp_topic_title'] ) || !$topic_title = esc_attr( strip_tags( $_POST['bbp_topic_title']) ) )271 if ( isset( $_POST['bbp_topic_title'] ) && ( !$topic_title = esc_attr( strip_tags( $_POST['bbp_topic_title'] ) ) ) ) 271 272 $bbp->errors->add( 'bbp_edit_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) ); 272 273 … … 274 275 275 276 // Handle Content 276 if ( empty( $_POST['bbp_topic_content'] ) || !$topic_content = $_POST['bbp_topic_content'])277 if ( isset( $_POST['bbp_topic_content'] ) && ( !$topic_content = $_POST['bbp_topic_content'] ) ) 277 278 $bbp->errors->add( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) ); 278 279
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)