summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-02-05 16:35:19 -0500
committerEvan Prodromou <evan@controlyourself.ca>2009-02-05 16:35:19 -0500
commit8775e79e35a2fb343254fdd21b9d6d228cc97a9e (patch)
tree5d7125cb3e206f3081ba468bcc5fb8290c0a3023
parent444c7944809544928e05bd71479f6551acc98fc4 (diff)
parent02eecb4f07fd4bede01bf81b441e04e68b6091ec (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
-rw-r--r--actions/noticesearch.php12
-rw-r--r--actions/tagrss.php16
-rw-r--r--js/facebookapp.js10
-rw-r--r--lib/util.php2
4 files changed, 17 insertions, 23 deletions
diff --git a/actions/noticesearch.php b/actions/noticesearch.php
index a0d723b12..630fb8857 100644
--- a/actions/noticesearch.php
+++ b/actions/noticesearch.php
@@ -154,7 +154,8 @@ class NoticesearchAction extends SearchAction
$this->elementStart('div', 'entry-title');
$this->elementStart('span', 'vcard author');
$avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
- $this->elementStart('a', array('href' => $profile->profileurl));
+ $this->elementStart('a', array('href' => $profile->profileurl,
+ 'class' => 'url'));
$this->element('img', array('src' => ($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_STREAM_SIZE),
'class' => 'avatar photo',
'width' => AVATAR_STREAM_SIZE,
@@ -223,15 +224,6 @@ class NoticesearchAction extends SearchAction
$this->elementEnd('a');
$this->elementEnd('dd');
$this->elementEnd('dl');
-
- $this->elementStart('a',
- array('href' => common_local_url('newnotice',
- array('replyto' => $profile->nickname)),
- 'onclick' => 'doreply("'.$profile->nickname.'"); return false',
- 'title' => _('reply'),
- 'class' => 'replybutton'));
- $this->hidden('posttoken', common_session_token());
- $this->elementEnd('a');
$this->elementEnd('div');
$this->elementEnd('li');
}
diff --git a/actions/tagrss.php b/actions/tagrss.php
index b4c2dcdff..a77fa12c9 100644
--- a/actions/tagrss.php
+++ b/actions/tagrss.php
@@ -25,12 +25,12 @@ require_once(INSTALLDIR.'/lib/rssaction.php');
class TagrssAction extends Rss10Action
{
+ var $tag;
- function init()
- {
- $tag = $this->trimmed('tag');
+ function prepare($args) {
+ parent::prepare($args);
+ $tag = common_canonical_tag($this->trimmed('tag'));
$this->tag = Notice_tag::staticGet('tag', $tag);
-
if (!$this->tag) {
$this->clientError(_('No such tag.'));
return false;
@@ -39,7 +39,7 @@ class TagrssAction extends Rss10Action
}
}
- function get_notices($limit=0)
+ function getNotices($limit=0)
{
$tag = $this->tag;
@@ -48,7 +48,6 @@ class TagrssAction extends Rss10Action
}
$notice = Notice_tag::getStream($tag->tag, 0, ($limit == 0) ? NOTICES_PER_PAGE : $limit);
-
while ($notice->fetch()) {
$notices[] = clone($notice);
}
@@ -56,10 +55,9 @@ class TagrssAction extends Rss10Action
return $notices;
}
- function get_channel()
+ function getChannel()
{
- $tag = $this->tag->tag;
-
+ $tagname = $this->tag->tag;
$c = array('url' => common_local_url('tagrss', array('tag' => $tagname)),
'title' => $tagname,
'link' => common_local_url('tagrss', array('tag' => $tagname)),
diff --git a/js/facebookapp.js b/js/facebookapp.js
index 8ef9aa532..f0696c19e 100644
--- a/js/facebookapp.js
+++ b/js/facebookapp.js
@@ -19,10 +19,12 @@
var max = 140;
var noticeBox = document.getElementById('notice_data-text');
-noticeBox.addEventListener('keyup', keypress);
-noticeBox.addEventListener('keydown', keypress);
-noticeBox.addEventListener('keypress', keypress);
-noticeBox.addEventListener('change', keypress);
+if (noticeBox) {
+ noticeBox.addEventListener('keyup', keypress);
+ noticeBox.addEventListener('keydown', keypress);
+ noticeBox.addEventListener('keypress', keypress);
+ noticeBox.addEventListener('change', keypress);
+}
// Do our the countdown
function keypress(evt) {
diff --git a/lib/util.php b/lib/util.php
index 579f964ac..cbff35a9d 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -736,6 +736,8 @@ function common_fancy_url($action, $args=null)
return common_path("api/statuses/public_timeline.atom");
case 'publicxrds':
return common_path('xrds');
+ case 'tagrss':
+ return common_path('tag/' . $args['tag'] . '/rss');
case 'featuredrss':
return common_path('featuredrss');
case 'favoritedrss':