summaryrefslogtreecommitdiff
path: root/actions/twitapidirect_messages.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-12-23 14:33:23 -0500
committerEvan Prodromou <evan@prodromou.name>2008-12-23 14:33:23 -0500
commit04ef1ba8eee7a9e2a565d7b4b747ef607665d562 (patch)
treed56ac33bd6bfb8f8641cc9f63b0f6af52b6edfb9 /actions/twitapidirect_messages.php
parenteb2f9c98ac115ce67e9a740b200c832153ffa05c (diff)
change function headers to K&R style
Another huge change, for PEAR code standards compliance. Function headers have to be in K&R style (opening brace on its own line), instead of having the opening brace on the same line as the function and parameters. So, a little perl magic found all the function definitions and move the opening brace to the next line (properly indented... usually). darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
Diffstat (limited to 'actions/twitapidirect_messages.php')
-rw-r--r--actions/twitapidirect_messages.php30
1 files changed, 20 insertions, 10 deletions
diff --git a/actions/twitapidirect_messages.php b/actions/twitapidirect_messages.php
index 7adb4eadd..e9f7aa0bf 100644
--- a/actions/twitapidirect_messages.php
+++ b/actions/twitapidirect_messages.php
@@ -23,17 +23,20 @@ require_once(INSTALLDIR.'/lib/twitterapi.php');
class Twitapidirect_messagesAction extends TwitterapiAction {
- function direct_messages($args, $apidata) {
+ function direct_messages($args, $apidata)
+ {
parent::handle($args);
return $this->show_messages($args, $apidata, 'received');
}
- function sent($args, $apidata) {
+ function sent($args, $apidata)
+ {
parent::handle($args);
return $this->show_messages($args, $apidata, 'sent');
}
- function show_messages($args, $apidata, $type) {
+ function show_messages($args, $apidata, $type)
+ {
$user = $apidata['user'];
@@ -110,7 +113,8 @@ class Twitapidirect_messagesAction extends TwitterapiAction {
}
// had to change this from "new" to "create" to avoid PHP reserved word
- function create($args, $apidata) {
+ function create($args, $apidata)
+ {
parent::handle($args);
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
@@ -173,12 +177,14 @@ class Twitapidirect_messagesAction extends TwitterapiAction {
}
- function destroy($args, $apidata) {
+ function destroy($args, $apidata)
+ {
parent::handle($args);
common_server_error(_('API method under construction.'), $code=501);
}
- function show_xml_dmsgs($message) {
+ function show_xml_dmsgs($message)
+ {
$this->init_document('xml');
common_element_start('direct-messages', array('type' => 'array'));
@@ -200,7 +206,8 @@ class Twitapidirect_messagesAction extends TwitterapiAction {
}
- function show_json_dmsgs($message) {
+ function show_json_dmsgs($message)
+ {
$this->init_document('json');
@@ -223,7 +230,8 @@ class Twitapidirect_messagesAction extends TwitterapiAction {
}
- function show_rss_dmsgs($message, $title, $link, $subtitle) {
+ function show_rss_dmsgs($message, $title, $link, $subtitle)
+ {
$this->init_document('rss');
@@ -252,7 +260,8 @@ class Twitapidirect_messagesAction extends TwitterapiAction {
}
- function show_atom_dmsgs($message, $title, $link, $subtitle) {
+ function show_atom_dmsgs($message, $title, $link, $subtitle)
+ {
$this->init_document('atom');
@@ -279,7 +288,8 @@ class Twitapidirect_messagesAction extends TwitterapiAction {
}
// swiped from MessageAction. Should it be place in util.php?
- function notify($from, $to, $message) {
+ function notify($from, $to, $message)
+ {
mail_notify_message($message, $from, $to);
# XXX: Jabber, SMS notifications... probably queued
}