Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ui/include/func.inc.php')
-rw-r--r--ui/include/func.inc.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/include/func.inc.php b/ui/include/func.inc.php
index d34d9b36b0a..55600959ffc 100644
--- a/ui/include/func.inc.php
+++ b/ui/include/func.inc.php
@@ -1625,7 +1625,7 @@ function access_deny($mode = ACCESS_DENY_OBJECT) {
show_error_message(_('No permissions to referred object or it does not exist!'));
require_once dirname(__FILE__).'/page_header.php';
- (new CWidget())->show();
+ (new CHtmlPage())->show();
require_once dirname(__FILE__).'/page_footer.php';
}
// deny access to a page
@@ -1806,8 +1806,20 @@ function makeMessageBox(string $class, array $messages, string $title = null, bo
function filter_messages(): array {
if (!CSettingsHelper::getGlobal(CSettingsHelper::SHOW_TECHNICAL_ERRORS)
&& CWebUser::getType() != USER_TYPE_SUPER_ADMIN && !CWebUser::getDebugMode()) {
+
+ $type = CMessageHelper::getType();
+ $title = CMessageHelper::getTitle();
$messages = CMessageHelper::getMessages();
- CMessageHelper::clear(false);
+ CMessageHelper::clear();
+
+ if ($title !== null) {
+ if ($type === CMessageHelper::MESSAGE_TYPE_SUCCESS) {
+ CMessageHelper::setSuccessTitle($title);
+ }
+ else {
+ CMessageHelper::setErrorTitle($title);
+ }
+ }
$generic_exists = false;
foreach ($messages as $message) {