From efe8358c786ff5a1cce9321597b802367774c032 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 8 Apr 2023 00:08:06 +0200 Subject: [PATCH] use Dotclear Helper --- src/Backend.php | 4 ++-- src/Frontend.php | 4 ++-- src/UrlHandler.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Backend.php b/src/Backend.php index e2545fa..bff287f 100644 --- a/src/Backend.php +++ b/src/Backend.php @@ -17,6 +17,7 @@ namespace Dotclear\Plugin\simplyFavicon; use dcCore; use dcNsProcess; use dcSettings; +use Dotclear\Helper\File\Path; use Dotclear\Helper\Html\Form\{ Checkbox, Div, @@ -24,7 +25,6 @@ use Dotclear\Helper\Html\Form\{ Note, Para }; -use path; class Backend extends dcNsProcess { @@ -44,7 +44,7 @@ class Backend extends dcNsProcess dcCore::app()->addBehaviors([ 'adminBlogPreferencesFormV2' => function (dcSettings $blog_settings): void { $exists = []; - $path = path::fullFromRoot((string) $blog_settings->get('system')->get('public_path'), DC_ROOT); + $path = Path::fullFromRoot((string) $blog_settings->get('system')->get('public_path'), DC_ROOT); foreach (['ico', 'png', 'bmp', 'gif', 'jpg', 'mng'] as $ext) { if (file_exists($path . '/favicon.' . $ext)) { $url = dcCore::app()->blog->url . dcCore::app()->url->getURLFor('simplyFavicon', $ext); diff --git a/src/Frontend.php b/src/Frontend.php index ee7082d..ee5d234 100644 --- a/src/Frontend.php +++ b/src/Frontend.php @@ -16,7 +16,7 @@ namespace Dotclear\Plugin\simplyFavicon; use dcCore; use dcNsProcess; -use path; +use Dotclear\Helper\File\Path; class Frontend extends dcNsProcess { @@ -38,7 +38,7 @@ class Frontend extends dcNsProcess return; } - $public_path = path::fullFromRoot(dcCore::app()->blog->settings->get('system')->get('public_path'), DC_ROOT) . '/favicon.'; + $public_path = Path::fullFromRoot(dcCore::app()->blog->settings->get('system')->get('public_path'), DC_ROOT) . '/favicon.'; $public_url = dcCore::app()->blog->url . dcCore::app()->url->getBase('simplyFavicon') . '.'; // ico : IE6 diff --git a/src/UrlHandler.php b/src/UrlHandler.php index eb38398..e847c57 100644 --- a/src/UrlHandler.php +++ b/src/UrlHandler.php @@ -16,7 +16,7 @@ namespace Dotclear\Plugin\simplyFavicon; use dcCore; use dcUrlHandlers; -use path; +use Dotclear\Helper\File\Path; class UrlHandler extends dcUrlHandlers { @@ -31,7 +31,7 @@ class UrlHandler extends dcUrlHandlers public static function simplyFaviconUrl(string $arg): void { - $public_path = path::fullFromRoot(dcCore::app()->blog->settings->get('system')->get('public_path'), DC_ROOT); + $public_path = Path::fullFromRoot(dcCore::app()->blog->settings->get('system')->get('public_path'), DC_ROOT); if (dcCore::app()->blog->settings->get('system')->get('simply_favicon') && !empty($arg)