diff options
author | friendica <info@friendica.com> | 2015-01-22 17:41:16 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-22 17:41:16 -0800 |
commit | e46eba125888704b4381aa8418495e91eeb565c8 (patch) | |
tree | d91e1e52560ea27be806f416485d32b831d03ebc /include/statistics_fns.php | |
parent | 29436081a86650e7905a79eba4fdf7dc12f1c7c9 (diff) | |
download | volse-hubzilla-e46eba125888704b4381aa8418495e91eeb565c8.tar.gz volse-hubzilla-e46eba125888704b4381aa8418495e91eeb565c8.tar.bz2 volse-hubzilla-e46eba125888704b4381aa8418495e91eeb565c8.zip |
heavy lifting converting item flag bits
Diffstat (limited to 'include/statistics_fns.php')
-rw-r--r-- | include/statistics_fns.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/statistics_fns.php b/include/statistics_fns.php index 288925a2c..ce2eee5e7 100644 --- a/include/statistics_fns.php +++ b/include/statistics_fns.php @@ -23,8 +23,7 @@ function update_channels_active_halfyear_stat() { $s .= ','; $s .= intval($rr['channel_id']); } - $x = q("select uid from item where uid in ( $s ) and (item_flags & %d)>0 and created > %s - INTERVAL %s group by uid", - intval(ITEM_WALL), + $x = q("select uid from item where uid in ( $s ) and item_wall = 1 and created > %s - INTERVAL %s group by uid", db_utcnow(), db_quoteinterval('6 MONTH') ); if($x) { @@ -50,8 +49,7 @@ function update_channels_active_monthly_stat() { $s .= ','; $s .= intval($rr['channel_id']); } - $x = q("select uid from item where uid in ( $s ) and ( item_flags & %d )>0 and created > %s - INTERVAL %s group by uid", - intval(ITEM_WALL), + $x = q("select uid from item where uid in ( $s ) and item_wall = 1 and created > %s - INTERVAL %s group by uid", db_utcnow(), db_quoteinterval('1 MONTH') ); if($x) { @@ -66,8 +64,7 @@ function update_channels_active_monthly_stat() { } function update_local_posts_stat() { - $posts = q("SELECT COUNT(*) AS local_posts FROM `item` WHERE (item_flags & %d)>0 ", - intval(ITEM_WALL) ); + $posts = q("SELECT COUNT(*) AS local_posts FROM `item` WHERE item_wall = 1 "); if (is_array($posts)) { $local_posts_stat = intval($posts[0]["local_posts"]); set_config('system','local_posts_stat',$local_posts_stat); |