diff options
| author | turon <spider@turon> | 2016-02-17 15:54:31 -0500 |
|---|---|---|
| committer | turon <spider@turon> | 2016-02-17 15:54:31 -0500 |
| commit | f3eb905a3540335e353abb3a41a68ca9151474aa (patch) | |
| tree | 519299fe7694bb9e475add89034711265000b145 | |
| parent | d6aa7800a1a7fcaadaeb77cc4a1f0be36007d301 (diff) | |
| download | stats-f3eb905a3540335e353abb3a41a68ca9151474aa.tar.gz stats-f3eb905a3540335e353abb3a41a68ca9151474aa.tar.bz2 stats-f3eb905a3540335e353abb3a41a68ca9151474aa.zip | |
cache getReferrerList only when isLive
| -rw-r--r-- | Statistics.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Statistics.php b/Statistics.php index 86c243e..9074ca0 100644 --- a/Statistics.php +++ b/Statistics.php @@ -29,6 +29,7 @@ class Statistics extends BitBase { * @return array of referers */ function getRefererList( &$pListHash ) { + global $gBitSystem; $hashKey = ''; $ret = $bindVars = array(); @@ -71,7 +72,7 @@ class Statistics extends BitBase { LEFT JOIN `".BIT_DB_PREFIX."stats_referer_users_map` srum ON(uu.`user_id`=srum.`user_id`) LEFT JOIN `".BIT_DB_PREFIX."stats_referer_urls` sru ON (sru.`referer_url_id`=srum.`referer_url_id`) $whereSql ORDER BY ".$this->mDb->convertSortmode( $pListHash['sort_mode'] ); - if( $rs = $this->mDb->query( $query, $bindVars, -1, $pListHash['offset'], 1800 ) ) { + if( $rs = $this->mDb->query( $query, $bindVars, -1, $pListHash['offset'], ($gBitSystem->isLive() ? 1800 : NULL) ) ) { while( $row = $rs->fetchRow() ) { $key = $row['hash_key']; |
