Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,8 @@ use RuntimeException;
|
||||
use App\RSpade\CodeQuality\RuntimeChecks\BundleErrors;
|
||||
use App\RSpade\Core\Bundle\BundleCompiler;
|
||||
use App\RSpade\Core\Manifest\Manifest;
|
||||
use App\RSpade\Core\Portal\Portal_Session;
|
||||
use App\RSpade\Core\Portal\Rsx_Portal;
|
||||
use App\RSpade\Core\Rsx;
|
||||
use App\RSpade\Core\Session\Session;
|
||||
|
||||
@@ -261,10 +263,12 @@ abstract class Rsx_Bundle_Abstract
|
||||
|
||||
// Add runtime data
|
||||
$rsxapp_data['debug'] = Rsx::is_development();
|
||||
$rsxapp_data['current_controller'] = Rsx::get_current_controller();
|
||||
$rsxapp_data['current_action'] = Rsx::get_current_action();
|
||||
$rsxapp_data['is_auth'] = Session::is_logged_in();
|
||||
$rsxapp_data['is_spa'] = Rsx::is_spa();
|
||||
// Use portal-specific methods when in portal context
|
||||
$is_portal = Rsx_Portal::is_portal_request();
|
||||
$rsxapp_data['is_portal'] = $is_portal;
|
||||
$rsxapp_data['current_controller'] = $is_portal ? Rsx_Portal::get_current_controller() : Rsx::get_current_controller();
|
||||
$rsxapp_data['current_action'] = $is_portal ? Rsx_Portal::get_current_action() : Rsx::get_current_action();
|
||||
$rsxapp_data['is_spa'] = $is_portal ? Rsx_Portal::is_spa() : Rsx::is_spa();
|
||||
|
||||
// Enable ajax batching in debug/production modes, disable in development for easier debugging
|
||||
$rsxapp_data['ajax_batching'] = !Rsx::is_development();
|
||||
@@ -274,9 +278,18 @@ abstract class Rsx_Bundle_Abstract
|
||||
$rsxapp_data['params'] = $current_params ?? [];
|
||||
|
||||
// Add user, site, and csrf data from session
|
||||
$rsxapp_data['user'] = Session::get_user();
|
||||
$rsxapp_data['site'] = Session::get_site();
|
||||
$rsxapp_data['csrf'] = Session::get_csrf_token();
|
||||
// Use Portal_Session for portal requests, Session for regular requests
|
||||
if ($is_portal) {
|
||||
$rsxapp_data['is_auth'] = Portal_Session::is_logged_in();
|
||||
$rsxapp_data['user'] = Portal_Session::get_portal_user();
|
||||
$rsxapp_data['site'] = Portal_Session::get_site();
|
||||
$rsxapp_data['csrf'] = Portal_Session::get_csrf_token();
|
||||
} else {
|
||||
$rsxapp_data['is_auth'] = Session::is_logged_in();
|
||||
$rsxapp_data['user'] = Session::get_user();
|
||||
$rsxapp_data['site'] = Session::get_site();
|
||||
$rsxapp_data['csrf'] = Session::get_csrf_token();
|
||||
}
|
||||
|
||||
// Add browser error logging flag (enabled in both dev and production)
|
||||
if (config('rsx.log_browser_errors', false)) {
|
||||
|
||||
Reference in New Issue
Block a user