aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-18 11:10:40 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-18 11:10:40 +0200
commit178b440f05ff7356f313845fbfb307a838a29f8d (patch)
tree67e8385f1bac27c3d19fb0fd569c88dc266647df /include
parent9749bbcedcb0aa20330790ca7af838d00de45f05 (diff)
parent755dd67ec7856b8926bfb78e6034ddff1834b032 (diff)
downloadvolse-hubzilla-178b440f05ff7356f313845fbfb307a838a29f8d.tar.gz
volse-hubzilla-178b440f05ff7356f313845fbfb307a838a29f8d.tar.bz2
volse-hubzilla-178b440f05ff7356f313845fbfb307a838a29f8d.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php2
-rw-r--r--include/channel.php1
-rw-r--r--include/taxonomy.php2
-rw-r--r--include/text.php6
4 files changed, 9 insertions, 2 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index b720355af..0bf326506 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -493,7 +493,7 @@ function bb_code($match) {
function bb_highlight($match) {
if(in_array(strtolower($match[1]),['php','css','mysql','sql','abap','diff','html','perl','ruby',
- 'vbscript','avrc','dtd','java','xml','cpp','python','javascript','js','sh']))
+ 'vbscript','avrc','dtd','java','xml','cpp','python','javascript','js','json','sh']))
return text_highlight($match[2],strtolower($match[1]));
return $match[0];
}
diff --git a/include/channel.php b/include/channel.php
index 92c274105..90dfb2bf6 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1224,6 +1224,7 @@ function advanced_profile(&$a) {
$things = get_things(App::$profile['profile_guid'],App::$profile['profile_uid']);
+
// logger('mod_profile: things: ' . print_r($things,true), LOGGER_DATA);
return replace_macros($tpl, array(
diff --git a/include/taxonomy.php b/include/taxonomy.php
index 177215fe8..067bd3246 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -400,7 +400,7 @@ function get_things($profile_hash,$uid) {
if(! $things[$rr['obj_verb']])
$things[$rr['obj_verb']] = array();
- $things[$rr['obj_verb']][] = array('term' => $rr['obj_term'],'url' => $rr['obj_url'],'img' => $rr['obj_imgurl'], 'profile' => $rr['profile_name'],'term_hash' => $rr['obj_obj'], 'likes' => $l,'like_count' => count($l),'like_label' => tt('Like','Likes',count($l),'noun'));
+ $things[$rr['obj_verb']][] = array('term' => $rr['obj_term'],'url' => $rr['obj_url'],'img' => $rr['obj_imgurl'], 'editurl' => z_root() . '/thing/' . $rr['obj_obj'], 'profile' => $rr['profile_name'],'term_hash' => $rr['obj_obj'], 'likes' => $l,'like_count' => count($l),'like_label' => tt('Like','Likes',count($l),'noun'));
}
$sorted_things = array();
if($things) {
diff --git a/include/text.php b/include/text.php
index 50a3d8892..22f4556a8 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2887,6 +2887,12 @@ function text_highlight($s,$lang) {
if($lang === 'js')
$lang = 'javascript';
+ if($lang === 'json') {
+ $lang = 'javascript';
+ if(! strpos(trim($s),"\n"))
+ $s = jindent($s);
+ }
+
if(! strpos('Text_Highlighter',get_include_path())) {
set_include_path(get_include_path() . PATH_SEPARATOR . 'library/Text_Highlighter');
}