Merge branch 'dev' into sabre32

This commit is contained in:
Mario Vavti 2016-06-18 11:10:40 +02:00
commit 178b440f05
8 changed files with 1210 additions and 1134 deletions

View File

@ -34,6 +34,7 @@ Hubzilla 1.8
Apps:
Synchronise app list with changes to system apps
Preserve existing app categories on app updates/edits
Regression: fixed translated system app names
Architecture:
Provide autoloaded class files and libraries for plugins.
Further refactoring of session driver to sort out some cookie anomolies
@ -61,6 +62,9 @@ Hubzilla 1.8
Block 'sys' channels from being 'random profile' candidates
DB update failed email could be sent in the wrong language under rare circumstances
Openid remote authentication used incorrect namespace
URL attached to profile "things" was not linked, always showing the "thing" manage page
New connection wasn't added to default privacy group when "auto-accept" was enabled
Regression: iconfig sharing wasn't working properly
Plugins:
CalDAV/CardDAV plugin provided
Issue sending Diaspora 'like' activities from sources that did not propagate the DCV

View File

@ -26,7 +26,7 @@ class Thing extends \Zotlabs\Web\Controller {
$verb = escape_tags($_REQUEST['verb']);
$activity = intval($_REQUEST['activity']);
$profile_guid = escape_tags($_REQUEST['profile_assign']);
$url = $_REQUEST['link'];
$url = $_REQUEST['url'];
$photo = $_REQUEST['img'];
$hash = random_string();
@ -235,7 +235,7 @@ class Thing extends \Zotlabs\Web\Controller {
}
function get() {
function get() {
// @FIXME one problem with things is we can't share them unless we provide the channel in the url
// so we can definitively lookup the owner.

View File

@ -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];
}

View File

@ -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(

View File

@ -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) {

View File

@ -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');
}

File diff suppressed because it is too large Load Diff

View File

@ -282,7 +282,7 @@
<ul class="profile-thing-list">
{{foreach $items as $item}}
<li>{{if $item.img}}<a href="{{$item.url}}" ><img src="{{$item.img}}" class="profile-thing-img" width="100" height="100" alt="{{$item.term}}" /></a>{{/if}}
<a href="{{$item.url}}" >{{$item.term}}</a>
<a href="{{$item.editurl}}" >{{$item.term}}</a>
{{if $profile.canlike}}<br />
<button type="button" class="btn btn-default btn-sm" onclick="doprofilelike('thing/' + '{{$item.term_hash}}','like'); return false;" title="{{$likethis}}" >
<i class="fa fa-thumbs-o-up" title="{{$likethis}}"></i>