pull in new 'writable' dfrn flag

This commit is contained in:
Friendika 2011-04-11 03:22:09 -07:00
parent 9133a2384a
commit c8f32536ff
7 changed files with 25 additions and 15 deletions

View file

@ -73,6 +73,18 @@ define ( 'PAGE_SOAPBOX', 1 );
define ( 'PAGE_COMMUNITY', 2 ); define ( 'PAGE_COMMUNITY', 2 );
define ( 'PAGE_FREELOVE', 3 ); define ( 'PAGE_FREELOVE', 3 );
/**
* Network and protocol family types
*/
define ( 'NETWORK_DFRN', 'dfrn'); // Friendika, Mistpark, other DFRN implementations
define ( 'NETWORK_OSTATUS', 'stat'); // status.net, identi.ca, GNU-social, other OStatus implementations
define ( 'NETWORK_FEED', 'feed'); // RSS/Atom feeds with no known "post/notify" protocol
define ( 'NETWORK_DIASPORA', 'dspr'); // Diaspora
define ( 'NETWORK_MAIL', 'mail'); // IMAP/POP
define ( 'NETWORK_FACEBOOK', 'face'); // Facebook API
/** /**
* Maximum number of "people who like (or don't like) this" that we will list by name * Maximum number of "people who like (or don't like) this" that we will list by name
*/ */

View file

@ -354,6 +354,7 @@ function notifier_run($argv, $argc){
case 'mail': case 'mail':
case 'dspr': case 'dspr':
case 'feed': case 'feed':
case 'face':
default: default:
break; break;
} }

View file

@ -85,7 +85,7 @@ function display_content(&$a) {
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0

View file

@ -202,7 +202,7 @@ function network_content(&$a, $update = 0) {
// "New Item View" - show all items unthreaded in reverse created date order // "New Item View" - show all items unthreaded in reverse created date order
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`writable`,
`contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item`, `contact` FROM `item`, `contact`
@ -246,7 +246,7 @@ function network_content(&$a, $update = 0) {
$parents_str = implode(', ', $parents_arr); $parents_str = implode(', ', $parents_arr);
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`writable`,
`contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item`, (SELECT `p`.`id`,`p`.`created` FROM `item` AS `p` WHERE `p`.`parent`=`p`.`id`) as `parentitem`, `contact` FROM `item`, (SELECT `p`.`id`,`p`.`created` FROM `item` AS `p` WHERE `p`.`parent`=`p`.`id`) as `parentitem`, `contact`

View file

@ -1259,17 +1259,14 @@ function photos_content(&$a) {
if(count($r)) { if(count($r)) {
foreach($r as $rr) { foreach($r as $rr) {
$o .= replace_macros($tpl,array( $o .= replace_macros($tpl,array(
'$id' => $rr['id'], '$id' => $rr['id'],
'$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'],
. '/image/' . $rr['resource-id'],
'$phototitle' => t('View Photo'), '$phototitle' => t('View Photo'),
'$imgsrc' => $a->get_baseurl() . '/photo/' '$imgsrc' => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg',
. $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg', '$albumlink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
'$albumlink' => $a->get_baseurl() . '/photos/' '$albumname' => $rr['album'],
. $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']), '$albumalt' => t('View Album'),
'$albumname' => $rr['album'], '$imgalt' => $rr['filename']
'$albumalt' => t('View Album'),
'$imgalt' => $rr['filename']
)); ));
} }

View file

@ -272,7 +272,7 @@ function profile_content(&$a, $update = 0) {
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`,
`contact`.`thumb`, `contact`.`self`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0

View file

@ -65,7 +65,7 @@ function search_content(&$a) {
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`,
`user`.`nickname` `user`.`nickname`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`