mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
fix affinity settings, use export var on bbcode destined for ActivityPub recipients to strip out map and embed scripts
This commit is contained in:
parent
9424a7f56b
commit
d64e67b18c
4 changed files with 7 additions and 18 deletions
|
@ -243,8 +243,8 @@ class Activity {
|
||||||
if($i['title'])
|
if($i['title'])
|
||||||
$ret['name'] = $i['title'];
|
$ret['name'] = $i['title'];
|
||||||
if($i['summary'])
|
if($i['summary'])
|
||||||
$ret['summary'] = bbcode($i['summary']);
|
$ret['summary'] = bbcode($i['summary'], [ 'export' => true ]);
|
||||||
$ret['content'] = bbcode($i['body']);
|
$ret['content'] = bbcode($i['body'], [ 'export' => true ]);
|
||||||
$ret['source'] = [ 'content' => $i['body'], 'summary' => $i['summary'], 'mediaType' => 'text/bbcode' ];
|
$ret['source'] = [ 'content' => $i['body'], 'summary' => $i['summary'], 'mediaType' => 'text/bbcode' ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,12 +420,12 @@ class Activity {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($i['summary']) {
|
if($i['summary']) {
|
||||||
$ret['summary'] = bbcode($i['summary']);
|
$ret['summary'] = bbcode($i['summary'], [ 'export' => true ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($ret['type'] === 'Announce') {
|
if($ret['type'] === 'Announce') {
|
||||||
$tmp = $i['body'];
|
$tmp = $i['body'];
|
||||||
$ret['content'] = bbcode($tmp);
|
$ret['content'] = bbcode($tmp, [ 'export' => true ]);
|
||||||
$ret['source'] = [
|
$ret['source'] = [
|
||||||
'content' => $i['body'],
|
'content' => $i['body'],
|
||||||
'mediaType' => 'text/bbcode'
|
'mediaType' => 'text/bbcode'
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Affinity extends \Zotlabs\Web\Controller {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_POST['affinity_slider-submit']) {
|
if($_POST['affinity-submit']) {
|
||||||
$cmax = intval($_POST['affinity_cmax']);
|
$cmax = intval($_POST['affinity_cmax']);
|
||||||
if($cmax < 0 || $cmax > 99)
|
if($cmax < 0 || $cmax > 99)
|
||||||
$cmax = 99;
|
$cmax = 99;
|
||||||
|
@ -23,7 +23,7 @@ class Affinity extends \Zotlabs\Web\Controller {
|
||||||
set_pconfig(local_channel(),'affinity','cmin',$cmin);
|
set_pconfig(local_channel(),'affinity','cmin',$cmin);
|
||||||
set_pconfig(local_channel(),'affinity','cmax',$cmax);
|
set_pconfig(local_channel(),'affinity','cmax',$cmax);
|
||||||
|
|
||||||
info( t('Affinity Slider settings updated.') . EOL);
|
info( t('Affinity Tool settings updated.') . EOL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class Affinity extends \Zotlabs\Web\Controller {
|
||||||
));
|
));
|
||||||
|
|
||||||
$s .= replace_macros(get_markup_template('generic_app_settings.tpl'), array(
|
$s .= replace_macros(get_markup_template('generic_app_settings.tpl'), array(
|
||||||
'$addon' => array('affinity_slider', '' . t('Affinity Tool Settings'), '', t('Submit')),
|
'$addon' => array('affinity', '' . t('Affinity Tool Settings'), '', t('Submit')),
|
||||||
'$content' => $setting_fields
|
'$content' => $setting_fields
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
version: 2
|
|
||||||
url: https://framagit.org/macgirvin/zap/issues
|
|
||||||
name: Report Bug
|
|
||||||
photo: icon:bug
|
|
||||||
categories: System
|
|
|
@ -1,6 +0,0 @@
|
||||||
version: 1.2
|
|
||||||
url: $baseurl/cards/$nick
|
|
||||||
name: Cards
|
|
||||||
requires: local_channel
|
|
||||||
photo: icon:list
|
|
||||||
categories: nav_featured_app, Productivity
|
|
Loading…
Reference in a new issue