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:
-rw-r--r--CHANGELOG.md4
-rw-r--r--core/API/Request.php6
-rw-r--r--core/Date.php6
-rw-r--r--core/Exception/ErrorException.php1
-rw-r--r--core/Exception/PluginDeactivatedException.php (renamed from core/PluginDeactivatedException.php)2
-rw-r--r--core/FrontController.php3
-rw-r--r--core/Plugin/Manager.php16
-rw-r--r--core/Updates/2.16.5.php (renamed from core/Updates/2.16.3-b3.php)9
-rw-r--r--core/Updates/3.0.0-b1.php7
-rw-r--r--plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php1
-rw-r--r--plugins/Diagnostics/Diagnostic/FileIntegrityCheck.php5
-rw-r--r--plugins/LanguagesManager/Commands/CreatePull.php2
-rw-r--r--plugins/Morpheus/stylesheets/ui/_map.less6
-rw-r--r--plugins/ScheduledReports/templates/_addReport.twig2
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_email_reports_editor.png3
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png4
-rw-r--r--tests/UI/expected-screenshots/ViewDataTableTest_exclude_low_population.png (renamed from tests/UI/expected-screenshots/ViewDataTableTest_4_exclude_low_population.png)0
-rw-r--r--tests/UI/specs/MultiSites_spec.js2
-rw-r--r--tests/UI/specs/UIIntegration_spec.js10
-rw-r--r--tests/UI/specs/ViewDataTable_spec.js17
21 files changed, 68 insertions, 42 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index df60083d19..d956467ac8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -51,7 +51,7 @@ The folder containing expected screenshots was renamed from `expected-ui-screens
* A new methd `Piwik\Menu\MenuAdmin::addMeasurablesItem()` was added.
* The class `Piwik\Plugin\Settings` has been splitted to `Piwik\Settings\Plugin\SystemSettings` and `Piwik\Settings\Plugin\UserSettings`.
* The creation of settings has slightly changed to improve performance. It is now possible to create new settings via the method `$this->makeSetting()` see `Piwik\Plugins\ExampleSettingsPlugin\SystemSettings` for an example.
-* It is no possible to define an introduction text for settings.
+* It is no longer possible to define an introduction text for settings.
* If requesting multipe periods for one report, the keys that define the range are no longer translated. For example before 3.0 an API response may contain: `<result date="From 2010-02-01 to 2010-02-07">` which is now `<result date="2010-02-01,2010-02-07">`.
* The following deprecated events have been removed as mentioned.
* `Tracker.existingVisitInformation` Use [dimensions](http://developer.piwik.org/guides/dimensions) instead of using `Tracker` events.
@@ -106,7 +106,7 @@ Read more about migrating a plugin from Piwik 2.X to Piwik 3 on our [Migration g
### Internal change
* Support for IE8 was dropped. This affects only the Piwik UI, not the Piwik.js Tracker.
-* Required PHP version was changed from 5.3 to 5.5
+* Required PHP version was changed from 5.3 to 5.5.9
* We have updated PhantomJS 1.9 to 2.1.1 for our screenshot tests.
diff --git a/core/API/Request.php b/core/API/Request.php
index 6ddb8333f5..ee14cdca15 100644
--- a/core/API/Request.php
+++ b/core/API/Request.php
@@ -12,13 +12,13 @@ use Exception;
use Piwik\Access;
use Piwik\Common;
use Piwik\DataTable;
+use Piwik\Exception\PluginDeactivatedException;
+use Piwik\Log;
use Piwik\Piwik;
-use Piwik\PluginDeactivatedException;
+use Piwik\Plugin\Manager as PluginManager;
use Piwik\SettingsServer;
use Piwik\Url;
use Piwik\UrlHelper;
-use Piwik\Log;
-use Piwik\Plugin\Manager as PluginManager;
/**
* Dispatches API requests to the appropriate API method.
diff --git a/core/Date.php b/core/Date.php
index 8922ed8ac2..dd2051a1a0 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -258,7 +258,7 @@ class Date
}
/**
- * Converts a timestamp in a from UTC to a timezone.
+ * Converts a timestamp from UTC to a timezone.
*
* @param int $timestamp The UNIX timestamp to adjust.
* @param string $timezone The timezone to adjust to.
@@ -266,6 +266,10 @@ class Date
*/
public static function adjustForTimezone($timestamp, $timezone)
{
+ if (empty($timezone)) {
+ return $timestamp;
+ }
+
// manually adjust for UTC timezones
$utcOffset = self::extractUtcOffset($timezone);
if ($utcOffset !== false) {
diff --git a/core/Exception/ErrorException.php b/core/Exception/ErrorException.php
index 2de42f2898..77c7ea3287 100644
--- a/core/Exception/ErrorException.php
+++ b/core/Exception/ErrorException.php
@@ -11,7 +11,6 @@ namespace Piwik\Exception;
/**
* ErrorException
*
- * @author Matthieu Napoli <matthieu@mnapoli.fr>
*/
class ErrorException extends \ErrorException
{
diff --git a/core/PluginDeactivatedException.php b/core/Exception/PluginDeactivatedException.php
index fe42667674..d0582840e5 100644
--- a/core/PluginDeactivatedException.php
+++ b/core/Exception/PluginDeactivatedException.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik;
+namespace Piwik\Exception;
/**
* Exception thrown when the requested plugin is not activated in the config file
diff --git a/core/FrontController.php b/core/FrontController.php
index 79e1bc52cd..569f541dfa 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -14,6 +14,7 @@ use Piwik\API\Request;
use Piwik\Container\StaticContainer;
use Piwik\Exception\AuthenticationFailedException;
use Piwik\Exception\DatabaseSchemaIsNewerThanCodebaseException;
+use Piwik\Exception\PluginDeactivatedException;
use Piwik\Http\ControllerResolver;
use Piwik\Http\Router;
use Piwik\Plugins\CoreAdminHome\CustomLogo;
@@ -95,7 +96,7 @@ class FrontController extends Singleton
/**
* Executes the requested plugin controller method.
*
- * @throws Exception|\Piwik\PluginDeactivatedException in case the plugin doesn't exist, the action doesn't exist,
+ * @throws Exception|\Piwik\Exception\PluginDeactivatedException in case the plugin doesn't exist, the action doesn't exist,
* there is not enough permission, etc.
*
* @param string $module The name of the plugin whose controller to execute, eg, `'UserCountryMap'`.
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index c38773380d..9bd2231df8 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -12,26 +12,25 @@ namespace Piwik\Plugin;
use Piwik\Application\Kernel\PluginList;
use Piwik\Cache;
use Piwik\Columns\Dimension;
-use Piwik\Config as PiwikConfig;
use Piwik\Config;
-use Piwik\Db;
-use Piwik\Settings\Storage as SettingsStorage;
+use Piwik\Config as PiwikConfig;
use Piwik\Container\StaticContainer;
+use Piwik\Db;
use Piwik\EventDispatcher;
use Piwik\Filesystem;
use Piwik\Log;
use Piwik\Notification;
use Piwik\Piwik;
use Piwik\Plugin;
-use Piwik\PluginDeactivatedException;
+use Piwik\Plugin\Dimension\ActionDimension;
+use Piwik\Plugin\Dimension\ConversionDimension;
+use Piwik\Plugin\Dimension\VisitDimension;
use Piwik\Session;
+use Piwik\Settings\Storage as SettingsStorage;
use Piwik\Theme;
use Piwik\Tracker;
use Piwik\Translation\Translator;
use Piwik\Updater;
-use Piwik\Plugin\Dimension\ActionDimension;
-use Piwik\Plugin\Dimension\ConversionDimension;
-use Piwik\Plugin\Dimension\VisitDimension;
require_once PIWIK_INCLUDE_PATH . '/core/EventDispatcher.php';
@@ -468,7 +467,8 @@ class Manager
{
$plugins = $this->pluginList->getActivatedPlugins();
if (in_array($pluginName, $plugins)) {
- throw new \Exception("Plugin '$pluginName' already activated.");
+ // plugin is already activated
+ return;
}
if (!$this->isPluginInFilesystem($pluginName)) {
diff --git a/core/Updates/2.16.3-b3.php b/core/Updates/2.16.5.php
index e5f2075c71..c5aef85066 100644
--- a/core/Updates/2.16.3-b3.php
+++ b/core/Updates/2.16.5.php
@@ -16,24 +16,25 @@ use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
/**
- * Update for version 2.16.3-b3.
+ * Update for version 2.16.5.
*
* Update existing scheduled reports to use UTC timezone for hour setting
*/
-class Updates_2_16_3_b3 extends PiwikUpdates
+class Updates_2_16_5 extends PiwikUpdates
{
public function doUpdate(Updater $updater)
{
$model = new ScheduledReportsModel();
$allReports = ScheduledReportsAPI::getInstance()->getReports();
foreach ($allReports as $report) {
- $report['hour'] = $this->adjustTimezoneBySite($report['hour'], $report['idsite']);
- $model->updateReport($report['idreport'], $report);
+ $update = array('hour' => $this->adjustTimezoneBySite($report['hour'], $report['idsite']));
+ $model->updateReport($report['idreport'], $update);
}
}
protected function adjustTimezoneBySite($hour, $idSite)
{
+ $timezone = Site::getTimezoneFor($idSite);
$timeZoneDifference = -ceil(Date::getUtcOffset($timezone)/3600);
return (24 + $hour + $timeZoneDifference) % 24;
}
diff --git a/core/Updates/3.0.0-b1.php b/core/Updates/3.0.0-b1.php
index bb3bf57350..1ac0d4bca8 100644
--- a/core/Updates/3.0.0-b1.php
+++ b/core/Updates/3.0.0-b1.php
@@ -68,11 +68,8 @@ class Updates_3_0_0_b1 extends Updates
ServerFilesGenerator::createHtAccessFiles();
// Renamed plugin ExampleRssWidget -> RssWidget
- try {
- \Piwik\Plugin\Manager::getInstance()->activatePlugin('RssWidget');
- \Piwik\Plugin\Manager::getInstance()->deactivatePlugin('ExampleRssWidget');
- } catch (\Exception $e) {
- }
+ \Piwik\Plugin\Manager::getInstance()->activatePlugin('RssWidget');
+ \Piwik\Plugin\Manager::getInstance()->deactivatePlugin('ExampleRssWidget');
}
private function migratePluginEmailUpdateSetting()
diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php b/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
index ef6ad37ea8..536477abb3 100644
--- a/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
+++ b/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
@@ -26,7 +26,6 @@ class AllColumns extends HtmlTable
public function beforeRender()
{
$this->config->show_extra_columns = true;
- $this->config->show_exclude_low_population = true;
parent::beforeRender();
}
diff --git a/plugins/Diagnostics/Diagnostic/FileIntegrityCheck.php b/plugins/Diagnostics/Diagnostic/FileIntegrityCheck.php
index 454237418d..7393877175 100644
--- a/plugins/Diagnostics/Diagnostic/FileIntegrityCheck.php
+++ b/plugins/Diagnostics/Diagnostic/FileIntegrityCheck.php
@@ -7,6 +7,7 @@
*/
namespace Piwik\Plugins\Diagnostics\Diagnostic;
+use Piwik\Development;
use Piwik\Filechecks;
use Piwik\Translation\Translator;
@@ -29,6 +30,10 @@ class FileIntegrityCheck implements Diagnostic
{
$label = $this->translator->translate('Installation_SystemCheckFileIntegrity');
+ if(Development::isEnabled()) {
+ return array(DiagnosticResult::singleResult($label, DiagnosticResult::STATUS_OK));
+ }
+
$messages = Filechecks::getFileIntegrityInformation();
$ok = array_shift($messages);
diff --git a/plugins/LanguagesManager/Commands/CreatePull.php b/plugins/LanguagesManager/Commands/CreatePull.php
index fca1fc76aa..bfac18566d 100644
--- a/plugins/LanguagesManager/Commands/CreatePull.php
+++ b/plugins/LanguagesManager/Commands/CreatePull.php
@@ -19,7 +19,7 @@ use Symfony\Component\Console\Output\OutputInterface;
*/
class CreatePull extends TranslationBase
{
- const GIT_BASE_BRANCH = '2.x-dev';
+ const GIT_BASE_BRANCH = '3.x-dev';
protected function configure()
{
diff --git a/plugins/Morpheus/stylesheets/ui/_map.less b/plugins/Morpheus/stylesheets/ui/_map.less
index 731f4e369b..19763eaf25 100644
--- a/plugins/Morpheus/stylesheets/ui/_map.less
+++ b/plugins/Morpheus/stylesheets/ui/_map.less
@@ -56,7 +56,9 @@
font-size: 14px;
}
-.uiTest .realTimeMap_datetime {
+.uiTest .realTimeMap_datetime,
+/* remove the message only in the dashboard as the real time map in its own report shows the same message */
+ .uiTest .fullWidgetColumn .showing_visits_of {
visibility: hidden;
}
@@ -70,4 +72,4 @@
.realtime-map[data-name=white-bg] {
color: #808080 !important;
-} \ No newline at end of file
+}
diff --git a/plugins/ScheduledReports/templates/_addReport.twig b/plugins/ScheduledReports/templates/_addReport.twig
index ac7840337a..5201911d3d 100644
--- a/plugins/ScheduledReports/templates/_addReport.twig
+++ b/plugins/ScheduledReports/templates/_addReport.twig
@@ -119,7 +119,7 @@
</div>
<div class='col s12 m6'>
{% endif %}
- <div class='reportCategory'>{{ category }}</div>
+ <h3 class='reportCategory'>{{ category }}</h3>
<ul class='listReports'>
{% for report in reports %}
<li>
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
index 6c61138418..4995fec660 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_settings_general.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:6071466d97c235246f0aa30bfc39eca493015bf88202a2888f5514b1d136dc10
-size 646336
+oid sha256:73ce5d8f801ad0c99d52b3a9585ae9f2fdc16c59897e4b3f98e348567212d505
+size 645576
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_editor.png b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_editor.png
new file mode 100644
index 0000000000..5445d8add4
--- /dev/null
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_editor.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:777b5f322b41877e06779442aa65c29f0357261d7aaa1cb2cbe14d4756bec6d9
+size 364519
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png
index b17ed92bfb..76fb13aa67 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_map.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d91d70cafa5bc4a9b9bc617b78781d982f82e30fb6641afb6681717f0a27d998
-size 107246
+oid sha256:8559ad591604643472d900c6c32f0497b183a70a1ed2aaa56d4b487d6ec61fcc
+size 103279
diff --git a/tests/UI/expected-screenshots/ViewDataTableTest_4_exclude_low_population.png b/tests/UI/expected-screenshots/ViewDataTableTest_exclude_low_population.png
index 806b9059db..806b9059db 100644
--- a/tests/UI/expected-screenshots/ViewDataTableTest_4_exclude_low_population.png
+++ b/tests/UI/expected-screenshots/ViewDataTableTest_exclude_low_population.png
diff --git a/tests/UI/specs/MultiSites_spec.js b/tests/UI/specs/MultiSites_spec.js
index 6037a196ef..66d9945f68 100644
--- a/tests/UI/specs/MultiSites_spec.js
+++ b/tests/UI/specs/MultiSites_spec.js
@@ -41,12 +41,14 @@ describe("MultiSitesTest", function () {
it('should load the all websites dashboard correctly', function (done) {
expect.screenshot('all_websites').to.be.captureSelector(selector, function (page) {
page.load("?" + generalParams + "&module=MultiSites&action=index");
+ page.wait(1000);
}, done);
});
it('should load next page correctly', function (done) {
expect.screenshot('all_websites_page_1').to.be.captureSelector(selector, function (page) {
page.click('.paging .next');
+ page.wait(1000);
}, done);
});
diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index 252f57f49d..0f6d3866e2 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -472,6 +472,10 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
page.load("?" + generalParams + "&module=CoreAdminHome&action=generalSettings");
// angular might need a little to render after page has loaded
page.wait(1000);
+ page.evaluate(function () {
+ $('textarea:eq(0)').trigger('focus');
+ });
+ page.wait(1000);
}, done);
});
@@ -611,6 +615,12 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
}, done);
});
+ it('should load the scheduled reports when Edit button is clicked', function (done) {
+ expect.screenshot('email_reports_editor').to.be.captureSelector('.pageWrap', function (page) {
+ page.click('.entityTable tr:nth-child(4) button[title=Edit]');
+ }, done);
+ });
+
it('should load the feedback form when the feedback form link is clicked', function (done) {
expect.screenshot('feedback_form').to.be.captureSelector('.pageWrap', function (page) {
diff --git a/tests/UI/specs/ViewDataTable_spec.js b/tests/UI/specs/ViewDataTable_spec.js
index a7254b3ef6..b13944c412 100644
--- a/tests/UI/specs/ViewDataTable_spec.js
+++ b/tests/UI/specs/ViewDataTable_spec.js
@@ -39,13 +39,6 @@ describe("ViewDataTableTest", function () { // TODO: should remove Test suffix f
}, done);
});
- it("should exclude low population rows when low population clicked", function (done) {
- expect.screenshot("4_exclude_low_population").to.be.capture(function (page) {
- page.click('.dropdownConfigureIcon');
- page.click('.dataTableExcludeLowPopulation');
- }, done);
- });
-
it("should show all available visualizations for this report", function (done) {
expect.screenshot("5_visualizations").to.be.captureSelector('.dataTableFooterIcons', function (page) {
page.click('.activateVisualizationSelection');
@@ -157,4 +150,14 @@ describe("ViewDataTableTest", function () { // TODO: should remove Test suffix f
page.click('.datatableRelatedReports li>span:visible');
}, done);
});
+
+ it("should exclude low population rows when low population clicked", function (done) {
+ var newUrl = url.replace('moduleToWidgetize=Referrers', 'moduleToWidgetize=Actions').replace('actionToWidgetize=getKeywords', 'actionToWidgetize=getPageUrls');
+ expect.screenshot("exclude_low_population").to.be.capture(function (page) {
+ page.load(newUrl);
+ page.click('.dropdownConfigureIcon');
+ page.click('.dataTableExcludeLowPopulation');
+ }, done);
+ });
+
}); \ No newline at end of file