mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-22 01:15:14 +00:00
Merge branch '1.2'
This commit is contained in:
commit
05a6ce58a5
11 changed files with 90 additions and 25 deletions
|
@ -1050,11 +1050,36 @@ class Activity {
|
|||
$icon = z_root() . '/' . get_default_profile_photo();
|
||||
}
|
||||
|
||||
if(is_array($person_obj['url']) && array_key_exists('href', $person_obj['url']))
|
||||
$profile = $person_obj['url']['href'];
|
||||
else
|
||||
$profile = $url;
|
||||
|
||||
$links = false;
|
||||
$profile = false;
|
||||
|
||||
if(is_array($person_obj['url'])) {
|
||||
if(! array_key_exists(0,$person_obj['url'])) {
|
||||
$links = [ $person_obj['url'] ];
|
||||
}
|
||||
else {
|
||||
$links = $person_obj['url'];
|
||||
}
|
||||
}
|
||||
|
||||
if($links) {
|
||||
foreach($links as $link) {
|
||||
if(array_key_exists('mediaType',$link) && $link['mediaType'] === 'text/html') {
|
||||
$profile = $link['href'];
|
||||
}
|
||||
}
|
||||
if(! $profile) {
|
||||
$profile = $links[0]['href'];
|
||||
}
|
||||
}
|
||||
elseif(array_key_exists('url',$person_obj) && is_string($person_obj['url'])) {
|
||||
$profile = $person_obj['url'];
|
||||
}
|
||||
|
||||
if(! $profile) {
|
||||
$profile = $url;
|
||||
}
|
||||
|
||||
$inbox = $person_obj['inbox'];
|
||||
|
||||
|
@ -1165,7 +1190,7 @@ class Activity {
|
|||
|
||||
static function create_action($channel,$observer_hash,$act) {
|
||||
|
||||
if(in_array($act->obj['type'], [ 'Note', 'Article', 'Video', 'Photo' ])) {
|
||||
if(in_array($act->obj['type'], [ 'Note', 'Article', 'Video', 'Audio', 'Image' ])) {
|
||||
self::create_note($channel,$observer_hash,$act);
|
||||
}
|
||||
|
||||
|
@ -1183,7 +1208,7 @@ class Activity {
|
|||
|
||||
static function like_action($channel,$observer_hash,$act) {
|
||||
|
||||
if(in_array($act->obj['type'], [ 'Note', 'Article', 'Video', 'Photo' ])) {
|
||||
if(in_array($act->obj['type'], [ 'Note', 'Article', 'Video', 'Audio', 'Image' ])) {
|
||||
self::like_note($channel,$observer_hash,$act);
|
||||
}
|
||||
|
||||
|
@ -1445,8 +1470,6 @@ class Activity {
|
|||
$s['owner_xchan'] = $act->actor['id'];
|
||||
$s['author_xchan'] = $act->actor['id'];
|
||||
|
||||
// self::actor_store($act->actor['id'],$act->actor);
|
||||
|
||||
$s['mid'] = $act->obj['id'];
|
||||
$s['parent_mid'] = $act->parent_id;
|
||||
|
||||
|
@ -1571,6 +1594,37 @@ class Activity {
|
|||
}
|
||||
}
|
||||
|
||||
if($act->obj['type'] === 'Audio') {
|
||||
|
||||
$atypes = [
|
||||
'audio/mpeg',
|
||||
'audio/ogg',
|
||||
'audio/wav'
|
||||
];
|
||||
|
||||
if(array_key_exists('url',$act->obj) && is_array($act->obj['url'])) {
|
||||
foreach($act->obj['url'] as $vurl) {
|
||||
if(in_array($vurl['mimeType'], $atypes)) {
|
||||
$s['body'] .= "\n\n" . '[audio]' . $vurl['href'] . '[/audio]';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($act->obj['type'] === 'Image') {
|
||||
if(array_key_exists('url',$act->obj) && is_array($act->obj['url'])) {
|
||||
foreach($act->obj['url'] as $vurl) {
|
||||
if(strpos($s['body'],$vurl['href']) === false) {
|
||||
$s['body'] .= "\n\n" . '[zmg]' . $vurl['href'] . '[/zmg]';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($act->recips && (! in_array(ACTIVITY_PUBLIC_INBOX,$act->recips)))
|
||||
$s['item_private'] = 1;
|
||||
|
||||
|
|
|
@ -94,17 +94,17 @@ class ActivityStreams {
|
|||
}
|
||||
}
|
||||
|
||||
if($this->obj && $this->obj['actor'])
|
||||
if($this->obj && is_array($this->obj) && $this->obj['actor'])
|
||||
$this->obj['actor'] = $this->get_actor('actor',$this->obj);
|
||||
if($this->tgt && $this->tgt['actor'])
|
||||
if($this->tgt && is_array($this->tgt) && $this->tgt['actor'])
|
||||
$this->tgt['actor'] = $this->get_actor('actor',$this->tgt);
|
||||
|
||||
$this->parent_id = $this->get_property_obj('inReplyTo');
|
||||
|
||||
if(! $this->parent_id) {
|
||||
if((! $this->parent_id) && is_array($this->obj)) {
|
||||
$this->parent_id = $this->obj['inReplyTo'];
|
||||
}
|
||||
if(! $this->parent_id) {
|
||||
if((! $this->parent_id) && is_array($this->obj)) {
|
||||
$this->parent_id = $this->obj['id'];
|
||||
}
|
||||
}
|
||||
|
@ -235,6 +235,11 @@ class ActivityStreams {
|
|||
$base = (($base) ? $base : $this->data);
|
||||
$propname = (($prefix) ? $prefix . ':' : '') . $property;
|
||||
|
||||
if(! is_array($base)) {
|
||||
btlogger('not an array: ' . print_r($base,true));
|
||||
return null;
|
||||
}
|
||||
|
||||
return ((array_key_exists($propname, $base)) ? $base[$propname] : null);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class Libsync {
|
|||
if(intval($channel['channel_removed']))
|
||||
return;
|
||||
|
||||
$h = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash = '%s' and hubloc_deleted = 0",
|
||||
$h = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash = '%s' and hubloc_netwoor = 'zot6' and hubloc_deleted = 0",
|
||||
dbesc(($keychange) ? $packet['keychange']['old_hash'] : $channel['channel_hash'])
|
||||
);
|
||||
|
||||
|
@ -195,7 +195,7 @@ class Libsync {
|
|||
|
||||
$hashes = ids_to_querystr($l,'link',true);
|
||||
|
||||
$h = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . protect_sprintf($hashes) . ") and hubloc_deleted = 0");
|
||||
$h = q("select hubloc.*, site.site_crypto from hubloc left join site on site_url = hubloc_url where hubloc_hash in (" . protect_sprintf($hashes) . ") and hubloc_network = 'zot6' and hubloc_deleted = 0");
|
||||
|
||||
if(! $h)
|
||||
return;
|
||||
|
|
|
@ -303,7 +303,7 @@ class Queue {
|
|||
$host_crypto = null;
|
||||
|
||||
if($channel && $base) {
|
||||
$h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' order by hubloc_id desc limit 1",
|
||||
$h = q("select hubloc_sitekey, site_crypto from hubloc left join site on hubloc_url = site_url where site_url = '%s' and hubloc_network = 'zot6' order by hubloc_id desc limit 1",
|
||||
dbesc($base)
|
||||
);
|
||||
if($h) {
|
||||
|
|
|
@ -129,6 +129,10 @@ class ThreadItem {
|
|||
else
|
||||
$edpost = false;
|
||||
|
||||
if($item['verb'] === 'Announce') {
|
||||
$edpost = false;
|
||||
}
|
||||
|
||||
|
||||
if($observer['xchan_hash'] == $this->get_data_value('author_xchan')
|
||||
|| $observer['xchan_hash'] == $this->get_data_value('owner_xchan')
|
||||
|
@ -497,7 +501,7 @@ class ThreadItem {
|
|||
}
|
||||
}
|
||||
|
||||
logger('authors: ' . print_r($result['authors'],true));
|
||||
//logger('authors: ' . print_r($result['authors'],true));
|
||||
|
||||
$result['private'] = $item['item_private'];
|
||||
$result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : '');
|
||||
|
|
|
@ -5,7 +5,7 @@ require_once('include/conversation.php');
|
|||
require_once('include/bbcode.php');
|
||||
require_once('include/datetime.php');
|
||||
require_once('include/event.php');
|
||||
|
||||
require_once('include/html2plain.php');
|
||||
|
||||
|
||||
class Cal extends \Zotlabs\Web\Controller {
|
||||
|
@ -293,6 +293,7 @@ class Cal extends \Zotlabs\Web\Controller {
|
|||
}
|
||||
$html = format_event_html($rr);
|
||||
$rr['desc'] = zidify_links(smilies(bbcode($rr['desc'])));
|
||||
$rr['description'] = htmlentities(html2plain(bbcode($rr['description'])),ENT_COMPAT,'UTF-8',false);
|
||||
$rr['location'] = zidify_links(smilies(bbcode($rr['location'])));
|
||||
$events[] = array(
|
||||
'id'=>$rr['id'],
|
||||
|
|
|
@ -204,7 +204,7 @@ class Directory extends \Zotlabs\Web\Controller {
|
|||
logger('mod_directory: query: ' . $query);
|
||||
|
||||
$x = z_fetch_url($query);
|
||||
logger('directory: return from upstream: ' . print_r($x,true), LOGGER_DATA);
|
||||
// logger('directory: return from upstream: ' . print_r($x,true), LOGGER_DATA);
|
||||
|
||||
if($x['success']) {
|
||||
$t = 0;
|
||||
|
@ -379,7 +379,7 @@ class Directory extends \Zotlabs\Web\Controller {
|
|||
\App::$data['directory_keywords'] = $j['keywords'];
|
||||
}
|
||||
|
||||
logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DATA);
|
||||
// logger('mod_directory: entries: ' . print_r($entries,true), LOGGER_DATA);
|
||||
|
||||
|
||||
if($_REQUEST['aj']) {
|
||||
|
|
|
@ -7,7 +7,7 @@ require_once('include/conversation.php');
|
|||
require_once('include/bbcode.php');
|
||||
require_once('include/datetime.php');
|
||||
require_once('include/event.php');
|
||||
|
||||
require_once('include/html2plain.php');
|
||||
|
||||
class Events extends \Zotlabs\Web\Controller {
|
||||
|
||||
|
@ -642,6 +642,7 @@ class Events extends \Zotlabs\Web\Controller {
|
|||
}
|
||||
$html = format_event_html($rr);
|
||||
$rr['desc'] = zidify_links(smilies(bbcode($rr['desc'])));
|
||||
$rr['description'] = htmlentities(html2plain(bbcode($rr['description'])),ENT_COMPAT,'UTF-8',false);
|
||||
$rr['location'] = zidify_links(smilies(bbcode($rr['location'])));
|
||||
$events[] = array(
|
||||
'id'=>$rr['id'],
|
||||
|
|
2
boot.php
2
boot.php
|
@ -35,7 +35,7 @@ require_once('include/items.php');
|
|||
define ( 'PLATFORM_NAME', 'osada' );
|
||||
define ( 'PLATFORM_ARCHITECTURE', 'osada' );
|
||||
|
||||
define ( 'STD_VERSION', '1.1' );
|
||||
define ( 'STD_VERSION', '1.2' );
|
||||
define ( 'ZOT_REVISION', '6.0' );
|
||||
|
||||
define ( 'DB_UPDATE_VERSION', 1220 );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[h2]Bugs, Issues, and things that go bump in the night...[/h2]
|
||||
[h3]Something went wrong! Who is charge of fixing it?[/h3]
|
||||
[h3]Something went wrong! Who is in charge of fixing it?[/h3]
|
||||
|
||||
[b]$Projectname Community Server[/b]
|
||||
|
||||
|
@ -21,9 +21,9 @@ If you get a blank white screen when doing something, this is almost always a co
|
|||
|
||||
[h3]I'm stumped. I can't figure out what is wrong.[/h3]
|
||||
|
||||
At this point it might be worthwhile discussing the issue on one of the online forums. There may be several of these and some may be more suited to your spoken language. At this time, the 'Hubzilla Support' channel (support@gravizot.de) is the recommended forum for discussing bugs.
|
||||
At this point it might be worthwhile discussing the issue on one of the online forums. There may be several of these and some may be more suited to your spoken language.
|
||||
|
||||
If community members with software engineering training/expertise can't help you right away, understand that they are volunteers and may have a lot of other work and demands on their time. At this point you need to file a bug report. You will need an account on github.com to do this. So register, and then visit https://framagit.org/hubzilla/core/issues . Create an issue here and provide all the same information that you provided online. Don't leave out anything.
|
||||
If community members with software engineering training/expertise can't help you right away, understand that they are volunteers and may have a lot of other work and demands on their time. At this point you need to file a bug report. You will need an account on framagit.org to do this. So register, and then visit https://framagit.org/macgirvin/osada/issues . Create an issue here and provide all the same information that you provided online. Don't leave out anything.
|
||||
|
||||
Then you wait. If it's a high profile issue, it may get fixed quickly. But nobody is in charge of fixing bugs. If it lingers without resolution, please spend some more time investigating the problem. Ask about anything you don't understand related to the behaviour. You will learn more about how the software works and quite possibly figure out why it isn't working now. Ultimately it is somebody in the community who is going to fix this and you are a member of the community; and this is how the open source process works.
|
||||
|
||||
|
|
|
@ -215,8 +215,8 @@ var activeCommentText = '';
|
|||
$('#like-rotator-' + id).show();
|
||||
$.get('{{$baseurl}}/share/' + id, function(data) {
|
||||
$('#like-rotator-' + id).hide();
|
||||
notificationsUpdate();
|
||||
});
|
||||
notificationsUpdate();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue