From 067ab6695cf3973115482dbdba94569febdbb54d Mon Sep 17 00:00:00 2001 From: Matthieu Aubry Date: Mon, 19 Dec 2016 11:20:47 +1300 Subject: Fix API reference page is partly broken (#11033) * refs #11023 better piwik.js json compatibility * fix some tests * fix json lint tests * Display titles correctly in API reference doc * Slightly better code --- plugins/API/Controller.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/API/Controller.php b/plugins/API/Controller.php index e7ef5efd36..2d107182cb 100644 --- a/plugins/API/Controller.php +++ b/plugins/API/Controller.php @@ -49,7 +49,8 @@ class Controller extends \Piwik\Plugin\Controller public function listAllMethods() { $ApiDocumentation = new DocumentationGenerator(); - return $ApiDocumentation->getAllInterfaceString($outputExampleUrls = true, $prefixUrls = Common::getRequestVar('prefixUrl', '')); + $prefixUrls = Common::getRequestVar('prefixUrl', 'http://demo.piwik.org/', 'string'); + return $ApiDocumentation->getApiDocumentationAsStringForDeveloperReference($outputExampleUrls = true, $prefixUrls); } public function listAllAPI() @@ -59,7 +60,7 @@ class Controller extends \Piwik\Plugin\Controller $ApiDocumentation = new DocumentationGenerator(); $view->countLoadedAPI = Proxy::getInstance()->getCountRegisteredClasses(); - $view->list_api_methods_with_links = $ApiDocumentation->getAllInterfaceString(); + $view->list_api_methods_with_links = $ApiDocumentation->getApiDocumentationAsString(); return $view->render(); } -- cgit v1.2.3 From c5de13dd831e4e96992d0873fcaa33b289bd216d Mon Sep 17 00:00:00 2001 From: Matthieu Aubry Date: Mon, 19 Dec 2016 13:27:04 +1300 Subject: Fix Uncaught TypeError: this.jsViewDataTable.indexOf is not a function (#11035) * refs #11023 better piwik.js json compatibility * fix some tests * fix json lint tests * Display titles correctly in API reference doc * Slightly better code * Prevent error reported in #11028 * Per Thomas feedback * fix --- plugins/CoreHome/javascripts/dataTable.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index e364251f9b..763674585d 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -509,7 +509,10 @@ $.extend(DataTable.prototype, UIControl.prototype, { setMaxTableWidthIfNeeded(domElem, 1200); - var isTableVisualization = this.jsViewDataTable && this.jsViewDataTable.indexOf('table') !== -1; + var isTableVisualization = this.jsViewDataTable + && typeof this.jsViewDataTable === 'string' + && typeof this.jsViewDataTable.indexOf === 'function' + && this.jsViewDataTable.indexOf('table') !== -1; if (isTableVisualization) { // we do this only for html tables -- cgit v1.2.3 From 7bf3cc23631ebda7861d5122ea6edff7ecd787f3 Mon Sep 17 00:00:00 2001 From: mattab Date: Mon, 19 Dec 2016 14:05:01 +1300 Subject: fix --- plugins/CoreUpdater/lang/en.json | 2 ++ plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig | 3 +++ 2 files changed, 5 insertions(+) (limited to 'plugins') diff --git a/plugins/CoreUpdater/lang/en.json b/plugins/CoreUpdater/lang/en.json index c75736c204..32d1369b21 100644 --- a/plugins/CoreUpdater/lang/en.json +++ b/plugins/CoreUpdater/lang/en.json @@ -34,6 +34,8 @@ "ListOfSqlQueriesFYI": "FYI: these are the SQL queries that will be executed to upgrade your database to Piwik %s", "MajorUpdateWarning1": "This is a major update! It will take longer than usual.", "MajorUpdateWarning2": "The following advice is especially important for large installations.", + "NeedHelpUpgrading": "Need help upgrading Piwik?", + "NeedHelpUpgradingText": "If you need support to upgrade your Piwik, the creators of Piwik are here to help you make the Piwik upgrade a success and provide all instructions, best practises and ongoing support. %sContact the Piwik experts to get started upgrading your Piwik safely.%s", "NoteForLargePiwikInstances": "Important notes for large Piwik installations", "NotificationClickToUpdatePlugins": "Click here to update your plugins now:", "NotificationClickToUpdateThemes": "Click here to update your themes now:", diff --git a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig index e5899117ce..3d1a8a5357 100644 --- a/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig +++ b/plugins/CoreUpdater/templates/runUpdaterAndExit_welcome.twig @@ -60,6 +60,9 @@ {% endif %} +

{{ 'CoreUpdater_NeedHelpUpgrading'|translate }}

+

{{ 'CoreUpdater_NeedHelpUpgradingText'|translate("", "")|raw }}

+

{{ 'CoreUpdater_ReadyToGo'|translate }}

{{ 'CoreUpdater_TheUpgradeProcessMayTakeAWhilePleaseBePatient'|translate }}

{% endif %} -- cgit v1.2.3 From 969865185016ec8a5dde31a2a28c97aaeaaae234 Mon Sep 17 00:00:00 2001 From: mattab Date: Mon, 19 Dec 2016 14:35:18 +1300 Subject: integration test --- plugins/CoreUpdater/lang/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/CoreUpdater/lang/en.json b/plugins/CoreUpdater/lang/en.json index 32d1369b21..cd517e0d31 100644 --- a/plugins/CoreUpdater/lang/en.json +++ b/plugins/CoreUpdater/lang/en.json @@ -35,7 +35,7 @@ "MajorUpdateWarning1": "This is a major update! It will take longer than usual.", "MajorUpdateWarning2": "The following advice is especially important for large installations.", "NeedHelpUpgrading": "Need help upgrading Piwik?", - "NeedHelpUpgradingText": "If you need support to upgrade your Piwik, the creators of Piwik are here to help you make the Piwik upgrade a success and provide all instructions, best practises and ongoing support. %sContact the Piwik experts to get started upgrading your Piwik safely.%s", + "NeedHelpUpgradingText": "If you need support to upgrade your Piwik, the creators of Piwik are here to help you make the Piwik upgrade a success and provide all instructions, best practises and ongoing support. %1$sContact the Piwik experts to get started upgrading your Piwik safely.%2$s", "NoteForLargePiwikInstances": "Important notes for large Piwik installations", "NotificationClickToUpdatePlugins": "Click here to update your plugins now:", "NotificationClickToUpdateThemes": "Click here to update your themes now:", -- cgit v1.2.3