function onEndShowScripts($action)
{
- $timeline = null;
+ $path = null;
switch ($action->trimmed('action')) {
case 'public':
- $timeline = 'timelines-public';
+ $path = array('public');
break;
case 'tag':
$tag = $action->trimmed('tag');
if (!empty($tag)) {
- $timeline = 'timelines-tag-'.$tag;
+ $path = array('tag', $tag);
} else {
return true;
}
return true;
}
+ $timeline = $this->_pathToChannel($path);
+
$scripts = $this->_getScripts();
foreach ($scripts as $script) {
function onEndNoticeSave($notice)
{
- $timelines = array();
+ $paths = array();
// XXX: Add other timelines; this is just for the public one
if ($notice->is_local ||
($notice->is_local == 0 && !common_config('public', 'localonly'))) {
- $timelines[] = 'timelines-public';
+ $paths[] = array('public');
}
$tags = $this->getNoticeTags($notice);
if (!empty($tags)) {
foreach ($tags as $tag) {
- $timelines[] = 'timelines-tag-' . $tag;
+ $paths[] = array('tag', $tag);
}
}
- if (count($timelines) > 0) {
+ if (count($paths) > 0) {
$json = $this->noticeAsJson($notice);
$this->_connect();
- foreach ($timelines as $timeline) {
+ foreach ($paths as $path) {
+ $timeline = $this->_pathToChannel($path);
$this->_publish($timeline, $json);
}
function _disconnect()
{
}
+
+ function _pathToChannel($path)
+ {
+ return '';
+ }
}