diff --git a/LEGALNOTICE b/LEGALNOTICE index 72af0a8bb974f0db272e1b3becdb06a866513f54..651be5c4471c2d0d79a86294ebed5c15c66df91a 100644 --- a/LEGALNOTICE +++ b/LEGALNOTICE @@ -178,9 +178,9 @@ THIRD-PARTY COMPONENTS AND LIBRARIES Link: http://www.getrank.org/free-pagerank-script License: GPL - Name: Smarty - Link: http://smarty.net/ - License: LGPL v2.1 or later + Name: Twig + Link: http://twig.sensiolabs.org/ + License: BSD Name: TCPDF Link: http://sourceforge.net/projects/tcpdf diff --git a/config/global.ini.php b/config/global.ini.php index 17b86d0df5b2d549512708c3747ae54d6ef2c727..3903439a3e5213942f647b744297089be93830dd 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -494,21 +494,6 @@ logger_file_path = tmp/logs ; disabled by default as it can cause serious overhead and should only be used wisely ;logger_api_call[] = file -[smarty] -; the list of directories in which to look for templates -template_dir[] = plugins -template_dir[] = themes/default -template_dir[] = themes - -plugins_dir[] = core/SmartyPlugins -plugins_dir[] = libs/Smarty/plugins - -compile_dir = tmp/templates_c -cache_dir = tmp/cache - -; error reporting inside Smarty -error_reporting = E_ALL|E_NOTICE - [Plugins] Plugins[] = CorePluginsAdmin Plugins[] = CoreAdminHome diff --git a/core/FrontController.php b/core/FrontController.php index c09a6eeb202d07072544160fcc45cb1ad5711283..f9b6e947c95c6f18eafff3c93a9037aedaff396c 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -272,7 +272,9 @@ class Piwik_FrontController Piwik_PostEvent('FrontController.dispatchCoreAndPluginUpdatesScreen'); Piwik_PluginsManager::getInstance()->installLoadedPlugins(); - Piwik::install(); + + +// Piwik_Common::mkdir(PIWIK_USER_PATH . '/' . Piwik_Config::getInstance()->smarty['compile_dir']); // ensure the current Piwik URL is known for later use if (method_exists('Piwik', 'getPiwikUrl')) { diff --git a/core/Piwik.php b/core/Piwik.php index 95e953bd09fe7589e9e00a5d929e96fcfd6ed9ab..62a7bbcb2930796b3538c576d977f7cdd8c03220 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -105,14 +105,6 @@ class Piwik return $class; } - /** - * Installation helper - */ - static public function install() - { - Piwik_Common::mkdir(PIWIK_USER_PATH . '/' . Piwik_Config::getInstance()->smarty['compile_dir']); - } - /** * Uninstallation helper */ diff --git a/core/Twig.php b/core/Twig.php index c5c8cdc2cdd97a9315f758b854703d785189e630..acd806a010d31c8964fbe5c8c0cea2c75561c1be 100644 --- a/core/Twig.php +++ b/core/Twig.php @@ -68,7 +68,7 @@ class Piwik_Twig { $includeAssetsFunction = new Twig_SimpleFunction('includeAssets', function ($params) { if (!isset($params['type'])) { - throw new Exception("The smarty function includeAssets needs a 'type' parameter."); + throw new Exception("The function includeAssets needs a 'type' parameter."); } $assetType = strtolower($params['type']); @@ -173,7 +173,7 @@ class Piwik_Twig { $moneyFilter = new Twig_SimpleFilter('money', function ($amount) { if (func_num_args() != 2) { - throw new Exception('the smarty modifier money expects one parameter: the idSite.'); + throw new Exception('the money modifier expects one parameter: the idSite.'); } $idSite = func_get_args(); $idSite = $idSite[1]; diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php index 8ae368eb3c5d31eed2e9d22a8b12ea9d12447c64..7a1cd4c156889dd2d465cedf30ede5076446e084 100644 --- a/core/ViewDataTable.php +++ b/core/ViewDataTable.php @@ -66,7 +66,7 @@ abstract class Piwik_ViewDataTable protected $variablesDefault = array(); /** - * Array of properties that are available in the view (from smarty) + * Array of properties that are available in the view * Used to store UI properties, eg. "show_footer", "show_search", etc. * * @var array diff --git a/core/ViewDataTable/HtmlTable/Goals.php b/core/ViewDataTable/HtmlTable/Goals.php index 882a044a8f8b77487cbc4f3fc39b52a9aa96fb09..2ceb8e88c3accb41881a7c839d947f4f4544698b 100644 --- a/core/ViewDataTable/HtmlTable/Goals.php +++ b/core/ViewDataTable/HtmlTable/Goals.php @@ -138,7 +138,6 @@ class Piwik_ViewDataTable_HtmlTable_Goals extends Piwik_ViewDataTable_HtmlTable foreach ($goals as $goal) { $idgoal = $goal['idgoal']; - // Columns names are escaped in smarty via | escape:'html' $goal['name'] = Piwik_Common::unsanitizeInputValue($goal['name']); if ($this->processOnlyIdGoal > Piwik_DataTable_Filter_AddColumnsProcessedMetricsGoal::GOALS_FULL_TABLE diff --git a/lang/en.php b/lang/en.php index 263596591b1eae324f3c4d828ec7ac1145906311..5c675d3fe522b736ac108069110cf5005c66accb 100644 --- a/lang/en.php +++ b/lang/en.php @@ -556,7 +556,7 @@ If you use the latest beta and you find a bug or have a suggestion, please %ssee 'CoreHome_DonateCall3' => 'If you feel that Piwik has added significant value to your business or endeavour, %1$splease consider donating!%2$s', 'CoreHome_HowMuchIsPiwikWorth' => 'How much is Piwik worth to you?', 'CoreHome_SupportPiwik' => 'Support Piwik!', - 'CoreHome_OnlyForAdmin' => 'This is only displayed to you, the superuser.', + 'CoreHome_OnlyForAdmin' => 'This widget is only displayed to you, the superuser.', 'CoreHome_DonateFormInstructions' => 'Click on the slider to select an amount, then click subscribe to donate.', 'CoreHome_SubscribeAndBecomePiwikSupporter' => 'Proceed to a secure credit card payment page (Paypal) to become a Piwik Supporter!', 'CoreHome_CheckPiwikOut' => 'Check Piwik out!', diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php index 2367abf3dec34eb9db3a159059aae77952fc15ee..a8827fd48a670380be1223793010ae549d6b8314 100644 --- a/plugins/Installation/Controller.php +++ b/plugins/Installation/Controller.php @@ -426,7 +426,6 @@ class Piwik_Installation_Controller extends Piwik_Controller_Admin $viewTrackingHelp->idSite = $idSite; $viewTrackingHelp->piwikUrl = Piwik_Url::getCurrentUrlWithoutFileName(); - // Assign the html output to a smarty variable $view->trackingHelp = $viewTrackingHelp->render(); $view->displaySiteName = $siteName; diff --git a/plugins/Installation/templates/displayJavascriptCode.twig b/plugins/Installation/templates/displayJavascriptCode.twig index dede2e5a3e6eab0705fc5c0275a3213bcf8a0b09..1940641dd32f93ab342b98f233e98db85b8bee36 100644 --- a/plugins/Installation/templates/displayJavascriptCode.twig +++ b/plugins/Installation/templates/displayJavascriptCode.twig @@ -8,7 +8,7 @@ </span> {% endif %} -{{ trackingHelp }} +{{ trackingHelp|raw }} <br/><br/> <h2>{{ 'Installation_LargePiwikInstances'|translate }}</h2> {{ 'Installation_JsTagArchivingHelp1'|translate('<a target="_blank" href="http://piwik.org/docs/setup-auto-archiving/">','</a>')|raw }} diff --git a/plugins/SitesManager/templates/displayJavascriptCode.twig b/plugins/SitesManager/templates/displayJavascriptCode.twig index 1d19de45f1ce89019c5466366f5cdc46ff699ad6..34ef90e10e5b16387918ad97f15d17d7b98b19e2 100644 --- a/plugins/SitesManager/templates/displayJavascriptCode.twig +++ b/plugins/SitesManager/templates/displayJavascriptCode.twig @@ -3,5 +3,7 @@ {% block content %} {{ loadJavascriptTranslations(['SitesManager']) }} +{% raw %} {% include "@SitesManager/_displayJavascriptCode.twig" %} +{% endraw %} {% endblock %} \ No newline at end of file