Permalink
Browse files

some more cleanup

  • Loading branch information...
1 parent 219a395 commit bfe399363893d6c77bf98838e5599edb3cf9e601 @splitbrain splitbrain committed Mar 27, 2012
Showing with 5 additions and 3 deletions.
  1. +3 −1 frame.php
  2. +2 −2 helper.php
View
@@ -10,6 +10,7 @@
html_header();
+echo "<!-- $CID -->";
if(!$CID){
html_authrequired();
@@ -32,6 +33,7 @@
function html_follow(){
global $FOLLOW;
+ global $ID;
if($FOLLOW){
echo '<a href="frame.php?id='.$ID.'&amp;follow='.hsc($FOLLOW).'" class="button unfollow">Unfollow</a>';
@@ -57,7 +59,7 @@ function html_comments($items){
foreach($items as $item){
if(!isset($item['actor'])) $item['actor'] = $item['user'];
- #FIXME skip non-comments
+ if($item['type'] == 'TrackedChange') continue;
echo '<li id="chatter__comment'.$item['id'].'">';
echo '<img src="'.$item['actor']['photo']['smallPhotoUrl'].'" width="45" height="45" /> ';
View
@@ -189,15 +189,15 @@ public function apicall($method,$endpoint,$data=array(),$usejson=true){
*/
public function id2chatter($id){
$inst = $this->getConf('consumer_key'); //unique key per setup
- $key = p_get_metadata($id,"plugin chatter $inst");
+ $key = p_get_metadata($id,"plugin chatter-$inst");
if($key) return $key;
// no key yet, try to create a new SF object
$resp = $this->apicall('POST','/sobjects/WikiPage__c',array('name'=>$id,'url__c'=>wl($id,'',true,'&')));
if(!$resp) return false;
$key = $resp['id'];
- p_set_metadata($id,array('plugin' => array('chatter' => array($inst => $key))));
+ p_set_metadata($id,array('plugin' => array("chatter-$inst" => $key)));
return $key;
}

0 comments on commit bfe3993

Please sign in to comment.