Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/11/2012 02:14:07 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Remove unneeded globals and clean up some code in XProfile component. See #3989.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-screens.php

    r5418 r5699  
    11<?php
    2 /*******************************************************************************
     2
     3/**
     4 * BuddyPress XProfile Screens
     5 *
    36 * Screen functions are the controllers of BuddyPress. They will execute when
    47 * their specific URL is caught. They will first save or manipulate data using
    58 * business functions, then pass on the user to a template file.
     9 *
     10 * @package BuddyPress
     11 * @subpackage XProfileScreens
    612 */
    713
     
    4652    }
    4753
     54    // No errors
     55    $errors = false;
     56
    4857    // Check to see if any new information has been submitted
    4958    if ( isset( $_POST['field_ids'] ) ) {
     
    7786
    7887            $is_required[$field_id] = xprofile_check_is_required_field( $field_id );
    79             if ( $is_required[$field_id] && empty( $_POST['field_' . $field_id] ) )
     88            if ( $is_required[$field_id] && empty( $_POST['field_' . $field_id] ) ) {
    8089                $errors = true;
     90            }
    8191        }
    8292
     
    8797        // No errors
    8898        } else {
     99
    89100            // Reset the errors var
    90101            $errors = false;
     
    108119
    109120            // Set the feedback messages
    110             if ( $errors )
     121            if ( !empty( $errors ) )
    111122                bp_core_add_message( __( 'There was a problem updating some of your profile information, please try again.', 'buddypress' ), 'error' );
    112123            else
Note: See TracChangeset for help on using the changeset viewer.