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:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-07-22 13:33:25 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2010-07-22 13:33:25 +0400
commitb5701fddcb971c4f38f98d8a47efae43fb7990c3 (patch)
tree59791d4539c3e1fe1ae39a261e32f0d5a6a412fc
parent04b5bab41184af5df587dd8346d1ef30c58186d0 (diff)
parent8afb042d14aec148e43344fa1c16aa2810022b09 (diff)
releasing 0.6.4 without bugs0.6.4
-rw-r--r--core/AssetManager.php12
-rw-r--r--core/Piwik.php3
-rw-r--r--core/Session.php6
-rw-r--r--libs/HTML/QuickForm2/Container.php2
-rw-r--r--libs/HTML/QuickForm2/Element.php2
-rw-r--r--libs/HTML/QuickForm2/Element/Button.php2
-rw-r--r--libs/HTML/QuickForm2/Element/Date.php2
-rw-r--r--libs/HTML/QuickForm2/Element/InputCheckbox.php2
-rw-r--r--libs/HTML/QuickForm2/Element/InputFile.php2
-rw-r--r--libs/HTML/QuickForm2/Element/InputImage.php2
-rw-r--r--libs/HTML/QuickForm2/Element/InputSubmit.php2
-rw-r--r--libs/HTML/QuickForm2/Element/Select.php2
-rw-r--r--libs/HTML/QuickForm2/Element/Static.php2
-rw-r--r--libs/HTML/QuickForm2/Node.php2
-rw-r--r--libs/HTML/QuickForm2/Renderer.php2
-rw-r--r--libs/HTML/QuickForm2/Renderer/Array.php2
-rw-r--r--libs/HTML/QuickForm2/Renderer/Default.php2
-rw-r--r--plugins/SEO/RankChecker.php2
-rw-r--r--tests/build-ci.xml12
19 files changed, 34 insertions, 29 deletions
diff --git a/core/AssetManager.php b/core/AssetManager.php
index f71ed203f7..2695c15b4e 100644
--- a/core/AssetManager.php
+++ b/core/AssetManager.php
@@ -332,24 +332,26 @@ class Piwik_AssetManager
$matchingFiles = glob( $mergedFileDirectory . "*." . $type );
+ if($matchingFiles === false)
+ {
+ return false;
+ }
switch ( count($matchingFiles) )
{
case 0:
return false;
case 1:
-
$mergedFile = $matchingFiles[0];
$hashcode = basename($mergedFile, ".".$type);
if ( empty($hashcode) ) {
- throw new Exception ("The merged asset : " . $mergedFile . " couldn't be parsed for getting the hashcode.");
+ throw new Exception("The merged asset : " . $mergedFile . " couldn't be parsed for getting the hashcode.");
}
-
return $hashcode;
-
default:
- throw Exception ("There are more than 1 merged file of the same type in the merged file directory. This should never happen. Please delete all files in piwik/tmp/assets/ and refresh the page.");
+ throw new Exception("There are more than 1 merged file of the same type in the merged file directory.
+ This should not happen. Please delete all files in piwik/tmp/assets/ and refresh the page.");
}
}
diff --git a/core/Piwik.php b/core/Piwik.php
index 7c2cb4ff05..64bc6d6e1c 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -486,7 +486,8 @@ class Piwik
// convert end-of-line characters and re-test text files
$content = @file_get_contents($file);
$content = str_replace("\r\n", "\n", $content);
- if(@md5($content) !== $props[1])
+ if((strlen($content) != $props[0])
+ || (@md5($content) !== $props[1]))
{
$messages[] = Piwik_Translate('General_ExceptionFilesizeMismatch', array($file, $props[0], filesize($file)));
}
diff --git a/core/Session.php b/core/Session.php
index 490e1b2ce5..515cd8ec25 100644
--- a/core/Session.php
+++ b/core/Session.php
@@ -19,6 +19,12 @@ class Piwik_Session extends Zend_Session
{
public static function start($options = false)
{
+ // use cookies to store session id on the client side
+ @ini_set('session.use_cookies', '1');
+
+ // prevent attacks involving session ids passed in URLs
+ @ini_set('session.use_only_cookies', '1');
+
// don't use the default: PHPSESSID
$sessionName = defined('PIWIK_SESSION_NAME') ? PIWIK_SESSION_NAME : 'PIWIK_SESSID';
@ini_set('session.name', $sessionName);
diff --git a/libs/HTML/QuickForm2/Container.php b/libs/HTML/QuickForm2/Container.php
index e96a4ff12b..444f740b89 100644
--- a/libs/HTML/QuickForm2/Container.php
+++ b/libs/HTML/QuickForm2/Container.php
@@ -357,7 +357,7 @@ abstract class HTML_QuickForm2_Container extends HTML_QuickForm2_Node
* The default behaviour is just to call the updateValue() methods of
* contained elements, since default Container doesn't have any value itself
*/
- protected function updateValue()
+ public function updateValue()
{
foreach ($this as $child) {
$child->updateValue();
diff --git a/libs/HTML/QuickForm2/Element.php b/libs/HTML/QuickForm2/Element.php
index 1ce181fcb8..3677b30add 100644
--- a/libs/HTML/QuickForm2/Element.php
+++ b/libs/HTML/QuickForm2/Element.php
@@ -92,7 +92,7 @@ abstract class HTML_QuickForm2_Element extends HTML_QuickForm2_Node
* The default behaviour is to go through the complete list of the data
* sources until the non-null value is found.
*/
- protected function updateValue()
+ public function updateValue()
{
$name = $this->getName();
foreach ($this->getDataSources() as $ds) {
diff --git a/libs/HTML/QuickForm2/Element/Button.php b/libs/HTML/QuickForm2/Element/Button.php
index b53f28902b..845d49c439 100644
--- a/libs/HTML/QuickForm2/Element/Button.php
+++ b/libs/HTML/QuickForm2/Element/Button.php
@@ -145,7 +145,7 @@ class HTML_QuickForm2_Element_Button extends HTML_QuickForm2_Element
'>' . $this->data['content'] . '</button>';
}
- protected function updateValue()
+ public function updateValue()
{
foreach ($this->getDataSources() as $ds) {
if ($ds instanceof HTML_QuickForm2_DataSource_Submit &&
diff --git a/libs/HTML/QuickForm2/Element/Date.php b/libs/HTML/QuickForm2/Element/Date.php
index c1a26c0a0e..b7e620691b 100644
--- a/libs/HTML/QuickForm2/Element/Date.php
+++ b/libs/HTML/QuickForm2/Element/Date.php
@@ -309,7 +309,7 @@ class HTML_QuickForm2_Element_Date extends HTML_QuickForm2_Container_Group
* Since the date element also accepts a timestamp as value, the default
* group behavior is changed.
*/
- protected function updateValue()
+ public function updateValue()
{
$name = $this->getName();
foreach ($this->getDataSources() as $ds) {
diff --git a/libs/HTML/QuickForm2/Element/InputCheckbox.php b/libs/HTML/QuickForm2/Element/InputCheckbox.php
index 70510b1b4b..a3e510cb3b 100644
--- a/libs/HTML/QuickForm2/Element/InputCheckbox.php
+++ b/libs/HTML/QuickForm2/Element/InputCheckbox.php
@@ -74,7 +74,7 @@ class HTML_QuickForm2_Element_InputCheckbox extends HTML_QuickForm2_Element_Inpu
}
}
- protected function updateValue()
+ public function updateValue()
{
$name = $this->getName();
if ('[]' == substr($name, -2)) {
diff --git a/libs/HTML/QuickForm2/Element/InputFile.php b/libs/HTML/QuickForm2/Element/InputFile.php
index fc52eca400..784e6d3379 100644
--- a/libs/HTML/QuickForm2/Element/InputFile.php
+++ b/libs/HTML/QuickForm2/Element/InputFile.php
@@ -198,7 +198,7 @@ class HTML_QuickForm2_Element_InputFile extends HTML_QuickForm2_Element_Input
return $this;
}
- protected function updateValue()
+ public function updateValue()
{
foreach ($this->getDataSources() as $ds) {
if ($ds instanceof HTML_QuickForm2_DataSource_Submit) {
diff --git a/libs/HTML/QuickForm2/Element/InputImage.php b/libs/HTML/QuickForm2/Element/InputImage.php
index 86748ad82a..b621e98118 100644
--- a/libs/HTML/QuickForm2/Element/InputImage.php
+++ b/libs/HTML/QuickForm2/Element/InputImage.php
@@ -128,7 +128,7 @@ class HTML_QuickForm2_Element_InputImage extends HTML_QuickForm2_Element_Input
}
}
- protected function updateValue()
+ public function updateValue()
{
foreach ($this->getDataSources() as $ds) {
if ($ds instanceof HTML_QuickForm2_DataSource_Submit) {
diff --git a/libs/HTML/QuickForm2/Element/InputSubmit.php b/libs/HTML/QuickForm2/Element/InputSubmit.php
index de286eaf2b..8b06eb9c78 100644
--- a/libs/HTML/QuickForm2/Element/InputSubmit.php
+++ b/libs/HTML/QuickForm2/Element/InputSubmit.php
@@ -104,7 +104,7 @@ class HTML_QuickForm2_Element_InputSubmit extends HTML_QuickForm2_Element_Input
return $this->getAttribute('disabled')? null: $this->applyFilters($this->submitValue);
}
- protected function updateValue()
+ public function updateValue()
{
foreach ($this->getDataSources() as $ds) {
if ($ds instanceof HTML_QuickForm2_DataSource_Submit &&
diff --git a/libs/HTML/QuickForm2/Element/Select.php b/libs/HTML/QuickForm2/Element/Select.php
index 6803035543..2c852d6af7 100644
--- a/libs/HTML/QuickForm2/Element/Select.php
+++ b/libs/HTML/QuickForm2/Element/Select.php
@@ -555,7 +555,7 @@ class HTML_QuickForm2_Element_Select extends HTML_QuickForm2_Element
return $this->optionContainer->addOptgroup($label, $attributes);
}
- protected function updateValue()
+ public function updateValue()
{
if (!$this->getAttribute('multiple')) {
parent::updateValue();
diff --git a/libs/HTML/QuickForm2/Element/Static.php b/libs/HTML/QuickForm2/Element/Static.php
index cf0bbba5ba..a66998bdaa 100644
--- a/libs/HTML/QuickForm2/Element/Static.php
+++ b/libs/HTML/QuickForm2/Element/Static.php
@@ -138,7 +138,7 @@ class HTML_QuickForm2_Element_Static extends HTML_QuickForm2_Element
*
* Static elements content can be updated with default form values.
*/
- protected function updateValue()
+ public function updateValue()
{
foreach ($this->getDataSources() as $ds) {
if (!$ds instanceof HTML_QuickForm2_DataSource_Submit &&
diff --git a/libs/HTML/QuickForm2/Node.php b/libs/HTML/QuickForm2/Node.php
index b957ec1477..358f3f66a6 100644
--- a/libs/HTML/QuickForm2/Node.php
+++ b/libs/HTML/QuickForm2/Node.php
@@ -477,7 +477,7 @@ abstract class HTML_QuickForm2_Node extends HTML_Common2
/**
* Called when the element needs to update its value from form's data sources
*/
- abstract protected function updateValue();
+ abstract public function updateValue();
/**
* Adds a validation rule
diff --git a/libs/HTML/QuickForm2/Renderer.php b/libs/HTML/QuickForm2/Renderer.php
index 67dbfe99a4..8de745308d 100644
--- a/libs/HTML/QuickForm2/Renderer.php
+++ b/libs/HTML/QuickForm2/Renderer.php
@@ -212,7 +212,7 @@ abstract class HTML_QuickForm2_Renderer
*
* @return array
*/
- protected function exportMethods()
+ public function exportMethods()
{
return array();
}
diff --git a/libs/HTML/QuickForm2/Renderer/Array.php b/libs/HTML/QuickForm2/Renderer/Array.php
index 975aaed76a..f415ea96b6 100644
--- a/libs/HTML/QuickForm2/Renderer/Array.php
+++ b/libs/HTML/QuickForm2/Renderer/Array.php
@@ -160,7 +160,7 @@ class HTML_QuickForm2_Renderer_Array extends HTML_QuickForm2_Renderer
$this->options['static_labels'] = false;
}
- protected function exportMethods()
+ public function exportMethods()
{
return array(
'reset',
diff --git a/libs/HTML/QuickForm2/Renderer/Default.php b/libs/HTML/QuickForm2/Renderer/Default.php
index c688889cb4..40a5b77b5f 100644
--- a/libs/HTML/QuickForm2/Renderer/Default.php
+++ b/libs/HTML/QuickForm2/Renderer/Default.php
@@ -149,7 +149,7 @@ class HTML_QuickForm2_Renderer_Default extends HTML_QuickForm2_Renderer
*/
public $groupId = array();
- protected function exportMethods()
+ public function exportMethods()
{
return array(
'reset',
diff --git a/plugins/SEO/RankChecker.php b/plugins/SEO/RankChecker.php
index b704db2651..ae4ccf8118 100644
--- a/plugins/SEO/RankChecker.php
+++ b/plugins/SEO/RankChecker.php
@@ -53,7 +53,7 @@ class Piwik_SEO_RankChecker
public function getAlexaRank()
{
$url = $this->url;
- $xml = simplexml_load_file('http://data.alexa.com/data?cli=10&url=' . $url);
+ $xml = simplexml_load_string($this->getPage('http://data.alexa.com/data?cli=10&url=' . $url));
return $xml->SD->POPULARITY['TEXT'];
}
diff --git a/tests/build-ci.xml b/tests/build-ci.xml
index 4afb9738b7..61c5f35539 100644
--- a/tests/build-ci.xml
+++ b/tests/build-ci.xml
@@ -96,17 +96,13 @@
<echo>SchemaSpy finished</echo>
</target>
- <target name="all">
- <antcall target="test-pdo-mysql"/>
- <antcall target="test-mysqli"/>
- <antcall target="webtest"/>
- <antcall target="schemaspy"/>
+ <target name="all" depends="test-pdo-mysql,test-mysqli,webtest,schemaspy">
<fail>
<condition>
<or>
- <equals arg1="${result-mysqli}" arg2="1"/>
- <equals arg1="${result-pdo-mysql}" arg2="1"/>
- <equals arg1="${result-schemaspy}" arg2="1"/>
+ <isfailure code="${result-mysqli}"/>
+ <isfailure code="${result-pdo-mysql}"/>
+ <isfailure code="${result-schemaspy}"/>
</or>
</condition>
</fail>