diff --git a/core/Piwik.php b/core/Piwik.php index 62a7bbcb2930796b3538c576d977f7cdd8c03220..d9f2ba99136c6f5d9b38193037231d0d14be0364 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -285,7 +285,7 @@ class Piwik */ static public function copy($source, $dest, $excludePhp = false) { - static $phpExtensions = array('php', 'tpl'); + static $phpExtensions = array('php', 'tpl', 'twig'); if ($excludePhp) { $path_parts = pathinfo($source); @@ -547,7 +547,7 @@ class Piwik // more selective allow/deny filters $allowAny = "<Files \"*\">\n" . $allow . "Satisfy any\n</Files>\n"; $allowStaticAssets = "<Files ~ \"\\.(test\.php|gif|ico|jpg|png|svg|js|css|swf)$\">\n" . $allow . "Satisfy any\n</Files>\n"; - $denyDirectPhp = "<Files ~ \"\\.(php|php4|php5|inc|tpl|in)$\">\n" . $deny . "</Files>\n"; + $denyDirectPhp = "<Files ~ \"\\.(php|php4|php5|inc|tpl|in|twig)$\">\n" . $deny . "</Files>\n"; $directoriesToProtect = array( '/js' => $allowAny, @@ -582,6 +582,7 @@ class Piwik </hiddenSegments> <fileExtensions> <add fileExtension=".tpl" allowed="false" /> + <add fileExtension=".twig" allowed="false" /> <add fileExtension=".php4" allowed="false" /> <add fileExtension=".php5" allowed="false" /> <add fileExtension=".inc" allowed="false" /> diff --git a/core/Version.php b/core/Version.php index 53ca79f9d2e16e0434d8d8a77012ae9ebfebdde0..0b515ad28fa4f245857490ec32023e6689f500c0 100644 --- a/core/Version.php +++ b/core/Version.php @@ -20,5 +20,5 @@ final class Piwik_Version * Current Piwik version * @var string */ - const VERSION = '1.12'; + const VERSION = '1.11'; } diff --git a/core/View.php b/core/View.php index 0f3c4c0f7ed0831ed82605a676bcf67412a33fc1..5e2af830c58b969a1f378d4f2e15666d630499c0 100644 --- a/core/View.php +++ b/core/View.php @@ -236,6 +236,7 @@ class Piwik_View implements Piwik_View_Interface } $path = basename(dirname($bt[0]['file'])); + // TODO fixmea if (Piwik_Common::isPhpCliMode()) { $templateFile = $path . '/templates/cli_' . $templateName . '.tpl'; if (file_exists(PIWIK_INCLUDE_PATH . '/plugins/' . $templateFile)) { diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index 7a1cd4c156889dd2d465cedf30ede5076446e084..087819db45e2c6170f1f562ddb3f1a6e4f385bc1 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -899,7 +899,7 @@ abstract class Piwik_ViewDataTable } /** - * When this method is called, the output will not contain the template datatable_footer.tpl + * When this method is called, the output will not include the template datatable_footer */ public function disableFooter() { diff --git a/core/ViewDataTable/Cloud.php b/core/ViewDataTable/Cloud.php index 517a326a093707526677cc35fc17c4d6bdb521c5..a0f4d48c564960d5cd124cf6a51450a2f8bd7f31 100644 --- a/core/ViewDataTable/Cloud.php +++ b/core/ViewDataTable/Cloud.php @@ -11,7 +11,7 @@ /** * Reads the requested DataTable from the API, and prepares the data to give - * to Piwik_Visualization_Cloud that will display the tag cloud (via the template cloud.tpl). + * to Piwik_Visualization_Cloud that will display the tag cloud (via the template _dataTable_cloud.twig). * * @package Piwik * @subpackage Piwik_ViewDataTable diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js index 34352de732bb936d244e91f2f7181f35294e498b..868623b8c57694da775a835462c8734e5b39133c 100644 --- a/plugins/CoreHome/javascripts/broadcast.js +++ b/plugins/CoreHome/javascripts/broadcast.js @@ -9,14 +9,6 @@ * broadcast object is to help maintain a hash for link clicks and ajax calls * so we can have back button and refresh button working. * - * Other file that currently depending on this are: - * calendar.js - * period_select.tpl - * sites_selections.tpl - * menu.js, ...etc - * - * !! Load this once and only once. !! - * * @type {object} */ var broadcast = { @@ -229,12 +221,6 @@ var broadcast = { * Expecting: * str = "param1=newVal1¶m2=newVal2"; * - * Currently being use by: - * - * handlePeriodClick, - * calendar.js, - * sites_selection.tpl - * * NOTE: This method will refresh the page with new values. * * @param {string} str url with parameters to be updated diff --git a/plugins/ExamplePlugin/Controller.php b/plugins/ExamplePlugin/Controller.php index 4ca9f663c38a34ae45608f01e91e2582edbd0e9a..ca0f03edca1b7756160a003c1af492870ec75465 100644 --- a/plugins/ExamplePlugin/Controller.php +++ b/plugins/ExamplePlugin/Controller.php @@ -48,7 +48,7 @@ class Piwik_ExamplePlugin_Controller extends Piwik_Controller /** * this widgets shows how to make a remote API request to piwik.org - * you find the main JS code in templates/piwikDownloadCount.tpl + * you find the main JS code in templates/piwikDownloads.twig */ public function piwikDownloads() { diff --git a/plugins/MobileMessaging/ReportRenderer/Sms.php b/plugins/MobileMessaging/ReportRenderer/Sms.php index ba794e3b0ffe4c1b5a2339989db43cbcd8687f9b..2fe2a3d1119145c938e2e514799b9632ccc53382 100644 --- a/plugins/MobileMessaging/ReportRenderer/Sms.php +++ b/plugins/MobileMessaging/ReportRenderer/Sms.php @@ -87,7 +87,7 @@ class Piwik_MobileMessaging_ReportRenderer_Sms extends Piwik_ReportRenderer // evolution metrics formatting : // - remove monetary, percentage and white spaces to shorten SMS content - // (this is also needed to be able to test $value != 0 and see if there is an evolution at all in SMSReport.tpl) + // (this is also needed to be able to test $value != 0 and see if there is an evolution at all in SMSReport.twig) // - adds a plus sign $reportData->filter( 'ColumnCallbackReplace', diff --git a/plugins/Overlay/javascripts/Piwik_Overlay.js b/plugins/Overlay/javascripts/Piwik_Overlay.js index 0caaefe559173f0b6619719ed92b1b32e9e60aaa..e778b9dd8c0cf1bf3d4885ebb762cd4584c3cbf7 100644 --- a/plugins/Overlay/javascripts/Piwik_Overlay.js +++ b/plugins/Overlay/javascripts/Piwik_Overlay.js @@ -139,7 +139,7 @@ var Piwik_Overlay = (function () { return { - /** This method is called when Overlay loads (from index.tpl) */ + /** This method is called when Overlay loads */ init: function (iframeSrc, pIdSite, pPeriod, pDate) { iframeSrcBase = iframeSrc; idSite = pIdSite; diff --git a/plugins/SitesManager/javascripts/SitesManager.js b/plugins/SitesManager/javascripts/SitesManager.js index 8067e5ff214ea66cef4cfbc3aec3554e27a7da0c..a854430732f73bfa75e41ab23f467d2e17a89771 100644 --- a/plugins/SitesManager/javascripts/SitesManager.js +++ b/plugins/SitesManager/javascripts/SitesManager.js @@ -5,7 +5,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -// NOTE: if you cannot find the definition of a variable here, look in SitesManager.tpl +// NOTE: if you cannot find the definition of a variable here, look in index.twig function SitesManager(_timezones, _currencies, _defaultTimezone, _defaultCurrency) { var timezones = _timezones; diff --git a/plugins/UserCountry/Controller.php b/plugins/UserCountry/Controller.php index b2f6d2ec47c3e2113b4e0bfc36a83a53e77e6af9..cf95488cd100469591377b7b8b09f851d1fb753f 100644 --- a/plugins/UserCountry/Controller.php +++ b/plugins/UserCountry/Controller.php @@ -141,7 +141,7 @@ class Piwik_UserCountry_Controller extends Piwik_Controller_Admin } /** - * Sets some variables needed by the updaterSetup.tpl template. + * Sets some variables needed by the _updaterManage.twig template. * * @param Piwik_View $view */ diff --git a/tests/PHPUnit/Core/ReleaseCheckListTest.php b/tests/PHPUnit/Core/ReleaseCheckListTest.php index 442c7fe3decb34365e10cab394888baf954cab17..9542c663c7770d3f7f55b557587439f517f4dc08 100644 --- a/tests/PHPUnit/Core/ReleaseCheckListTest.php +++ b/tests/PHPUnit/Core/ReleaseCheckListTest.php @@ -52,8 +52,8 @@ class ReleaseCheckListTest extends PHPUnit_Framework_TestCase */ public function testTemplatesDontContainDebug() { - $patternFailIfFound = '{debug}'; - $files = Piwik::globr(PIWIK_INCLUDE_PATH . '/plugins', '*.tpl'); + $patternFailIfFound = 'dump('; + $files = Piwik::globr(PIWIK_INCLUDE_PATH . '/plugins', '*.twig'); foreach ($files as $file) { $content = file_get_contents($file); $this->assertFalse(strpos($content, $patternFailIfFound), 'found in ' . $file);