Merge branch 'zap' into dev

This commit is contained in:
zotlabs 2018-09-13 22:40:23 -07:00
commit c16fa755a8
11 changed files with 16 additions and 20 deletions

View file

@ -70,7 +70,7 @@ class Onepoll {
return;
}
if($contact['xchan_network'] !== 'zot')
if($contact['xchan_network'] !== 'zot6')
return;
// update permissions

View file

@ -110,7 +110,7 @@ class Poller {
}
if($contact['xchan_network'] !== 'zot')
if($contact['xchan_network'] !== 'zot6')
continue;
if($c == $t) {

View file

@ -483,7 +483,7 @@ class Apps {
}
elseif(remote_channel()) {
$observer = \App::get_observer();
if($observer && $observer['xchan_network'] === 'zot') {
if($observer && $observer['xchan_network'] === 'zot6') {
// some folks might have xchan_url redirected offsite, use the connurl
$x = parse_url($observer['xchan_connurl']);
if($x) {

View file

@ -280,16 +280,12 @@ class Group {
$o = '';
if(! (local_channel() && feature_enabled(local_channel(),'groups'))) {
return '';
}
$groups = array();
$groups = [];
$r = q("SELECT * FROM groups WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval($_SESSION['uid'])
);
$member_of = array();
$member_of = [];
if($cid) {
$member_of = self::containing(local_channel(),$cid);
}

View file

@ -116,7 +116,7 @@ class Queue {
dbesc($arr['hash']),
intval($arr['account_id']),
intval($arr['channel_id']),
dbesc(($arr['driver']) ? $arr['driver'] : 'zot'),
dbesc(($arr['driver']) ? $arr['driver'] : 'zot6'),
dbesc($arr['posturl']),
intval(1),
intval(($arr['priority']) ? $arr['priority'] : 0),

View file

@ -187,7 +187,7 @@ class Dirsearch extends \Zotlabs\Web\Controller {
else {
$qlimit = " LIMIT " . intval($perpage) . " OFFSET " . intval($startrec);
if($return_total) {
$r = q("SELECT COUNT(xchan_hash) AS total FROM xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and xchan_network = 'zot' and xchan_hidden = 0 and xchan_orphan = 0 and xchan_deleted = 0 $safesql ");
$r = q("SELECT COUNT(xchan_hash) AS total FROM xchan left join xprof on xchan_hash = xprof_hash where $logic $sql_extra and xchan_network = 'zot6' and xchan_hidden = 0 and xchan_orphan = 0 and xchan_deleted = 0 $safesql ");
if($r) {
$ret['total_items'] = $r[0]['total'];
}

View file

@ -125,7 +125,7 @@ class Oep extends \Zotlabs\Web\Controller {
"' profile='".$p[0]['author']['xchan_url'] .
"' avatar='".$p[0]['author']['xchan_photo_s'].
"' link='".$p[0]['plink'].
"' auth='".(($p[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' auth='".(($p[0]['author']['network'] === 'zot6') ? 'true' : 'false') .
"' posted='".$p[0]['created'].
"' message_id='".$p[0]['mid']."']";
if($p[0]['title'])
@ -210,7 +210,7 @@ class Oep extends \Zotlabs\Web\Controller {
"' profile='".$p[0]['author']['xchan_url'] .
"' avatar='".$p[0]['author']['xchan_photo_s'].
"' link='".$p[0]['plink'].
"' auth='".(($p[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' auth='".(($p[0]['author']['network'] === 'zot6') ? 'true' : 'false') .
"' posted='".$p[0]['created'].
"' message_id='".$p[0]['mid']."']";
if($p[0]['title'])
@ -294,7 +294,7 @@ class Oep extends \Zotlabs\Web\Controller {
"' profile='".$p[0]['author']['xchan_url'] .
"' avatar='".$p[0]['author']['xchan_photo_s'].
"' link='".$p[0]['plink'].
"' auth='".(($p[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' auth='".(($p[0]['author']['network'] === 'zot6') ? 'true' : 'false') .
"' posted='".$p[0]['created'].
"' message_id='".$p[0]['mid']."']";
if($p[0]['title'])
@ -369,7 +369,7 @@ class Oep extends \Zotlabs\Web\Controller {
"' profile='".$p[0]['author']['xchan_url'] .
"' avatar='".$p[0]['author']['xchan_photo_s'].
"' link='".$p[0]['plink'].
"' auth='".(($p[0]['author']['network'] === 'zot') ? 'true' : 'false') .
"' auth='".(($p[0]['author']['network'] === 'zot6') ? 'true' : 'false') .
"' posted='".$p[0]['created'].
"' message_id='".$p[0]['mid']."']";
if($p[0]['title'])

View file

@ -211,7 +211,7 @@ function mark_orphan_hubsxchans() {
return;
$r = q("update hubloc set hubloc_error = 1 where hubloc_error = 0
and hubloc_network = 'zot' and hubloc_connected < %s - interval %s",
and hubloc_network = 'zot6' and hubloc_connected < %s - interval %s",
db_utcnow(), db_quoteinterval('36 day')
);

View file

@ -122,7 +122,7 @@ function poco_load($xchan = '', $url = null) {
$profile_url = $url['value'];
continue;
}
if($url['type'] == 'zot') {
if($url['type'] == 'zot6') {
$network = $url['type'];
$address = str_replace('acct:' , '', $url['value']);
continue;
@ -151,7 +151,7 @@ function poco_load($xchan = '', $url = null) {
if(($x !== false) && (! count($x))) {
if($address) {
if($network === 'zot') {
if($network === 'zot6') {
$j = Zotlabs\Lib\Zotfinger::exec($profile_url);
if(is_array($j) && array_path_exists('signature/signer',$j) && $j['signature']['signer'] === $profile_url && intval($j['signature']['header_valid'])) {
import_xchan($j);

View file

@ -1826,7 +1826,7 @@ function get_plink($item,$conversation_mode = true) {
$zidify = true;
if(array_key_exists('author',$item) && $item['author']['xchan_network'] !== 'zot')
if(array_key_exists('author',$item) && $item['author']['xchan_network'] !== 'zot6')
$zidify = false;
if(x($item,$key)) {

View file

@ -12,7 +12,7 @@ function is_matrix_url($url) {
if(array_key_exists($m['host'],$remembered))
return $remembered[$m['host']];
$r = q("select hubloc_url from hubloc where hubloc_host = '%s' and hubloc_network = 'zot' limit 1",
$r = q("select hubloc_url from hubloc where hubloc_host = '%s' and hubloc_network = 'zot6' limit 1",
dbesc($m['host'])
);
if($r) {