From cdb3260a32dd9ae0f18147ddab41d5a6f6f8c9df Mon Sep 17 00:00:00 2001 From: mattab <matthieu.aubry@gmail.com> Date: Mon, 17 Mar 2014 20:31:14 +1300 Subject: [PATCH] New config setting to skip the Custom Logo check and always assume logo is writable --- config/global.ini.php | 3 +++ plugins/CoreAdminHome/CustomLogo.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/config/global.ini.php b/config/global.ini.php index 8bcdb989ff..1d7668b793 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -352,6 +352,9 @@ overlay_following_pages_limit = 300 ; With this option, you can disable the framed mode of the Overlay plugin. Use it if your website contains a framebuster. overlay_disable_framed_mode = 0 +; By default we check whether the Custom logo is writable or not, before we display the Custom logo file uploader +enable_custom_logo_check = 1 + ; If php is running in a chroot environment, when trying to import CSV files with createTableFromCSVFile(), ; Mysql will try to load the chrooted path (which is imcomplete). To prevent an error, here you can specify the ; absolute path to the chroot environment. eg. '/path/to/piwik/chrooted/' diff --git a/plugins/CoreAdminHome/CustomLogo.php b/plugins/CoreAdminHome/CustomLogo.php index bc1f1da055..ca845fe4fb 100644 --- a/plugins/CoreAdminHome/CustomLogo.php +++ b/plugins/CoreAdminHome/CustomLogo.php @@ -79,6 +79,9 @@ class CustomLogo */ public function isCustomLogoWritable() { + if(Config::getInstance()->General['enable_custom_logo_check'] == 0) { + return true; + } $pathUserLogo = $this->getPathUserLogo(); $directoryWritingTo = PIWIK_DOCUMENT_ROOT . '/' . dirname($pathUserLogo); -- GitLab