more dfrn_poll

This commit is contained in:
Mike Macgirvin 2010-07-18 06:02:19 -07:00
parent 5ed87a44e6
commit 5bdff4d44c
2 changed files with 15 additions and 9 deletions

View file

@ -1,5 +1,6 @@
<?php <?php
require_once('include/items.php');
function dfrn_poll_init(&$a) { function dfrn_poll_init(&$a) {
@ -16,6 +17,12 @@ function dfrn_poll_init(&$a) {
return; return;
if(($dfrn_id == '*') && ($a->argc > 1) && (intval($a->argv[1]))) {
$o = get_feed_for($a,'*', $a->argv[1],$last_update);
echo $o;
killme();
}
if((x($type)) && ($type == 'profile')) { if((x($type)) && ($type == 'profile')) {
$r = q("SELECT `contact`.*, `user`.`nickname` $r = q("SELECT `contact`.*, `user`.`nickname`
@ -101,7 +108,7 @@ function dfrn_poll_post(&$a) {
dbesc($challenge) dbesc($challenge)
); );
if(! count($r)) if(! count($r))
xml_status(3); killme();
$type = $r[0]['type']; $type = $r[0]['type'];
$last_update = $r[0]['last_update']; $last_update = $r[0]['last_update'];
@ -116,7 +123,7 @@ function dfrn_poll_post(&$a) {
dbesc($dfrn_id) dbesc($dfrn_id)
); );
if(! count($r)) if(! count($r))
xml_status(3); killme();
$owner_uid = $r[0]['uid']; $owner_uid = $r[0]['uid'];
$contact_id = $r[0]['id']; $contact_id = $r[0]['id'];
@ -150,17 +157,15 @@ function dfrn_poll_post(&$a) {
killme(); killme();
return; // NOTREACHED return; // NOTREACHED
} }
else {
$o = get_feed_for($a,$dfrn_id, $a->argv[1], $last_update);
echo $o;
killme();
}
} }
function dfrn_poll_content(&$a) {
}

View file

@ -19,3 +19,4 @@ ALTER TABLE `user` ADD `pwdreset` CHAR( 255 ) NOT NULL AFTER `blocked` ;
ADD `url` CHAR( 255 ) NOT NULL AFTER `cmd` , ADD `url` CHAR( 255 ) NOT NULL AFTER `cmd` ,
ADD `last_update` CHAR( 255 ) NOT NULL AFTER `url` ; ADD `last_update` CHAR( 255 ) NOT NULL AFTER `url` ;
ALTER TABLE `contact` ADD `last-update` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `ret-pubkey` ;