Merge remote-tracking branch 'mike/master' into dev
This commit is contained in:
commit
150e238b02
@ -14,7 +14,7 @@ class Follow extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$uid = local_channel();
|
$uid = local_channel();
|
||||||
$url = notags(trim($_REQUEST['url']));
|
$url = notags(trim(unpunify($_REQUEST['url'])));
|
||||||
$return_url = $_SESSION['return_url'];
|
$return_url = $_SESSION['return_url'];
|
||||||
$confirm = intval($_REQUEST['confirm']);
|
$confirm = intval($_REQUEST['confirm']);
|
||||||
$interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1);
|
$interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1);
|
||||||
|
@ -830,6 +830,12 @@ class Item extends \Zotlabs\Web\Controller {
|
|||||||
$datarray['plink'] = $plink;
|
$datarray['plink'] = $plink;
|
||||||
$datarray['route'] = $route;
|
$datarray['route'] = $route;
|
||||||
|
|
||||||
|
|
||||||
|
// A specific ACL over-rides public_policy completely
|
||||||
|
|
||||||
|
if(! empty_acl($datarray))
|
||||||
|
$datarray['public_policy'] = '';
|
||||||
|
|
||||||
if($iconfig)
|
if($iconfig)
|
||||||
$datarray['iconfig'] = $iconfig;
|
$datarray['iconfig'] = $iconfig;
|
||||||
|
|
||||||
|
@ -16,8 +16,15 @@ class New_channel extends \Zotlabs\Web\Controller {
|
|||||||
require_once('library/urlify/URLify.php');
|
require_once('library/urlify/URLify.php');
|
||||||
$result = array('error' => false, 'message' => '');
|
$result = array('error' => false, 'message' => '');
|
||||||
$n = trim($_REQUEST['name']);
|
$n = trim($_REQUEST['name']);
|
||||||
|
|
||||||
$x = strtolower(\URLify::transliterate($n));
|
$x = false;
|
||||||
|
|
||||||
|
if(get_config('system','unicode_usernames')) {
|
||||||
|
$x = punify(mb_strtolower($n));
|
||||||
|
}
|
||||||
|
|
||||||
|
if((! $x) || strlen($x) > 64)
|
||||||
|
$x = strtolower(\URLify::transliterate($n));
|
||||||
|
|
||||||
$test = array();
|
$test = array();
|
||||||
|
|
||||||
@ -43,7 +50,14 @@ class New_channel extends \Zotlabs\Web\Controller {
|
|||||||
$result = array('error' => false, 'message' => '');
|
$result = array('error' => false, 'message' => '');
|
||||||
$n = trim($_REQUEST['nick']);
|
$n = trim($_REQUEST['nick']);
|
||||||
|
|
||||||
$x = strtolower(\URLify::transliterate($n));
|
$x = false;
|
||||||
|
|
||||||
|
if(get_config('system','unicode_usernames')) {
|
||||||
|
$x = punify(mb_strtolower($n));
|
||||||
|
}
|
||||||
|
|
||||||
|
if((! $x) || strlen($x) > 64)
|
||||||
|
$x = strtolower(\URLify::transliterate($n));
|
||||||
|
|
||||||
$test = array();
|
$test = array();
|
||||||
|
|
||||||
|
@ -1234,7 +1234,7 @@ function profile_load($nickname, $profile = '') {
|
|||||||
);
|
);
|
||||||
if($z) {
|
if($z) {
|
||||||
$p[0]['picdate'] = $z[0]['xchan_photo_date'];
|
$p[0]['picdate'] = $z[0]['xchan_photo_date'];
|
||||||
$p[0]['reddress'] = str_replace('@','@',$z[0]['xchan_addr']);
|
$p[0]['reddress'] = str_replace('@','@',unpunify($z[0]['xchan_addr']));
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetch user tags if this isn't the default profile
|
// fetch user tags if this isn't the default profile
|
||||||
@ -1255,7 +1255,7 @@ function profile_load($nickname, $profile = '') {
|
|||||||
|
|
||||||
App::$profile = $p[0];
|
App::$profile = $p[0];
|
||||||
App::$profile_uid = $p[0]['profile_uid'];
|
App::$profile_uid = $p[0]['profile_uid'];
|
||||||
App::$page['title'] = App::$profile['channel_name'] . " - " . channel_reddress(App::$profile);
|
App::$page['title'] = App::$profile['channel_name'] . " - " . unpunify(channel_reddress(App::$profile));
|
||||||
|
|
||||||
App::$profile['permission_to_view'] = $can_view_profile;
|
App::$profile['permission_to_view'] = $can_view_profile;
|
||||||
|
|
||||||
|
@ -969,6 +969,10 @@ function import_author_unknown($x) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function empty_acl($item) {
|
||||||
|
return (($item['allow_cid'] === EMPTY_STR && $item['allow_gid'] === EMPTY_STR && $item['deny_cid'] === EMPTY_STR && $item['deny_gid'] === EMPTY_STR) ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
function encode_item($item,$mirror = false) {
|
function encode_item($item,$mirror = false) {
|
||||||
$x = array();
|
$x = array();
|
||||||
$x['type'] = 'activity';
|
$x['type'] = 'activity';
|
||||||
|
@ -3318,3 +3318,19 @@ function featured_sort($a,$b) {
|
|||||||
$s2 = substr($b,strpos($b,'id='),20);
|
$s2 = substr($b,strpos($b,'id='),20);
|
||||||
return(strcmp($s1,$s2));
|
return(strcmp($s1,$s2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function punify($s) {
|
||||||
|
require_once('vendor/simplepie/simplepie/idn/idna_convert.class.php');
|
||||||
|
$x = new idna_convert(['encoding' => 'utf8']);
|
||||||
|
return $x->encode($s);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function unpunify($s) {
|
||||||
|
require_once('vendor/simplepie/simplepie/idn/idna_convert.class.php');
|
||||||
|
$x = new idna_convert(['encoding' => 'utf8']);
|
||||||
|
return $x->decode($s);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user