From 33bf2141e7859f2e5a7ffc2cfdb73b811b1cbed1 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sun, 4 Dec 2022 11:31:16 +0100 Subject: [PATCH] use notice, redirect, breadcrumb functions --- index.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 385107e..2a324b4 100644 --- a/index.php +++ b/index.php @@ -23,7 +23,8 @@ $aliases = $o->getAliases(); if (isset($_POST['a']) && is_array($_POST['a'])) { try { $o->updateAliases($_POST['a']); - http::redirect(dcCore::app()->admin->getPageURL() . '&up=1'); + dcAdminNotices::addSuccessNotice(__('Aliases successfully updated.')); + dcCore::app()->adminurl->redirect('admin.plugin.alias'); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } @@ -33,7 +34,8 @@ if (isset($_POST['a']) && is_array($_POST['a'])) { if (isset($_POST['alias_url'])) { try { $o->createAlias($_POST['alias_url'], $_POST['alias_destination'], count($aliases) + 1); - http::redirect(dcCore::app()->admin->getPageURL() . '&created=1'); + dcAdminNotices::addSuccessNotice(__('Alias successfully created.')); + dcCore::app()->adminurl->redirect('admin.plugin.alias'); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } @@ -46,8 +48,14 @@ if (isset($_POST['alias_url'])) { ' . html::escapeHTML(dcCore::app()->blog->name) . ' › ' . __('Aliases') . '' . +dcPage::breadcrumb([ + __('Plugins') => '', + __('Aliases') => '', +]) . +dcPage::notices() . + '

' . __('Aliases list') . '

'; if (empty($aliases)) {