require_once('include/message.php');
require_once('include/Smilies.php');
-function message_init(&$a) {
+function message_init(App &$a) {
$tabs = '';
'$tabs'=>$tabs,
'$new'=>$new,
));
- $base = $a->get_baseurl();
+ $base = App::get_baseurl();
$head_tpl = get_markup_template('message-head.tpl');
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$base' => $base
));
$end_tpl = get_markup_template('message-end.tpl');
$a->page['end'] .= replace_macros($end_tpl,array(
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$base' => $base
));
}
-function message_post(&$a) {
+function message_post(App &$a) {
- if(! local_user()) {
+ if (! local_user()) {
notice( t('Permission denied.') . EOL);
return;
}
-function message_content(&$a) {
+function message_content(App &$a) {
$o = '';
nav_set_selected('messages');
- if(! local_user()) {
+ if (! local_user()) {
notice( t('Permission denied.') . EOL);
return;
}
- $myprofile = $a->get_baseurl().'/profile/' . $a->user['nickname'];
+ $myprofile = App::get_baseurl().'/profile/' . $a->user['nickname'];
$tpl = get_markup_template('mail_head.tpl');
$header = replace_macros($tpl, array(
if($r) {
info( t('Message deleted.') . EOL );
}
- //goaway($a->get_baseurl(true) . '/message' );
+ //goaway(App::get_baseurl(true) . '/message' );
goaway($_SESSION['return_url']);
}
else {
if($r)
info( t('Conversation removed.') . EOL );
}
- //goaway($a->get_baseurl(true) . '/message' );
+ //goaway(App::get_baseurl(true) . '/message' );
goaway($_SESSION['return_url']);
}
$tpl = get_markup_template('msg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$nickname' => $a->user['nickname'],
'$linkurl' => t('Please enter a link URL:')
$tpl = get_markup_template('msg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$nickname' => $a->user['nickname'],
'$linkurl' => t('Please enter a link URL:')
$_SESSION['return_url'] = $a->query_string;
- if($a->argc == 1) {
+ if ($a->argc == 1) {
// List messages
$r = get_messages(local_user(), $a->pager['start'], $a->pager['itemspage']);
- if(! dbm::is_result($r)) {
+ if (! dbm::is_result($r)) {
info( t('No messages.') . EOL);
return $o;
}
$tpl = get_markup_template('msg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$nickname' => $a->user['nickname'],
'$linkurl' => t('Please enter a link URL:')
$tpl = get_markup_template('msg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$nickname' => $a->user['nickname'],
'$linkurl' => t('Please enter a link URL:')
$tpl = get_markup_template($t);
$rslt = '';
- $myprofile = $a->get_baseurl().'/profile/' . $a->user['nickname'];
+ $myprofile = App::get_baseurl().'/profile/' . $a->user['nickname'];
foreach($msg as $rr) {