예제 #1
0
              </script>
            <?  
          }
          else
          {
            ?><span class="green"><?php 
echo $item['url'];
?>
</span><?
          }
          ?>
          </div>
        </td>
        <td>&nbsp;</td>
        <td valign="top" width="*"><div id="frq_<?php 
echo $ent->key();
?>
">
            <input type="button" value="<?php 
echo l10n('friend.addnow');
?>
" 
              onclick="do_friend_request(<?php 
echo $ent->key();
?>
);"/>          
            <?php 
echo l10n('addto');
?>
            <select id="group_select_<?php 
echo $ent->key();
예제 #2
0
	$post->localUserEntity = $ne1->key();
  $post->author($ne1->ds);
  $post->owner($ne1->ds);
  $post->data['text'] = 'This is a test message. Umlauts like üöä should be preserved.';
  $post->save();
  tlog($post->ds['m_key'] > 0, 'HubbubMessage post in DB', 'OK (#'.$post->ds['m_key'].')', 'fail');
  tlog($post->ds['m_publish'] == 'Y', 'HubbubMessage post m_publish==Y', 'OK', 'fail (localUserEntity='.$post->localUserEntity.')');
  
  // now, this post should be on $ne1's wall
	$wallPosts1 = $this->msg->getPostList($ne1->key());
	foreach($wallPosts1['list'] as $pds)
	  if($pds['m_key'] == $post->ds['m_key']) $postFound1 = true; 
	tlog($postFound1, 'msg->getPostList(for '.$u1name.':e'.$ne1->key().') post found', 'OK', 'fail '.dumpArray($wallPosts1));
	
	// the post should also appear in $ne2's stream
	$streamPosts1 = $this->msg->getStream($ne2->key());
  foreach($streamPosts1['list'] as $pds)
    if($pds['m_key'] == $post->ds['m_key']) $postFound2 = true; 
  tlog($postFound2, 'getStream->getStream(for '.$u2name.':u'.$u2['u_key'].'-e'.$ne2->key().') post found', 'OK', 'fail '.dumpArray($streamPosts1));
  
  // feed polling, let's pretend ne2 is polling ne1
	$fpServ = new HubbubServer($ne1->ds['server']);
  $feed = $this->endpoint->pollFeed($fpServ, time()-1*60);
  tlog($feed['result'] == 'OK', 'Endpoint pollFeed('.$ne1->ds['server'].') Result Code', 'OK', 'fail ('.$feed['reason'].')');
  foreach($feed['feed'] as $item)
    if($item['msgid'] ==   $post->ds['m_id']) $postFound3 = $item;
  tlog(isset($postFound3), 'Posted item found in remote feed', 'OK', 'fail');  
  tlog($postFound3['text'] == $post->data['text'], 'Post content unicode test', 'OK', 'fail');  
  
  tsection('Foreign Posts');