e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
322 stars 214 forks source link

AltAuth plugin admin menu is not displayed #4281

Closed Jimmi08 closed 3 years ago

Jimmi08 commented 3 years ago

Bug Description

Admin menu is not fully displayed

How to Reproduce

PHP 7.3 Latest git

It should look like this: image

but it looks like this: image

The problem is caused by the latest changes in alt_auth_adminmenu.php

Deltik commented 3 years ago

Bisect log:

git bisect start
# bad: [9452dd003724945aa18ccbc1e00e4e0e50b499ae] Fixed use of deprecated test method in e_mediaTest
git bisect bad 9452dd003724945aa18ccbc1e00e4e0e50b499ae
# good: [7214b75794f6431a376f6839bca7f30137f45067] Fixes #4223 - Fix for bootstrap style inside TinyMce. Thanks go to @tgtje
git bisect good 7214b75794f6431a376f6839bca7f30137f45067
# good: [5770aa8bbbf888da13e716a2c5e75f1a10963dd6] Closes #4260 toImage() : Added 'title' attribute. Added options to override size, width and height values. (subject to change)
git bisect good 5770aa8bbbf888da13e716a2c5e75f1a10963dd6
# good: [645c05cfbfd4962ea663c8540aa8444dffceb847] PHP8 Compatibility Fixes
git bisect good 645c05cfbfd4962ea663c8540aa8444dffceb847
# bad: [68a0c8940c00efcbdc6db14f7f7d29606474e4c6] Image thumbnail processing moved to its own class. Thumbnail test added.
git bisect bad 68a0c8940c00efcbdc6db14f7f7d29606474e4c6
# good: [b16d7605b67d704894dc0e73d5f43c43c2568786] Code cleanup.
git bisect good b16d7605b67d704894dc0e73d5f43c43c2568786
# bad: [09fb747374e17c54350cd4e2a659da2af78ff789] Code cleanup
git bisect bad 09fb747374e17c54350cd4e2a659da2af78ff789
# good: [d37d4bf8afd26afdb8cb8f23e6e8660d661d5dc3] Metaweblog plugin removed. Available in separate repo https://github.com/e107inc/metaweblog
git bisect good d37d4bf8afd26afdb8cb8f23e6e8660d661d5dc3
# first bad commit: [09fb747374e17c54350cd4e2a659da2af78ff789] Code cleanup

This was the bad commit:

commit 09fb747374e17c54350cd4e2a659da2af78ff789
Author: Cameron <e107inc@gmail.com>
Date:   Sat Dec 5 14:13:18 2020 -0800

    Code cleanup

 comment.php                                        |  5 ++--
 e107_admin/admin_log.php                           | 12 +++++----
 e107_core/bbcodes/bb_img.php                       | 31 +++++++++++++---------
 e107_core/shortcodes/single/nextprev.php           |  3 ++-
 e107_handlers/application.php                      |  2 +-
 e107_handlers/e_parse_class.php                    | 14 +++++-----
 e107_handlers/model_class.php                      |  6 ++---
 e107_handlers/news_class.php                       |  4 +--
 e107_handlers/upload_handler.php                   |  2 +-
 e107_plugins/alt_auth/alt_auth_adminmenu.php       | 28 ++++++++++---------
 e107_plugins/alt_auth/alt_auth_login_class.php     |  6 +++--
 e107_plugins/banner/admin_banner.php               | 23 +++++++++-------
 e107_plugins/download/handlers/download_class.php  |  3 ++-
 e107_plugins/faqs/faqs.php                         | 11 +++++---
 e107_plugins/featurebox/e_shortcode.php            |  3 ++-
 e107_plugins/featurebox/featurebox_menu.php        |  4 +--
 e107_plugins/forum/forum.php                       |  4 +--
 .../forum/shortcodes/batch/forum_shortcodes.php    |  2 +-
 e107_plugins/gallery/controllers/index.php         |  4 +--
 e107_plugins/gallery/e_shortcode.php               |  6 +++--
 e107_plugins/gsitemap/admin_config.php             |  2 +-
 e107_plugins/gsitemap/e_cron.php                   |  2 +-
 .../import/providers/phpbb3_import_class.php       |  3 ++-
 e107_plugins/import/providers/rss_import_class.php |  2 +-
 e107_plugins/login_menu/login_menu_class.php       |  3 ++-
 e107_plugins/newsfeed/admin_config.php             |  2 +-
 e107_plugins/newsletter/nl_archive.php             |  8 +++---
 e107_plugins/pm/admin_config.php                   |  2 +-
 e107_plugins/pm/pm_class.php                       | 13 ++++++---
 e107_plugins/social/admin_config.php               |  4 +--
 30 files changed, 125 insertions(+), 89 deletions(-)
Deltik commented 3 years ago

@CaMer0n: Looks like the cause was these changes specifically:

diff --git a/e107_plugins/alt_auth/alt_auth_adminmenu.php b/e107_plugins/alt_auth/alt_auth_adminmenu.php
index cf456f313..14f53baa3 100755
--- a/e107_plugins/alt_auth/alt_auth_adminmenu.php
+++ b/e107_plugins/alt_auth/alt_auth_adminmenu.php
@@ -551,10 +551,10 @@ class alt_auth_admin extends alt_auth_base
 function alt_auth_adminmenu()
 {
        echo ' ';
-       /*if(!is_array($authlist))
+       if(!is_array($authlist))
        {
                $authlist = alt_auth_admin::alt_auth_get_authlist();
-       }*/
+       }
        define('ALT_AUTH_ACTION', 'main');

        $var['main']['text'] = LAN_ALT_31;
@@ -568,7 +568,6 @@ function alt_auth_adminmenu()

        $var = array();
-       /*
        foreach($authlist as $a)
        {
          if($a != 'e107')
@@ -576,10 +575,10 @@ function alt_auth_adminmenu()
                $var[$a]['text'] = LAN_ALT_30.$a;
                $var[$a]['link'] = e_PLUGIN."alt_auth/{$a}_conf.php";
          }
-       }*/
+       }

-       // show_admin_menu(LAN_ALT_29, ALT_AUTH_ACTION, $var);
+       show_admin_menu(LAN_ALT_29, ALT_AUTH_ACTION, $var);
 }