Ignore:
Timestamp:
Sep 5, 2012, 4:15:54 PM (12 years ago)
Author:
grum
Message:

version 0.1.0b

. Fix install bugs
. Manage anonymous directories
. Manage CSV export options settings
. Fix IPadress<=>country association bug & improve join performances
. Fix bug on IP filter
. Improve performances for history consult

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/EStat/estat_ajax.php

    r17737 r17758  
    475475
    476476      $gStatFile=new StatDBGlobal($this->fileStatDir, self::FILE_GLOBAL);
    477       $gStatFile->setIpCountryFile(ESTAT_PATH.'data/ipCountry.db');
     477      $gStatFile->setIpCountryFile($this->fileStatDir.'/'.self::FILE_COUNTRY.'.db', true);
    478478      $gStatFile->open(ASDF_OPEN_WRITE);
    479479      if($gStatFile->getInfoProperty('log', 'startImport')==null)
     
    575575
    576576      // prepare an EStat_IdList to buid a list of unique Id
    577       $idList=new EStat_IdList(array('catId', 'imageId', 'tagsId', 'userId', 'IPadress'));
     577      $idList=new EStat_IdList(array('catId', 'imageId', 'tagsId', 'userId'));
    578578      // $idAssoc will get the label associated to the id
    579579      $idAssoc=array(
     
    581581        'imageId'=>array(),
    582582        'tagsId'=>array(),
    583         'userId'=>array(),
    584         'IPadress'=>array()
     583        'userId'=>array()
    585584      );
    586585
     
    612611        $this->prepareIdList($idAssoc, 'userId', "SELECT id, username AS name FROM ".USERS_TABLE." WHERE id IN (".implode(',', $idList->getItems('userId')).") ORDER BY id;");
    613612
    614       // for reverse DNS
    615       if($this->config['logs.ipCountry']=='y')
    616         $this->getIpInfos($idAssoc, $idList->getItems('IPadress'));
    617 
    618613      // complete the data
    619614      foreach($returned['rows'] as $key=>$row)
     
    636631          'date' => date('Y-m-d H:i:s', $row['date']),
    637632          'IpUserId' => ($row['userId']==2)?$row['IPadress']:$this->getId($idAssoc, 'userId', $row['userId'], $row['IPadress'], 'name'),
    638           //'country' => $row['country'],
     633          'country' => $row['country'],
    639634          'catId' => GPCCore::getUserLanguageDesc($this->getId($idAssoc, 'catId', $row['catId'], ($row['catId']==0)?'-':'?')),
    640635          'imageId' => $this->getId($idAssoc, 'imageId', $row['imageId'], ($row['imageId']==0)?'-':'?', 'name'),
     
    702697        if($row['userId']==2)
    703698        {
    704           $ipInfo=$this->getId($idAssoc, 'IPadress', $tmp['IpUserId'], '?');
    705699          if($this->config['logs.reverseDNS']=='y')
    706700          {/*
     
    716710          }
    717711
    718           if($ipInfo['country']!='--' and $ipInfo['country']!='XA')
     712          if($row['country']!='--' and $row['country']!='XA')
    719713          {
    720             $tmp['IpUserId'].='<span class="geoip">[<a href="http://www.geoiptool.com/fr/?IP='.$tmp['IpUserId'].'">'.$ipInfo['country'].'</a>]</span>';
     714            $tmp['IpUserId'].='<span class="geoip">[<a href="http://www.geoiptool.com/fr/?IP='.$tmp['IpUserId'].'">'.$row['country'].'</a>]</span>';
    721715          }
    722716          else
Note: See TracChangeset for help on using the changeset viewer.