use Dotclear Helper
This commit is contained in:
parent
00b27f226e
commit
efe8358c78
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user