summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-08-03 22:47:57 +0000
committerZach Copley <zach@controlyourself.ca>2009-08-03 22:47:57 +0000
commitdccd4aa68d7ae449434c63380f21d8070913778f (patch)
tree1a25d40f20326047eb0776f910e155362e8e33cb /actions
parent981fa1b33a8073bd0d53d8bee7dfccd171685e61 (diff)
parentff6e976d0315c57fc5b7e31845e9a3bad4f095bc (diff)
Merge branch '0.8.x' into twitter-oauth
Diffstat (limited to 'actions')
-rw-r--r--actions/api.php1
-rw-r--r--actions/conversation.php2
-rw-r--r--actions/public.php2
-rw-r--r--actions/twitapifavorites.php26
-rw-r--r--actions/twitapigroups.php31
-rw-r--r--actions/twitapitags.php5
6 files changed, 36 insertions, 31 deletions
diff --git a/actions/api.php b/actions/api.php
index 8b92889f8..99ab262ad 100644
--- a/actions/api.php
+++ b/actions/api.php
@@ -130,6 +130,7 @@ class ApiAction extends Action
'laconica/wadl',
'tags/timeline',
'oembed/oembed',
+ 'groups/show',
'groups/timeline');
static $bareauth = array('statuses/user_timeline',
diff --git a/actions/conversation.php b/actions/conversation.php
index c8755ba6e..6b5d8d54d 100644
--- a/actions/conversation.php
+++ b/actions/conversation.php
@@ -167,6 +167,8 @@ class ConversationTree extends NoticeList
function _buildTree()
{
+ $cnt = 0;
+
$this->tree = array();
$this->table = array();
diff --git a/actions/public.php b/actions/public.php
index ef9ef0d1a..d0317ac70 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -229,7 +229,7 @@ class PublicAction extends Action
// $top->show();
$pop = new PopularNoticeSection($this);
$pop->show();
- $gbp = new GroupsByPostsSection($this);
+ $gbp = new GroupsByMembersSection($this);
$gbp->show();
$feat = new FeaturedUsersSection($this);
$feat->show();
diff --git a/actions/twitapifavorites.php b/actions/twitapifavorites.php
index 8256668f3..6f9361065 100644
--- a/actions/twitapifavorites.php
+++ b/actions/twitapifavorites.php
@@ -207,32 +207,10 @@ class TwitapifavoritesAction extends TwitterapiAction
$other = User::staticGet('id', $notice->profile_id);
if ($other && $other->id != $user->id) {
if ($other->email && $other->emailnotifyfav) {
- $this->notify_mail($other, $user, $notice);
+ mail_notify_fave($other, $user, $notice);
}
# XXX: notify by IM
# XXX: notify by SMS
}
}
-
- function notify_mail($other, $user, $notice)
- {
- $profile = $user->getProfile();
- $bestname = $profile->getBestName();
- $subject = sprintf(_('%s added your notice as a favorite'), $bestname);
- $body = sprintf(_("%1\$s just added your notice from %2\$s as one of their favorites.\n\n" .
- "In case you forgot, you can see the text of your notice here:\n\n" .
- "%3\$s\n\n" .
- "You can see the list of %1\$s's favorites here:\n\n" .
- "%4\$s\n\n" .
- "Faithfully yours,\n" .
- "%5\$s\n"),
- $bestname,
- common_exact_date($notice->created),
- common_local_url('shownotice', array('notice' => $notice->id)),
- common_local_url('showfavorites', array('nickname' => $user->nickname)),
- common_config('site', 'name'));
-
- mail_to_user($other, $subject, $body);
- }
-
-} \ No newline at end of file
+}
diff --git a/actions/twitapigroups.php b/actions/twitapigroups.php
index 71a0776f4..82604ebff 100644
--- a/actions/twitapigroups.php
+++ b/actions/twitapigroups.php
@@ -51,6 +51,32 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
class TwitapigroupsAction extends TwitterapiAction
{
+ function show($args, $apidata)
+ {
+ parent::handle($args);
+
+ common_debug("in groups api action");
+
+ $this->auth_user = $apidata['user'];
+ $group = $this->get_group($apidata['api_arg'], $apidata);
+
+ if (empty($group)) {
+ $this->clientError('Not Found', 404, $apidata['content-type']);
+ return;
+ }
+
+ switch($apidata['content-type']) {
+ case 'xml':
+ $this->show_single_xml_group($group);
+ break;
+ case 'json':
+ $this->show_single_json_group($group);
+ break;
+ default:
+ $this->clientError(_('API method not found!'), $code = 404);
+ }
+ }
+
function timeline($args, $apidata)
{
parent::handle($args);
@@ -88,8 +114,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
$this->show_xml_timeline($notice);
break;
case 'rss':
- $this->show_rss_timeline($notice, $title, $link,
- $subtitle, $suplink);
+ $this->show_rss_timeline($notice, $title, $link, $subtitle);
break;
case 'atom':
if (isset($apidata['api_arg'])) {
@@ -101,7 +126,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
'api/laconica/groups/timeline.atom';
}
$this->show_atom_timeline($notice, $title, $id, $link,
- $subtitle, $suplink, $selfuri);
+ $subtitle, null, $selfuri);
break;
case 'json':
$this->show_json_timeline($notice);
diff --git a/actions/twitapitags.php b/actions/twitapitags.php
index 5c8527530..e19e1b1ed 100644
--- a/actions/twitapitags.php
+++ b/actions/twitapitags.php
@@ -88,8 +88,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
$this->show_xml_timeline($notice);
break;
case 'rss':
- $this->show_rss_timeline($notice, $title, $link,
- $subtitle, $suplink);
+ $this->show_rss_timeline($notice, $title, $link, $subtitle);
break;
case 'atom':
if (isset($apidata['api_arg'])) {
@@ -101,7 +100,7 @@ require_once INSTALLDIR.'/lib/twitterapi.php';
'api/laconica/tags/timeline.atom';
}
$this->show_atom_timeline($notice, $title, $id, $link,
- $subtitle, $suplink, $selfuri);
+ $subtitle, null, $selfuri);
break;
case 'json':
$this->show_json_timeline($notice);