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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas ZILLIOX <thomas@zilliox.me>2013-05-23 17:46:29 +0400
committerThomas ZILLIOX <thomas@zilliox.me>2013-05-23 17:46:29 +0400
commit4d3b77ed8e2498c5fd4eb6eb35a6dd1a08d6f7d1 (patch)
treee0b6bed85cc82a987f839ef97042c404a8515053
parentd4ddedb4d3c7870f46d1ffc74ddde8ebd3ec9562 (diff)
Move the user logo from themes folder to misc
-rw-r--r--.gitignore5
-rw-r--r--core/Piwik.php2
-rw-r--r--lang/de.php2
-rw-r--r--lang/en.php2
-rw-r--r--lang/hu.php2
-rw-r--r--lang/nl.php2
-rwxr-xr-xmisc/user/.gitkeep0
-rw-r--r--plugins/API/API.php14
-rw-r--r--plugins/CoreAdminHome/Controller.php10
-rw-r--r--plugins/CoreAdminHome/templates/generalSettings.twig4
-rw-r--r--tests/PHPUnit/Core/AssetManagerTest.php6
-rw-r--r--tests/webtest/testcases/modules/macros.xml1
12 files changed, 23 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore
index 1836509077..3bc24da322 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,8 +5,9 @@ documentation
favicon.ico
logs
plugins/*.zip
-themes/logo-header.png
-themes/logo.png
+misc/user/logo-header.png
+misc/user/logo.png
+misc/user/logo.svg
piwik-min.js
robots.txt
tmp
diff --git a/core/Piwik.php b/core/Piwik.php
index 93e4ad0afb..27ce522942 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -547,7 +547,7 @@ class Piwik
'/js' => $allowAny,
'/libs' => $denyDirectPhp . $allowStaticAssets,
'/plugins' => $denyDirectPhp . $allowStaticAssets,
- '/themes' => $denyDirectPhp . $allowStaticAssets,
+ '/misc/user' => $denyDirectPhp . $allowStaticAssets,
);
foreach ($directoriesToProtect as $directoryToProtect => $content) {
Piwik_Common::createHtAccess(PIWIK_INCLUDE_PATH . $directoryToProtect, $overwrite = true, $content);
diff --git a/lang/de.php b/lang/de.php
index 06b023f946..00ad85b51b 100644
--- a/lang/de.php
+++ b/lang/de.php
@@ -473,7 +473,7 @@ $translations = array(
'CoreAdminHome_UseCustomLogo' => 'Eigenes Logo verwenden',
'CoreAdminHome_LogoUpload' => 'Wählen Sie ein Logo für den Upload',
'CoreAdminHome_LogoUploadDescription' => 'Es werden Logos in %s Formaten, ohne Transparenz und mit einer minimalen Höhe von %s Pixeln unterstützt.',
- 'CoreAdminHome_LogoNotWriteable' => 'Um ein eigenes Logo in Piwik verwenden zu können, wird Schreibzugriff auf die Logo Dateien im themes Ordner benötigt: %s',
+ 'CoreAdminHome_LogoNotWriteable' => 'Um ein eigenes Logo in Piwik verwenden zu können, wird Schreibzugriff auf die Logo Dateien im "misc" Ordner benötigt: %s',
'CoreAdminHome_TrustedHostSettings' => 'Vertrauter Piwik Hostname',
'CoreAdminHome_TrustedHostConfirm' => 'Wollen Sie wirklich den Vertrauten Piwik Hostnamen ändern?',
'CoreAdminHome_PiwikIsInstalledAt' => 'Piwik ist installiert unter',
diff --git a/lang/en.php b/lang/en.php
index 79ef8aa44a..ac95e91499 100644
--- a/lang/en.php
+++ b/lang/en.php
@@ -474,7 +474,7 @@ $translations = array(
'CoreAdminHome_UseCustomLogo' => 'Use a custom logo',
'CoreAdminHome_LogoUpload' => 'Select a Logo to upload',
'CoreAdminHome_LogoUploadDescription' => 'Please upload a file in %s formats, no transparent background, with a minimum height of %s pixels.',
- 'CoreAdminHome_LogoNotWriteable' => 'To use a custom logo Piwik requires write access to the logo files within the themes directory: %s',
+ 'CoreAdminHome_LogoNotWriteable' => 'To use a custom logo Piwik requires write access to the logo files within the "misc" directory: %s',
'CoreAdminHome_TrustedHostSettings' => 'Trusted Piwik Hostname',
'CoreAdminHome_TrustedHostConfirm' => 'Are you sure you want to change the trusted Piwik hostname?',
'CoreAdminHome_PiwikIsInstalledAt' => 'Piwik is installed at',
diff --git a/lang/hu.php b/lang/hu.php
index 4db2bb56b5..fafd175d17 100644
--- a/lang/hu.php
+++ b/lang/hu.php
@@ -351,7 +351,7 @@ $translations = array(
'CoreAdminHome_CustomLogoFeedbackInfo' => 'A Piwik logó konfigurálása esetén érdekes lehet a felső menüben található %s link eltávolítása is. Ehhez a %sBővítmények%s oldalon ki kell kapcsolni a Feedback bővítményt.',
'CoreAdminHome_LogoUpload' => 'Feltölteni kívánt logó:',
'CoreAdminHome_LogoUploadDescription' => 'Kérlek %s formátumú, nem átlátszó hátterű és legfeljebb %s pixel magas képet tölts fel.',
- 'CoreAdminHome_LogoNotWriteable' => 'Egyéni logó használatához a Piwiknek írási jogra van szüksége a \'themes\' mappában a logó fájlokhoz: %s',
+ 'CoreAdminHome_LogoNotWriteable' => 'Egyéni logó használatához a Piwiknek írási jogra van szüksége a "misc" mappában a logó fájlokhoz: %s',
'CoreHome_PluginDescription' => 'Webanalitikai jelentések struktúrája',
'CoreHome_WebAnalyticsReports' => 'Webanalitikai jelentések',
'CoreHome_NoPrivilegesAskPiwikAdmin' => '\'%s\' felhasználóként léptél be, de úgy tűnik, hogy nem rendelkezel semmilyen jogosultsággal. %s Kérd meg a Piwik adminisztrátorod (kattints ide egy email írásához)%s, hogy adjon számodra \'megtekintési\' jogosultságot a webhelyhez.',
diff --git a/lang/nl.php b/lang/nl.php
index 74a3fc04ca..0d7794f557 100644
--- a/lang/nl.php
+++ b/lang/nl.php
@@ -448,7 +448,7 @@ $translations = array(
'CoreAdminHome_UseCustomLogo' => 'Gebruik een aangepast logo',
'CoreAdminHome_LogoUpload' => 'Selecteer een logo om te uploaden',
'CoreAdminHome_LogoUploadDescription' => 'Upload een bestand in de formaten %s, geen transparante achtergrond, met een minimum hoogte van %s pixels.',
- 'CoreAdminHome_LogoNotWriteable' => 'Voor het gebruik van een aangepast logo heeft Piwik schrijfrechten nodig in de map met de logo-bestanden in de themes map: %s',
+ 'CoreAdminHome_LogoNotWriteable' => 'Voor het gebruik van een aangepast logo heeft Piwik schrijfrechten nodig in de map met de logo-bestanden in de "misc" map: %s',
'CoreAdminHome_TrustedHostSettings' => 'Toegestane Piwik hostnaam',
'CoreAdminHome_PiwikIsInstalledAt' => 'Piwik is geïnstalleerd in',
'CoreAdminHome_JavaScriptTracking' => 'JavaScript Tracking',
diff --git a/misc/user/.gitkeep b/misc/user/.gitkeep
new file mode 100755
index 0000000000..e69de29bb2
--- /dev/null
+++ b/misc/user/.gitkeep
diff --git a/plugins/API/API.php b/plugins/API/API.php
index df4e74e831..d52ae41f0a 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -446,9 +446,9 @@ class Piwik_API_API
{
$logo = 'plugins/Zeitgeist/images/logo.png';
if (Piwik_Config::getInstance()->branding['use_custom_logo'] == 1
- && file_exists(Piwik_Common::getPathToPiwikRoot() . '/themes/logo.png')
+ && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.png')
) {
- $logo = 'themes/logo.png';
+ $logo = 'misc/user/logo.png';
}
if (!$pathOnly) {
return Piwik::getPiwikUrl() . $logo;
@@ -466,9 +466,9 @@ class Piwik_API_API
{
$logo = 'plugins/Zeitgeist/images/logo-header.png';
if (Piwik_Config::getInstance()->branding['use_custom_logo'] == 1
- && file_exists(Piwik_Common::getPathToPiwikRoot() . '/themes/logo-header.png')
+ && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo-header.png')
) {
- $logo = 'themes/logo-header.png';
+ $logo = 'misc/user/logo-header.png';
}
if (!$pathOnly) {
return Piwik::getPiwikUrl() . $logo;
@@ -487,9 +487,9 @@ class Piwik_API_API
{
$logo = 'plugins/Zeitgeist/images/logo.svg';
if (Piwik_Config::getInstance()->branding['use_custom_logo'] == 1
- && file_exists(Piwik_Common::getPathToPiwikRoot() . '/themes/logo.svg')
+ && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
) {
- $logo = 'themes/logo.svg';
+ $logo = 'misc/user/logo.svg';
}
if (!$pathOnly) {
return Piwik::getPiwikUrl() . $logo;
@@ -508,7 +508,7 @@ class Piwik_API_API
/* We always have our application logo */
return true;
} else if (Piwik_Config::getInstance()->branding['use_custom_logo'] == 1
- && file_exists(Piwik_Common::getPathToPiwikRoot() . '/themes/logo.svg')
+ && file_exists(Piwik_Common::getPathToPiwikRoot() . '/misc/user/logo.svg')
) {
return true;
}
diff --git a/plugins/CoreAdminHome/Controller.php b/plugins/CoreAdminHome/Controller.php
index cb914716cf..880745f68b 100644
--- a/plugins/CoreAdminHome/Controller.php
+++ b/plugins/CoreAdminHome/Controller.php
@@ -54,8 +54,10 @@ class Piwik_CoreAdminHome_Controller extends Piwik_Controller_Admin
$view->branding = $config->branding;
- $directoryWritable = is_writable(PIWIK_DOCUMENT_ROOT . '/themes/');
- $logoFilesWriteable = is_writeable(PIWIK_DOCUMENT_ROOT . '/themes/logo.png') && is_writeable(PIWIK_DOCUMENT_ROOT . '/themes/logo-header.png');
+ $directoryWritable = is_writable(PIWIK_DOCUMENT_ROOT . '/misc/user/');
+ $logoFilesWriteable = is_writeable(PIWIK_DOCUMENT_ROOT . '/misc/user/logo.png')
+ && is_writeable(PIWIK_DOCUMENT_ROOT . '/misc/user/logo.svg')
+ && is_writeable(PIWIK_DOCUMENT_ROOT . '/misc/user/logo-header.png');;
$view->logosWriteable = ($logoFilesWriteable || $directoryWritable) && ini_get('file_uploads') == 1;
$trustedHosts = array();
@@ -224,8 +226,8 @@ class Piwik_CoreAdminHome_Controller extends Piwik_Controller_Admin
imagecopyresized($logo, $image, 0, 0, 0, 0, $widthExpected, self::LOGO_HEIGHT, $width, $height);
imagecopyresized($logoSmall, $image, 0, 0, 0, 0, $smallWidthExpected, self::LOGO_SMALL_HEIGHT, $width, $height);
- imagepng($logo, PIWIK_DOCUMENT_ROOT . '/themes/logo.png', 3);
- imagepng($logoSmall, PIWIK_DOCUMENT_ROOT . '/themes/logo-header.png', 3);
+ imagepng($logo, PIWIK_DOCUMENT_ROOT . '/misc/user/logo.png', 3);
+ imagepng($logoSmall, PIWIK_DOCUMENT_ROOT . '/misc/user/logo-header.png', 3);
echo '1';
return;
}
diff --git a/plugins/CoreAdminHome/templates/generalSettings.twig b/plugins/CoreAdminHome/templates/generalSettings.twig
index 430dc195c9..cbc8d1743a 100644
--- a/plugins/CoreAdminHome/templates/generalSettings.twig
+++ b/plugins/CoreAdminHome/templates/generalSettings.twig
@@ -229,11 +229,11 @@
</td>
<td style='width:200px'>
<input name="customLogo" type="file" id="customLogo"/>
- <img src="themes/logo.png?r={math equation='rand(10,1000)'}" id="currentLogo" height="150"/>
+ <img src="misc/user/logo.png?r={math equation='rand(10,1000)'}" id="currentLogo" height="150"/>
</td>
{% else %}
<td>
- <span class="ajaxSuccess">{{ 'CoreAdminHome_LogoNotWriteable'|translate("<ul style='list-style: disc inside;'><li>/themes/</li><li>/themes/logo.png</li><li>/themes/logo-header.png</li></ul>")|raw }}</span>
+ <span class="ajaxSuccess">{{ 'CoreAdminHome_LogoNotWriteable'|translate("<ul style='list-style: disc inside;'><li>/misc/user/</li><li>/misc/user/logo.png</li><li>/misc/user/logo-header.png</li></ul>")|raw }}</span>
</td>
{% endif %}
</tr>
diff --git a/tests/PHPUnit/Core/AssetManagerTest.php b/tests/PHPUnit/Core/AssetManagerTest.php
index 826894fa3f..24cd73244b 100644
--- a/tests/PHPUnit/Core/AssetManagerTest.php
+++ b/tests/PHPUnit/Core/AssetManagerTest.php
@@ -14,8 +14,6 @@ class AssetManagerTest extends PHPUnit_Framework_TestCase
public function testPrioritySort()
{
$buckets = array(
- 'themes/base.css',
- 'themes/',
'libs/base.css',
'libs/',
'plugins/',
@@ -24,18 +22,14 @@ class AssetManagerTest extends PHPUnit_Framework_TestCase
$data = array(
'plugins/xyz',
'plugins/abc',
- 'themes/base.css',
'libs/xyz',
'libs/base.css',
'libs/abc',
'plugins/xyz',
- 'themes/test',
'libs/xyz',
);
$expected = array(
- 'themes/base.css',
- 'themes/test',
'libs/base.css',
'libs/xyz',
'libs/abc',
diff --git a/tests/webtest/testcases/modules/macros.xml b/tests/webtest/testcases/modules/macros.xml
index 9236d7825b..ceeef91101 100644
--- a/tests/webtest/testcases/modules/macros.xml
+++ b/tests/webtest/testcases/modules/macros.xml
@@ -53,7 +53,6 @@
<fileset dir="${basedir}/../.." includes="libs/**" />
<fileset dir="${basedir}/../.." includes="misc/**" />
<fileset dir="${basedir}/../.." includes="plugins/**" />
- <fileset dir="${basedir}/../.." includes="themes/**" />
<fileset dir="${basedir}/../.." includes="tmp/**" />
<fileset dir="${basedir}/../..">
<include name="*" />