Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/06/2009 10:44:01 PM (16 years ago)
Author:
apeatling
Message:

Syntax cleanup.

File:
1 edited

Legend:

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

    r1021 r1025  
    1616    $groups = BP_XProfile_Group::get_all();
    1717
    18     if ( isset($_GET['mode']) && isset($_GET['group_id']) && $_GET['mode'] == "add_field" ) {
     18    if ( isset($_GET['mode']) && isset($_GET['group_id']) && 'add_field' == $_GET['mode'] ) {
    1919        xprofile_admin_manage_field($_GET['group_id']);
    20     } else if ( isset($_GET['mode']) && isset($_GET['group_id']) && isset($_GET['field_id']) && $_GET['mode'] == "edit_field" ) {
     20    } else if ( isset($_GET['mode']) && isset($_GET['group_id']) && isset($_GET['field_id']) && 'edit_field' == $_GET['mode'] ) {
    2121        xprofile_admin_manage_field($_GET['group_id'], $_GET['field_id']);
    22     } else if ( isset($_GET['mode']) && isset($_GET['field_id']) && $_GET['mode'] == "delete_field" ) {
     22    } else if ( isset($_GET['mode']) && isset($_GET['field_id']) && 'delete_field' == $_GET['mode'] ) {
    2323        xprofile_admin_delete_field($_GET['field_id'], 'field');
    24     } else if ( isset($_GET['mode']) && isset($_GET['option_id']) && $_GET['mode'] == "delete_option" ) {
     24    } else if ( isset($_GET['mode']) && isset($_GET['option_id']) && 'delete_option' == $_GET['mode'] ) {
    2525        xprofile_admin_delete_field($_GET['option_id'], 'option');
    26     } else if ( isset($_GET['mode']) && $_GET['mode'] == "add_group" ) {
     26    } else if ( isset($_GET['mode']) && 'add_group' == $_GET['mode'] ) {
    2727        xprofile_admin_manage_group();
    28     } else if ( isset($_GET['mode']) && isset($_GET['group_id']) && $_GET['mode'] == "delete_group" ) {
     28    } else if ( isset($_GET['mode']) && isset($_GET['group_id']) && 'delete_group' == $_GET['mode'] ) {
    2929        xprofile_admin_delete_group($_GET['group_id']);
    30     } else if ( isset($_GET['mode']) && isset($_GET['group_id']) && $_GET['mode'] == "edit_group" ) {
     30    } else if ( isset($_GET['mode']) && isset($_GET['group_id']) && 'edit_group' == $_GET['mode'] ) {
    3131        xprofile_admin_manage_group($_GET['group_id']);
    3232    } else {
     
    9191                          <?php if ( $groups[$i]->fields ) { ?>
    9292                            <?php for ( $j = 0; $j < count($groups[$i]->fields); $j++ ) { ?>
    93                                     <?php if ( $j % 2 == 0 ) { $class = ""; } else { $class = "alternate"; } ?>
     93                                    <?php if ( 0 == $j % 2 ) { $class = ""; } else { $class = "alternate"; } ?>
    9494                                <?php $field = new BP_XProfile_Field($groups[$i]->fields[$j]->id); ?>
    9595                                <?php if ( !$field->can_delete ) { $class .= ' core'; } ?>
     
    244244    global $message, $type;
    245245   
    246     if ( $type == 'field' ) {
     246    if ( 'field' == $type ) {
    247247        $type = __('field', 'buddypress');
    248248    } else {
Note: See TracChangeset for help on using the changeset viewer.