mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-25 04:02:41 +00:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
6cd348f155
1 changed files with 2 additions and 4 deletions
|
@ -1183,7 +1183,7 @@ function encode_item_terms($terms,$mirror = false) {
|
||||||
if($terms) {
|
if($terms) {
|
||||||
foreach($terms as $term) {
|
foreach($terms as $term) {
|
||||||
if(in_array($term['ttype'],$allowed_export_terms))
|
if(in_array($term['ttype'],$allowed_export_terms))
|
||||||
$ret[] = array('tag' => $term['term'], 'url' => $term['url'], 'ttype' => termtype($term['type']));
|
$ret[] = array('tag' => $term['term'], 'url' => $term['url'], 'type' => termtype($term['type']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1240,11 +1240,9 @@ function decode_tags($t) {
|
||||||
$ret = array();
|
$ret = array();
|
||||||
foreach($t as $x) {
|
foreach($t as $x) {
|
||||||
$tag = array();
|
$tag = array();
|
||||||
if(array_key_exists('type',$x))
|
|
||||||
$x['ttype'] = $x['type'];
|
|
||||||
$tag['term'] = htmlspecialchars($x['tag'], ENT_COMPAT, 'UTF-8', false);
|
$tag['term'] = htmlspecialchars($x['tag'], ENT_COMPAT, 'UTF-8', false);
|
||||||
$tag['url'] = htmlspecialchars($x['url'], ENT_COMPAT, 'UTF-8', false);
|
$tag['url'] = htmlspecialchars($x['url'], ENT_COMPAT, 'UTF-8', false);
|
||||||
switch($x['ttype']) {
|
switch($x['type']) {
|
||||||
case 'hashtag':
|
case 'hashtag':
|
||||||
$tag['ttype'] = TERM_HASHTAG;
|
$tag['ttype'] = TERM_HASHTAG;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue