Skip to content

Commit

Permalink
Revert "Move menu generation functionality into Menu Class and update…
Browse files Browse the repository at this point in the history
… CSS"

This commit was merged without approval or review from the team, and
introduced several regressions and issues, documented in

- Issue #17712: errors in menu and submenu display
- Issue #17779: New Menu Class is breaking plugins

See also issue #17711 and comments in pull request #316.

This reverts commit 29c2f82.
  • Loading branch information
dregad committed Oct 18, 2014
1 parent 215e78b commit b5b3ae1
Show file tree
Hide file tree
Showing 45 changed files with 729 additions and 1,122 deletions.
1 change: 1 addition & 0 deletions account_page.php
Expand Up @@ -140,6 +140,7 @@
<fieldset <?php echo $t_force_pw_reset_html ?>>
<legend><span><?php echo lang_get( 'edit_account_title' ); ?></span></legend>
<?php echo form_security_field( 'account_update' );
print_account_menu( 'account_page.php' );

if( !helper_call_custom_function( 'auth_can_change_password', array() ) ) {
# With LDAP -->
Expand Down
5 changes: 5 additions & 0 deletions account_prefs_inc.php
Expand Up @@ -93,6 +93,11 @@ function edit_account_prefs( $p_user_id = null, $p_error_if_protected = true, $p
<?php echo form_security_field( 'account_prefs_update' ) ?>
<input type="hidden" name="user_id" value="<?php echo $p_user_id ?>" />
<input type="hidden" name="redirect_url" value="<?php echo $t_redirect_url ?>" />
<?php
if( $p_accounts_menu ) {
print_account_menu( 'account_prefs_page.php' );
}
?>
<div class="field-container">
<label for="default-project-id"><span><?php echo lang_get( 'default_project' ) ?></span></label>
<span class="select">
Expand Down
11 changes: 10 additions & 1 deletion account_prof_edit_page.php
Expand Up @@ -72,6 +72,9 @@

html_page_top();

if( profile_is_global( $f_profile_id ) ) {
print_manage_menu();
}
?>

<?php # Edit Profile Form BEGIN ?>
Expand All @@ -86,7 +89,13 @@
<input type="hidden" name="profile_id" value="<?php echo $v_id ?>" />
<?php echo lang_get( 'edit_profile_title' ) ?>
</td>
<td class="right">&nbsp;</td>
<td class="right">
<?php
if( !profile_is_global( $f_profile_id ) ) {
print_account_menu();
}
?>
</td>
</tr>
<tr class="row-1">
<th class="category" width="25%">
Expand Down
9 changes: 9 additions & 0 deletions account_prof_menu_page.php
Expand Up @@ -72,6 +72,10 @@

html_page_top( lang_get( 'manage_profiles_link' ) );

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

if( $g_global_profiles ) {
$t_user_id = ALL_USERS;
} else {
Expand All @@ -87,6 +91,11 @@
<?php echo form_security_field( 'profile_update' )?>
<input type="hidden" name="action" value="add" />
<input type="hidden" name="user_id" value="<?php echo $t_user_id ?>" />
<?php
if( !$g_global_profiles ) {
print_account_menu( 'account_prof_menu_page.php' );
}
?>
<div class="field-container">
<label for="platform" class="required"><span><?php echo lang_get( 'platform' ) ?></span></label>
<span class="input"><input id="platform" type="text" name="platform" size="32" maxlength="32" /></span>
Expand Down
4 changes: 3 additions & 1 deletion account_sponsor_page.php
Expand Up @@ -100,7 +100,9 @@
<td class="form-title">
<?php echo lang_get( 'my_sponsorship' ) ?>
</td>
<td class="right">&nbsp;</td>
<td class="right">
<?php print_account_menu( 'account_sponsor_page.php' ) ?>
</td>
</tr>
</table>
<?php
Expand Down
3 changes: 3 additions & 0 deletions adm_config_report.php
Expand Up @@ -58,6 +58,9 @@

html_page_top( lang_get( 'configuration_report' ) );

print_manage_menu( 'adm_config_report.php' );
print_manage_config_menu( 'adm_config_report.php' );

$t_config_types = array(
CONFIG_TYPE_DEFAULT => 'default',
CONFIG_TYPE_INT => 'integer',
Expand Down
3 changes: 3 additions & 0 deletions adm_permissions_report.php
Expand Up @@ -45,6 +45,9 @@

html_page_top( lang_get( 'permissions_summary_report' ) );

print_manage_menu( 'adm_permissions_report.php' );
print_manage_config_menu( 'adm_permissions_report.php' );

/**
* return html for start of administration report section
* @param string $p_section_name Section name.
Expand Down
172 changes: 0 additions & 172 deletions config_menu_defaults_inc.php

This file was deleted.

10 changes: 0 additions & 10 deletions core.php
Expand Up @@ -32,8 +32,6 @@
* @uses config_api.php
* @uses config_defaults_inc.php
* @uses config_inc.php
* @uses config_menu_defaults_inc.php
* @uses config_menu_inc.php
* @uses constant_inc.php
* @uses crypto_api.php
* @uses custom_constants_inc.php
Expand Down Expand Up @@ -87,14 +85,6 @@
require_once( $g_config_path . 'config_inc.php' );
}

# Include default menu configuration settings
require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'config_menu_defaults_inc.php' );

# config_menu_inc may not be present if this is a new install
if( file_exists( $g_config_path . 'config_menu_inc.php' ) ) {
require_once( $g_config_path . 'config_menu_inc.php' );
}


/**
* Define an API inclusion function to replace require_once
Expand Down

0 comments on commit b5b3ae1

Please sign in to comment.