[Piwik-svn] r490 - in trunk: modules plugins/Provider
svnmaster at piwik.org
svnmaster at piwik.org
Wed May 21 22:11:26 CEST 2008
Author: matt
Date: 2008-05-21 22:11:25 +0200 (Wed, 21 May 2008)
New Revision: 490
Modified:
trunk/modules/LogStats.php
trunk/modules/Plugin.php
trunk/plugins/Provider/Provider.php
Log:
- fixing bug in Provider plugin
Modified: trunk/modules/LogStats.php
===================================================================
--- trunk/modules/LogStats.php 2008-05-20 22:05:18 UTC (rev 489)
+++ trunk/modules/LogStats.php 2008-05-21 20:11:25 UTC (rev 490)
@@ -168,7 +168,7 @@
* Returns the LogStats_Visit object.
* This method can be overwritten so that we use a different LogStats_Visit object
*
- * @return LogStats_Visit
+ * @return Piwik_LogStats_Visit
*/
protected function getNewVisitObject()
{
Modified: trunk/modules/Plugin.php
===================================================================
--- trunk/modules/Plugin.php 2008-05-20 22:05:18 UTC (rev 489)
+++ trunk/modules/Plugin.php 2008-05-21 20:11:25 UTC (rev 490)
@@ -25,7 +25,13 @@
public function registerTranslation( $langCode )
{
- $infos = $this->getInformation();
+ // we are certainly in LogStats mode, Zend is not loaded
+ if(!class_exists('Zend_Loader'))
+ {
+ return ;
+ }
+
+ $infos = $this->getInformation();
if(!isset($infos['translationAvailable']))
{
$infos['translationAvailable'] = false;
@@ -44,12 +50,7 @@
$defaultEnglishLangPath = sprintf($path, 'en');
$translations = array();
-
- if(!class_exists('Zend_Loader'))
- {
- throw new Exception("Zend_Loader not defined. It is not possible to load plugins translation files in LogStats mode.");
- }
-
+
if(Zend_Loader::isReadable($defaultLangPath))
{
require $defaultLangPath;
Modified: trunk/plugins/Provider/Provider.php
===================================================================
--- trunk/plugins/Provider/Provider.php 2008-05-20 22:05:18 UTC (rev 489)
+++ trunk/plugins/Provider/Provider.php 2008-05-21 20:11:25 UTC (rev 490)
@@ -96,8 +96,6 @@
$labelSQL = "location_provider";
$tableProvider = $archiveProcessing->getDataTableInterestForLabel($labelSQL);
$record = new Piwik_ArchiveProcessing_Record_BlobArray($recordName, $tableProvider->getSerialized());
-// echo $tableProvider;
-// Piwik::printMemoryUsage("End of ".get_class($this)." ");
}
/**
@@ -107,7 +105,7 @@
{
$visitorInfo =& $notification->getNotificationObject();
- $hostname = $this->getHost($visitorInfo['location_ip']);
+ $hostname = $this->getHost($visitorInfo['location_ip']);
$hostnameExtension = $this->getHostnameExt($hostname);
// add the value to save in the table log_visit
@@ -128,7 +126,7 @@
'com', 'net', 'org', 'co'
);
- $off = strrpos($hostname, '.');
+ $off = strrpos($hostname, '.');
$ext = substr($hostname, $off);
if(empty($off) || is_numeric($ext) || strlen($hostname) < 5)
More information about the Piwik-svn
mailing list