]> git.mxchange.org Git - friendica.git/commitdiff
pull in new 'writable' dfrn flag
authorFriendika <info@friendika.com>
Mon, 11 Apr 2011 10:22:09 +0000 (03:22 -0700)
committerFriendika <info@friendika.com>
Mon, 11 Apr 2011 10:22:09 +0000 (03:22 -0700)
boot.php
include/notifier.php
mod/display.php
mod/network.php
mod/photos.php
mod/profile.php
mod/search.php

index 5d8417bd224a5f1c5660d4c1350b7985fed8b639..2a4c29c1aec2e9aed1df47a1f78fad1c246beb18 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -73,6 +73,18 @@ define ( 'PAGE_SOAPBOX',           1 );
 define ( 'PAGE_COMMUNITY',         2 );
 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
  */
index ca2304845ed276655aa009c8d7717e72b3b31e65..9d74f8b9b57dae5f7bc566c41784d75c7081e4c8 100644 (file)
@@ -354,6 +354,7 @@ function notifier_run($argv, $argc){
                                case 'mail':
                                case 'dspr':
                                case 'feed':
+                               case 'face':
                                default:
                                        break;
                        }
index fb69523e91b095d7485edf74c714ce8b368b43fa..dd880907e020e2383f66517e42013aaf325e159a 100644 (file)
@@ -85,7 +85,7 @@ function display_content(&$a) {
 
        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
                `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`
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
index 5461aae3feb5de3382f2e7716eddd739decf3f96..29b852c07f725c848545335720002792aae74569 100644 (file)
@@ -202,7 +202,7 @@ function network_content(&$a, $update = 0) {
                // "New Item View" - show all items unthreaded in reverse created date order
 
                $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`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
                        FROM `item`, `contact`
@@ -246,7 +246,7 @@ function network_content(&$a, $update = 0) {
                        $parents_str = implode(', ', $parents_arr);
 
                        $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`.`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`
index 2e0ccd248fd2865625debbe5b63fa96a212ebd4b..757b4685d91908d9b2825d78b39b13dc86f46cf2 100644 (file)
@@ -1259,17 +1259,14 @@ function photos_content(&$a) {
        if(count($r)) {
                foreach($r as $rr) {
                        $o .= replace_macros($tpl,array(
-                               '$id' => $rr['id'],
-                               '$photolink' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] 
-                                       . '/image/' . $rr['resource-id'],
+                               '$id'         => $rr['id'],
+                               '$photolink'  => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $rr['resource-id'],
                                '$phototitle' => t('View Photo'),
-                               '$imgsrc' => $a->get_baseurl() . '/photo/' 
-                                       . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg',
-                               '$albumlink' => $a->get_baseurl() . '/photos/' 
-                                       . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
-                               '$albumname' => $rr['album'],
-                               '$albumalt' => t('View Album'),
-                               '$imgalt' => $rr['filename']
+                               '$imgsrc'     => $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . ((($rr['scale']) == 6) ? 4 : $rr['scale']) . '.jpg',
+                               '$albumlink'  => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/album/' . bin2hex($rr['album']),
+                               '$albumname'  => $rr['album'],
+                               '$albumalt'   => t('View Album'),
+                               '$imgalt'     => $rr['filename']
                        ));
 
                }
index f98c28f8fc72f239bb2581b5c86417e823c09335..a12fd9af2c81236ef5da9dbe1ca473b1224262cb 100644 (file)
@@ -272,7 +272,7 @@ function profile_content(&$a, $update = 0) {
  
                $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
                        `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`
                        FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
                        WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
index e0a8506b68546224b0c222157a20dc852242ec23..23b2ddb7e3884a0445595ab6a34379df2c285845 100644 (file)
@@ -65,7 +65,7 @@ function search_content(&$a) {
 
        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
                `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`,
                `user`.`nickname`
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`