diff options
author | friendica <info@friendica.com> | 2012-12-19 16:48:17 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-12-19 16:48:17 -0800 |
commit | 893ba371a90a8f304e4e1707d40cbcc3295a43b2 (patch) | |
tree | 8f2955975b1610516bc3bb23d690fe0f8a78c50f /mod | |
parent | 44e70bdca367344c441b1e26e790ac0465953734 (diff) | |
download | volse-hubzilla-893ba371a90a8f304e4e1707d40cbcc3295a43b2.tar.gz volse-hubzilla-893ba371a90a8f304e4e1707d40cbcc3295a43b2.tar.bz2 volse-hubzilla-893ba371a90a8f304e4e1707d40cbcc3295a43b2.zip |
set_baseurl issue, more cleanup
Diffstat (limited to 'mod')
-rw-r--r-- | mod/ping.php | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/mod/ping.php b/mod/ping.php index f32384952..9b29eacf7 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -180,24 +180,15 @@ function ping_init(&$a) { $t2 = dba_timer(); - $intros1 = q("SELECT `intro`.`id`, `intro`.`datetime`, - `fcontact`.`name`, `fcontact`.`url`, `fcontact`.`photo` - FROM `intro` LEFT JOIN `fcontact` ON `intro`.`fid` = `fcontact`.`id` - WHERE `intro`.`uid` = %d AND `intro`.`blocked` = 0 AND `intro`.`ignore` = 0 AND `intro`.`fid`!=0", + $intr = q("select count(abook_id) as total from abook where (abook_flags & %d) and abook_channel = %d", + intval(ABOOK_FLAG_PENDING), intval(local_user()) ); $t3 = dba_timer(); - $intros2 = q("SELECT `intro`.`id`, `intro`.`datetime`, - `contact`.`name`, `contact`.`url`, `contact`.`photo` - FROM `intro` LEFT JOIN `contact` ON `intro`.`contact-id` = `contact`.`id` - WHERE `intro`.`uid` = %d AND `intro`.`blocked` = 0 AND `intro`.`ignore` = 0 AND `intro`.`contact-id`!=0", - intval(local_user()) - ); - - $intros = count($intros1) + count($intros2); - $result['intros'] = intval($intros); + if($intr) + $result['intros'] = intval($intr[0]['total']); $t4 = dba_timer(); $channel = get_app()->get_channel(); |