Merge remote-tracking branch 'mike/master' into dev
This commit is contained in:
commit
6822415ee2
@ -828,7 +828,7 @@ class Connedit extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
$locstr = locations_by_netid($contact['xchan_hash']);
|
$locstr = locations_by_netid($contact['xchan_hash']);
|
||||||
if(! $locstr)
|
if(! $locstr)
|
||||||
$locstr = $contact['xchan_url'];
|
$locstr = unpunify($contact['xchan_url']);
|
||||||
|
|
||||||
$clone_warn = '';
|
$clone_warn = '';
|
||||||
$clonable = (in_array($contact['xchan_network'],['zot','rss']) ? true : false);
|
$clonable = (in_array($contact['xchan_network'],['zot','rss']) ? true : false);
|
||||||
@ -852,8 +852,8 @@ class Connedit extends \Zotlabs\Web\Controller {
|
|||||||
'$permcat' => [ 'permcat', t('Permission role'), '', '<span class="loading invisible">' . t('Loading') . '<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span></span>',$permcats ],
|
'$permcat' => [ 'permcat', t('Permission role'), '', '<span class="loading invisible">' . t('Loading') . '<span class="jumping-dots"><span class="dot-1">.</span><span class="dot-2">.</span><span class="dot-3">.</span></span></span>',$permcats ],
|
||||||
'$permcat_new' => t('Add permission role'),
|
'$permcat_new' => t('Add permission role'),
|
||||||
'$permcat_enable' => feature_enabled(local_channel(),'permcats'),
|
'$permcat_enable' => feature_enabled(local_channel(),'permcats'),
|
||||||
'$addr' => $contact['xchan_addr'],
|
'$addr' => unpunify($contact['xchan_addr']),
|
||||||
'$primeurl' => $contact['xchan_url'],
|
'$primeurl' => unpunify($contact['xchan_url']),
|
||||||
'$section' => $section,
|
'$section' => $section,
|
||||||
'$sections' => $sections,
|
'$sections' => $sections,
|
||||||
'$vcard' => $vcard,
|
'$vcard' => $vcard,
|
||||||
|
@ -299,9 +299,9 @@ class Directory extends \Zotlabs\Web\Controller {
|
|||||||
if(strlen($out))
|
if(strlen($out))
|
||||||
$out .= ', ';
|
$out .= ', ';
|
||||||
if($marr && in_arrayi($k,$marr))
|
if($marr && in_arrayi($k,$marr))
|
||||||
$out .= '<strong>' . $k . '</strong>';
|
$out .= '<a href="' . z_root() . '/directory/f=&keywords=' . urlencode($k) .'"><strong>' . $k . '</strong></a>';
|
||||||
else
|
else
|
||||||
$out .= $k;
|
$out .= '<a href="' . z_root() . '/directory/f=&keywords=' . urlencode($k) .'">' . $k . '</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +81,8 @@ class Tagger extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$clean_term = trim($term,'"\' ');
|
||||||
|
|
||||||
$links = array(array('rel' => 'alternate','type' => 'text/html',
|
$links = array(array('rel' => 'alternate','type' => 'text/html',
|
||||||
'href' => z_root() . '/display/' . gen_link_id($item['mid'])));
|
'href' => z_root() . '/display/' . gen_link_id($item['mid'])));
|
||||||
|
|
||||||
@ -103,15 +105,15 @@ class Tagger extends \Zotlabs\Web\Controller {
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
$tagid = z_root() . '/search?tag=' . $term;
|
$tagid = z_root() . '/search?tag=' . $clean_term;
|
||||||
$objtype = ACTIVITY_OBJ_TAGTERM;
|
$objtype = ACTIVITY_OBJ_TAGTERM;
|
||||||
|
|
||||||
$obj = json_encode(array(
|
$obj = json_encode(array(
|
||||||
'type' => $objtype,
|
'type' => $objtype,
|
||||||
'id' => $tagid,
|
'id' => $tagid,
|
||||||
'link' => array(array('rel' => 'alternate','type' => 'text/html', 'href' => $tagid)),
|
'link' => array(array('rel' => 'alternate','type' => 'text/html', 'href' => $tagid)),
|
||||||
'title' => $term,
|
'title' => $clean_term,
|
||||||
'content' => $term
|
'content' => $clean_term
|
||||||
));
|
));
|
||||||
|
|
||||||
$bodyverb = t('%1$s tagged %2$s\'s %3$s with %4$s');
|
$bodyverb = t('%1$s tagged %2$s\'s %3$s with %4$s');
|
||||||
@ -119,7 +121,7 @@ class Tagger extends \Zotlabs\Web\Controller {
|
|||||||
// saving here for reference
|
// saving here for reference
|
||||||
// also check out x22d5 and x2317 and x0d6b and x0db8 and x24d0 and xff20 !!!
|
// also check out x22d5 and x2317 and x0d6b and x0db8 and x24d0 and xff20 !!!
|
||||||
|
|
||||||
$termlink = html_entity_decode('⋕') . '[zrl=' . z_root() . '/search?tag=' . urlencode($term) . ']'. $term . '[/zrl]';
|
$termlink = html_entity_decode('⋕') . '[zrl=' . z_root() . '/search?tag=' . urlencode($clean_term) . ']'. $clean_term . '[/zrl]';
|
||||||
|
|
||||||
$channel = \App::get_channel();
|
$channel = \App::get_channel();
|
||||||
|
|
||||||
@ -143,8 +145,7 @@ class Tagger extends \Zotlabs\Web\Controller {
|
|||||||
$arr['obj_type'] = $objtype;
|
$arr['obj_type'] = $objtype;
|
||||||
$arr['obj'] = $obj;
|
$arr['obj'] = $obj;
|
||||||
$arr['parent_mid'] = $item['mid'];
|
$arr['parent_mid'] = $item['mid'];
|
||||||
|
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_COMMUNITYTAG,$clean_term,$tagid);
|
||||||
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_COMMUNITYTAG,$term,$tagid);
|
|
||||||
$ret = post_activity_item($arr);
|
$ret = post_activity_item($arr);
|
||||||
|
|
||||||
if($ret['success']) {
|
if($ret['success']) {
|
||||||
|
@ -1573,14 +1573,25 @@ function advanced_profile() {
|
|||||||
$profile['howlong'] = relative_date(App::$profile['howlong'], t('for %1$d %2$s'));
|
$profile['howlong'] = relative_date(App::$profile['howlong'], t('for %1$d %2$s'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(App::$profile['keywords']) {
|
||||||
|
$keywords = str_replace(',',' ', App::$profile['keywords']);
|
||||||
|
$keywords = str_replace(' ',' ', $keywords);
|
||||||
|
$karr = explode(' ', $keywords);
|
||||||
|
if($karr) {
|
||||||
|
for($cnt = 0; $cnt < count($karr); $cnt ++) {
|
||||||
|
$karr[$cnt] = '<a href="' . z_root() . '/directory/f=&keywords=' . trim($karr[$cnt]) . '">' . $karr[$cnt] . '</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$profile['keywords'] = array( t('Tags:'), implode(' ', $karr));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(App::$profile['sexual']) $profile['sexual'] = array( t('Sexual Preference:'), App::$profile['sexual'] );
|
if(App::$profile['sexual']) $profile['sexual'] = array( t('Sexual Preference:'), App::$profile['sexual'] );
|
||||||
|
|
||||||
if(App::$profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify(App::$profile['homepage']) );
|
if(App::$profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify(App::$profile['homepage']) );
|
||||||
|
|
||||||
if(App::$profile['hometown']) $profile['hometown'] = array( t('Hometown:'), linkify(App::$profile['hometown']) );
|
if(App::$profile['hometown']) $profile['hometown'] = array( t('Hometown:'), linkify(App::$profile['hometown']) );
|
||||||
|
|
||||||
if(App::$profile['keywords']) $profile['keywords'] = array( t('Tags:'), App::$profile['keywords']);
|
|
||||||
|
|
||||||
if(App::$profile['politic']) $profile['politic'] = array( t('Political Views:'), App::$profile['politic']);
|
if(App::$profile['politic']) $profile['politic'] = array( t('Political Views:'), App::$profile['politic']);
|
||||||
|
|
||||||
if(App::$profile['religion']) $profile['religion'] = array( t('Religion:'), App::$profile['religion']);
|
if(App::$profile['religion']) $profile['religion'] = array( t('Religion:'), App::$profile['religion']);
|
||||||
|
@ -270,7 +270,8 @@ function locations_by_netid($netid) {
|
|||||||
dbesc($netid)
|
dbesc($netid)
|
||||||
);
|
);
|
||||||
|
|
||||||
return array_elm_to_str($locs,'location',', ');
|
|
||||||
|
return array_elm_to_str($locs,'location',', ','trim_and_unpunify');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2189,13 +2189,13 @@ function ids_to_querystr($arr,$idx = 'id',$quote = false) {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function array_elm_to_str($arr,$elm,$delim = ',') {
|
function array_elm_to_str($arr,$elm,$delim = ',',$each = 'trim') {
|
||||||
|
|
||||||
$tmp = [];
|
$tmp = [];
|
||||||
if($arr && is_array($arr)) {
|
if($arr && is_array($arr)) {
|
||||||
foreach($arr as $x) {
|
foreach($arr as $x) {
|
||||||
if(is_array($x) && array_key_exists($elm,$x)) {
|
if(is_array($x) && array_key_exists($elm,$x)) {
|
||||||
$z = trim($x[$elm]);
|
$z = $each($x[$elm]);
|
||||||
if(($z) && (! in_array($z,$tmp))) {
|
if(($z) && (! in_array($z,$tmp))) {
|
||||||
$tmp[] = $z;
|
$tmp[] = $z;
|
||||||
}
|
}
|
||||||
@ -2205,7 +2205,9 @@ function array_elm_to_str($arr,$elm,$delim = ',') {
|
|||||||
return implode($delim,$tmp);
|
return implode($delim,$tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function trim_and_unpunify($s) {
|
||||||
|
return unpunify(trim($s));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user