Use debug settings to determine whether to display error location

This commit is contained in:
Kijin Sung 2020-03-19 17:50:59 +09:00
parent 339fd234a5
commit 1f9fe48170
5 changed files with 10 additions and 4 deletions

View file

@ -6,7 +6,7 @@
<div class="message" cond="$system_message_detail">
{$system_message_detail}
</div>
<div class="message location" cond="$system_message_location && $logged_info->is_admin === 'Y'">
<div class="message location" cond="$system_message_location">
{$system_message_location}
</div>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/message/m.skin/default/system_message/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">

View file

@ -48,6 +48,12 @@ class messageView extends message
if(strncasecmp('https://', Context::getRequestUri(), 8) === 0) $ssl_mode = true;
}
// Disable location if debug not available
if (!Rhymix\Framework\Debug::isEnabledForCurrentUser())
{
$location = null;
}
// Remove basedir from location (if any)
if ($location && starts_with(\RX_BASEDIR, $location))
{

View file

@ -11,7 +11,7 @@
<div class="message" cond="$system_message_detail">
{$system_message_detail}
</div>
<div class="message location" cond="$system_message_location && $logged_info->is_admin === 'Y'">
<div class="message location" cond="$system_message_location">
{$system_message_location}
</div>
</div>

View file

@ -5,7 +5,7 @@
<div class="rx_message-notice error" cond="$system_message_detail">
{$system_message_detail}
</div>
<div class="rx_message-notice location" cond="$system_message_location && $logged_info->is_admin === 'Y'">
<div class="rx_message-notice location" cond="$system_message_location">
{$system_message_location}
</div>
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/message/skins/simple_world/system_message/1'" class="rx_message-notice {$XE_VALIDATOR_MESSAGE_TYPE}">

View file

@ -8,7 +8,7 @@
<div class="message" cond="$system_message_detail">
{$system_message_detail}
</div>
<div class="message location" cond="$system_message_location && $logged_info->is_admin === 'Y'">
<div class="message location" cond="$system_message_location">
{$system_message_location}
</div>
</div>