* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
class ApiDirectMessageAction extends ApiAuthAction
{
var $messages = null;
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
function prepare($args)
{
parent::prepare($args);
// Action was called by /api/direct_messages/sent.format
$this->title = sprintf(
- // TRANS: %s is a user nickname.
+ // TRANS: Title. %s is a user nickname.
_("Direct messages from %s"),
$this->user->nickname
);
$this->subtitle = sprintf(
- // TRANS: %s is a user nickname.
+ // TRANS: Subtitle. %s is a user nickname.
_("All the direct messages sent from %s"),
$this->user->nickname
);
$this->id = "tag:$taguribase:SentDirectMessages:" . $this->user->id;
} else {
$this->title = sprintf(
- // TRANS: %s is a user nickname.
+ // TRANS: Title. %s is a user nickname.
_("Direct messages to %s"),
$this->user->nickname
);
$this->subtitle = sprintf(
- // TRANS: %s is a user nickname.
+ // TRANS: Subtitle. %s is a user nickname.
_("All the direct messages sent to %s"),
$this->user->nickname
);
*
* @return void
*/
-
function handle($args)
{
parent::handle($args);
*
* @return void
*/
-
function showMessages()
{
switch($this->format) {
*
* @return array notices
*/
-
function getMessages()
{
$message = new Message();
*
* @return boolean true
*/
-
function isReadOnly($args)
{
return true;
*
* @return string datestamp of the latest notice in the stream
*/
-
function lastModified()
{
if (!empty($this->messages)) {
*
* @return void
*/
-
function showXmlDirectMessages()
{
$this->initDocument('xml');
*
* @return void
*/
-
function showJsonDirectMessages()
{
$this->initDocument('json');
*
* @return void
*/
-
function showRssDirectMessages()
{
$this->initDocument('rss');
*
* @return void
*/
-
function showAtomDirectMessages()
{
$this->initDocument('atom');
*
* @return string etag
*/
-
function etag()
{
if (!empty($this->messages)) {
return null;
}
-
}