1
0
Fork 0

Merge remote-tracking branch 'upstream/develop' into 1508-public-relay

This commit is contained in:
Michael Vogel 2015-08-10 10:52:54 +02:00
commit c8e0685788
40 changed files with 15208 additions and 15046 deletions

View file

@ -1207,7 +1207,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
// fix any escaped ampersands that may have been converted into links
$Text = preg_replace("/\<([^>]*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
$Text = preg_replace("/\<([^>]*?)(src|href)=\"(?!http|ftp|mailto|cid)(.*?)\>/ism",'<$1$2="">',$Text);
$Text = preg_replace("/\<([^>]*?)(src|href)=\"(?!http|ftp|mailto|gopher|cid)(.*?)\>/ism",'<$1$2="">',$Text);
if($saved_image)
$Text = bb_replace_images($Text, $saved_image);

View file

@ -892,9 +892,9 @@ function item_photo_menu($item){
foreach($menu as $k=>$v){
if(strpos($v,'javascript:') === 0) {
$v = substr($v,11);
$o .= "<li><a href=\"#\" onclick=\"$v\">$k</a></li>\n";
$o .= "<li role=\"menuitem\"><a onclick=\"$v\">$k</a></li>\n";
}
elseif ($v!="") $o .= "<li><a href=\"$v\">$k</a></li>\n";
elseif ($v!="") $o .= "<li role=\"menuitem\"><a href=\"$v\">$k</a></li>\n";
}
return $o;
}}

View file

@ -263,8 +263,8 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
);
}
}
$tpl = get_markup_template("group_side.tpl");
$o = replace_macros($tpl, array(
'$title' => t('Groups'),
@ -276,8 +276,8 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
'$groups' => $groups,
'$add' => t('add'),
));
return $o;
}

View file

@ -634,6 +634,7 @@ if(! function_exists('profile_tabs')){
'sel' => ((!isset($tab)&&$a->argv[0]=='profile')?'active':''),
'title' => t('Status Messages and Posts'),
'id' => 'status-tab',
'accesskey' => 'm',
),
array(
'label' => t('Profile'),
@ -641,6 +642,7 @@ if(! function_exists('profile_tabs')){
'sel' => ((isset($tab) && $tab=='profile')?'active':''),
'title' => t('Profile Details'),
'id' => 'profile-tab',
'accesskey' => 'r',
),
array(
'label' => t('Photos'),
@ -648,6 +650,7 @@ if(! function_exists('profile_tabs')){
'sel' => ((!isset($tab)&&$a->argv[0]=='photos')?'active':''),
'title' => t('Photo Albums'),
'id' => 'photo-tab',
'accesskey' => 'h',
),
array(
'label' => t('Videos'),
@ -655,6 +658,7 @@ if(! function_exists('profile_tabs')){
'sel' => ((!isset($tab)&&$a->argv[0]=='videos')?'active':''),
'title' => t('Videos'),
'id' => 'video-tab',
'accesskey' => 'v',
),
);
@ -665,6 +669,7 @@ if(! function_exists('profile_tabs')){
'sel' =>((!isset($tab)&&$a->argv[0]=='events')?'active':''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
'accesskey' => 'e',
);
$tabs[] = array(
'label' => t('Personal Notes'),
@ -672,6 +677,7 @@ if(! function_exists('profile_tabs')){
'sel' =>((!isset($tab)&&$a->argv[0]=='notes')?'active':''),
'title' => t('Only You Can See This'),
'id' => 'notes-tab',
'accesskey' => 't',
);
}

View file

@ -162,6 +162,8 @@ function call_hooks($name, &$data = null) {
$a = get_app();
#logger($name, LOGGER_ALL);
if((is_array($a->hooks)) && (array_key_exists($name,$a->hooks))) {
foreach($a->hooks[$name] as $hook) {
// Don't run a theme's hook if the user isn't using the theme
@ -171,6 +173,7 @@ function call_hooks($name, &$data = null) {
@include_once($hook[0]);
if(function_exists($hook[1])) {
$func = $hook[1];
logger($name." => ".$hook[0].":".$func."()", LOGGER_DEBUG);
$func($a,$data);
}
else {
@ -386,11 +389,11 @@ function install_theme($theme) {
// check service_class restrictions. If there are no service_classes defined, everything is allowed.
// if $usage is supplied, we check against a maximum count and return true if the current usage is
// if $usage is supplied, we check against a maximum count and return true if the current usage is
// less than the subscriber plan allows. Otherwise we return boolean true or false if the property
// is allowed (or not) in this subscriber plan. An unset property for this service plan means
// the property is allowed, so it is only necessary to provide negative properties for each plan,
// or what the subscriber is not allowed to do.
// is allowed (or not) in this subscriber plan. An unset property for this service plan means
// the property is allowed, so it is only necessary to provide negative properties for each plan,
// or what the subscriber is not allowed to do.
function service_class_allows($uid,$property,$usage = false) {

View file

@ -1676,11 +1676,14 @@ function get_plink($item) {
//'href' => $a->get_baseurl()."/display/".$a->user['nickname']."/".$item['id'],
'href' => $a->get_baseurl()."/display/".$item['guid'],
'orig' => $a->get_baseurl()."/display/".$item['guid'],
'title' => t('link to source'),
'title' => t('local thread'),
'orig_title' => t('local thread'),
);
if (x($item,'plink'))
if (x($item,'plink')) {
$ret["href"] = $item['plink'];
$ret["title"] = t('link to source');
}
} elseif (x($item,'plink') && ($item['private'] != 1))
$ret = array(

View file

@ -136,8 +136,8 @@ function create_user($arr) {
$nickname = $arr['nickname'] = strtolower($nickname);
if(! preg_match("/^[a-z][a-z0-9\-\_]*$/",$nickname))
$result['message'] .= t('Your "nickname" can only contain "a-z", "0-9", "-", and "_", and must also begin with a letter.') . EOL;
if(! preg_match("/^[a-z0-9][a-z0-9\_]*$/",$nickname))
$result['message'] .= t('Your "nickname" can only contain "a-z", "0-9" and "_".') . EOL;
$r = q("SELECT `uid` FROM `user`
WHERE `nickname` = '%s' LIMIT 1",
dbesc($nickname)