diff options
-rw-r--r-- | Zotlabs/Access/PermissionLimits.php | 6 | ||||
-rw-r--r-- | Zotlabs/Access/PermissionRoles.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/New_channel.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Owa.php | 9 | ||||
-rw-r--r-- | Zotlabs/Module/Settings/Channel.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Webfinger.php | 28 | ||||
-rw-r--r-- | Zotlabs/Web/HTTPSig.php | 4 | ||||
-rw-r--r-- | doc/member/member_guide.bb | 118 | ||||
-rw-r--r-- | include/permissions.php | 2 | ||||
-rw-r--r-- | include/photo/photo_driver.php | 1 | ||||
-rw-r--r-- | include/photo/photo_gd.php | 5 | ||||
-rw-r--r-- | include/photo/photo_imagick.php | 13 | ||||
-rw-r--r-- | include/photos.php | 4 | ||||
-rw-r--r-- | include/taxonomy.php | 3 | ||||
-rw-r--r-- | tests/unit/Access/PermissionLimitsTest.php | 2 | ||||
-rw-r--r-- | view/js/autocomplete.js | 2 |
16 files changed, 113 insertions, 96 deletions
diff --git a/Zotlabs/Access/PermissionLimits.php b/Zotlabs/Access/PermissionLimits.php index eb660ead9..c11dc95e6 100644 --- a/Zotlabs/Access/PermissionLimits.php +++ b/Zotlabs/Access/PermissionLimits.php @@ -72,13 +72,13 @@ class PermissionLimits { * @param int $channel_id * @param string $perm (optional) * @return - * * \b boolean false if no perm_limits set for this channel - * * \b int if $perm is set, return one of PERMS_* constants for this permission + * * \b false if no perm_limits set for this channel + * * \b int if $perm is set, return one of PERMS_* constants for this permission, default 0 * * \b array with all permission limits, if $perm is not set */ static public function Get($channel_id, $perm = '') { if($perm) { - return PConfig::Get($channel_id, 'perm_limits', $perm); + return intval(PConfig::Get($channel_id, 'perm_limits', $perm)); } PConfig::Load($channel_id); diff --git a/Zotlabs/Access/PermissionRoles.php b/Zotlabs/Access/PermissionRoles.php index a8a9ae462..9855a05c4 100644 --- a/Zotlabs/Access/PermissionRoles.php +++ b/Zotlabs/Access/PermissionRoles.php @@ -41,7 +41,7 @@ class PermissionRoles { break; - case 'social_party': + case 'social_federation': $ret['perms_auto'] = false; $ret['default_collection'] = false; $ret['directory_publish'] = true; @@ -281,7 +281,7 @@ class PermissionRoles { static public function roles() { $roles = [ t('Social Networking') => [ - 'social_party' => t('Social - Party'), + 'social_federation' => t('Social - Federation'), 'social' => t('Social - Mostly Public'), 'social_restricted' => t('Social - Restricted'), 'social_private' => t('Social - Private') diff --git a/Zotlabs/Module/New_channel.php b/Zotlabs/Module/New_channel.php index ea9f27447..d9becbc22 100644 --- a/Zotlabs/Module/New_channel.php +++ b/Zotlabs/Module/New_channel.php @@ -146,14 +146,14 @@ class New_channel extends \Zotlabs\Web\Controller { $name = array('name', t('Name or caption'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Examples: "Bob Jameson", "Lisa and her Horses", "Soccer", "Aviation Group"'), "*"); $nickhub = '@' . \App::get_hostname(); $nickname = array('nickname', t('Choose a short nickname'), ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''), sprintf( t('Your nickname will be used to create an easy to remember channel address e.g. nickname%s'), $nickhub), "*"); - $role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/member/member_guide#Account_Permission_Roles" target="_blank">' . t('Read more about roles') . '</a>',$perm_roles); + $role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' <a href="help/member/member_guide#Channel_Permission_Roles" target="_blank">' . t('Read more about roles') . '</a>',$perm_roles); $o = replace_macros(get_markup_template('new_channel.tpl'), array( '$title' => t('Create Channel'), - '$desc' => t('A channel is your identity on this network. It can represent a person, a blog, or a forum to name a few. Channels can make connections with other channels to share information with highly detailed permissions.'), + '$desc' => t('A channel is a unique network identity. It can represent a person (social network profile), a forum (group), a business or celebrity page, a newsfeed, and many other things. Channels can make connections with other channels to share information with each other.') . ' ' . t('The type of channel you create affects the basic privacy settings, the permissions that are granted to connections/friends, and also the channel\'s visibility across the network.'), '$label_import' => t('or <a href="import">import an existing channel</a> from another location.'), '$name' => $name, - '$role' => $role, + '$role' => $role, '$default_role' => $default_role, '$nickname' => $nickname, '$validate' => t('Validate'), diff --git a/Zotlabs/Module/Owa.php b/Zotlabs/Module/Owa.php index e62fc9592..da26748b3 100644 --- a/Zotlabs/Module/Owa.php +++ b/Zotlabs/Module/Owa.php @@ -34,6 +34,15 @@ class Owa extends \Zotlabs\Web\Controller { where hubloc_addr = '%s' ", dbesc(str_replace('acct:','',$keyId)) ); + if(! $r) { + $found = discover_by_webbie(str_replace('acct:','',$keyId)); + if($found) { + $r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash + where hubloc_addr = '%s' ", + dbesc(str_replace('acct:','',$keyId)) + ); + } + } if($r) { foreach($r as $hubloc) { $verified = \Zotlabs\Web\HTTPSig::verify('',$hubloc['xchan_pubkey']); diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php index e274c9786..3e928ec58 100644 --- a/Zotlabs/Module/Settings/Channel.php +++ b/Zotlabs/Module/Settings/Channel.php @@ -536,7 +536,7 @@ class Channel { '$deny_gid' => acl2json($perm_defaults['deny_gid']), '$suggestme' => $suggestme, '$group_select' => $group_select, - '$role' => array('permissions_role' , t('Channel permissions category:'), $permissions_role, '', $perm_roles), + '$role' => array('permissions_role' , t('Channel role and privacy'), $permissions_role, '', $perm_roles), '$defpermcat' => [ 'defpermcat', t('Default Permissions Group'), $default_permcat, '', $permcats ], '$permcat_enable' => feature_enabled(local_channel(),'permcats'), '$profile_in_dir' => $profile_in_dir, diff --git a/Zotlabs/Module/Webfinger.php b/Zotlabs/Module/Webfinger.php index c50680de7..0dafae23c 100644 --- a/Zotlabs/Module/Webfinger.php +++ b/Zotlabs/Module/Webfinger.php @@ -17,33 +17,15 @@ class Webfinger extends \Zotlabs\Web\Controller { $o .= '<br /><br />'; - $old = false; if(x($_GET,'addr')) { $addr = trim($_GET['addr']); - // if(strpos($addr,'@') !== false) { - $res = webfinger_rfc7033($addr,true); - if(! $res) { - $res = old_webfinger($addr); - $old = true; - } - // } - // else { - // if(function_exists('lrdd')) - // $res = lrdd($addr); - // } - - if($res && $old) { - foreach($res as $r) { - if($r['@attributes']['rel'] === 'http://microformats.org/profile/hcard') { - $hcard = unamp($r['@attributes']['href']); - require_once('library/HTML5/Parser.php'); - $res['vcard'] = scrape_vcard($hcard); - break; - } - } + + $res = webfinger_rfc7033($addr,true); + if(! $res) { + $res = old_webfinger($addr); } - + $o .= '<pre>'; $o .= str_replace("\n",'<br />',print_r($res,true)); $o .= '</pre>'; diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php index 255511ede..df66ecf5c 100644 --- a/Zotlabs/Web/HTTPSig.php +++ b/Zotlabs/Web/HTTPSig.php @@ -195,7 +195,9 @@ class HTTPSig { if($x && $x[0]['xchan_pubkey']) { return ($x[0]['xchan_pubkey']); } - $r = as_fetch($id); + + if(function_exists('as_fetch')) + $r = as_fetch($id); if($r) { $j = json_decode($r,true); diff --git a/doc/member/member_guide.bb b/doc/member/member_guide.bb index 218f11d26..e36e1c497 100644 --- a/doc/member/member_guide.bb +++ b/doc/member/member_guide.bb @@ -22,67 +22,41 @@ Click the link to read the site's [zrl=[baseurl]/help/TermsOfService]Terms of Se Once you have provided the necessary details, click the 'Register' button. Some sites may require administrator approval before the registration is processed, and you will be alerted if this is the case. Please watch your email (including spam folders) for your registration approval. -[b]Create a Channel[/b] -Next, you will be presented with the "Add a channel" screen. Normally, your first channel will be one that represents you - so using your own name (or psuedonym) as the channel name is a good idea. The channel name should be thought of as a title, or brief description of your channel. The "choose a short nickname" box is similar to a "username" field. We will use whatever you enter here to create a channel address, which other people will use to connect to you, and you will use to log in to other sites. This looks like an email address, and takes the form nickname@siteyouregisteredat.xyz -When your channel is created you will be taken straight to your settings page where you can define permissions, enable features, etc. All these things are covered in the appropriate section of the helpfiles. - -See Also -[zrl=[baseurl]/help/accounts_profiles_channels_basics]The Basics about Identities within $Projectname[/zrl] -[zrl=[baseurl]/help/accounts]Accounts[/zrl] -[zrl=[baseurl]/help/profiles]Profiles[/zrl] -[zrl=[baseurl]/help/permissions]Permissions[/zrl] -[zrl=[baseurl]/help/remove_account]Remove Account[/zrl] - -[b]Profiles[/b] - -$Projectname has unlimited profiles. You may use different profiles to show different "sides of yourself" to different audiences. This is different to having different channels. Different channels allow for completely different sets of information. You may have a channel for yourself, a channel for your sports team, a channel for your website, or whatever else. A profile allows for finely graded "sides" of each channel. For example, your default public profile might say "Hello, I'm Fred, and I like laughing". You may show your close friends a profile that adds "and I also enjoy dwarf tossing". - -You always have a profile known as your "default" or "public" profile. This profile is always available to the general public and cannot be hidden (there may be rare exceptions on privately run or disconnected sites). You may, and probably should restrict the information you make available on your public profile. - -That said, if you want other friends to be able to find you, it helps to have the following information in your public profile... - -[ul][*]Your real name or at least a nickname everybody knows -[*]A photo of you -[*]Your location on the planet, at least to a country level.[/ul] - -In addition, if you'd like to meet people that share some general interests with you, please take a moment and add some "Keywords" to your profile. Such as "music, linux, photography" or whatever. You can add as many keywords as you like. - -To create an alternate profile, first go to [zrl=[baseurl]/settings/features]Settings > Additional Features[/zrl] and enable "Multiple Profiles" there, otherwise you won't have the ability to use more than just your default profile. - -Then select "Edit Profiles" from the menu of your $Projectname site. You may edit an existing profile, change the profile photo, add things to a profile or create a new profile. You may also create a "clone" of an existing profile if you only wish to change a few items but don't wish to enter all the information again. To do that, click on the profile you want to clone and choose "Clone this profile" there. - -In the list of your profiles, you can also choose the contacts who can see a specific profile. Just click on "Edit visibility" next to the profile in question (only available for the profiles that are not your default profile) and then click on specific connections to add them to or remove them from the group of people who can see this profile. +[h3]Channels[/h3] -Once a profile has been selected, when the person views your profile, they will see the private profile you have assigned. If they are not authenticated, they will see your public profile. +[h4]What are channels?[/h4] -There is a setting which allows you to publish your profile to a directory and ensure that it can be found by others. You can change this setting on the "Settings" page. +Channels are simply collections of content stored in one place. A channel can represent anything. It could represent you, a website, a forum, photo albums, anything. For most people, their first channel with be "Me". -If you do not wish to be found be people unless you give them your channel address, you may leave your profile unpublished. +The most important features for a channel that represents "me" are: +[ul] +[*]Secure and private "spam free" communications -[b]Keywords and Directory Search[/b] +[*]Identity and "single-signon" across the entire network -On the directory page, you may search for people with published profiles. Currently, only the name field and the keywords are searched. You may also include such keywords in your default profile - which may be used to search for common interests with other members. Keywords are used in the channel suggestion tool and although they aren't visible in the directory, they are shown if people visit your profile page. +[*]Privacy controls and permissions which extend to the entire network -On your Connnections page and in the directory there is a link to "Suggestions" or "Channel Suggestions", respectively. This will find channels who have matching and/or similar keywords. The more keywords you provide, the more relevant the search results that are returned. These are sorted by relevance. +[*]Directory services (like a phone book) +[/ul] +In short, a channel that represents yourself is "me, on the internet". -See Also -[zrl=[baseurl]/help/AdvancedSearch]Advanced Searching[/zrl] -[h3]Account Permission Roles[/h3] +[h3]Channel Permission Roles[/h3] +When you create a new channel, you will be asked to select a permission role based on how you envision using this channel. The most popular permission roles are the Social Networking roles. You have many other choices, providing options which are analagous to Facebook Groups and Pages, collaborative spaces, newsfeeds, and more. These roles automatically configure several different system variables ranging from what permissions are granted to friends, to your default privacy settings and visibility choices. Advanced configurations are available to let you adjust each of these parameters to your needs, but we've found that most people prefer to "set it and forget it". Thew following describes some of the different roles which are currently available and how they impact your privacy and ability to interact. [h4]Social[/h4] -[b]Mostly Public[/b] +[b]Federation[/b] -The channel is a typical social networking profile. By default posts and published items are public, but you can over-ride this when creating the item and restrict it. You are listed in the directory. Your online presence and connections are visible to others. Only your immediate connections can comment on your public posts and send you private mail. The permission policies are similar to Facebook. +The channel is a very permissive social networking profile which is compatible with other federated social networks. The permission policies are similar to Twitter and mostly compatible with Diaspora and Mastodon. Privacy is a lower priority than ease of access and connecting with others. Anybody in the network can comment on your public posts and send you private mail. By default posts and published items are public, but you can over-ride this when creating the item and restrict it. You are listed in the directory. Your online presence and connections are visible to others. This mode [i]may[/i] increase your exposure to undesired communications and spam. This role is not generally recommended [i]unless[/i] you need to interact regularly with members of other networks. -[b]Party[/b] +[b]Mostly Public[/b] -The channel is a permissive social networking profile. The permission policies are similar to Twitter and several free networks such as Diaspora and Mastodon. Anybody in the network can comment on your public posts and send you private mail. By default posts and published items are public, but you can over-ride this when creating the item and restrict it. You are listed in the directory. Your online presence and connections are visible to others. This mode [i]may[/i] increase your exposure to undesired communications and spam. +The channel is a typical social networking profile. By default posts and published items are public, but you can over-ride this when creating the item and restrict it. You are listed in the directory. Your online presence and connections are visible to others. Only your immediate connections can comment on your public posts and send you private mail. The permission policies are similar to Facebook. [b]Restricted[/b] @@ -140,33 +114,59 @@ A public forum which allows members to post files/photos/webpages. Set all the privacy and permissions manually to suit your specific needs. -[h3]Channels[/h3] +[h3]Creating channels[/h3] -[h4]What are channels?[/h4] -Channels are simply collections of content stored in one place. A channel can represent anything. It could represent you, a website, a forum, photo albums, anything. For most people, their first channel with be "Me". +After creating your account, you will be presented with the "Add a channel" screen. Normally, your first channel will be one that represents you - so using your own name (or psuedonym) as the channel name is a good idea. The channel name should be thought of as a title, or brief description of your channel. The "choose a short nickname" box is similar to a "username" field. We will use whatever you enter here to create a channel address, which other people will use to connect to you, and you will use to log in to other sites. This looks like an email address, and takes the form nickname@siteyouregisteredat.xyz -The most important features for a channel that represents "me" are: -[ul] -[*]Secure and private "spam free" communications +See Also +[zrl=[baseurl]/help/accounts_profiles_channels_basics]The Basics about Identities within $Projectname[/zrl] +[zrl=[baseurl]/help/accounts]Accounts[/zrl] +[zrl=[baseurl]/help/profiles]Profiles[/zrl] +[zrl=[baseurl]/help/permissions]Permissions[/zrl] +[zrl=[baseurl]/help/remove_account]Remove Account[/zrl] -[*]Identity and "single-signon" across the entire network -[*]Privacy controls and permissions which extend to the entire network +You can create additonal channels from the "Channel Manager" link. -[*]Directory services (like a phone book) -[/ul] -In short, a channel that represents yourself is "me, on the internet". +Once you have done this, your channel is ready to use. At [observer=1][observer.url][/observer][observer=0][baseurl]/channel/username[/observer] you will find your channel "stream". This is where your recent activity will appear, in reverse chronological order. If you post in the box marked "share", the entry will appear at the top of your stream. You will also find links to all the other communication areas for this channel here. The "hamburger" menu in most themes will provide you with navigation to other system components and apps. The Photos page contain photo albums, and the Events page contains events share by both yourself and your contacts. + +[b]Profiles[/b] + +$Projectname has unlimited profiles. You may use different profiles to show different "sides of yourself" to different audiences. This is different to having different channels. Different channels allow for completely different sets of information. You may have a channel for yourself, a channel for your sports team, a channel for your website, or whatever else. A profile allows for finely graded "sides" of each channel. For example, your default public profile might say "Hello, I'm Fred, and I like laughing". You may show your close friends a profile that adds "and I also enjoy dwarf tossing". + +You always have a profile known as your "default" or "public" profile. This profile is always available to the general public and cannot be hidden (there may be rare exceptions on privately run or disconnected sites). You may, and probably should restrict the information you make available on your public profile. + +That said, if you want other friends to be able to find you, it helps to have the following information in your public profile... -[h4]Creating channels[/h4] +[ul][*]Your real name or at least a nickname everybody knows +[*]A photo of you +[*]Your location on the planet, at least to a country level.[/ul] + +In addition, if you'd like to meet people that share some general interests with you, please take a moment and add some "Keywords" to your profile. Such as "music, linux, photography" or whatever. You can add as many keywords as you like. + +To create an alternate profile, first go to [zrl=[baseurl]/settings/features]Settings > Additional Features[/zrl] and enable "Multiple Profiles" there, otherwise you won't have the ability to use more than just your default profile. + +Then select "Edit Profiles" from the menu of your $Projectname site. You may edit an existing profile, change the profile photo, add things to a profile or create a new profile. You may also create a "clone" of an existing profile if you only wish to change a few items but don't wish to enter all the information again. To do that, click on the profile you want to clone and choose "Clone this profile" there. + +In the list of your profiles, you can also choose the contacts who can see a specific profile. Just click on "Edit visibility" next to the profile in question (only available for the profiles that are not your default profile) and then click on specific connections to add them to or remove them from the group of people who can see this profile. + +Once a profile has been selected, when the person views your profile, they will see the private profile you have assigned. If they are not authenticated, they will see your public profile. + +There is a setting which allows you to publish your profile to a directory and ensure that it can be found by others. You can change this setting on the "Settings" page. + +If you do not wish to be found be people unless you give them your channel address, you may leave your profile unpublished. + +[b]Keywords and Directory Search[/b] + +On the directory page, you may search for people with published profiles. Currently, only the name field and the keywords are searched. You may also include such keywords in your default profile - which may be used to search for common interests with other members. Keywords are used in the channel suggestion tool and although they aren't visible in the directory, they are shown if people visit your profile page. -You will be required to create your first channel as part of the sign up process. You can also create additonal channels from the "Select channel" link. +On your Connnections page and in the directory there is a link to "Suggestions" or "Channel Suggestions", respectively. This will find channels who have matching and/or similar keywords. The more keywords you provide, the more relevant the search results that are returned. These are sorted by relevance. -You will be asked to provide a channel name, and a short nick name. For a channel that represents yourself, it is a good idea to use your real name here to ensure your friends can find you, and connect to your channel. The short nickname will be used to generate a "webbie". This is a bit like a username, and will look like an email address, taking the form nickname@domain. You should put a little thought into what you want to use here. Imagine somebody asking for your webbie and having to tell them it is "llamas-are_kewl.123". "llamasarecool" would be a much better choice. +See Also -Once you have created your channel, you will be taken to the settings page, where you can configure your channel, and set your default permissions. +[zrl=[baseurl]/help/AdvancedSearch]Advanced Searching[/zrl] -Once you have done this, your channel is ready to use. At [observer=1][observer.url][/observer][observer=0][baseurl]/channel/username[/observer] you will find your channel "stream". This is where your recent activity will appear, in reverse chronological order. If you post in the box marked "share", the entry will appear at the top of your stream. You will also find links to all the other communication areas for this channel here. The "About" tab contains your "profile", the photos page contain photo albums, and the events page contains events share by both yourself and your contacts. [h4]The grid, permissions and delegation[/h4] diff --git a/include/permissions.php b/include/permissions.php index f97142fab..185d37b6a 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -46,7 +46,7 @@ function get_all_perms($uid, $observer_xchan, $internal_use = true) { // First find out what the channel owner declared permissions to be. - $channel_perm = \Zotlabs\Access\PermissionLimits::Get($uid,$perm_name); + $channel_perm = intval(\Zotlabs\Access\PermissionLimits::Get($uid,$perm_name)); if(! $channel_checked) { $r = q("select * from channel where channel_id = %d limit 1", diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 22d2b776d..2e2f5a758 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -75,6 +75,7 @@ abstract class photo_driver { abstract function imageString(); + abstract function clearexif(); public function __construct($data, $type='') { $this->types = $this->supportedTypes(); diff --git a/include/photo/photo_gd.php b/include/photo/photo_gd.php index 24bdc204f..e98ac2827 100644 --- a/include/photo/photo_gd.php +++ b/include/photo/photo_gd.php @@ -35,6 +35,11 @@ class photo_gd extends photo_driver { } + public function clearexif() { + return; + } + + public function destroy() { if($this->is_valid()) { imagedestroy($this->image); diff --git a/include/photo/photo_imagick.php b/include/photo/photo_imagick.php index 32bb61342..89577e71e 100644 --- a/include/photo/photo_imagick.php +++ b/include/photo/photo_imagick.php @@ -96,6 +96,19 @@ class photo_imagick extends photo_driver { } + public function clearexif() { + + $profiles = $this->image->getImageProfiles("icc", true); + + $this->image->stripImage(); + + if(!empty($profiles)) { + $this->image->profileImage("icc", $profiles['icc']); + } + } + + + public function getImage() { if(!$this->is_valid()) return FALSE; diff --git a/include/photos.php b/include/photos.php index 321f7159c..9ae0e6874 100644 --- a/include/photos.php +++ b/include/photos.php @@ -211,6 +211,10 @@ function photo_upload($channel, $observer, $args) { $ph->orient($exif); } + + $ph->clearexif(); + + @unlink($src); $max_length = get_config('system','max_image_length'); diff --git a/include/taxonomy.php b/include/taxonomy.php index e8d33986f..46d95458c 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -312,7 +312,8 @@ function article_tagadelic($uid, $count = 0, $authors = '', $owner = '', $flags function pubtagblock($net,$site,$limit,$recent = 0,$safemode = 1, $type = TERM_HASHTAG) { $o = ''; - $r = pub_tagadelic($net,$site,$limit,$since,$safemode,$type); + $r = pub_tagadelic($net,$site,$limit,$recent,$safemode,$type); + $link = z_root() . '/pubstream'; if($r) { diff --git a/tests/unit/Access/PermissionLimitsTest.php b/tests/unit/Access/PermissionLimitsTest.php index 58595111a..57ad42a19 100644 --- a/tests/unit/Access/PermissionLimitsTest.php +++ b/tests/unit/Access/PermissionLimitsTest.php @@ -66,7 +66,7 @@ class PermissionLimitsTest extends UnitTestCase { $this->assertEquals(PERMS_SPECIFIC, $stdlimits['write_pages']); $this->assertEquals(PERMS_SPECIFIC, $stdlimits['write_wiki']); $this->assertEquals(PERMS_SPECIFIC, $stdlimits['post_wall']); - $this->assertEquals(PERMS_PUBLIC, $stdlimits['post_comments']); + $this->assertEquals(PERMS_SPECIFIC, $stdlimits['post_comments']); $this->assertEquals(PERMS_SPECIFIC, $stdlimits['post_mail']); $this->assertEquals(PERMS_SPECIFIC, $stdlimits['post_like']); $this->assertEquals(PERMS_SPECIFIC, $stdlimits['tag_deliver']); diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index e92de17c4..be632a07e 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -60,7 +60,7 @@ function contact_format(item) { var desc = ((item.label) ? item.nick + ' ' + item.label : item.nick); if(typeof desc === 'undefined') desc = ''; if(desc) desc = ' ('+desc+')'; - return "<div class='{0} dropdown-item dropdown-notification clearfix' title='{4}'><img class='menu-img-2' src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{3}</span></div>".format(item.taggable, item.photo, item.name, desc, item.link); + return "<div class='{0} dropdown-item dropdown-notification clearfix' title='{4}'><img class='menu-img-2' src='{1}'><span class='contactname'>{2}</span><span class='dropdown-sub-text'>{3}</span></div>".format(item.taggable, item.photo, item.name, desc, typeof(item.link) !== 'undefined' ? item.link : desc.replace('(','').replace(')','')); } else return "<div>" + item.text + "</div>"; |