Merge branch 'dev' of /home/macgirvin/z into dev

This commit is contained in:
nobody 2021-06-01 15:55:58 -07:00
commit 462253d4aa
10 changed files with 4997 additions and 4891 deletions

View file

@ -349,8 +349,8 @@ class Channel extends Controller {
'title' => 'oembed'
]);
if ($update && isset($_SESSION['loadtime'])) {
$simple_update = " AND (( item_unseen = 1 AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) OR item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime']) . "' ) ";
if ($update && isset($_SESSION['loadtime_channel'])) {
$simple_update = " AND item.changed > '" . datetime_convert('UTC','UTC',$_SESSION['loadtime_channel']) . "' ";
}
if ($load) {
$simple_update = '';
@ -368,7 +368,6 @@ class Channel extends Controller {
dbesc($mid . '%'),
intval(App::$profile['profile_uid'])
);
$_SESSION['loadtime'] = datetime_convert();
}
else {
$r = q("SELECT parent AS item_id from item
@ -380,7 +379,6 @@ class Channel extends Controller {
ORDER BY created DESC",
intval(App::$profile['profile_uid'])
);
$_SESSION['loadtime'] = datetime_convert();
}
}

View file

@ -506,9 +506,15 @@ class Item extends Controller {
// if interacting with a pubstream item (owned by the sys channel),
// create a copy of the parent in your stream
if (local_channel()) {
// $r may have changed. Check it again before trying to use it.
if ($r && local_channel()) {
$old_id = $r[0]['id'];
$r = [ copy_of_pubitem(App::get_channel(), $r[0]['mid']) ];
$pub_copy = true;
if ($r[0]['id'] !== $old_id) {
// keep track that a copy was made to display a special status notice that is unique to this condition
$pub_copy = true;
}
}
}

View file

@ -41,7 +41,7 @@ class Siteinfo extends Controller {
'$transport_link' => '<a href="https://zotlabs.com">https://zotlabs.com</a>',
'$ebs' => System::ebs(),
'$additional_text' => t('Federated transport protocols:'),
'$additional_text' => t('Protocols:'),
'$additional_fed' => $federated,
'$prj_version' => ((get_config('system','hidden_version_siteinfo')) ? '' : sprintf( t('Version %s'), System::get_project_version())),
'$prj_linktxt' => t('Project homepage'),

View file

@ -747,14 +747,13 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
return $ret;
}
$r = q("SELECT channel_id, channel_address FROM channel left join profile on profile.uid = channel.channel_id WHERE channel_removed = 0 AND channel_system = 0 AND (channel_pageflags & %d) = 0",
$r = q("SELECT channel_id, channel_address, profile.publish FROM channel left join profile on profile.uid = channel.channel_id WHERE channel_removed = 0 AND channel_system = 0 AND (channel_pageflags & %d) = 0 and profile.is_default = 1",
intval(PAGE_HIDDEN)
);
if ($r) {
foreach ($r as $rr) {
if (perm_is_allowed($rr['channel_id'], $auth->observer, 'view_storage')) {
logger('found channel: ' . $rr['channel_address'], LOGGER_DATA);
if ((perm_is_allowed($rr['channel_id'], $auth->observer, 'view_storage') && $rr['publish']) || $rr['channel_id'] == $this->auth->channel_id) {
logger('found channel: /cloud/' . $rr['channel_address'], LOGGER_DATA);
$ret[] = new Directory($rr['channel_address'], $auth);
}
}

View file

@ -166,7 +166,7 @@ class Zot6Handler implements IHandler {
dbesc($recip)
);
if ($channel) {
$abook = q("select abook_id from abook where uid = %d and abook_xchan = '%s' limit 1",
$abook = q("select abook_id from abook where abook_channel = %d and abook_xchan = '%s' limit 1",
intval($channel[0]['channel_id']),
dbesc($sender)
);

View file

@ -17,7 +17,7 @@ use Zotlabs\Daemon\Run;
* @brief This file defines some global constants and includes the central App class.
*/
define ( 'STD_VERSION', '21.05.28' );
define ( 'STD_VERSION', '21.06.02' );
define ( 'ZOT_REVISION', '10.0' );
define ( 'DB_UPDATE_VERSION', 1248 );

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -65,7 +65,6 @@
{{include file="field_input.tpl" field=$frontpage}}
{{include file="field_checkbox.tpl" field=$mirror_frontpage}}
{{include file="field_checkbox.tpl" field=$login_on_homepage}}
{{include file="field_checkbox.tpl" field=$enable_context_help}}
<div class="settings-submit-wrapper" >
<button type="submit" name="page_site" class="btn btn-primary" value="1" >{{$submit}}</button>
</div>

View file

@ -36,8 +36,6 @@
<div><a href="{{$prj_src}}">{{$prj_src}}</a></div><br>
<div>{{$prj_transport}}</div>
{{if $additional_fed}}
<div>{{$additional_text}} {{$additional_fed}}</div>
{{/if}}