aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addon/facebook/facebook.php27
-rw-r--r--boot.php2
-rw-r--r--doc/Connectors.md2
-rw-r--r--include/acl_selectors.php2
-rw-r--r--include/queue.php16
-rw-r--r--mod/friendika.php2
-rw-r--r--mod/match.php1
-rw-r--r--mod/photos.php26
-rw-r--r--mod/qsearch.php2
-rw-r--r--mod/settings.php26
-rw-r--r--mod/uexport.php4
11 files changed, 90 insertions, 20 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index dc1aa02dd..3cc40330c 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -438,7 +438,7 @@ function facebook_post_hook(&$a,&$b) {
logger('facebook reply id=' . $reply);
}
- if($b['private'] && $reply == false) {
+ if($b['private'] && $reply === false) {
$allow_people = expand_acl($b['allow_cid']);
$allow_groups = expand_groups(expand_acl($b['allow_gid']));
$deny_people = expand_acl($b['deny_cid']);
@@ -624,19 +624,24 @@ function facebook_post_hook(&$a,&$b) {
// "test_mode" prevents anything from actually being posted.
// Otherwise, let's do it.
- if(! get_config('facebook','test_mode'))
+ if(! get_config('facebook','test_mode')) {
$x = post_url($url, $postvars);
- $retj = json_decode($x);
- if($retj->id) {
- q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
- dbesc('fb::' . $retj->id),
- intval($b['id'])
- );
+ $retj = json_decode($x);
+ if($retj->id) {
+ q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
+ dbesc('fb::' . $retj->id),
+ intval($b['id'])
+ );
+ }
+ else {
+ // FIXME queue the message so we can attempt to redeliver, see include/notifier.php and include/queue.php
+ if(! $likes)
+ notice( t('Facebook delivery failed.') . EOL);
+ }
+
+ logger('Facebook post returns: ' . $x, LOGGER_DEBUG);
}
-
- logger('Facebook post returns: ' . $x, LOGGER_DEBUG);
-
}
}
}
diff --git a/boot.php b/boot.php
index f42d6beda..0af73c468 100644
--- a/boot.php
+++ b/boot.php
@@ -4,7 +4,7 @@ set_time_limit(0);
ini_set('pcre.backtrack_limit', 250000);
-define ( 'FRIENDIKA_VERSION', '2.2.997' );
+define ( 'FRIENDIKA_VERSION', '2.2.999' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1059 );
diff --git a/doc/Connectors.md b/doc/Connectors.md
index d9ad0e9b0..9b2430d09 100644
--- a/doc/Connectors.md
+++ b/doc/Connectors.md
@@ -26,7 +26,7 @@ These are described as the "federated social web" or OStatus contacts.
Please note that there are **no** privacy provisions on the OStatus network. Any message which is delivered to **any** OStatus member is visible to anybody in the world and will negate any privacy settings that you have in effect. These messages will also turn up in public searches.
-Since OStatus communications do not use authentication, if you select the profile privacy option to hide your profile and messages from unknown viewers, OStatus members will **not** be able to recieve your communications.
+Since OStatus communications do not use authentication, if you select the profile privacy option to hide your profile and messages from unknown viewers, OStatus members will **not** be able to receive your communications.
To connect with an OStatus member insert their profile URL or Identity address into the Connect box on your [Contacts](contacts) page.
diff --git a/include/acl_selectors.php b/include/acl_selectors.php
index b1bcf5108..90fdf9c1c 100644
--- a/include/acl_selectors.php
+++ b/include/acl_selectors.php
@@ -90,7 +90,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
else
$selected = '';
- $trimmed = mb_substr($rr['name'],0,22);
+ $trimmed = mb_substr($rr['name'],0,20);
$o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}|{$rr['url']}\" >$trimmed</option>\r\n";
}
diff --git a/include/queue.php b/include/queue.php
index d4fc7dbd6..ff280cb53 100644
--- a/include/queue.php
+++ b/include/queue.php
@@ -97,7 +97,7 @@ function queue_run($argv, $argc){
$deliver_status = 0;
switch($contact['network']) {
- case 'dfrn':
+ case NETWORK_DFRN:
logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
$deliver_status = dfrn_deliver($owner,$contact,$data);
@@ -109,7 +109,7 @@ function queue_run($argv, $argc){
remove_queue_item($q_item['id']);
}
break;
- default:
+ case NETWORK_OSTATUS:
if($contact['notify']) {
logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
$deliver_status = slapper($owner,$contact['notify'],$data);
@@ -120,6 +120,18 @@ function queue_run($argv, $argc){
remove_queue_item($q_item['id']);
}
break;
+ default:
+ $a = get_app();
+ $params = array('owner' => $owner, 'contact' => $contact, 'queue' => $q_item, 'result' => false);
+ call_hooks('queue_deliver', $a, $params);
+
+ if($params['result'])
+ remove_queue_item($q_item['id']);
+ else
+ update_queue_time($q_item['id']);
+
+ break;
+
}
}
diff --git a/mod/friendika.php b/mod/friendika.php
index 8bd6e3437..7762bfbb5 100644
--- a/mod/friendika.php
+++ b/mod/friendika.php
@@ -24,7 +24,7 @@ function friendika_init(&$a) {
);
- echo str_replace('\\/','/',json_encode($data));
+ echo json_encode($data);
killme();
}
}
diff --git a/mod/match.php b/mod/match.php
index 2742b4a88..12138a26c 100644
--- a/mod/match.php
+++ b/mod/match.php
@@ -38,6 +38,7 @@ function match_content(&$a) {
if(count($j->results)) {
foreach($j->results as $jj) {
+
$o .= '<div class="profile-match-wrapper"><div class="profile-match-photo">';
$o .= '<a href="' . $jj->url . '">' . '<img src="' . $jj->photo . '" alt="' . $jj->name . '" title="' . $jj->name . '[' . $jj->url . ']' . '" /></a></div>';
$o .= '<div class="profile-match-break"></div>';
diff --git a/mod/photos.php b/mod/photos.php
index 71d00ed25..926b33dbe 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -45,6 +45,32 @@ function photos_init(&$a) {
if(! x($a->page,'aside'))
$a->page['aside'] = '';
$a->page['aside'] .= $o;
+
+
+ $a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
+
+ $a->page['htmlhead'] .= <<< EOT
+
+ $(document).ready(function() {
+
+ $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
+ var selstr;
+ $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
+ selstr = $(this).text();
+ $('#jot-perms-icon').removeClass('unlock').addClass('lock');
+ $('#jot-public').hide();
+ });
+ if(selstr == null) {
+ $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+ $('#jot-public').show();
+ }
+
+ }).trigger('change');
+
+ });
+
+ </script>
+EOT;
}
return;
diff --git a/mod/qsearch.php b/mod/qsearch.php
index 9b3f2b087..c35e253b6 100644
--- a/mod/qsearch.php
+++ b/mod/qsearch.php
@@ -44,7 +44,7 @@ function qsearch_init(&$a) {
$results[] = array( (int) $rr['id'], 0, $rr['name'],$rr['url'],$rr['photo']);
}
- echo str_replace('\\/','/',json_encode((object) $results));
+ echo json_encode((object) $results);
killme();
}
diff --git a/mod/settings.php b/mod/settings.php
index f898f171c..86d1ae015 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -6,6 +6,32 @@ function settings_init(&$a) {
profile_load($a,$a->user['nickname']);
}
+ $a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
+
+ $a->page['htmlhead'] .= <<< EOT
+
+ $(document).ready(function() {
+
+ $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
+ var selstr;
+ $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
+ selstr = $(this).text();
+ $('#jot-perms-icon').removeClass('unlock').addClass('lock');
+ $('#jot-public').hide();
+ });
+ if(selstr == null) {
+ $('#jot-perms-icon').removeClass('lock').addClass('unlock');
+ $('#jot-public').show();
+ }
+
+ }).trigger('change');
+
+ });
+
+ </script>
+EOT;
+
+
}
diff --git a/mod/uexport.php b/mod/uexport.php
index 96f062c41..e1fb22855 100644
--- a/mod/uexport.php
+++ b/mod/uexport.php
@@ -39,7 +39,7 @@ function uexport_init(&$a) {
$output = array('user' => $user, 'contact' => $contact, 'profile' => $profile );
header("Content-type: application/json");
- echo str_replace('\\/','/',json_encode($output));
+ echo json_encode($output);
$r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ",
intval(local_user())
@@ -63,7 +63,7 @@ function uexport_init(&$a) {
}
$output = array('item' => $item);
- echo str_replace('\\/','/',json_encode($output));
+ echo json_encode($output);
}