Skip to content

Commit

Permalink
Merge branch 'master' into DeviceDetector2
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Jun 8, 2014
2 parents 18f9b8c + 5c4f235 commit e579da2
Show file tree
Hide file tree
Showing 27 changed files with 1,122 additions and 408 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ after_script:
- ./tests/travis/upload_artifacts.sh

notifications:
slack: piwik:3HWhNh21qPfDACQXTrJOb0mW

irc:
skip_join: true
on_success: change
Expand Down
1 change: 1 addition & 0 deletions core/DataFiles/SearchEngines.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@

// DuckDuckGo
'duckduckgo.com' => array('DuckDuckGo', 'q', '?q={k}'),
'r.duckduckgo.com' => array('DuckDuckGo'),

// earthlink
'search.earthlink.net' => array('Earthlink', 'q', 'search?q={k}'),
Expand Down
2 changes: 1 addition & 1 deletion core/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ final class Version
* The current Piwik version.
* @var string
*/
const VERSION = '2.4.0-b3';
const VERSION = '2.4.0-b5';
}
2 changes: 2 additions & 0 deletions libs/PiwikTracker/PiwikTracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,8 @@ protected function sendRequest($url, $method = 'GET', $data = null, $force = fal

// Clear custom variables so they don't get copied over to other users in the bulk request
$this->clearCustomVariables();
$this->userAgent = false;
$this->acceptLanguage = false;
return true;
}

Expand Down
1 change: 1 addition & 0 deletions misc/package/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ if [ ! -e $DEST_PATH/piwik_last_version ] ; then
fi
echo "checkout repository for tag $VERSION..."
cd $DEST_PATH/piwik_last_version
git checkout master
git pull
git checkout tags/$VERSION

Expand Down
1 change: 1 addition & 0 deletions plugins/CoreConsole/Commands/SetupFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ private function requireFixtureFiles()
require_once PIWIK_INCLUDE_PATH . '/libs/PiwikTracker/PiwikTracker.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/FakeAccess.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/TestingEnvironment.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/IntegrationTestCase.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Fixture.php';

$fixturesToLoad = array(
Expand Down
2 changes: 1 addition & 1 deletion plugins/CustomAlerts
13 changes: 8 additions & 5 deletions plugins/DevicesDetection/templates/detection.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,23 @@
display: block;
}
.detection {
padding-top:10px;
}
.detection td {
width: 50%;
}
</style>
<h1>{{ 'DevicesDetection_DeviceDetection'|translate }}</h1>
<h2>{{ 'DevicesDetection_DeviceDetection'|translate }}</h2>

<h2>{{ 'DevicesDetection_UserAgent'|translate }}</h2>
<h3>{{ 'DevicesDetection_UserAgent'|translate }}</h3>
<form action="{{ linkTo({}) }}" method="POST">
<textarea name="ua">{{ userAgent }}</textarea>
<input type="submit" value="{{ 'General_Refresh'|translate }}" />
</form>

<h2>{{ 'UserSettings_ColumnOperatingSystem'|translate }}</h2>
<h3>{{ 'UserSettings_ColumnOperatingSystem'|translate }}</h3>
<table class="dataTable detection">
<tr>
<td>{{ 'General_Name'|translate }} <small>(<a href="javascript:showList('os');">{{ 'Mobile_ShowAll'|translate }}</a>)</small></td>
Expand All @@ -60,7 +63,7 @@
</tr>
</table>

<h2>{{ 'UserSettings_ColumnBrowser'|translate }}</h2>
<h3>{{ 'UserSettings_ColumnBrowser'|translate }}</h3>
<table class="dataTable detection">
<tr>
<td>{{ 'General_Name'|translate }} <small>(<a href="javascript:showList('browsers');">{{ 'Mobile_ShowAll'|translate }}</a>)</small></td>
Expand All @@ -76,7 +79,7 @@
</tr>
</table>

<h2>{{ 'DevicesDetection_Device'|translate }}</h2>
<h3>{{ 'DevicesDetection_Device'|translate }}</h3>
<table class="dataTable detection">
<tr>
<td>{{ 'DevicesDetection_dataTableLabelTypes'|translate }} <small>(<a href="javascript:showList('devicetypes');">{{ 'Mobile_ShowAll'|translate }}</a>)</small></td>
Expand Down
19 changes: 11 additions & 8 deletions tests/PHPUnit/Integration/ManyVisitorsOneWebsiteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,6 @@ public function getApiForTesting()

// Randomly fails on 5.3
if(!self::isPhpVersion53()) {
$apiToTest[] = array('Live.getLastVisitsDetails', array(
'idSite' => $idSite,
'date' => $dateString,
'periods' => 'month',
'testSuffix' => '_Live.getLastVisitsDetails_sortAsc',
'otherRequestParameters' => array('filter_sort_order' => 'asc', 'filter_limit' => 7)
));

$apiToTest[] = array('Live.getLastVisitsDetails', array(
'idSite' => $idSite,
'date' => $dateString,
Expand All @@ -119,6 +111,17 @@ public function getApiForTesting()
'otherRequestParameters' => array('filter_sort_order' => 'desc', 'filter_limit' => 7)
));
}

// this also fails on all PHP versions, it seems randomly.
// $apiToTest[] = array('Live.getLastVisitsDetails', array(
// 'idSite' => $idSite,
// 'date' => $dateString,
// 'periods' => 'month',
// 'testSuffix' => '_Live.getLastVisitsDetails_sortAsc',
// 'otherRequestParameters' => array('filter_sort_order' => 'asc', 'filter_limit' => 7)
// ));


return $apiToTest;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1704,16 +1704,16 @@
<referrerUrl />
<referrerSearchEngineUrl />
<referrerSearchEngineIcon />
<operatingSystem>Windows XP</operatingSystem>
<operatingSystemCode>WXP</operatingSystemCode>
<operatingSystemShortName>Win XP</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/WXP.gif</operatingSystemIcon>
<browserFamily>gecko</browserFamily>
<browserFamilyDescription>Gecko (Firefox)</browserFamilyDescription>
<browserName>Firefox 3.6</browserName>
<browserIcon>plugins/UserSettings/images/browsers/FF.gif</browserIcon>
<browserCode>FF</browserCode>
<browserVersion>3.6</browserVersion>
<operatingSystem>Unknown</operatingSystem>
<operatingSystemCode>UNK</operatingSystemCode>
<operatingSystemShortName>Unknown</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/UNK.gif</operatingSystemIcon>
<browserFamily>unknown</browserFamily>
<browserFamilyDescription>Unknown</browserFamilyDescription>
<browserName>Unknown</browserName>
<browserIcon>plugins/UserSettings/images/browsers/UNK.gif</browserIcon>
<browserCode>UNK</browserCode>
<browserVersion>UNK</browserVersion>
<screenType>normal</screenType>
<deviceType>Desktop</deviceType>
<resolution>1024x768</resolution>
Expand Down Expand Up @@ -1952,16 +1952,16 @@
<referrerUrl />
<referrerSearchEngineUrl />
<referrerSearchEngineIcon />
<operatingSystem>Windows XP</operatingSystem>
<operatingSystemCode>WXP</operatingSystemCode>
<operatingSystemShortName>Win XP</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/WXP.gif</operatingSystemIcon>
<browserFamily>gecko</browserFamily>
<browserFamilyDescription>Gecko (Firefox)</browserFamilyDescription>
<browserName>Firefox 3.6</browserName>
<browserIcon>plugins/UserSettings/images/browsers/FF.gif</browserIcon>
<browserCode>FF</browserCode>
<browserVersion>3.6</browserVersion>
<operatingSystem>Unknown</operatingSystem>
<operatingSystemCode>UNK</operatingSystemCode>
<operatingSystemShortName>Unknown</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/UNK.gif</operatingSystemIcon>
<browserFamily>unknown</browserFamily>
<browserFamilyDescription>Unknown</browserFamilyDescription>
<browserName>Unknown</browserName>
<browserIcon>plugins/UserSettings/images/browsers/UNK.gif</browserIcon>
<browserCode>UNK</browserCode>
<browserVersion>UNK</browserVersion>
<screenType>normal</screenType>
<deviceType>Desktop</deviceType>
<resolution>1024x768</resolution>
Expand Down Expand Up @@ -2232,15 +2232,15 @@
<daysSinceLastVisit>10</daysSinceLastVisit>
<daysSinceFirstVisit>100</daysSinceFirstVisit>
<daysSinceLastEcommerceOrder>50</daysSinceLastEcommerceOrder>
<continent>Europe</continent>
<continentCode>eur</continentCode>
<country>France</country>
<countryCode>fr</countryCode>
<countryFlag>plugins/UserCountry/images/flags/fr.png</countryFlag>
<continent>Unknown</continent>
<continentCode>unk</continentCode>
<country>Unknown</country>
<countryCode>xx</countryCode>
<countryFlag>plugins/UserCountry/images/flags/xx.png</countryFlag>
<region />
<regionCode />
<city />
<location>France</location>
<location>Unknown</location>
<latitude />
<longitude />
<provider>Unknown</provider>
Expand All @@ -2254,16 +2254,16 @@
<referrerUrl />
<referrerSearchEngineUrl />
<referrerSearchEngineIcon />
<operatingSystem>Windows XP</operatingSystem>
<operatingSystemCode>WXP</operatingSystemCode>
<operatingSystemShortName>Win XP</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/WXP.gif</operatingSystemIcon>
<browserFamily>gecko</browserFamily>
<browserFamilyDescription>Gecko (Firefox)</browserFamilyDescription>
<browserName>Firefox 3.6</browserName>
<browserIcon>plugins/UserSettings/images/browsers/FF.gif</browserIcon>
<browserCode>FF</browserCode>
<browserVersion>3.6</browserVersion>
<operatingSystem>Unknown</operatingSystem>
<operatingSystemCode>UNK</operatingSystemCode>
<operatingSystemShortName>Unknown</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/UNK.gif</operatingSystemIcon>
<browserFamily>unknown</browserFamily>
<browserFamilyDescription>Unknown</browserFamilyDescription>
<browserName>Unknown</browserName>
<browserIcon>plugins/UserSettings/images/browsers/UNK.gif</browserIcon>
<browserCode>UNK</browserCode>
<browserVersion>UNK</browserVersion>
<screenType>normal</screenType>
<deviceType>Desktop</deviceType>
<resolution>1024x768</resolution>
Expand Down Expand Up @@ -2480,15 +2480,15 @@
<daysSinceLastVisit>11</daysSinceLastVisit>
<daysSinceFirstVisit>101</daysSinceFirstVisit>
<daysSinceLastEcommerceOrder>51</daysSinceLastEcommerceOrder>
<continent>Europe</continent>
<continentCode>eur</continentCode>
<country>France</country>
<countryCode>fr</countryCode>
<countryFlag>plugins/UserCountry/images/flags/fr.png</countryFlag>
<continent>Unknown</continent>
<continentCode>unk</continentCode>
<country>Unknown</country>
<countryCode>xx</countryCode>
<countryFlag>plugins/UserCountry/images/flags/xx.png</countryFlag>
<region />
<regionCode />
<city />
<location>France</location>
<location>Unknown</location>
<latitude />
<longitude />
<provider>Unknown</provider>
Expand All @@ -2502,16 +2502,16 @@
<referrerUrl />
<referrerSearchEngineUrl />
<referrerSearchEngineIcon />
<operatingSystem>Windows XP</operatingSystem>
<operatingSystemCode>WXP</operatingSystemCode>
<operatingSystemShortName>Win XP</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/WXP.gif</operatingSystemIcon>
<browserFamily>gecko</browserFamily>
<browserFamilyDescription>Gecko (Firefox)</browserFamilyDescription>
<browserName>Firefox 3.6</browserName>
<browserIcon>plugins/UserSettings/images/browsers/FF.gif</browserIcon>
<browserCode>FF</browserCode>
<browserVersion>3.6</browserVersion>
<operatingSystem>Unknown</operatingSystem>
<operatingSystemCode>UNK</operatingSystemCode>
<operatingSystemShortName>Unknown</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/UNK.gif</operatingSystemIcon>
<browserFamily>unknown</browserFamily>
<browserFamilyDescription>Unknown</browserFamilyDescription>
<browserName>Unknown</browserName>
<browserIcon>plugins/UserSettings/images/browsers/UNK.gif</browserIcon>
<browserCode>UNK</browserCode>
<browserVersion>UNK</browserVersion>
<screenType>normal</screenType>
<deviceType>Desktop</deviceType>
<resolution>1024x768</resolution>
Expand Down Expand Up @@ -2908,16 +2908,16 @@
<referrerUrl />
<referrerSearchEngineUrl />
<referrerSearchEngineIcon />
<operatingSystem>Windows XP</operatingSystem>
<operatingSystemCode>WXP</operatingSystemCode>
<operatingSystemShortName>Win XP</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/WXP.gif</operatingSystemIcon>
<browserFamily>gecko</browserFamily>
<browserFamilyDescription>Gecko (Firefox)</browserFamilyDescription>
<browserName>Firefox 3.6</browserName>
<browserIcon>plugins/UserSettings/images/browsers/FF.gif</browserIcon>
<browserCode>FF</browserCode>
<browserVersion>3.6</browserVersion>
<operatingSystem>Unknown</operatingSystem>
<operatingSystemCode>UNK</operatingSystemCode>
<operatingSystemShortName>Unknown</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/UNK.gif</operatingSystemIcon>
<browserFamily>unknown</browserFamily>
<browserFamilyDescription>Unknown</browserFamilyDescription>
<browserName>Unknown</browserName>
<browserIcon>plugins/UserSettings/images/browsers/UNK.gif</browserIcon>
<browserCode>UNK</browserCode>
<browserVersion>UNK</browserVersion>
<screenType>normal</screenType>
<deviceType>Desktop</deviceType>
<resolution>1024x768</resolution>
Expand Down Expand Up @@ -3418,16 +3418,16 @@
<referrerUrl />
<referrerSearchEngineUrl />
<referrerSearchEngineIcon />
<operatingSystem>Windows XP</operatingSystem>
<operatingSystemCode>WXP</operatingSystemCode>
<operatingSystemShortName>Win XP</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/WXP.gif</operatingSystemIcon>
<browserFamily>gecko</browserFamily>
<browserFamilyDescription>Gecko (Firefox)</browserFamilyDescription>
<browserName>Firefox 3.6</browserName>
<browserIcon>plugins/UserSettings/images/browsers/FF.gif</browserIcon>
<browserCode>FF</browserCode>
<browserVersion>3.6</browserVersion>
<operatingSystem>Unknown</operatingSystem>
<operatingSystemCode>UNK</operatingSystemCode>
<operatingSystemShortName>Unknown</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/UNK.gif</operatingSystemIcon>
<browserFamily>unknown</browserFamily>
<browserFamilyDescription>Unknown</browserFamilyDescription>
<browserName>Unknown</browserName>
<browserIcon>plugins/UserSettings/images/browsers/UNK.gif</browserIcon>
<browserCode>UNK</browserCode>
<browserVersion>UNK</browserVersion>
<screenType>normal</screenType>
<deviceType>Desktop</deviceType>
<resolution>1024x768</resolution>
Expand Down Expand Up @@ -3999,16 +3999,16 @@
<referrerUrl />
<referrerSearchEngineUrl />
<referrerSearchEngineIcon />
<operatingSystem>Windows XP</operatingSystem>
<operatingSystemCode>WXP</operatingSystemCode>
<operatingSystemShortName>Win XP</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/WXP.gif</operatingSystemIcon>
<browserFamily>gecko</browserFamily>
<browserFamilyDescription>Gecko (Firefox)</browserFamilyDescription>
<browserName>Firefox 3.6</browserName>
<browserIcon>plugins/UserSettings/images/browsers/FF.gif</browserIcon>
<browserCode>FF</browserCode>
<browserVersion>3.6</browserVersion>
<operatingSystem>Unknown</operatingSystem>
<operatingSystemCode>UNK</operatingSystemCode>
<operatingSystemShortName>Unknown</operatingSystemShortName>
<operatingSystemIcon>plugins/UserSettings/images/os/UNK.gif</operatingSystemIcon>
<browserFamily>unknown</browserFamily>
<browserFamilyDescription>Unknown</browserFamilyDescription>
<browserName>Unknown</browserName>
<browserIcon>plugins/UserSettings/images/browsers/UNK.gif</browserIcon>
<browserCode>UNK</browserCode>
<browserVersion>UNK</browserVersion>
<screenType>normal</screenType>
<deviceType>Desktop</deviceType>
<resolution>1024x768</resolution>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>FF</row>
<row>UNK</row>
</result>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<nb_visits>35</nb_visits>
<nb_actions>61</nb_actions>
<nb_visits_converted>35</nb_visits_converted>
<bounce_count>18</bounce_count>
<sum_visit_length>21437</sum_visit_length>
<nb_visits>28</nb_visits>
<nb_actions>48</nb_actions>
<nb_visits_converted>28</nb_visits_converted>
<bounce_count>15</bounce_count>
<sum_visit_length>16393</sum_visit_length>
<max_actions>3</max_actions>
<bounce_rate>51%</bounce_rate>
<bounce_rate>54%</bounce_rate>
<nb_actions_per_visit>1.7</nb_actions_per_visit>
<avg_time_on_site>612</avg_time_on_site>
<avg_time_on_site>585</avg_time_on_site>
</result>
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<result>
<row>3.6</row>
<row>UNK</row>
</result>
Loading

0 comments on commit e579da2

Please sign in to comment.