The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug in admin.php in 4.4
#1
In admin.php, you have this function:

 function usView($file){
   global $abs_us_root;
   global $us_url_root;
   if(file_exists($abs_us_root.$us_url_root.'usersc/includes/admin/'.$file)){
     $path = $abs_us_root.$us_url_root.'usersc/admin/'.$file;
   }else{
     $path = $abs_us_root.$us_url_root.'users/views/'.$file;
   }
   return $path;
 }


It's looking for the override file in the wrong place.  The line where $path is set seems like it should be:

$path = $abs_us_root.$us_url_root.'usersc/includes/admin/'.$file;

Also, if you fix the aforementioned bug and manage to load a custom view, the admin dashboard also displays on the same screen due to this default code at the end of the switch in admin.php:

   default:
   if($view != ''){
   logger($user->data()->id,"Errors","Tried to visit unsupported view ($view) in admin.php");
   }
   include($abs_us_root.$us_url_root.'users/views/_admin_dashboard.php');



There needs to be some way to not show the dashboard if a custom view has been instantiated earlier. Also, there's no need to log an error in this situation.
  Reply


Messages In This Thread
Bug in admin.php in 4.4 - by haydentech - 02-02-2019, 12:36 AM
RE: Bug in admin.php in 4.4 - by Brandin - 02-03-2019, 04:22 PM
RE: Bug in admin.php in 4.4 - by mudmin - 02-06-2019, 07:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)