update writable for dfrn contacts when using local delivery
This commit is contained in:
parent
f8b81b31f2
commit
3968dc932f
|
@ -328,8 +328,9 @@ function delivery_run($argv, $argc){
|
||||||
dbesc($nickname)
|
dbesc($nickname)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(count($x)) {
|
if($x && count($x)) {
|
||||||
if($owner['page-flags'] == PAGE_COMMUNITY && ! $x[0]['writable']) {
|
$write_flag = ((($x[0]['rel']) && ($x[0]['rel'] != CONTACT_IS_SHARING)) ? true : false);
|
||||||
|
if((($owner['page-flags'] == PAGE_COMMUNITY) || ($write_flag)) && (! $x[0]['writable'])) {
|
||||||
q("update contact set writable = 1 where id = %d limit 1",
|
q("update contact set writable = 1 where id = %d limit 1",
|
||||||
intval($x[0]['id'])
|
intval($x[0]['id'])
|
||||||
);
|
);
|
||||||
|
|
|
@ -580,9 +580,9 @@ function notifier_run($argv, $argc){
|
||||||
dbesc($nickname)
|
dbesc($nickname)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(count($x)) {
|
if($x && count($x)) {
|
||||||
|
$write_flag = ((($x[0]['rel']) && ($x[0]['rel'] != CONTACT_IS_SHARING)) ? true : false);
|
||||||
if($owner['page-flags'] == PAGE_COMMUNITY && ! $x[0]['writable']) {
|
if((($owner['page-flags'] == PAGE_COMMUNITY) || ($write_flag)) && (! $x[0]['writable'])) {
|
||||||
q("update contact set writable = 1 where id = %d limit 1",
|
q("update contact set writable = 1 where id = %d limit 1",
|
||||||
intval($x[0]['id'])
|
intval($x[0]['id'])
|
||||||
);
|
);
|
||||||
|
|
|
@ -36,6 +36,9 @@ function completeurl($url, $scheme) {
|
||||||
if ($schemearr["port"] != "")
|
if ($schemearr["port"] != "")
|
||||||
$complete .= ":".$schemearr["port"];
|
$complete .= ":".$schemearr["port"];
|
||||||
|
|
||||||
|
if(strpos($urlarr['path'],'/') !== 0)
|
||||||
|
$complete .= '/';
|
||||||
|
|
||||||
$complete .= $urlarr["path"];
|
$complete .= $urlarr["path"];
|
||||||
|
|
||||||
if ($urlarr["query"] != "")
|
if ($urlarr["query"] != "")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user