Sync RealtimePlugin with 0.9.x

This commit is contained in:
Sarven Capadisli 2009-11-04 09:19:39 +00:00
parent df1ee6867e
commit cc0a6dce36

View File

@ -230,6 +230,7 @@ class RealtimePlugin extends Plugin
} }
$action->showContentBlock(); $action->showContentBlock();
$action->showScripts();
$action->elementEnd('body'); $action->elementEnd('body');
return false; // No default processing return false; // No default processing
} }
@ -239,13 +240,13 @@ class RealtimePlugin extends Plugin
// FIXME: this code should be abstracted to a neutral third // FIXME: this code should be abstracted to a neutral third
// party, like Notice::asJson(). I'm not sure of the ethics // party, like Notice::asJson(). I'm not sure of the ethics
// of refactoring from within a plugin, so I'm just abusing // of refactoring from within a plugin, so I'm just abusing
// the TwitterApiAction method. Don't do this unless you're me! // the ApiAction method. Don't do this unless you're me!
require_once(INSTALLDIR.'/lib/twitterapi.php'); require_once(INSTALLDIR.'/lib/api.php');
$act = new TwitterApiAction('/dev/null'); $act = new ApiAction('/dev/null');
$arr = $act->twitter_status_array($notice, true); $arr = $act->twitterStatusArray($notice, true);
$arr['url'] = $notice->bestUrl(); $arr['url'] = $notice->bestUrl();
$arr['html'] = htmlspecialchars($notice->rendered); $arr['html'] = htmlspecialchars($notice->rendered);
$arr['source'] = htmlspecialchars($arr['source']); $arr['source'] = htmlspecialchars($arr['source']);