Skip to content

Commit

Permalink
Remove extra spaces (batch #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
syncguru committed Aug 26, 2014
1 parent 871cdc9 commit c238c74
Show file tree
Hide file tree
Showing 17 changed files with 1,252 additions and 1,257 deletions.
10 changes: 5 additions & 5 deletions account_delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@
# Only allow users to delete their own accounts if allow_account_delete = ON or
# the user has permission to manage user accounts.
if( OFF == config_get( 'allow_account_delete' ) &&
!access_has_global_level( config_get( 'manage_user_threshold' ) ) ) {
print_header_redirect( 'account_page.php' );
!access_has_global_level( config_get( 'manage_user_threshold' ) ) ) {
print_header_redirect( 'account_page.php' );
}

# check that we are not deleting the last administrator account
$t_admin_threshold = config_get_global( 'admin_site_threshold' );
if( current_user_is_administrator() &&
user_count_level( $t_admin_threshold ) <= 1 ) {
trigger_error( ERROR_USER_CHANGE_LAST_ADMIN, ERROR );
user_count_level( $t_admin_threshold ) <= 1 ) {
trigger_error( ERROR_USER_CHANGE_LAST_ADMIN, ERROR );
}

helper_ensure_confirmed( lang_get( 'confirm_delete_msg' ),
lang_get( 'delete_account_button' ) );
lang_get( 'delete_account_button' ) );

form_security_purge( 'account_delete' );

Expand Down
32 changes: 16 additions & 16 deletions account_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,22 @@
$t_can_change_password = helper_call_custom_function( 'auth_can_change_password', array() );

echo '<div class="alert alert-danger">';
echo '<ul>';

if( $t_verify ) {
echo '<li>' . lang_get( 'verify_warning' ) . '</li>';

if( $t_can_change_password ) {
echo '<li>' . lang_get( 'verify_change_password' ) . '</li>';
$t_force_pw_reset = true;
}
} else if( $t_reset_password && $t_can_change_password ) {
echo '<li>' . lang_get( 'warning_default_administrator_account_present' ) . '</li>';
$t_force_pw_reset = true;
}

echo '</ul>';
echo '</div>';
echo '<ul>';

if( $t_verify ) {
echo '<li>' . lang_get( 'verify_warning' ) . '</li>';

if( $t_can_change_password ) {
echo '<li>' . lang_get( 'verify_change_password' ) . '</li>';
$t_force_pw_reset = true;
}
} else if( $t_reset_password && $t_can_change_password ) {
echo '<li>' . lang_get( 'warning_default_administrator_account_present' ) . '</li>';
$t_force_pw_reset = true;
}

echo '</ul>';
echo '</div>';
}

print_account_menu( 'account_page.php' );
Expand Down
38 changes: 19 additions & 19 deletions account_prefs_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/

if( !defined( 'ACCOUNT_PREFS_INC_ALLOW' ) ) {
return;
return;
}

require_api( 'authentication_api.php' );
Expand All @@ -63,29 +63,29 @@
* @return void
*/
function edit_account_prefs( $p_user_id = null, $p_error_if_protected = true, $p_accounts_menu = true, $p_redirect_url = '' ) {
if( null === $p_user_id ) {
$p_user_id = auth_get_current_user_id();
}
if( null === $p_user_id ) {
$p_user_id = auth_get_current_user_id();
}

$t_redirect_url = $p_redirect_url;
if( is_blank( $t_redirect_url ) ) {
$t_redirect_url = 'account_prefs_page.php';
}
$t_redirect_url = $p_redirect_url;
if( is_blank( $t_redirect_url ) ) {
$t_redirect_url = 'account_prefs_page.php';
}

# protected account check
if( user_is_protected( $p_user_id ) ) {
if( $p_error_if_protected ) {
trigger_error( ERROR_PROTECTED_ACCOUNT, ERROR );
} else {
return;
}
}
# protected account check
if( user_is_protected( $p_user_id ) ) {
if( $p_error_if_protected ) {
trigger_error( ERROR_PROTECTED_ACCOUNT, ERROR );
} else {
return;
}
}

# prefix data with u_
$t_pref = user_pref_get( $p_user_id );
# prefix data with u_
$t_pref = user_pref_get( $p_user_id );

# Account Preferences Form BEGIN
?>
?>

<?php
if( $p_accounts_menu ) {
Expand Down
128 changes: 64 additions & 64 deletions account_prof_edit_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
require_api( 'string_api.php' );

if( !config_get( 'enable_profiles' ) ) {
trigger_error( ERROR_ACCESS_DENIED, ERROR );
trigger_error( ERROR_ACCESS_DENIED, ERROR );
}

auth_ensure_user_authenticated();
Expand All @@ -61,11 +61,11 @@
$f_profile_id = gpc_get_int( 'profile_id' );

if( profile_is_global( $f_profile_id ) ) {
access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );

$t_row = profile_get_row( ALL_USERS, $f_profile_id );
$t_row = profile_get_row( ALL_USERS, $f_profile_id );
} else {
$t_row = profile_get_row( auth_get_current_user_id(), $f_profile_id );
$t_row = profile_get_row( auth_get_current_user_id(), $f_profile_id );
}

extract( $t_row, EXTR_PREFIX_ALL, 'v' );
Expand All @@ -80,66 +80,66 @@
?>

<?php # Edit Profile Form BEGIN ?>
<div class="col-md-12 col-xs-12">
<div class="space-10"></div>
<form method="post" action="account_prof_update.php">
<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-user"></i>
<?php echo lang_get('edit_profile_title') ?>
</h4>
</div>
<div class="col-md-12 col-xs-12">
<div class="space-10"></div>
<form method="post" action="account_prof_update.php">
<div class="widget-box widget-color-blue2">
<div class="widget-header widget-header-small">
<h4 class="widget-title lighter">
<i class="ace-icon fa fa-user"></i>
<?php echo lang_get('edit_profile_title') ?>
</h4>
</div>

<div class="widget-body">
<div class="widget-main no-padding">
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed">
<?php echo form_security_field( 'profile_update' )?>
<input type="hidden" name="action" value="update" />
<input type="hidden" name="profile_id" value="<?php echo $v_id ?>" />
<tr>
<th class="category" width="25%">
<span class="required">*</span><?php echo lang_get( 'platform' ) ?>
</th>
<td width="75%">
<input type="text" name="platform" class="input-sm" size="32" maxlength="32" value="<?php echo string_attribute( $v_platform ) ?>" />
</td>
</tr>
<tr>
<th class="category">
<span class="required">*</span><?php echo lang_get( 'os' ) ?>
</th>
<td>
<input type="text" name="os" class="input-sm" size="32" maxlength="32" value="<?php echo string_attribute( $v_os ) ?>" />
</td>
</tr>
<tr>
<th class="category">
<span class="required">*</span><?php echo lang_get( 'os_version' ) ?>
</th>
<td>
<input type="text" name="os_build" class="input-sm" size="16" maxlength="16" value="<?php echo string_attribute( $v_os_build ) ?>" />
</td>
</tr>
<tr>
<th class="category">
<?php echo lang_get( 'additional_description' ) ?>
</th>
<td>
<textarea class="form-control" name="description" cols="60" rows="8"><?php echo string_textarea( $v_description ) ?></textarea>
</td>
</tr>
</table>
</div>
</div>
<div class="widget-toolbox padding-8 clearfix">
<span class="required pull-right"> * <?php echo lang_get( 'required' ) ?></span>
<input type="submit" class="btn btn-primary btn-white btn-round" value="<?php echo lang_get( 'update_profile_button' ) ?>" />
</div>
</div>
</div>
</form>
</div>
<div class="widget-body">
<div class="widget-main no-padding">
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed">
<?php echo form_security_field( 'profile_update' )?>
<input type="hidden" name="action" value="update" />
<input type="hidden" name="profile_id" value="<?php echo $v_id ?>" />
<tr>
<th class="category" width="25%">
<span class="required">*</span><?php echo lang_get( 'platform' ) ?>
</th>
<td width="75%">
<input type="text" name="platform" class="input-sm" size="32" maxlength="32" value="<?php echo string_attribute( $v_platform ) ?>" />
</td>
</tr>
<tr>
<th class="category">
<span class="required">*</span><?php echo lang_get( 'os' ) ?>
</th>
<td>
<input type="text" name="os" class="input-sm" size="32" maxlength="32" value="<?php echo string_attribute( $v_os ) ?>" />
</td>
</tr>
<tr>
<th class="category">
<span class="required">*</span><?php echo lang_get( 'os_version' ) ?>
</th>
<td>
<input type="text" name="os_build" class="input-sm" size="16" maxlength="16" value="<?php echo string_attribute( $v_os_build ) ?>" />
</td>
</tr>
<tr>
<th class="category">
<?php echo lang_get( 'additional_description' ) ?>
</th>
<td>
<textarea class="form-control" name="description" cols="60" rows="8"><?php echo string_textarea( $v_description ) ?></textarea>
</td>
</tr>
</table>
</div>
</div>
<div class="widget-toolbox padding-8 clearfix">
<span class="required pull-right"> * <?php echo lang_get( 'required' ) ?></span>
<input type="submit" class="btn btn-primary btn-white btn-round" value="<?php echo lang_get( 'update_profile_button' ) ?>" />
</div>
</div>
</div>
</form>
</div>
<?php
layout_page_end();
16 changes: 8 additions & 8 deletions account_prof_menu_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,37 +51,37 @@
require_api( 'profile_api.php' );

if( !config_get( 'enable_profiles' ) ) {
trigger_error( ERROR_ACCESS_DENIED, ERROR );
trigger_error( ERROR_ACCESS_DENIED, ERROR );
}

if( isset( $g_global_profiles ) ) {
$g_global_profiles = true;
$g_global_profiles = true;
} else {
$g_global_profiles = false;
$g_global_profiles = false;
}

auth_ensure_user_authenticated();

current_user_ensure_unprotected();

if( $g_global_profiles ) {
access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
access_ensure_global_level( config_get( 'manage_global_profile_threshold' ) );
} else {
access_ensure_global_level( config_get( 'add_profile_threshold' ) );
access_ensure_global_level( config_get( 'add_profile_threshold' ) );
}

layout_page_header( lang_get( 'manage_profiles_link' ) );

layout_page_begin( 'manage_overview_page.php' );

if( $g_global_profiles ) {
print_manage_menu( 'manage_prof_menu_page.php' );
print_manage_menu( 'manage_prof_menu_page.php' );
}

if( $g_global_profiles ) {
$t_user_id = ALL_USERS;
$t_user_id = ALL_USERS;
} else {
$t_user_id = auth_get_current_user_id();
$t_user_id = auth_get_current_user_id();
}
if( !$g_global_profiles ) {
print_account_menu( 'account_prof_menu_page.php' );
Expand Down
Loading

0 comments on commit c238c74

Please sign in to comment.