still a lot of files to bring up to date with new architecture - keep plugging away at them

This commit is contained in:
friendica 2012-11-13 14:37:02 -08:00
parent 67a7d440d9
commit 34f8b06d45
3 changed files with 35 additions and 33 deletions

12
done
View File

@ -33,7 +33,7 @@ include/
delivery.php delivery.php
+ directory.php + directory.php
- email.php - email.php
enotify.php + enotify.php
event.php event.php
+ expire.php + expire.php
fcontact.php fcontact.php
@ -56,7 +56,7 @@ include/
oauth.php oauth.php
oembed.php oembed.php
onepoll.php onepoll.php
Photo.php ? Photo.php
pidfile.php pidfile.php
? plugin.php ? plugin.php
poller.php poller.php
@ -65,7 +65,7 @@ include/
queue_fn.php queue_fn.php
queue.php queue.php
quoteconvert.php quoteconvert.php
salmon.php - salmon.php
Scrape.php Scrape.php
+ security.php + security.php
? session.php ? session.php
@ -118,7 +118,7 @@ mod/
install.php install.php
invite.php invite.php
+ item.php + item.php
like.php + like.php
lockview.php lockview.php
+ login.php + login.php
lostpass.php lostpass.php
@ -172,8 +172,8 @@ mod/
update_profile.php update_profile.php
viewcontacts.php viewcontacts.php
view.php view.php
viewsrc.php + viewsrc.php
wall_attach.php ? wall_attach.php (needs remote permissions refactor)
wallmessage.php wallmessage.php
? wall_upload.php (needs remote permissions refactor) ? wall_upload.php (needs remote permissions refactor)
webfinger.php webfinger.php

View File

@ -11,7 +11,7 @@ function notification($params) {
push_lang($params['language']); push_lang($params['language']);
$banner = t('Friendica Notification'); $banner = t('Red Notification');
$product = FRIENDICA_PLATFORM; $product = FRIENDICA_PLATFORM;
$siteurl = $a->get_baseurl(true); $siteurl = $a->get_baseurl(true);
$thanks = t('Thank You,'); $thanks = t('Thank You,');
@ -39,7 +39,7 @@ function notification($params) {
if($params['type'] == NOTIFY_MAIL) { if($params['type'] == NOTIFY_MAIL) {
$subject = sprintf( t('[Friendica:Notify] New mail received at %s'),$sitename); $subject = sprintf( t('[Red:Notify] New mail received at %s'),$sitename);
$preamble = sprintf( t('%1$s sent you a new private message at %2$s.'),$params['source_name'],$sitename); $preamble = sprintf( t('%1$s sent you a new private message at %2$s.'),$params['source_name'],$sitename);
$epreamble = sprintf( t('%1$s sent you %2$s.'),'[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]', '[url=$itemlink]' . t('a private message') . '[/url]'); $epreamble = sprintf( t('%1$s sent you %2$s.'),'[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]', '[url=$itemlink]' . t('a private message') . '[/url]');
@ -109,7 +109,7 @@ function notification($params) {
// Before this we have the name of the replier on the subject rendering // Before this we have the name of the replier on the subject rendering
// differents subjects for messages on the same thread. // differents subjects for messages on the same thread.
$subject = sprintf( t('[Friendica:Notify] Comment to conversation #%1$d by %2$s'), $parent_id, $params['source_name']); $subject = sprintf( t('[Red:Notify] Comment to conversation #%1$d by %2$s'), $parent_id, $params['source_name']);
$preamble = sprintf( t('%s commented on an item/conversation you have been following.'), $params['source_name']); $preamble = sprintf( t('%s commented on an item/conversation you have been following.'), $params['source_name']);
$epreamble = $dest_str; $epreamble = $dest_str;
@ -120,7 +120,7 @@ function notification($params) {
} }
if($params['type'] == NOTIFY_WALL) { if($params['type'] == NOTIFY_WALL) {
$subject = sprintf( t('[Friendica:Notify] %s posted to your profile wall') , $params['source_name']); $subject = sprintf( t('[Red:Notify] %s posted to your profile wall') , $params['source_name']);
$preamble = sprintf( t('%1$s posted to your profile wall at %2$s') , $params['source_name'], $sitename); $preamble = sprintf( t('%1$s posted to your profile wall at %2$s') , $params['source_name'], $sitename);
@ -135,7 +135,7 @@ function notification($params) {
} }
if($params['type'] == NOTIFY_TAGSELF) { if($params['type'] == NOTIFY_TAGSELF) {
$subject = sprintf( t('[Friendica:Notify] %s tagged you') , $params['source_name']); $subject = sprintf( t('[Red:Notify] %s tagged you') , $params['source_name']);
$preamble = sprintf( t('%1$s tagged you at %2$s') , $params['source_name'], $sitename); $preamble = sprintf( t('%1$s tagged you at %2$s') , $params['source_name'], $sitename);
$epreamble = sprintf( t('%1$s [url=%2$s]tagged you[/url].') , $epreamble = sprintf( t('%1$s [url=%2$s]tagged you[/url].') ,
'[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]', '[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]',
@ -149,7 +149,7 @@ function notification($params) {
if($params['type'] == NOTIFY_POKE) { if($params['type'] == NOTIFY_POKE) {
$subject = sprintf( t('[Friendica:Notify] %1$s poked you') , $params['source_name']); $subject = sprintf( t('[Red:Notify] %1$s poked you') , $params['source_name']);
$preamble = sprintf( t('%1$s poked you at %2$s') , $params['source_name'], $sitename); $preamble = sprintf( t('%1$s poked you at %2$s') , $params['source_name'], $sitename);
$epreamble = sprintf( t('%1$s [url=%2$s]poked you[/url].') , $epreamble = sprintf( t('%1$s [url=%2$s]poked you[/url].') ,
'[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]', '[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]',
@ -166,7 +166,7 @@ function notification($params) {
} }
if($params['type'] == NOTIFY_TAGSHARE) { if($params['type'] == NOTIFY_TAGSHARE) {
$subject = sprintf( t('[Friendica:Notify] %s tagged your post') , $params['source_name']); $subject = sprintf( t('[Red:Notify] %s tagged your post') , $params['source_name']);
$preamble = sprintf( t('%1$s tagged your post at %2$s') , $params['source_name'], $sitename); $preamble = sprintf( t('%1$s tagged your post at %2$s') , $params['source_name'], $sitename);
$epreamble = sprintf( t('%1$s tagged [url=%2$s]your post[/url]') , $epreamble = sprintf( t('%1$s tagged [url=%2$s]your post[/url]') ,
'[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]', '[url=' . $params['source_link'] . ']' . $params['source_name'] . '[/url]',
@ -179,7 +179,7 @@ function notification($params) {
} }
if($params['type'] == NOTIFY_INTRO) { if($params['type'] == NOTIFY_INTRO) {
$subject = sprintf( t('[Friendica:Notify] Introduction received')); $subject = sprintf( t('[Red:Notify] Introduction received'));
$preamble = sprintf( t('You\'ve received an introduction from \'%1$s\' at %2$s'), $params['source_name'], $sitename); $preamble = sprintf( t('You\'ve received an introduction from \'%1$s\' at %2$s'), $params['source_name'], $sitename);
$epreamble = sprintf( t('You\'ve received [url=%1$s]an introduction[/url] from %2$s.'), $epreamble = sprintf( t('You\'ve received [url=%1$s]an introduction[/url] from %2$s.'),
$itemlink, $itemlink,
@ -193,7 +193,7 @@ function notification($params) {
} }
if($params['type'] == NOTIFY_SUGGEST) { if($params['type'] == NOTIFY_SUGGEST) {
$subject = sprintf( t('[Friendica:Notify] Friend suggestion received')); $subject = sprintf( t('[Red:Notify] Friend suggestion received'));
$preamble = sprintf( t('You\'ve received a friend suggestion from \'%1$s\' at %2$s'), $params['source_name'], $sitename); $preamble = sprintf( t('You\'ve received a friend suggestion from \'%1$s\' at %2$s'), $params['source_name'], $sitename);
$epreamble = sprintf( t('You\'ve received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s.'), $epreamble = sprintf( t('You\'ve received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s.'),
$itemlink, $itemlink,

View File

@ -3,34 +3,36 @@
function viewsrc_content(&$a) { function viewsrc_content(&$a) {
if(! local_user()) { $o = '';
notice( t('Access denied.') . EOL);
return;
}
$item_id = ((argc() > 1) ? intval(argv(1)) : 0); $item_id = ((argc() > 1) ? intval(argv(1)) : 0);
$raw_output = ((argc() > 2 && argv[2] === 'raw') ? true : false);
if(! local_user()) {
notice( t('Permission denied.') . EOL);
}
if(! $item_id) { if(! $item_id) {
$a->error = 404; $a->error = 404;
notice( t('Item not found.') . EOL); notice( t('Item not found.') . EOL);
return;
} }
$r = q("SELECT `item`.`body` FROM `item` if(local_user() && $item_id) {
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 $r = q("select body from item where item_restrict = 0 and uid = %d and id = %d limit 1",
and `item`.`moderated` = 0 intval(local_user()),
AND `item`.`id` = %d LIMIT 1", intval($item_id)
intval(local_user()), );
intval($item_id)
);
if(count($r)) { if($r)
$o = str_replace("\n",'<br />',$r[0]['body']); $o = (($raw_output) ? $r[0]['body'] : str_replace("\n",'<br />',$r[0]['body']));
if(is_ajax()) {
echo $o;
killme();
}
} }
if(is_ajax()) {
echo $o;
killme();
}
return $o; return $o;
} }