Merge remote-tracking branch 'mike/master' into dev
This commit is contained in:
commit
61e019e176
@ -313,7 +313,7 @@ class Dirsearch extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$ret['results'] = $entries;
|
$ret['results'] = $entries;
|
||||||
if($kw) {
|
if($kw) {
|
||||||
$k = dir_tagadelic($kw);
|
$k = dir_tagadelic($kw, $hub);
|
||||||
if($k) {
|
if($k) {
|
||||||
$ret['keywords'] = array();
|
$ret['keywords'] = array();
|
||||||
foreach($k as $kv) {
|
foreach($k as $kv) {
|
||||||
|
@ -3,4 +3,4 @@ url: $baseurl/articles/$nick
|
|||||||
name: Articles
|
name: Articles
|
||||||
requires: local_channel, articles
|
requires: local_channel, articles
|
||||||
photo: icon:file-text-o
|
photo: icon:file-text-o
|
||||||
categories: Productivity
|
categories: nav_featured_app, Productivity
|
||||||
|
@ -3,4 +3,4 @@ url: $baseurl/cards/$nick
|
|||||||
name: Cards
|
name: Cards
|
||||||
requires: local_channel, cards
|
requires: local_channel, cards
|
||||||
photo: icon:list
|
photo: icon:list
|
||||||
categories: Productivity
|
categories: nav_featured_app, Productivity
|
||||||
|
@ -3,4 +3,4 @@ url: $baseurl/webpages/$nick
|
|||||||
requires: local_channel, webpages
|
requires: local_channel, webpages
|
||||||
name: Webpages
|
name: Webpages
|
||||||
photo: icon:newspaper-o
|
photo: icon:newspaper-o
|
||||||
categories: Productivity
|
categories: nav_featured_app, Productivity
|
||||||
|
@ -3,4 +3,4 @@ url: $baseurl/wiki/$nick
|
|||||||
requires: local_channel, wiki
|
requires: local_channel, wiki
|
||||||
name: Wiki
|
name: Wiki
|
||||||
photo: icon:pencil-square-o
|
photo: icon:pencil-square-o
|
||||||
categories: Productivity
|
categories: nav_featured_app, Productivity
|
||||||
|
@ -178,11 +178,12 @@ function poco_load($xchan = '', $url = null) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if(! $r) {
|
if(! $r) {
|
||||||
q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_rating_text, xlink_updated, xlink_static ) values ( '%s', '%s', %d, '%s', '%s', 0 ) ",
|
q("insert into xlink ( xlink_xchan, xlink_link, xlink_rating, xlink_rating_text, xlink_sig, xlink_updated, xlink_static ) values ( '%s', '%s', %d, '%s', '%s', '%s', 0 ) ",
|
||||||
dbesc($xchan),
|
dbesc($xchan),
|
||||||
dbesc($hash),
|
dbesc($hash),
|
||||||
intval(0),
|
intval(0),
|
||||||
dbesc(''),
|
dbesc(''),
|
||||||
|
dbesc(''),
|
||||||
dbesc(datetime_convert())
|
dbesc(datetime_convert())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -309,19 +309,27 @@ function article_tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function dir_tagadelic($count = 0) {
|
function dir_tagadelic($count = 0, $hub = '') {
|
||||||
|
|
||||||
$count = intval($count);
|
$count = intval($count);
|
||||||
|
|
||||||
$dirmode = get_config('system','directory_mode');
|
$dirmode = get_config('system','directory_mode');
|
||||||
|
|
||||||
if($dirmode == DIRECTORY_MODE_STANDALONE) {
|
if(($dirmode == DIRECTORY_MODE_STANDALONE) && (! $hub)) {
|
||||||
|
$hub = \App::get_hostname();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($hub)
|
||||||
|
$hub_query = " and xtag_hash in (select hubloc_hash from hubloc where hubloc_host = '" . protect_sprintf(dbesc($hub)) . "') ";
|
||||||
|
else
|
||||||
|
$hub_query = '';
|
||||||
|
|
||||||
|
if($hub_query) {
|
||||||
// Fetch tags
|
// Fetch tags
|
||||||
$r = q("select xtag_term as term, count(xtag_term) as total from xtag
|
$r = q("select xtag_term as term, count(xtag_term) as total from xtag
|
||||||
left join hubloc on xtag_hash = hubloc_hash
|
left join hubloc on xtag_hash = hubloc_hash
|
||||||
where xtag_flags = 0 and hubloc_url = '%s'
|
where xtag_flags = 0 $hub_query
|
||||||
group by xtag_term order by total desc %s",
|
group by xtag_term order by total desc %s",
|
||||||
dbesc(z_root()),
|
|
||||||
((intval($count)) ? "limit $count" : '')
|
((intval($count)) ? "limit $count" : '')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -485,9 +493,6 @@ function dir_tagblock($link,$r) {
|
|||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$observer = get_observer_hash();
|
$observer = get_observer_hash();
|
||||||
if(! get_directory_setting($observer, 'globaldir'))
|
|
||||||
return $o;
|
|
||||||
|
|
||||||
|
|
||||||
if(! $r)
|
if(! $r)
|
||||||
$r = App::$data['directory_keywords'];
|
$r = App::$data['directory_keywords'];
|
||||||
|
Reference in New Issue
Block a user