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:
authormattab <matthieu.aubry@gmail.com>2013-06-26 10:48:07 +0400
committermattab <matthieu.aubry@gmail.com>2013-06-27 03:56:26 +0400
commitb814322485f8808c85bd98c0902d3bd8b34783de (patch)
tree328c9e815c10b7419dc5743a36f8a537a17a2274
parent2577abf660f4ddbd285471b9bbe48ed495729631 (diff)
Removing Smarty strings from codebase, fixing install
Adding twig to LEGALNOTICE Refs #4019
-rw-r--r--LEGALNOTICE6
-rw-r--r--config/global.ini.php15
-rw-r--r--core/FrontController.php4
-rw-r--r--core/Piwik.php8
-rw-r--r--core/Twig.php4
-rw-r--r--core/ViewDataTable.php2
-rw-r--r--core/ViewDataTable/HtmlTable/Goals.php1
-rw-r--r--lang/en.php2
-rw-r--r--plugins/Installation/Controller.php1
-rw-r--r--plugins/Installation/templates/displayJavascriptCode.twig2
-rw-r--r--plugins/SitesManager/templates/displayJavascriptCode.twig2
11 files changed, 13 insertions, 34 deletions
diff --git a/LEGALNOTICE b/LEGALNOTICE
index 72af0a8bb9..651be5c447 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 17b86d0df5..3903439a3e 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 c09a6eeb20..f9b6e947c9 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 95e953bd09..62a7bbcb29 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -106,14 +106,6 @@ class Piwik
}
/**
- * Installation helper
- */
- static public function install()
- {
- Piwik_Common::mkdir(PIWIK_USER_PATH . '/' . Piwik_Config::getInstance()->smarty['compile_dir']);
- }
-
- /**
* Uninstallation helper
*/
static public function uninstall()
diff --git a/core/Twig.php b/core/Twig.php
index c5c8cdc2cd..acd806a010 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 8ae368eb3c..7a1cd4c156 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 882a044a8f..2ceb8e88c3 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 263596591b..5c675d3fe5 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 2367abf3de..a8827fd48a 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 dede2e5a3e..1940641dd3 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 1d19de45f1..34ef90e10e 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