bug #516 - set writable on first poll
This commit is contained in:
parent
dacda667d9
commit
376bf517a4
2
boot.php
2
boot.php
|
@ -12,7 +12,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
|
||||||
require_once('include/features.php');
|
require_once('include/features.php');
|
||||||
|
|
||||||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||||
define ( 'FRIENDICA_VERSION', '3.1.1547' );
|
define ( 'FRIENDICA_VERSION', '3.1.1549' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1157 );
|
define ( 'DB_UPDATE_VERSION', 1157 );
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,7 @@ function onepoll_run(&$argv, &$argc){
|
||||||
|
|
||||||
if($contact['network'] === NETWORK_DFRN) {
|
if($contact['network'] === NETWORK_DFRN) {
|
||||||
|
|
||||||
|
|
||||||
$idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']);
|
$idtosend = $orig_id = (($contact['dfrn-id']) ? $contact['dfrn-id'] : $contact['issued-id']);
|
||||||
if(intval($contact['duplex']) && $contact['dfrn-id'])
|
if(intval($contact['duplex']) && $contact['dfrn-id'])
|
||||||
$idtosend = '0:' . $orig_id;
|
$idtosend = '0:' . $orig_id;
|
||||||
|
@ -120,6 +121,12 @@ function onepoll_run(&$argv, &$argc){
|
||||||
// they have permission to write to us. We already filtered this in the contact query.
|
// they have permission to write to us. We already filtered this in the contact query.
|
||||||
$perm = 'rw';
|
$perm = 'rw';
|
||||||
|
|
||||||
|
// But this may be our first communication, so set the writable flag if it isn't set already.
|
||||||
|
|
||||||
|
if(! intval($contact['writable']))
|
||||||
|
q("update contact set writable = 1 where id = %d limit 1", intval($contact['id']));
|
||||||
|
|
||||||
|
|
||||||
$url = $contact['poll'] . '?dfrn_id=' . $idtosend
|
$url = $contact['poll'] . '?dfrn_id=' . $idtosend
|
||||||
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION
|
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION
|
||||||
. '&type=data&last_update=' . $last_update
|
. '&type=data&last_update=' . $last_update
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: 3.0.1547\n"
|
"Project-Id-Version: 3.1.1549\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2012-12-04 10:00-0800\n"
|
"POT-Creation-Date: 2012-12-06 10:00-0800\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
Loading…
Reference in a new issue