Merge branch 'master' of git://github.com/friendika/friendika
This commit is contained in:
commit
9b93bd2521
11 changed files with 90 additions and 20 deletions
|
@ -438,7 +438,7 @@ function facebook_post_hook(&$a,&$b) {
|
||||||
logger('facebook reply id=' . $reply);
|
logger('facebook reply id=' . $reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($b['private'] && $reply == false) {
|
if($b['private'] && $reply === false) {
|
||||||
$allow_people = expand_acl($b['allow_cid']);
|
$allow_people = expand_acl($b['allow_cid']);
|
||||||
$allow_groups = expand_groups(expand_acl($b['allow_gid']));
|
$allow_groups = expand_groups(expand_acl($b['allow_gid']));
|
||||||
$deny_people = expand_acl($b['deny_cid']);
|
$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.
|
// "test_mode" prevents anything from actually being posted.
|
||||||
// Otherwise, let's do it.
|
// Otherwise, let's do it.
|
||||||
|
|
||||||
if(! get_config('facebook','test_mode'))
|
if(! get_config('facebook','test_mode')) {
|
||||||
$x = post_url($url, $postvars);
|
$x = post_url($url, $postvars);
|
||||||
|
|
||||||
$retj = json_decode($x);
|
$retj = json_decode($x);
|
||||||
if($retj->id) {
|
if($retj->id) {
|
||||||
q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
|
q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
|
||||||
dbesc('fb::' . $retj->id),
|
dbesc('fb::' . $retj->id),
|
||||||
intval($b['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);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
boot.php
2
boot.php
|
@ -4,7 +4,7 @@ set_time_limit(0);
|
||||||
ini_set('pcre.backtrack_limit', 250000);
|
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 ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1059 );
|
define ( 'DB_UPDATE_VERSION', 1059 );
|
||||||
|
|
||||||
|
|
|
@ -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.
|
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.
|
To connect with an OStatus member insert their profile URL or Identity address into the Connect box on your [Contacts](contacts) page.
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ function contact_select($selname, $selclass, $preselected = false, $size = 4, $p
|
||||||
else
|
else
|
||||||
$selected = '';
|
$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";
|
$o .= "<option value=\"{$rr['id']}\" $selected title=\"{$rr['name']}|{$rr['url']}\" >$trimmed</option>\r\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ function queue_run($argv, $argc){
|
||||||
$deliver_status = 0;
|
$deliver_status = 0;
|
||||||
|
|
||||||
switch($contact['network']) {
|
switch($contact['network']) {
|
||||||
case 'dfrn':
|
case NETWORK_DFRN:
|
||||||
logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
|
logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
|
||||||
$deliver_status = dfrn_deliver($owner,$contact,$data);
|
$deliver_status = dfrn_deliver($owner,$contact,$data);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ function queue_run($argv, $argc){
|
||||||
remove_queue_item($q_item['id']);
|
remove_queue_item($q_item['id']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
case NETWORK_OSTATUS:
|
||||||
if($contact['notify']) {
|
if($contact['notify']) {
|
||||||
logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
|
logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
|
||||||
$deliver_status = slapper($owner,$contact['notify'],$data);
|
$deliver_status = slapper($owner,$contact['notify'],$data);
|
||||||
|
@ -120,6 +120,18 @@ function queue_run($argv, $argc){
|
||||||
remove_queue_item($q_item['id']);
|
remove_queue_item($q_item['id']);
|
||||||
}
|
}
|
||||||
break;
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ function friendika_init(&$a) {
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
echo str_replace('\\/','/',json_encode($data));
|
echo json_encode($data);
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ function match_content(&$a) {
|
||||||
|
|
||||||
if(count($j->results)) {
|
if(count($j->results)) {
|
||||||
foreach($j->results as $jj) {
|
foreach($j->results as $jj) {
|
||||||
|
|
||||||
$o .= '<div class="profile-match-wrapper"><div class="profile-match-photo">';
|
$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 .= '<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>';
|
$o .= '<div class="profile-match-break"></div>';
|
||||||
|
|
|
@ -45,6 +45,32 @@ function photos_init(&$a) {
|
||||||
if(! x($a->page,'aside'))
|
if(! x($a->page,'aside'))
|
||||||
$a->page['aside'] = '';
|
$a->page['aside'] = '';
|
||||||
$a->page['aside'] .= $o;
|
$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;
|
return;
|
||||||
|
|
|
@ -44,7 +44,7 @@ function qsearch_init(&$a) {
|
||||||
$results[] = array( (int) $rr['id'], 0, $rr['name'],$rr['url'],$rr['photo']);
|
$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();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,32 @@ function settings_init(&$a) {
|
||||||
profile_load($a,$a->user['nickname']);
|
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;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ function uexport_init(&$a) {
|
||||||
$output = array('user' => $user, 'contact' => $contact, 'profile' => $profile );
|
$output = array('user' => $user, 'contact' => $contact, 'profile' => $profile );
|
||||||
|
|
||||||
header("Content-type: application/json");
|
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 ",
|
$r = q("SELECT count(*) as `total` FROM `item` WHERE `uid` = %d ",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
|
@ -63,7 +63,7 @@ function uexport_init(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = array('item' => $item);
|
$output = array('item' => $item);
|
||||||
echo str_replace('\\/','/',json_encode($output));
|
echo json_encode($output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue