@@ -681,7 +681,7 @@ function is_allowed_db($filename)
681681
682682 $ cmp_func = (stristr (php_uname (), 'wind ' ) !== false ) ? 'strcasecmp ' : 'strcmp ' ;
683683
684- if (isset ($ ALLOWED_FILES ) && count ($ ALLOWED_FILES ) > 0 ) {
684+ if (isset ($ ALLOWED_FILES ) && is_array ( $ ALLOWED_FILES ) && count ($ ALLOWED_FILES ) > 0 ) {
685685 foreach ($ ALLOWED_FILES as $ file ) {
686686 if ($ cmp_func ($ filename , $ file ) == 0 ) {
687687
@@ -692,7 +692,7 @@ function is_allowed_db($filename)
692692 }
693693
694694 $ dirname = dirname ($ filename );
695- if (isset ($ ALLOWED_DIRS ) && count ($ ALLOWED_DIRS ) > 0 ) {
695+ if (isset ($ ALLOWED_DIRS ) && is_array ( $ ALLOWED_DIRS ) && count ($ ALLOWED_DIRS ) > 0 ) {
696696 foreach ($ ALLOWED_DIRS as $ dir ) {
697697 if ($ cmp_func ($ dirname , substr ($ dir , 0 , -1 )) == 0 ) {
698698
@@ -971,13 +971,14 @@ function get_tabmenu($page)
971971 $ html = "<ul class= \"nav nav-pills nav-justified \"> \n" ;
972972
973973 foreach ($ menuentries as $ item => $ script ) {
974- if (count ($ _SESSION ['s_ ' . strtolower ($ item ) . '_panels ' ]) == 1 ) {
974+ $ p_count = (isset ($ _SESSION ['s_ ' . strtolower ($ item ) . '_panels ' ]) && is_array ($ _SESSION ['s_ ' . strtolower ($ item ) . '_panels ' ])) ? count ($ _SESSION ['s_ ' . strtolower ($ item ) . '_panels ' ]) : 0 ;
975+ if ($ p_count == 1 ) {
975976 continue ;
976977 }
977978 $ class = $ page == $ item ? 'active ' : '' ;
978979
979980 $ html .= ' <li class=" ' . $ class . "\"> \n"
980- . ' <a class="menu-link" href=" ' . $ script . '"> ' . $ GLOBALS ['menu_strings ' ][$ item ] . "</a> \n"
981+ . ' <a class="menu-link" href=" ' . $ script . '"> ' . ( isset ( $ GLOBALS ['menu_strings ' ][$ item ]) ? $ GLOBALS [ ' menu_strings ' ][ $ item ] : $ item ) . "</a> \n"
981982 . " </li> \n" ;
982983 }
983984
@@ -1003,13 +1004,14 @@ function get_tabmenu_top_fixed($page)
10031004 $ html = "<ul class= \"nav navbar-nav \"> \n" ;
10041005
10051006 foreach ($ menuentries as $ item => $ script ) {
1006- if (count ($ _SESSION ['s_ ' . strtolower ($ item ) . '_panels ' ]) == 1 ) {
1007+ $ p_count = (isset ($ _SESSION ['s_ ' . strtolower ($ item ) . '_panels ' ]) && is_array ($ _SESSION ['s_ ' . strtolower ($ item ) . '_panels ' ])) ? count ($ _SESSION ['s_ ' . strtolower ($ item ) . '_panels ' ]) : 0 ;
1008+ if ($ p_count == 1 ) {
10071009 continue ;
10081010 }
10091011 $ class = ($ page == $ item ) ? ' class="active" ' : '' ;
10101012
10111013 $ html .= '<li ' . $ class . '> '
1012- . ' <a class="menu-link" href=" ' . $ script . '"> ' . $ GLOBALS ['menu_strings ' ][$ item ] . "</a> \n"
1014+ . ' <a class="menu-link" href=" ' . $ script . '"> ' . ( isset ( $ GLOBALS ['menu_strings ' ][$ item ]) ? $ GLOBALS [ ' menu_strings ' ][ $ item ] : $ item ) . "</a> \n"
10131015 . " </li> \n" ;
10141016 }
10151017
0 commit comments