Merge branch 'dev' into oauth2
This commit is contained in:
@@ -95,7 +95,7 @@ class Acl extends \Zotlabs\Web\Controller {
|
||||
. "' IN xchan_name) else position('" . protect_sprintf(dbesc(punify($search))) . "' IN xchan_addr) end, ";
|
||||
|
||||
$col = ((strpos($search,'@') !== false) ? 'xchan_addr' : 'xchan_name' );
|
||||
$sql_extra3 = "AND $col like " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ";
|
||||
$sql_extra3 = "AND $col like " . protect_sprintf( "'%" . dbesc(($col === 'xchan_addr') ? punify($search) : $search) . "%'" ) . " ";
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -828,7 +828,7 @@ class Connedit extends \Zotlabs\Web\Controller {
|
||||
|
||||
$locstr = locations_by_netid($contact['xchan_hash']);
|
||||
if(! $locstr)
|
||||
$locstr = $contact['xchan_url'];
|
||||
$locstr = unpunify($contact['xchan_url']);
|
||||
|
||||
$clone_warn = '';
|
||||
$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_new' => t('Add permission role'),
|
||||
'$permcat_enable' => feature_enabled(local_channel(),'permcats'),
|
||||
'$addr' => $contact['xchan_addr'],
|
||||
'$primeurl' => $contact['xchan_url'],
|
||||
'$addr' => unpunify($contact['xchan_addr']),
|
||||
'$primeurl' => unpunify($contact['xchan_url']),
|
||||
'$section' => $section,
|
||||
'$sections' => $sections,
|
||||
'$vcard' => $vcard,
|
||||
|
||||
@@ -299,9 +299,9 @@ class Directory extends \Zotlabs\Web\Controller {
|
||||
if(strlen($out))
|
||||
$out .= ', ';
|
||||
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
|
||||
$out .= $k;
|
||||
$out .= '<a href="' . z_root() . '/directory/f=&keywords=' . urlencode($k) .'">' . $k . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
if($decoded)
|
||||
$item_hash = $decoded;
|
||||
|
||||
$r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, item_blocked from item where mid like '%s' limit 1",
|
||||
$r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, author_xchan, item_blocked from item where mid like '%s' limit 1",
|
||||
dbesc($item_hash . '%')
|
||||
);
|
||||
|
||||
@@ -110,6 +110,13 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
$target_item = $r[0];
|
||||
}
|
||||
|
||||
$x = q("select * from xchan where xchan_hash = '%s' limit 1",
|
||||
dbesc($target_item['author_xchan'])
|
||||
);
|
||||
if($x) {
|
||||
\App::$poi = $x[0];
|
||||
}
|
||||
|
||||
//if the item is to be moderated redirect to /moderate
|
||||
if($target_item['item_blocked'] == ITEM_MODERATED) {
|
||||
goaway(z_root() . '/moderate/' . $target_item['id']);
|
||||
@@ -169,6 +176,7 @@ class Display extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0);
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class Hashtags extends \Zotlabs\Web\Controller {
|
||||
);
|
||||
if($r) {
|
||||
foreach($r as $rv) {
|
||||
$result[] = [ 'text' => strtolower($rv['term']) ];
|
||||
$result[] = [ 'text' => $rv['term'] ];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,14 +67,14 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
if(! $recipient) {
|
||||
$channel = \App::get_channel();
|
||||
|
||||
$j = \Zotlabs\Zot\Finger::run($rstr,$channel);
|
||||
$j = \Zotlabs\Zot\Finger::run(punify($rstr),$channel);
|
||||
|
||||
if(! $j['success']) {
|
||||
notice( t('Unable to lookup recipient.') . EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
logger('message_post: lookup: ' . $url . ' ' . print_r($j,true));
|
||||
logger('message_post: lookup: ' . $rstr . ' ' . print_r($j,true));
|
||||
|
||||
if(! $j['guid']) {
|
||||
notice( t('Unable to communicate with requested channel.'));
|
||||
|
||||
@@ -45,7 +45,9 @@ class Rpost extends \Zotlabs\Web\Controller {
|
||||
$url = get_rpost_path(\App::get_observer());
|
||||
// make sure we're not looping to our own hub
|
||||
if(($url) && (! stristr($url, \App::get_hostname()))) {
|
||||
foreach($_REQUEST as $key => $arg) {
|
||||
foreach($_GET as $key => $arg) {
|
||||
if($key === 'q')
|
||||
continue;
|
||||
$url .= '&' . $key . '=' . $arg;
|
||||
}
|
||||
goaway($url);
|
||||
|
||||
@@ -80,6 +80,8 @@ class Tagger extends \Zotlabs\Web\Controller {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$clean_term = trim($term,'"\' ');
|
||||
|
||||
$links = array(array('rel' => 'alternate','type' => 'text/html',
|
||||
'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;
|
||||
|
||||
$obj = json_encode(array(
|
||||
'type' => $objtype,
|
||||
'id' => $tagid,
|
||||
'link' => array(array('rel' => 'alternate','type' => 'text/html', 'href' => $tagid)),
|
||||
'title' => $term,
|
||||
'content' => $term
|
||||
'title' => $clean_term,
|
||||
'content' => $clean_term
|
||||
));
|
||||
|
||||
$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
|
||||
// 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();
|
||||
|
||||
@@ -143,8 +145,7 @@ class Tagger extends \Zotlabs\Web\Controller {
|
||||
$arr['obj_type'] = $objtype;
|
||||
$arr['obj'] = $obj;
|
||||
$arr['parent_mid'] = $item['mid'];
|
||||
|
||||
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_COMMUNITYTAG,$term,$tagid);
|
||||
store_item_tag($item['uid'],$item['id'],TERM_OBJ_POST,TERM_COMMUNITYTAG,$clean_term,$tagid);
|
||||
$ret = post_activity_item($arr);
|
||||
|
||||
if($ret['success']) {
|
||||
|
||||
@@ -22,8 +22,8 @@ class Uexport extends \Zotlabs\Web\Controller {
|
||||
$month = intval(argv(2));
|
||||
}
|
||||
|
||||
header('content-type: application/octet_stream');
|
||||
header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . '.json"' );
|
||||
header('content-type: application/json');
|
||||
header('content-disposition: attachment; filename="' . $channel['channel_address'] . (($year) ? '-' . $year : '') . (($month) ? '-' . $month : '') . (($_REQUEST['sections']) ? '-' . $_REQUEST['sections'] : '') . '.json"' );
|
||||
|
||||
if($year) {
|
||||
echo json_encode(identity_export_year(local_channel(),$year,$month));
|
||||
|
||||
@@ -284,6 +284,8 @@ class Wiki extends \Zotlabs\Web\Controller {
|
||||
$wikiheaderPage = urldecode($pageUrlName);
|
||||
|
||||
$renamePage = (($wikiheaderPage === 'Home') ? '' : t('Rename page'));
|
||||
$sharePage = t('Share');
|
||||
|
||||
$p = [];
|
||||
|
||||
if(! $ignore_language) {
|
||||
@@ -354,6 +356,8 @@ class Wiki extends \Zotlabs\Web\Controller {
|
||||
'$wikiheaderName' => $wikiheaderName,
|
||||
'$wikiheaderPage' => $wikiheaderPage,
|
||||
'$renamePage' => $renamePage,
|
||||
'$sharePage' => $sharePage,
|
||||
'$shareLink' => urlencode('#^[zrl=' . z_root() . '/wiki/' . argv(1) . '/' . $wikiUrlName . '/' . $pageUrlName . ']' . '[ ' . $owner['channel_name'] . ' ] - ' . $wikiheaderName . ' - ' . $wikiheaderPage . '[/zrl]'),
|
||||
'$showPageControls' => $showPageControls,
|
||||
'$editOrSourceLabel' => (($showPageControls) ? t('Edit') : t('Source')),
|
||||
'$tools_label' => 'Page Tools',
|
||||
|
||||
Reference in New Issue
Block a user