diff --git a/README.md b/README.md index cbd801b5d1..e66f3969e6 100644 --- a/README.md +++ b/README.md @@ -17,29 +17,29 @@ Have a look at the [installation documentation](doc/Install.md) for further info ### Friendica Screenshots -| ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profile-1.png?raw=true "Frio theme in mobile browser") ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profile-2.png?raw=true "Frio theme in mobile browser") -|:--:| -|*Frio theme, mobile browser. Timeline and composer view.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profile-1.png?raw=true "Frio theme in desktop browser") -|*Frio theme, desktop browser. Timeline view, contact info popped up, control menu open.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profile-2.png?raw=true "Frio theme in desktop browser") -|*Frio theme, desktop browser. Menu open for controlling individual posts.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-3.png?raw=true "Frio theme in desktop browser") -|*Frio theme, desktop browser. Profile view, notification menu open.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-2.png?raw=true "Frio theme in desktop browser") -|*Number of new posts, in total and by group.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-1.png?raw=true "Frio theme in desktop browser") -|*Calender with popup of event.*| -|![Frio theme default colour in standard browser on tablet](images/screenshots/friendica-frio-default-profile-1.png?raw=true "Frio theme default colour in standard browser on tablet") -|*Notifications menu and private messages counter, standard browser on tablet.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-brown-profile-2.png?raw=true "Frio theme in desktop browser") -|*Number of visible contacts, standard browser.*| -|![Frio theme in desktop browser](images/screenshots/friendica-frio-brown-profile-1.png?raw=true "Frio theme in desktop browser") -|*Network posts chronologically ordered, standard browser.*| -|![Vier theme in desktop browser](images/screenshots/friendica-vier-profile.png?raw=true "Vier theme in desktop browser") -|*Vier theme, desktop browser. Public timeline view.*| -|![Vier theme in desktop browser](images/screenshots/friendica-vier-community.png?raw=true "Vier theme in desktop browser") -|*Vier theme, desktop browser. Community post displayed.*| +| ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profile-1.png?raw=true "Frio theme in mobile browser") ![Frio theme in mobile browser](images/screenshots/friendica-frio-mobile-profile-2.png?raw=true "Frio theme in mobile browser") | +|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| +| *Frio theme, mobile browser. Timeline and composer view.* | +| ![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profile-1.png?raw=true "Frio theme in desktop browser") | +| *Frio theme, desktop browser. Timeline view, contact info popped up, control menu open.* | +| ![Frio theme in desktop browser](images/screenshots/friendica-frio-green-profile-2.png?raw=true "Frio theme in desktop browser") | +| *Frio theme, desktop browser. Menu open for controlling individual posts.* | +| ![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-3.png?raw=true "Frio theme in desktop browser") | +| *Frio theme, desktop browser. Profile view, notification menu open.* | +| ![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-2.png?raw=true "Frio theme in desktop browser") | +| *Number of new posts, in total and by circle.* | +| ![Frio theme in desktop browser](images/screenshots/friendica-frio-red-profile-1.png?raw=true "Frio theme in desktop browser") | +| *Calendar with popup of event.* | +| ![Frio theme default colour in standard browser on tablet](images/screenshots/friendica-frio-default-profile-1.png?raw=true "Frio theme default colour in standard browser on tablet") | +| *Notifications menu and private messages counter, standard browser on tablet.* | +| ![Frio theme in desktop browser](images/screenshots/friendica-frio-brown-profile-2.png?raw=true "Frio theme in desktop browser") | +| *Number of visible contacts, standard browser.* | +| ![Frio theme in desktop browser](images/screenshots/friendica-frio-brown-profile-1.png?raw=true "Frio theme in desktop browser") | +| *Network posts chronologically ordered, standard browser.* | +| ![Vier theme in desktop browser](images/screenshots/friendica-vier-profile.png?raw=true "Vier theme in desktop browser") | +| *Vier theme, desktop browser. Public timeline view.* | +| ![Vier theme in desktop browser](images/screenshots/friendica-vier-community.png?raw=true "Vier theme in desktop browser") | +| *Vier theme, desktop browser. Community post displayed.* | ## Endorsements diff --git a/database.sql b/database.sql index 4e674d63f4..f618960339 100644 --- a/database.sql +++ b/database.sql @@ -252,9 +252,9 @@ CREATE TABLE IF NOT EXISTS `permissionset` ( `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner id of this permission set', `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'', - `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups', + `allow_gid` mediumtext COMMENT 'Access Control - list of allowed circles', `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id', - `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', + `deny_gid` mediumtext COMMENT 'Access Control - list of denied circles', PRIMARY KEY(`id`), INDEX `uid_allow_cid_allow_gid_deny_cid_deny_gid` (`uid`,`allow_cid`(50),`allow_gid`(30),`deny_cid`(50),`deny_gid`(30)), FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE @@ -457,9 +457,9 @@ CREATE TABLE IF NOT EXISTS `attach` ( `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'creation time', `edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'last edit time', `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>', - `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups', + `allow_gid` mediumtext COMMENT 'Access Control - list of allowed circles', `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id', - `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', + `deny_gid` mediumtext COMMENT 'Access Control - list of denied circles', `backend-class` tinytext COMMENT 'Storage backend class', `backend-ref` text COMMENT 'Storage backend data reference', PRIMARY KEY(`id`), @@ -662,9 +662,9 @@ CREATE TABLE IF NOT EXISTS `event` ( `nofinish` boolean NOT NULL DEFAULT '0' COMMENT 'if event does have no end this is 1', `ignore` boolean NOT NULL DEFAULT '0' COMMENT '0 or 1', `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'', - `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups', + `allow_gid` mediumtext COMMENT 'Access Control - list of allowed circles', `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id', - `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', + `deny_gid` mediumtext COMMENT 'Access Control - list of denied circles', PRIMARY KEY(`id`), INDEX `uid_start` (`uid`,`start`), INDEX `cid` (`cid`), @@ -716,29 +716,29 @@ CREATE TABLE IF NOT EXISTS `group` ( `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id', `visible` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the member list is not private', - `deleted` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the group has been deleted', + `deleted` boolean NOT NULL DEFAULT '0' COMMENT '1 indicates the circle has been deleted', `cid` int unsigned COMMENT 'Contact id of forum. When this field is filled then the members are synced automatically.', - `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'human readable name of group', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'human readable name of circle', PRIMARY KEY(`id`), INDEX `uid` (`uid`), INDEX `cid` (`cid`), FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`cid`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE -) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy groups, group info'; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy circles, circle info'; -- -- TABLE group_member -- CREATE TABLE IF NOT EXISTS `group_member` ( `id` int unsigned NOT NULL auto_increment COMMENT 'sequential ID', - `gid` int unsigned NOT NULL DEFAULT 0 COMMENT 'groups.id of the associated group', - `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id of the member assigned to the associated group', + `gid` int unsigned NOT NULL DEFAULT 0 COMMENT 'group.id of the associated circle', + `contact-id` int unsigned NOT NULL DEFAULT 0 COMMENT 'contact.id of the member assigned to the associated circle', PRIMARY KEY(`id`), INDEX `contactid` (`contact-id`), UNIQUE INDEX `gid_contactid` (`gid`,`contact-id`), FOREIGN KEY (`gid`) REFERENCES `group` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE, FOREIGN KEY (`contact-id`) REFERENCES `contact` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE -) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy groups, member info'; +) DEFAULT COLLATE utf8mb4_general_ci COMMENT='privacy circles, member info'; -- -- TABLE gserver-tag @@ -1114,9 +1114,9 @@ CREATE TABLE IF NOT EXISTS `photo` ( `scale` tinyint unsigned NOT NULL DEFAULT 0 COMMENT '', `profile` boolean NOT NULL DEFAULT '0' COMMENT '', `allow_cid` mediumtext COMMENT 'Access Control - list of allowed contact.id \'<19><78>\'', - `allow_gid` mediumtext COMMENT 'Access Control - list of allowed groups', + `allow_gid` mediumtext COMMENT 'Access Control - list of allowed circles', `deny_cid` mediumtext COMMENT 'Access Control - list of denied contact.id', - `deny_gid` mediumtext COMMENT 'Access Control - list of denied groups', + `deny_gid` mediumtext COMMENT 'Access Control - list of denied circles', `accessible` boolean NOT NULL DEFAULT '0' COMMENT 'Make photo publicly accessible, ignoring permissions', `backend-class` tinytext COMMENT 'Storage backend class', `backend-ref` text COMMENT 'Storage backend data reference', diff --git a/doc/API-Entities.md b/doc/API-Entities.md index 213b2494f1..de3eac9b9a 100644 --- a/doc/API-Entities.md +++ b/doc/API-Entities.md @@ -454,7 +454,7 @@ Ex: Wed May 23 06:01:13 +0000 2007 allow_gid String (angle-brackets escaped integers) -Optional. List of allowed group ids +Optional. List of allowed circle ids @@ -466,7 +466,7 @@ Ex: Wed May 23 06:01:13 +0000 2007 deny_gid String (angle-brackets escaped integers) -Optional. List of disallowed group ids +Optional. List of disallowed circle ids @@ -583,7 +583,7 @@ Ex: Wed May 23 06:01:13 +0000 2007 friendica_owner - + Contact No @@ -984,7 +984,7 @@ Identical to [the Twitter Media Object](https://developer.twitter.com/en/docs/tw allow_gid String (ACL) -List of contact group ids wrapped in angle brackets allowed to access the photo. +List of contact circle ids wrapped in angle brackets allowed to access the photo. @@ -996,7 +996,7 @@ Identical to [the Twitter Media Object](https://developer.twitter.com/en/docs/tw deny_gid String (ACL) -List of contact group ids wrapped in angle brackets forbidden to access the photo. +List of contact circle ids wrapped in angle brackets forbidden to access the photo. @@ -1541,4 +1541,4 @@ Unused ## User Mention -Unused \ No newline at end of file +Unused diff --git a/doc/API-Friendica.md b/doc/API-Friendica.md index 197a5033e5..785cbe41a0 100644 --- a/doc/API-Friendica.md +++ b/doc/API-Friendica.md @@ -39,8 +39,8 @@ Create a new event for the current logged in user. - `publish` : (optional) create message for event - `allow_cid` : (optional) ACL-formatted list of allowed contact ids if private event - `allow_gid` : (optional) ACL-formatted list of disallowed contact ids if private event -- `deny_cid` : (optional) ACL-formatted list of allowed group ids if private event -- `deny_gid` : (optional) ACL-formatted list of disallowed group ids if private event +- `deny_cid` : (optional) ACL-formatted list of allowed circle ids if private event +- `deny_gid` : (optional) ACL-formatted list of disallowed circle ids if private event ### POST api/friendica/event_delete @@ -323,33 +323,37 @@ On error: --- -### GET api/friendica/group_show +### GET api/friendica/circle_show -Return all or a specified group of the user with the containing contacts as array. +Alternatively: GET api/friendica/group_show (Backward compatibility) + +Return all or a specified circle of the user with the containing contacts as array. #### Parameters -* `gid`: optional, if not given, API returns all groups of the user +* `gid`: optional, if not given, API returns all circles of the user #### Return values Array of: -* `name`: name of the group -* `gid`: id of the group +* `name`: name of the circle +* `gid`: id of the circle * `user`: array of [Contacts](help/API-Entities#Contact) -### POST api/friendica/group_create +### POST api/friendica/circle_create -Create the group with the posted array of contacts as members. +Alternatively: POST api/friendica/group_create + +Create the circle with the posted array of contacts as members. #### Parameters -* `name`: name of the group to be created +* `name`: name of the circle to be created #### POST data -JSON data as Array like the result of [GET api/friendica/group_show](#GET+api%2Ffriendica%2Fgroup_show): +JSON data as Array like the result of [GET api/friendica/circle_show](#GET+api%2Ffriendica%2Fcircle_show): * `gid` * `name` @@ -360,23 +364,25 @@ JSON data as Array like the result of [GET api/friendica/group_show](#GET+api%2F Array of: * `success`: true if successfully created or reactivated -* `gid`: gid of the created group -* `name`: name of the created group +* `gid`: gid of the created circle +* `name`: name of the created circle * `status`: "missing user" | "reactivated" | "ok" * `wrong users`: array of users, which were not available in the contact table -### POST api/friendica/group_update +### POST api/friendica/circle_update -Update the group with the posted array of contacts as members (post all members of the group to the call; function will remove members not posted). +Alternatively: POST api/friendica/group_update + +Update the circle with the posted array of contacts as members (post all members of the circle to the call; function will remove members not posted). #### Parameters -* `gid`: id of the group to be changed -* `name`: name of the group to be changed +* `gid`: id of the circle to be changed +* `name`: name of the circle to be changed #### POST data -JSON data as array like the result of [GET api/friendica/group_show](#GET+api%2Ffriendica%2Fgroup_show): +JSON data as array like the result of [GET api/friendica/circle_show](#GET+api%2Ffriendica%2Fcircle_show): * `gid` * `name` @@ -387,27 +393,29 @@ JSON data as array like the result of [GET api/friendica/group_show](#GET+api%2F Array of: * `success`: true if successfully updated -* `gid`: gid of the changed group -* `name`: name of the changed group +* `gid`: gid of the changed circle +* `name`: name of the changed circle * `status`: "missing user" | "ok" * `wrong users`: array of users, which were not available in the contact table -### POST api/friendica/group_delete +### POST api/friendica/circle_delete -Delete the specified group of contacts; API call need to include the correct gid AND name of the group to be deleted. +Alternatively: POST api/friendica/group_delete + +Delete the specified circle of contacts; API call need to include the correct gid AND name of the circle to be deleted. #### Parameters -* `gid`: id of the group to be deleted -* `name`: name of the group to be deleted +* `gid`: id of the circle to be deleted +* `name`: name of the circle to be deleted #### Return values Array of: * `success`: true if successfully deleted -* `gid`: gid of the deleted group -* `name`: name of the deleted group +* `gid`: gid of the deleted circle +* `name`: name of the deleted circle * `status`: "deleted" if successfully deleted * `wrong users`: empty array @@ -556,7 +564,7 @@ Alias of [`api/friendica/photo/update`](#POST+api%2Ffriendica%2Fphoto%2Fupdate) Saves data for the scales 0-2 to database (see above for scale description). Call adds non-public entries to items table to enable authenticated contacts to comment/like the photo. -Client should pay attention to the fact that updated access rights are not transferred to the contacts. i.e. public photos remain publicly visible if they have been commented/liked before setting visibility back to a limited group. +Client should pay attention to the fact that updated access rights are not transferred to the contacts. i.e. public photos remain publicly visible if they have been commented/liked before setting visibility back to a limited circle. Currently it is best to inform user that updating rights is not the right way to do this, and offer a solution to add photo as a new photo with the new rights instead. #### Parameters diff --git a/doc/API-Mastodon.md b/doc/API-Mastodon.md index 18a783720f..2798446ba9 100644 --- a/doc/API-Mastodon.md +++ b/doc/API-Mastodon.md @@ -211,7 +211,7 @@ Example: - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`. - [`POST /api/v1/statuses`](https://docs.joinmastodon.org/methods/statuses/#create) - Does not support `polls` argument as Friendica does not have polls - - Additionally to the static values `public`, `unlisted` and `private`, the `visibility` parameter can contain a numeric value with a group id. + - Additionally to the static values `public`, `unlisted` and `private`, the `visibility` parameter can contain a numeric value with a circle id. - Additional field `quote_id` for the post that is being quote reshared - Additional fields `friendica` for Friendica specific parameters: - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`. diff --git a/doc/Accesskeys.md b/doc/Accesskeys.md index a94fd1ea96..9a68c62def 100644 --- a/doc/Accesskeys.md +++ b/doc/Accesskeys.md @@ -48,7 +48,7 @@ General * i - Only show ignored contacts * y - Only show archived contacts * h - Only show hidden contacts -* e - Edit contact groups +* e - Edit contact circles ../contact (single contact view) ------------------------------- diff --git a/doc/Account-Basics.md b/doc/Account-Basics.md index a205ea7e5e..f03a488b50 100644 --- a/doc/Account-Basics.md +++ b/doc/Account-Basics.md @@ -41,9 +41,9 @@ This is the only bit of personal information that has to be accurate. ### Nickname A nickname is used to generate web addresses for many of your personal pages, and is also treated like an email address when establishing communications with others. -Due to the way that the nickname is used, it has some limitations. +Due to the way that the nickname is used, it has some limitations. It must contain only US-ASCII text characters and numbers, and must also start with a text character. -It also must be unique on this system. +It also must be unique on this system. This is used in many places to identify your account, and once set it cannot be changed. @@ -53,28 +53,28 @@ The registration form also allows you to choose whether or not to list your acco This is like a "phone book" and you may choose to be unlisted. We recommend that you select 'Yes' so that other people (friends, family, etc.) will be able to find you. If you choose 'No', you will essentially be invisible and have few opportunities for interaction. -Whichever you choose, this can be changed any time from your Settings page after you login. +Whichever you choose, this can be changed any time from your Settings page after you login. ### Register Once you have provided the necessary details, click the 'Register' button. An email will be sent to you providing your account login details. -Please check your email (including spam folders) for your registration details and initial password. +Please check your email (including spam folders) for your registration details and initial password. Login Page --- On the 'Login' page, please enter your login information that was provided during registration. -You may use either your nickname or email address as a Login Name. +You may use either your nickname or email address as a Login Name. If you use your account to manage other accounts and these all have the same email address, please enter the nickname for the account you wish to manage. If your account has been OpenID enabled, you may use your OpenID address as a login name and leave the password blank. -You will be redirected to your OpenID provider to complete your authorisation. +You will be redirected to your OpenID provider to complete your authorisation. Otherwise, enter your password. This will have been initially provided in your registration email message. -Your password is case-sensitive, so please check your 'Caps Lock' key if you are having difficulty logging in. +Your password is case-sensitive, so please check your 'Caps Lock' key if you are having difficulty logging in. Changing Your Password --- @@ -99,9 +99,9 @@ See Also * [Profiles](help/Profiles) -* [Global Directory](help/Making-Friends#The+Directories) +* [Global Directory](help/Making-Friends#The+Directories) -* [Groups and Privacy](help/Groups-and-Privacy) +* [Circles and Privacy](help/Circles-and-Privacy) * [Move Account](help/Move-Account) diff --git a/doc/Groups-and-Privacy.md b/doc/Circles-and-Privacy.md similarity index 76% rename from doc/Groups-and-Privacy.md rename to doc/Circles-and-Privacy.md index d8d5a3d8f4..026cebb1f5 100644 --- a/doc/Groups-and-Privacy.md +++ b/doc/Circles-and-Privacy.md @@ -1,64 +1,64 @@ -Groups and Privacy +Circles and Privacy ================== * [Home](help) -Groups are merely collections of friends. +Circles are merely collections of friends. But Friendica uses these to unlock some very powerful features. -**Setting Up Groups** +**Setting Up Circles** -To create a group, visit your Friendica "Contacts" page and select "Create a new group". -Give the group a name. +To create a circle, visit your Friendica "Contacts" page and select "Create a new circle". +Give the circle a name. -This brings you to a page where you can select the group members. +This brings you to a page where you can select the circle members. You will have two boxes on this page. -The top box is the roster of current group members. -Below that is another box containing all of your friends who are *not* members of the group. +The top box is the roster of current circle members. +Below that is another box containing all of your friends who are *not* members of the circle. -If you click on a photo of a person who isn't in the group, they will be put into the group. -If you click on a photo of a person who is in the group, they will be removed from it. +If you click on a photo of a person who isn't in the circle, they will be put into the circle. +If you click on a photo of a person who is in the circle, they will be removed from it. **Access Control** -Once you have created a group, you may use it in any access control list. +Once you have created a circle, you may use it in any access control list. This is the little lock icon beneath the status update box on your home page. If you click this you can select who can see and who can *not* see the post you are about to make.. -These can be individual people or groups. +These can be individual people or circles. On your "Network" page you will find posts and conversation from everybody in your network. -You may select an individual group on this page to show conversations pertaining only to members of that group. +You may select an individual circle on this page to show conversations pertaining only to members of that circle. But wait, there's more... -If you look carefully when visiting a group from your Network page, the lock icon under the status update box has an exclamation mark next to it. +If you look carefully when visiting a circle from your Network page, the lock icon under the status update box has an exclamation mark next to it. This is meant to draw attention to that lock. Click the lock. -You will see that since you are only viewing a certain group of people, your status updates while on that screen default to only being seen by that same group of people. +You will see that since you are only viewing a certain circle of people, your status updates while on that screen default to only being seen by that same circle of people. This is how you keep your future employers from seeing what you write to your drinking buddies. You can over-ride this setting, but this makes it easy to separate your conversations into different friend circles. **Default Post Privacy** By default, Friendica assumes that you want all of your posts to be private. -Therefore, when you sign up, Friendica creates a group for you that it will automatically add all of your contacts to. -All of your posts are restricted to that group by default. +Therefore, when you sign up, Friendica creates a circle for you that it will automatically add all of your contacts to. +All of your posts are restricted to that circle by default. Note that this behaviour can be overridden by your site admin, in which case your posts will be "public" (i.e. visible to the entire Internet) by default. If you want your posts to be "public" by default, you can change your default post permissions on your Settings page. -You also have the option there to change which groups you post to by default, or to change which group your new contacts get placed into by default. +You also have the option there to change which circles you post to by default, or to change which circle your new contacts get placed into by default. **Privacy Concerns To Be Aware Of** These private conversations work best when your friends are Friendica members. -We know who else can see the conversations - nobody, *unless* your friends cut and paste the messages and send them to others. +We know who else can see the conversations - nobody, *unless* your friends cut and paste the messages and send them to others. This is a trust issue you need to be aware of. No software in the world can prevent your friends from leaking your confidential and trusted communications. -Only a wise choice of friends. +Only a wise choice of friends. But it isn't as clear cut when dealing with GNU Social and other network providers. If you look at the Contact Edit page for any person, we will tell you whether or not they are members of an insecure network where you should exercise caution. @@ -69,7 +69,7 @@ If you mistakenly created a message and wish you could take it back, the best yo We will send out a delete notification to everybody who received the message - and this should wipe out the message with the same speed it was initially propagated. In most cases it will be completely wiped from the Internet - in under a minute. Again, this applies to Friendica networks. -Once a message spreads to other networks, it may not be removed quickly and in some cases it may not be removed at all. +Once a message spreads to other networks, it may not be removed quickly and in some cases it may not be removed at all. In case you haven't yet figured this out, we are encouraging you to encourage your friends to use Friendica - because all these privacy features work much better within a privacy-aware network. Many of the other social networks Friendica can connect to have no privacy controls. @@ -102,7 +102,7 @@ When Friendica sends a post to these networks which exceeds the service length l The original is a link back to your Friendica profile. As Friendica cannot prove who they are, it may not be possible for these people to view your post in full. -For people in this situation we would recommend providing a "Twitter-length" summary, with more detail for friends that can see the post in full. +For people in this situation we would recommend providing a "Twitter-length" summary, with more detail for friends that can see the post in full. You can do so by including the BBCode tag *abstract* in your posting. Blocking your profile or entire Friendica site from unknown web visitors also has serious implications for communicating with GNU Social members. diff --git a/doc/Home.md b/doc/Home.md index d343c41ccf..760c8bf563 100644 --- a/doc/Home.md +++ b/doc/Home.md @@ -14,7 +14,7 @@ Friendica Documentation and Resources * You and other users * [Connectors](help/Connectors) * [Making Friends](help/Making-Friends) - * [Groups and Privacy](help/Groups-and-Privacy) + * [Circles and Privacy](help/Circles-and-Privacy) * [Tags and Mentions](help/Tags-and-Mentions) * [Community Forums](help/Forums) * [Chats](help/Chats) diff --git a/doc/Making-Friends.md b/doc/Making-Friends.md index aadf24796f..7101df2a87 100644 --- a/doc/Making-Friends.md +++ b/doc/Making-Friends.md @@ -20,7 +20,7 @@ You'll also see a link to a **Global Directory**. There are several global directories across the globe that regularly exchange information with each other. The specific global directory that you see usually depends on where your server is located. If you click through to the global directory, you will be presented with a list of everybody who choses to be listed across all instances of Friendica. -You will also see a "Show Community Forums" link, which will direct you to Groups, Forums and Fanpages. +You will also see a "Show Community Forums" link, which will direct you to Circles, Forums and Fanpages. You connect to people, groups and forums in the same way, except groups and forums will automatically accept your introduction request, whereas a human will approve you manually. Connect to other Friendica users @@ -31,9 +31,9 @@ Just beneath their profile picture will be the word 'Connect' (we're assuming th Click that 'Connect' button and it will take you to a 'Connect' form. The form is going to ask you for your Identity Address. -This is necessary so that this person's website can find yours. +This is necessary so that this person's website can find yours. -If your Friendica site is called "demo.friendica.com" and your username/nickname on that site is "bob", you would enter "bob@demo.friendica.com" in this form. +If your Friendica site is called "demo.friendica.com" and your username/nickname on that site is "bob", you would enter "bob@demo.friendica.com" in this form. Notice this looks just like an email address. It's meant to be that way. @@ -42,7 +42,7 @@ It's easy for people to remember. You *could* also put in the URL of your "home" page, such as "http://demo.friendica.com/profile/bob" instead of the email-style address. When you've submitted the connection page, it will take you back to your own site where you must then login (if necessary) and verify the connection request on *your* site. -Once you've done this, the two websites can communicate with each other to complete the process (after your new friend has approved the request). +Once you've done this, the two websites can communicate with each other to complete the process (after your new friend has approved the request). If you already know somebody's Identity Address, you can enter it in the "connect" box on your "Contacts" page. This will take you through a similar process. @@ -68,7 +68,7 @@ To connect, enter their contact details in the "connect" box on your "Contacts" ### Email If you have supplied your mailbox connection information on your Settings page, you can enter the email address of anybody that has sent you a message recently and have their email messages show up in your social stream. -You can also reply to them from within Friendica. +You can also reply to them from within Friendica. Create an email contact with for example Alice on Gmail, enter her email in following format "mailto:alice@gmail.no". In order to avoid abuse or spam, you must have an email from Alice with the correct email address in your email inbox. @@ -78,7 +78,7 @@ To subscribe to a mailing list, enter the email in following example format "mai ### Syndication feeds You can "follow" almost anybody or any website that produces a syndication feed (RSS/Atom,etc.). -If we can find an information stream and a name to attach to the contact, we'll try to connect with them. +If we can find an information stream and a name to attach to the contact, we'll try to connect with them. Notification --- @@ -88,24 +88,24 @@ You will usually need to approve this before the friendship is complete. Approval --- Some networks allow people to send you messages without being friends and without your approval. -Friendica does not allow this by default, as it would open a gateway for spam. +Friendica does not allow this by default, as it would open a gateway for spam. Unilateral or bilateral friendships --- When you receive a friendship notification from another Friendica member, you will have the option of allowing them as a "Follower" or as a "Friend". If they are a follower, they can see what you have to say, including private communications that you send to them, but not vice versa. -As a friend, you can both communicate with each other. +As a friend, you can both communicate with each other. -diaspora* uses a different terminology, and you are given the option of allowing them to "share with you", or being full friends. +diaspora* uses a different terminology, and you are given the option of allowing them to "share with you", or being full friends. Ignoring, blocking and deleting contacts --- Once you have become friends, if you find the person constantly sends you spam or worthless information, you can "Ignore" them - without breaking off the friendship or even alerting them to the fact that you aren't interested in anything they are saying. In many ways they are like a "follower" - but they don't know this. -They think they are a friend. +They think they are a friend. You can also "block" a person. This completely blocks communications with that person. -They may still be able to see your public posts, as can anybody in the world, but they cannot communicate with you directly. +They may still be able to see your public posts, as can anybody in the world, but they cannot communicate with you directly. You can also delete a friend no matter what the friendship status - which completely removes everything relating to that person from your website. diff --git a/doc/Move-Account.md b/doc/Move-Account.md index f2b56b982a..2983184be6 100644 --- a/doc/Move-Account.md +++ b/doc/Move-Account.md @@ -8,7 +8,7 @@ How to move your account between servers * Go to "Settings" -> "[Export personal data](uexport)" * Click on "Export account" to save your account data. -* **Save the file in a secure place!** It contains your details, your contacts, groups, and personal settings. It also contains your secret keys to authenticate yourself to your contacts. +* **Save the file in a secure place!** It contains your details, your contacts, circles, and personal settings. It also contains your secret keys to authenticate yourself to your contacts. * Go to your new server, and open *http://newserver.com/user/import* (there is not a direct link to this page at the moment). Please consider that this is only possible on servers with open registration. On other systems only the administrator can add accounts with an uploaded file. * Do NOT create a new account prior to importing your old settings - user import should be used *instead* of register. * Load your saved account file and click "Import". @@ -17,7 +17,7 @@ How to move your account between servers Friendica contacts --- -Friendica will recreate your account on the new server, with your contacts and groups. +Friendica will recreate your account on the new server, with your contacts and circles. A message is sent to Friendica contacts, to inform them about your move: If your contacts are running on an updated server, your details on their side will be automatically updated. diff --git a/doc/Quick-Start-andfinally.md b/doc/Quick-Start-andfinally.md index 3e7845d10f..6151439cee 100644 --- a/doc/Quick-Start-andfinally.md +++ b/doc/Quick-Start-andfinally.md @@ -4,7 +4,6 @@ Here are some more things to help get you started: **Groups** - - Friendica Support - problems? This is the place to ask. **Documentation** diff --git a/doc/Tags-and-Mentions.md b/doc/Tags-and-Mentions.md index ab87470b68..8d5ba9d8d1 100644 --- a/doc/Tags-and-Mentions.md +++ b/doc/Tags-and-Mentions.md @@ -15,7 +15,7 @@ You can tag **persons who are in your social circle** by adding the "@"-sign in * @mike - indicates a known contact in your social circle whose nickname is "mike" * @mike_macgirvin - indicates a known contact in your social circle whose full name is "Mike Macgirvin". Note that spaces cannot be used inside tags. -* @mike+151 - this form is used by the drop-down tag completion tool. It indicates the contact whose nickname is mike and whose contact identifier number is 151. The drop-down tool may be used to resolve people with duplicate nicknames. +* @mike+151 - this form is used by the drop-down tag completion tool. It indicates the contact whose nickname is mike and whose contact identifier number is 151. The drop-down tool may be used to resolve people with duplicate nicknames. You can tag a person on a different network or one that is **not in your social circle** by using the following notation: @@ -37,9 +37,9 @@ If you want to post something exclusively to a forum (e.g. the support forum) pl So !helpers will be an exclusive posting to the support forum if you are connected with the forum. If you select a forum from the ACL a !-mention will be added automatically to your posting. -If you sort your contacts into groups, you cannot @-mention these groups. -But you can select the group in the access control when creating a new posting, to allow (or disallow) a certain group of people to see the posting. -See [Groups and Privacy](help/Groups-and-Privacy) for more details about grouping your contacts. +If you sort your contacts into circles, you cannot @-mention these circles. +But you can select the circle in the access control when creating a new posting, to allow (or disallow) a certain circle of people to see the posting. +See [Circles and Privacy](help/Circles-and-Privacy) for more details about grouping your contacts. **Topical Tags** diff --git a/doc/Text_editor.md b/doc/Text_editor.md index b7d0937aa8..c20b9ac649 100644 --- a/doc/Text_editor.md +++ b/doc/Text_editor.md @@ -88,11 +88,11 @@ Click on "show" under contact name to hide the post to everyone but selected. Click on "Visible to everybody" to make the post public again. -If you have defined some groups, you can check "show" for groups also. All contact in that group will see the post. -If you want to hide the post to one contact of a group selected for "show", click "don't show" under contact name. +If you have defined some circles, you can check "show" for circles also. All contact in that circle will see the post. +If you want to hide the post to one contact of a circle selected for "show", click "don't show" under contact name. Click again on "show" or "don't show" to switch it off. -You can search for contacts or groups with the search box. +You can search for contacts or circles with the search box. -See also [Group and Privacy](help/Groups-and-Privacy) +See also [Circles and Privacy](help/Circles-and-Privacy) diff --git a/doc/api.md b/doc/api.md index f3fae82014..a3ca4d244d 100644 --- a/doc/api.md +++ b/doc/api.md @@ -68,8 +68,8 @@ xml: The [RSStoFriendika](https://github.com/pafcu/RSStoFriendika) code can be used as an example of how to use the API with python. The lines for posting are located at [line 21](https://github.com/pafcu/RSStoFriendika/blob/master/RSStoFriendika.py#L21) and following. -def tweet(server, message, group_allow=None): +def tweet(server, message, circle_allow=None): url = server + '/api/statuses/update' -urllib2.urlopen(url, urllib.urlencode({'status': message,'group_allow[]':group_allow}, doseq=True)) +urllib2.urlopen(url, urllib.urlencode({'status': message, 'circle_allow[]': circle_allow}, doseq=True)) There is also a [module for python 3](https://bitbucket.org/tobiasd/python-friendica) for using the API. diff --git a/doc/database.md b/doc/database.md index 461c1c2d9b..3c03d31b1f 100644 --- a/doc/database.md +++ b/doc/database.md @@ -30,8 +30,8 @@ Database Tables | [fetch-entry](help/database/db_fetch-entry) | | | [fetched-activity](help/database/db_fetched-activity) | Id of fetched activities | | [fsuggest](help/database/db_fsuggest) | friend suggestion stuff | -| [group](help/database/db_group) | privacy groups, group info | -| [group_member](help/database/db_group_member) | privacy groups, member info | +| [group](help/database/db_group) | privacy circles, circle info | +| [group_member](help/database/db_group_member) | privacy circles, member info | | [gserver](help/database/db_gserver) | Global servers | | [gserver-tag](help/database/db_gserver-tag) | Tags that the server has subscribed | | [hook](help/database/db_hook) | addon hook registry | diff --git a/doc/database/db_attach.md b/doc/database/db_attach.md index 76d8e01f20..38ce83a7c5 100644 --- a/doc/database/db_attach.md +++ b/doc/database/db_attach.md @@ -18,9 +18,9 @@ Fields | created | creation time | datetime | NO | | 0001-01-01 00:00:00 | | | edited | last edit time | datetime | NO | | 0001-01-01 00:00:00 | | | allow_cid | Access Control - list of allowed contact.id '<19><78> | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed circles | mediumtext | YES | | NULL | | | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied circles | mediumtext | YES | | NULL | | | backend-class | Storage backend class | tinytext | YES | | NULL | | | backend-ref | Storage backend data reference | text | YES | | NULL | | diff --git a/doc/database/db_event.md b/doc/database/db_event.md index 499e550c44..c7daea9873 100644 --- a/doc/database/db_event.md +++ b/doc/database/db_event.md @@ -25,9 +25,9 @@ Fields | nofinish | if event does have no end this is 1 | boolean | NO | | 0 | | | ignore | 0 or 1 | boolean | NO | | 0 | | | allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed circles | mediumtext | YES | | NULL | | | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied circles | mediumtext | YES | | NULL | | Indexes ------------ diff --git a/doc/database/db_group.md b/doc/database/db_group.md index ad7fa4a3dd..e94cf53ebf 100644 --- a/doc/database/db_group.md +++ b/doc/database/db_group.md @@ -1,7 +1,7 @@ Table group =========== -privacy groups, group info +privacy circles, circle info Fields ------ @@ -11,9 +11,9 @@ Fields | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | | uid | Owner User id | mediumint unsigned | NO | | 0 | | | visible | 1 indicates the member list is not private | boolean | NO | | 0 | | -| deleted | 1 indicates the group has been deleted | boolean | NO | | 0 | | +| deleted | 1 indicates the circle has been deleted | boolean | NO | | 0 | | | cid | Contact id of forum. When this field is filled then the members are synced automatically. | int unsigned | YES | | NULL | | -| name | human readable name of group | varchar(255) | NO | | | | +| name | human readable name of circle | varchar(255) | NO | | | | Indexes ------------ diff --git a/doc/database/db_group_member.md b/doc/database/db_group_member.md index a544f3b0ec..efe83e4aed 100644 --- a/doc/database/db_group_member.md +++ b/doc/database/db_group_member.md @@ -1,16 +1,16 @@ Table group_member =========== -privacy groups, member info +privacy circles, member info Fields ------ -| Field | Description | Type | Null | Key | Default | Extra | -| ---------- | --------------------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | -| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | -| gid | groups.id of the associated group | int unsigned | NO | | 0 | | -| contact-id | contact.id of the member assigned to the associated group | int unsigned | NO | | 0 | | +| Field | Description | Type | Null | Key | Default | Extra | +| ---------- | ---------------------------------------------------------- | ------------ | ---- | --- | ------- | -------------- | +| id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | +| gid | group.id of the associated circle | int unsigned | NO | | 0 | | +| contact-id | contact.id of the member assigned to the associated circle | int unsigned | NO | | 0 | | Indexes ------------ diff --git a/doc/database/db_permissionset.md b/doc/database/db_permissionset.md index 38c6fe8f31..82059b2f3d 100644 --- a/doc/database/db_permissionset.md +++ b/doc/database/db_permissionset.md @@ -11,9 +11,9 @@ Fields | id | sequential ID | int unsigned | NO | PRI | NULL | auto_increment | | uid | Owner id of this permission set | mediumint unsigned | NO | | 0 | | | allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed circles | mediumtext | YES | | NULL | | | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied circles | mediumtext | YES | | NULL | | Indexes ------------ diff --git a/doc/database/db_photo.md b/doc/database/db_photo.md index ed417f6147..c41e913ca3 100644 --- a/doc/database/db_photo.md +++ b/doc/database/db_photo.md @@ -30,9 +30,9 @@ Fields | scale | | tinyint unsigned | NO | | 0 | | | profile | | boolean | NO | | 0 | | | allow_cid | Access Control - list of allowed contact.id '<19><78>' | mediumtext | YES | | NULL | | -| allow_gid | Access Control - list of allowed groups | mediumtext | YES | | NULL | | +| allow_gid | Access Control - list of allowed circles | mediumtext | YES | | NULL | | | deny_cid | Access Control - list of denied contact.id | mediumtext | YES | | NULL | | -| deny_gid | Access Control - list of denied groups | mediumtext | YES | | NULL | | +| deny_gid | Access Control - list of denied circles | mediumtext | YES | | NULL | | | accessible | Make photo publicly accessible, ignoring permissions | boolean | NO | | 0 | | | backend-class | Storage backend class | tinytext | YES | | NULL | | | backend-ref | Storage backend data reference | text | YES | | NULL | | diff --git a/doc/de/Account-Basics.md b/doc/de/Account-Basics.md index 81ce68c041..ef7ca4e63f 100644 --- a/doc/de/Account-Basics.md +++ b/doc/de/Account-Basics.md @@ -9,14 +9,14 @@ Account - Basics Viele, aber nicht alle Friendica-Knoten (Server) bieten die Möglichkeit zur Registrierung an. Falls der Friendica-Knoten, den Du besuchst, keine Registrierung anbietet, oder Du glaubst, dass Dir ein anderer Knoten möglicherweise besser gefällt, dann findest Du hier eine [Liste von öffentlichen Friendica-Knoten](https://dir.friendica.social/servers), aus der Du Dir eine netten Knoten heraussuchen kannst. -Auf der Startseite des Knotens wird unter dem Login-Feld ein "Registrieren"-Link angezeigt. -Dieser Link führt dann direkt auf das Registrierungsformular. +Auf der Startseite des Knotens wird unter dem Login-Feld ein "Registrieren"-Link angezeigt. +Dieser Link führt dann direkt auf das Registrierungsformular. ### OpenID Falls du keine [OpenID-Adresse](https://de.wikipedia.org/wiki/OpenID">OpenID-Adresse) hast, kannst du diesen Punkt ignorieren. -Solltest du eine OpenID Adresse haben, kannst Du sie im ersten Feld eintragen und "Registrieren" klicken. +Solltest du eine OpenID Adresse haben, kannst Du sie im ersten Feld eintragen und "Registrieren" klicken. Friendica wird versuchen, so viele Informationen wie möglich von Deinem OpenID-Provider zu übernehmen, um diese in Dein Profil auf dieser Seite einzutragen. @@ -33,55 +33,55 @@ Bitte trage eine richtige Email-Adresse ein. Dies ist die einzige persönliche Information, die korrekt sein muss. Deine Email-Adresse wird **niemals** veröffentlicht. -Wir benötigen diese, um Dir Account-Informationen, das Initialpasswort und die Login-Daten zu schicken. Oder z.B. Dein Passwort zurückzusetzen. +Wir benötigen diese, um Dir Account-Informationen, das Initialpasswort und die Login-Daten zu schicken. Oder z.B. Dein Passwort zurückzusetzen. Du erhältst zudem von Zeit zu Zeit Benachrichtigungen über eingegangene Nachrichten oder Punkte, die Deine Aufmerksamkeit benötigen. Diese Nachrichten sind in den Einstellungen jederzeit an- oder abschaltbar. ### Spitzname/Nickname -Der Spitzname wird benötigt, um eine Webadresse (Profiladresse) für viele Deiner persönlichen Seiten zu erstellen. -Auch wird dieser wie eine Email-Adresse genutzt, wenn eine Verbindung zu anderen Personen hergestellt werden soll. -Durch die Art, wie der Spitzname genutzt wird, gibt es bestimmte Einschränkungen: +Der Spitzname wird benötigt, um eine Webadresse (Profiladresse) für viele Deiner persönlichen Seiten zu erstellen. +Auch wird dieser wie eine Email-Adresse genutzt, wenn eine Verbindung zu anderen Personen hergestellt werden soll. +Durch die Art, wie der Spitzname genutzt wird, gibt es bestimmte Einschränkungen: * **er muss mit einem Buchstaben beginnen** * **er darf nur US-ASCII-Textzeichen und Nummern enthalten** * **er muss einzigartig auf diesem Friendica-Knoten sein** * **er kann später nicht mehr geändert werden** -Dieser Spitzname wird an vielen Stellen genutzt, um Deinen Account zu identifizieren, daher ist es nicht möglich ihn später zu ändern. +Dieser Spitzname wird an vielen Stellen genutzt, um Deinen Account zu identifizieren, daher ist es nicht möglich ihn später zu ändern. ### Verzeichnis-Eintrag -Das Registrierungsformular erlaubt es dir, direkt auszuwählen, ob Du im [Onlineverzeichnis](https://dir.friendica.social/) (Friendica Directory) aufgelistet wirst oder nicht. -Das ist wie ein Telefonbuch und Du entscheidest, ob du darin eingetragen werden möchtest, oder nicht. +Das Registrierungsformular erlaubt es dir, direkt auszuwählen, ob Du im [Onlineverzeichnis](https://dir.friendica.social/) (Friendica Directory) aufgelistet wirst oder nicht. +Das ist wie ein Telefonbuch und Du entscheidest, ob du darin eingetragen werden möchtest, oder nicht. * Wir bitten dich, "Ja" zu wählen, damit Andere Dich finden können, so wie Du sie finden kannst -* Wählst Du "Nein", bist Du für Andere *nicht einfach auffindbar* +* Wählst Du "Nein", bist Du für Andere *nicht einfach auffindbar* Was auch immer Du wählst, kann jederzeit nach dem Login in Deinen Account-Einstellungen geändert werden. ### Registrierung -Sobald Du die nötigen Informationen eingegeben hast, klicke auf "Registrieren". -Eine Email mit den Registrierungsdetails und Deinem Initialpasswort wird an die hinterlegte Email-Adresse geschickt. +Sobald Du die nötigen Informationen eingegeben hast, klicke auf "Registrieren". +Eine Email mit den Registrierungsdetails und Deinem Initialpasswort wird an die hinterlegte Email-Adresse geschickt. Bitte prüfe den Posteingang (inkl. dem Spam-Ordner). ## Login-Seite -Gib auf der "Login"-Seite die Informationen ein, die Du mit der oben genannten Email erhalten hast. +Gib auf der "Login"-Seite die Informationen ein, die Du mit der oben genannten Email erhalten hast. Du kannst entweder Deinen Spitznamen oder die Email-Adresse als Login-Namen nutzen. Wenn Du Deinen Account nutzt, um unterschiedliche '[Seiten](help/Pages)' zu verwalten, die die gleiche Email-Adresse verwenden, dann nutze bitte den Spitznamen des Accounts, der verwaltet werden soll. -*Wenn* Dein Account OpenID nutzt, dann kannst Du Deine OpenID-Adresse als Login-Name nutzen und das Passwort-Feld frei lassen. -Du wirst zu Deinem OpenID-Anbieter weitergeleitet, wo Du Deine Anmeldung abschließt. +*Wenn* Dein Account OpenID nutzt, dann kannst Du Deine OpenID-Adresse als Login-Name nutzen und das Passwort-Feld frei lassen. +Du wirst zu Deinem OpenID-Anbieter weitergeleitet, wo Du Deine Anmeldung abschließt. -Wenn Du OpenID nicht nutzt, dann gib Dein Passwort ein, das Du mit der Registrierungsmail erhalten hast. -Das Passwort muss genau so geschrieben werden, wie es in der Email steht; Groß- und Kleinschreibung wird beachtet. +Wenn Du OpenID nicht nutzt, dann gib Dein Passwort ein, das Du mit der Registrierungsmail erhalten hast. +Das Passwort muss genau so geschrieben werden, wie es in der Email steht; Groß- und Kleinschreibung wird beachtet. Falls Du Schwierigkeiten beim Login hast, prüfe bitte, ob z. B. Deine Feststelltaste aktiv ist. @@ -90,7 +90,7 @@ Falls Du Schwierigkeiten beim Login hast, prüfe bitte, ob z. B. Deine Feststell Besuche nach Deinem ersten Login bitte die Einstellungsseite und wechsle das Passwort in eines, dass Du Dir merken kannst. -## Die ersten Schritte +## Die ersten Schritte ### Persönliche Daten exportieren @@ -98,9 +98,9 @@ Du solltest dir als erstes Deinen neu erstellen [Account exportieren](uexport) u In diesem Export (JSON-Datei) sind enthalten * Deine Identität, die mit kryptographischen Schlüsseln ausgestattet ist -* Deine Kontakte +* Deine Kontakte -Dies ist z.B. dann nützlich wenn du mit deinem Account auf einen anderen Friendica Knoten umziehen willst, oder musst. +Dies ist z.B. dann nützlich wenn du mit deinem Account auf einen anderen Friendica Knoten umziehen willst, oder musst. ### Hilfe für Neulinge @@ -109,7 +109,7 @@ Ein ['Tipp für neue Mitglieder'](newmember)-Link zeigt sich in den ersten beide ## Schau Dir ebenfalls folgende Seiten an -* [Gruppen und Privatssphäre](help/Groups-and-Privacy) +* [Circles und Privatssphäre](help/Circles-and-Privacy) * [Account löschen](help/Remove-Account) diff --git a/doc/de/Groups-and-Privacy.md b/doc/de/Circles-and-Privacy.md similarity index 66% rename from doc/de/Groups-and-Privacy.md rename to doc/de/Circles-and-Privacy.md index 4ce4d28e11..aebaff8715 100644 --- a/doc/de/Groups-and-Privacy.md +++ b/doc/de/Circles-and-Privacy.md @@ -1,112 +1,112 @@ -Gruppen und Privatsphäre +Circles und Privatsphäre ================== * [Zur Startseite der Hilfe](help) -Gruppen sind nur eine Ansammlung von Freunden. +Circles sind nur eine Ansammlung von Freunden. Aber Friendica nutzt diese, um sehr mächtige Features zur Verfügung zu stellen. -**Gruppen erstellen** +**Circles erstellen** -Um eine Gruppe zu erstellen, besuche deine "Kontakte"-Seite und wähle "Neue Gruppe erstellen" (je nach Design nur als Pluszeichen angezeigt). -Gib deiner Gruppe einen Namen. +Um eine Circle zu erstellen, besuche deine "Kontakte"-Seite und wähle "Neue Circle erstellen" (je nach Design nur als Pluszeichen angezeigt). +Gib deiner Circle einen Namen. -Das führt dich zu einer Seite, auf der du die Gruppenmitglieder auswählen kannst. +Das führt dich zu einer Seite, auf der du die Gruppenmitglieder auswählen kannst. -Du hast zwei Boxen auf der Seite. -Die obere Box ist die Übersicht der aktuellen Mitglieder. -Die untere beinhaltet alle Freunde, die *nicht* Mitglied dieser Gruppe sind. +Du hast zwei Boxen auf der Seite. +Die obere Box ist die Übersicht der aktuellen Mitglieder. +Die untere beinhaltet alle Freunde, die *nicht* Mitglied dieser Circle sind. -Wenn du auf das Foto einer Person klickst, die nicht in der Gruppe ist, wird diese in die Gruppe verschoben. -Wenn du auf das Foto einer Person klickst, die bereits in der Gruppe ist, dann wird diese Person daraus entfernt. +Wenn du auf das Foto einer Person klickst, die nicht in der Circle ist, wird diese in die Circle verschoben. +Wenn du auf das Foto einer Person klickst, die bereits in der Circle ist, dann wird diese Person daraus entfernt. **Zugriffskontrolle** -Sobald du eine Gruppe erstellt hast, kannst du diese auf jeder Zugriffsrechteliste nutzen. -Damit ist das kleine Schloss neben deinem Statuseditor auf deiner Startseite gemeint. -Wenn du darauf klickst, kannst du auswählen, wer deinen Beitrag sehen kann und wer *nicht*. -Dabei kann es sich um eine einzelne Person oder eine ganze Gruppe handeln. +Sobald du eine Circle erstellt hast, kannst du diese auf jeder Zugriffsrechteliste nutzen. +Damit ist das kleine Schloss neben deinem Statuseditor auf deiner Startseite gemeint. +Wenn du darauf klickst, kannst du auswählen, wer deinen Beitrag sehen kann und wer *nicht*. +Dabei kann es sich um eine einzelne Person oder eine ganze Circle handeln. -Auf deiner "Netzwerk"-Seite ("Unterhaltungen deiner Kontakte") findest du Beiträge und Gespräche aller deiner Kontakte in deinem Netzwerk. -Du kannst aber auch eine einzelne Gruppe auswählen und nur Beiträge dieser Gruppenmitglieder anzeigen lassen. +Auf deiner "Netzwerk"-Seite ("Unterhaltungen deiner Kontakte") findest du Beiträge und Gespräche aller deiner Kontakte in deinem Netzwerk. +Du kannst aber auch eine einzelne Circle auswählen und nur Beiträge dieser Gruppenmitglieder anzeigen lassen. Aber stopp, es gibt noch mehr... -Wenn du auf deiner "Netzwerk"-Seite eine bestimmte Gruppe ausgewählt hast, dann findest du im Statuseditor neben dem Schloss ein Ausrufezeichen. -Dies dient dazu, deine Aufmerksamkeit auf das Schloss zu richten. -Klicke auf das Schloss. -Dort siehst du, dass dein Status-Update in dieser Ansicht standardmäßig nur für diese Gruppe freigegeben ist. -Das hilft dir, deinen zukünftigen Mitarbeitern nicht das Gleiche zu schreiben wie deinen Trinkfreunden. -Du kannst diese Einstellung natürlich auch überschreiben. +Wenn du auf deiner "Netzwerk"-Seite eine bestimmte Circle ausgewählt hast, dann findest du im Statuseditor neben dem Schloss ein Ausrufezeichen. +Dies dient dazu, deine Aufmerksamkeit auf das Schloss zu richten. +Klicke auf das Schloss. +Dort siehst du, dass dein Status-Update in dieser Ansicht standardmäßig nur für diese Circle freigegeben ist. +Das hilft dir, deinen zukünftigen Mitarbeitern nicht das Gleiche zu schreiben wie deinen Trinkfreunden. +Du kannst diese Einstellung natürlich auch überschreiben. **Standardmäßige Zugriffsrechte von Beiträgen** -Standardmäßig geht Friendica davon aus, dass alle deine Beiträge privat sein sollen. -Aus diesem Grund erstellt Friendica nach der Anmeldung eine Gruppe, in die automatisch alle deine Kontakte hinzugefügt werden. -Alle deine Beiträge sind nur auf diese Gruppe beschränkt. +Standardmäßig geht Friendica davon aus, dass alle deine Beiträge privat sein sollen. +Aus diesem Grund erstellt Friendica nach der Anmeldung eine Circle, in die automatisch alle deine Kontakte hinzugefügt werden. +Alle deine Beiträge sind nur auf diese Circle beschränkt. Beachte, dass diese Einstellung von deinem Seiten-Administrator überschrieben werden kann, was bedeutet, dass alle deine Beiträge standardmäßig "öffentlich" sind (bspw. für das gesamte Internet). -Wenn du deine Beiträge standardmäßig "öffentlich" haben willst, dann kannst du deine Standardzugriffsrechte auf deiner Einstellungseite ändern. -Dort kannst du außerdem festlegen, welchen Gruppen standardmäßig deine Beiträge erhalten oder in welche Gruppe deine neuen Kontakte standardmäßig eingeordnet werden. +Wenn du deine Beiträge standardmäßig "öffentlich" haben willst, dann kannst du deine Standardzugriffsrechte auf deiner Einstellungseite ändern. +Dort kannst du außerdem festlegen, welchen Circles standardmäßig deine Beiträge erhalten oder in welche Circle deine neuen Kontakte standardmäßig eingeordnet werden. **Fragen der Privatssphäre, die zu beachten sind** -Diese privaten Gespräche funktionieren am besten, wenn deine Freunde Friendica-Mitglieder sind. +Diese privaten Gespräche funktionieren am besten, wenn deine Freunde Friendica-Mitglieder sind. So wissen wir, wer sonst noch deine Gespräche sehen kann - niemand, *solange* deine Freunde deine Nachrichten nicht kopieren und an andere verschicken. -Dies ist eine Vertrauensfrage, die du beachten musst. -Keine Software der Welt kann deine Freunde davon abhalten, die privaten Unterhaltungen zu veröffentlichen. -Nur eine gute Auswahl deiner Freunde. +Dies ist eine Vertrauensfrage, die du beachten musst. +Keine Software der Welt kann deine Freunde davon abhalten, die privaten Unterhaltungen zu veröffentlichen. +Nur eine gute Auswahl deiner Freunde. -Bei GNu Social und anderen Netzwerk-Anbietern ist es nicht so gesichert. -Du musst **sehr** vorsichtig sein, wenn du Mitglieder anderer Netzwerke in einer deiner Gruppen hast, da es möglich ist, dass deine privaten Nachrichten in einem öffentlichen Stream enden. +Bei GNu Social und anderen Netzwerk-Anbietern ist es nicht so gesichert. +Du musst **sehr** vorsichtig sein, wenn du Mitglieder anderer Netzwerke in einer deiner Circles hast, da es möglich ist, dass deine privaten Nachrichten in einem öffentlichen Stream enden. Wenn du auf die "Kontakt bearbeiten"-Seite einer Person gehst, zeigen wir dir, ob sie Mitglied eines unsicheren Netzwerks ist oder nicht. -Sobald du einen Post erstellt hast, kannst du die Zugriffsrechte nicht mehr ändern. -Innerhalb von Sekunden ist dieser an viele verschiedene Personen verschickt worden - möglicherweise bereits an alle Addressierten. -Wenn du versehentlich eine Nachricht erstellt hast und sie zurücknehmen willst, dann ist es das beste, diese zu löschen. -Wir senden eine Löschmitteilung an jeden, der deine Nachricht erhalten hat - und das sollte die Nachricht genauso schnell löschen, wie sie zunächst erstellt wurde. -In vielen Fällen wird sie in weniger als einer Minute aus dem Internet gelöscht. -Nochmals: das gilt für Friendica-Netzwerke. +Sobald du einen Post erstellt hast, kannst du die Zugriffsrechte nicht mehr ändern. +Innerhalb von Sekunden ist dieser an viele verschiedene Personen verschickt worden - möglicherweise bereits an alle Addressierten. +Wenn du versehentlich eine Nachricht erstellt hast und sie zurücknehmen willst, dann ist es das beste, diese zu löschen. +Wir senden eine Löschmitteilung an jeden, der deine Nachricht erhalten hat - und das sollte die Nachricht genauso schnell löschen, wie sie zunächst erstellt wurde. +In vielen Fällen wird sie in weniger als einer Minute aus dem Internet gelöscht. +Nochmals: das gilt für Friendica-Netzwerke. Sobald eine Nachricht an ein anderes Netzwerk geschickt wurde, kann es nicht mehr so schnell gelöscht werden und in manchen Fällen auch gar nicht mehr. -Wenn du das bisher noch nicht wusstest, dann empfehlen wir dir, deine Freunde dazu zu ermutigen, auch Friendica zu nutzen, da alle diese Privatsphären-Einstellungen innerhalb eines privatsphärenbewussten Netzwerk viel besser funktionieren. +Wenn du das bisher noch nicht wusstest, dann empfehlen wir dir, deine Freunde dazu zu ermutigen, auch Friendica zu nutzen, da alle diese Privatsphären-Einstellungen innerhalb eines privatsphärenbewussten Netzwerk viel besser funktionieren. Viele andere Netzwerke, mit denen sich Friendica verbinden kann, bieten keine Kontrolle über die Privatsphäre. Profile, Fotos und die Privatsphäre ============================= -Die dezentralisierte Natur von Friendica (statt eine Webseite zu haben, die alles kontrolliert, gibt es viele Webseiten, die Information austauschen) hat in der Kommunikation mit anderen Seiten einige Konsequenzen. +Die dezentralisierte Natur von Friendica (statt eine Webseite zu haben, die alles kontrolliert, gibt es viele Webseiten, die Information austauschen) hat in der Kommunikation mit anderen Seiten einige Konsequenzen. Du solltest dir über einige Dinge bewusst sein, um am besten entscheiden zu können, wie du mit deiner Privatsphäre umgehst. **Fotos** -Fotos privat zu verteilen ist ein Problem. -Wir können Fotos nur mit Friendica-Nutzern __privat__ austauschen. -Um mit anderen Leuten Fotos zu teilen, müssen wir erkennen, wer sie sind. -Wir können die Identität von Friendica-Nutzern prüfen, da es hierfür einen Mechanismus gibt. -Deine Freunde anderer Netzwerke werden deine privaten Fotos nicht sehen können, da wir deren Identität nicht überprüfen können. +Fotos privat zu verteilen ist ein Problem. +Wir können Fotos nur mit Friendica-Nutzern __privat__ austauschen. +Um mit anderen Leuten Fotos zu teilen, müssen wir erkennen, wer sie sind. +Wir können die Identität von Friendica-Nutzern prüfen, da es hierfür einen Mechanismus gibt. +Deine Freunde anderer Netzwerke werden deine privaten Fotos nicht sehen können, da wir deren Identität nicht überprüfen können. -Unsere Entwickler arbeiten an einer Lösung, um deinen Freunden den Zugriff zu ermöglichen - unabhängig, zu welchem Netzwerk sie gehören. +Unsere Entwickler arbeiten an einer Lösung, um deinen Freunden den Zugriff zu ermöglichen - unabhängig, zu welchem Netzwerk sie gehören. Wir nehmen hingegen Privatsphäre ernst und agieren nicht wie andere Netzwerke, die __nur so tun__ als ob deine Fotos privat sind, sie aber trotzdem anderen ohne Identitätsprüfung zeigen. **Profile** -Dein Profil und deine "Wall" sollen vielleicht auch von Freunden anderer Netzwerke besucht werden können. -Wenn du diese Seiten allerdings für Webbesucher sperrst, die Friendica nicht kennt, kann das auch Freunde anderer Netzwerke blockieren. +Dein Profil und deine "Wall" sollen vielleicht auch von Freunden anderer Netzwerke besucht werden können. +Wenn du diese Seiten allerdings für Webbesucher sperrst, die Friendica nicht kennt, kann das auch Freunde anderer Netzwerke blockieren. -Das kann möglicherweise ungewollte Ergebnisse produzieren, wenn du lange Statusbeiträge z.B. für Twitter oder Facebook schreibst. -Wenn Friendica einen Beitrag an diese Netzwerke schickt und nur eine bestimmte Nachrichtenlänge erlaubt ist, dann verkürzen wir diesen und erstellen einen Link, der zum Originalbeitrag führt. -Der Originallink führt zurück zu deinem Friendica-Profil. +Das kann möglicherweise ungewollte Ergebnisse produzieren, wenn du lange Statusbeiträge z.B. für Twitter oder Facebook schreibst. +Wenn Friendica einen Beitrag an diese Netzwerke schickt und nur eine bestimmte Nachrichtenlänge erlaubt ist, dann verkürzen wir diesen und erstellen einen Link, der zum Originalbeitrag führt. +Der Originallink führt zurück zu deinem Friendica-Profil. Da Friendica nicht bestätigen kann, um wen es sich handelt, kann es passieren, dass diese Leute den Beitrag nicht komplett lesen können. -Für Leute, die davon betroffen sind, schlagen wir vor, eine Zusammenfassung in Twitter-Länge zu erstellen mit mehr Details für Freunde, die den ganzen Beitrag sehen können. +Für Leute, die davon betroffen sind, schlagen wir vor, eine Zusammenfassung in Twitter-Länge zu erstellen mit mehr Details für Freunde, die den ganzen Beitrag sehen können. -Dein Profil oder deine gesamte Friendica-Seite zu blockieren, hat außerdem ernsthafte Einflüsse auf deine Kommunikation mit GNU Social-Nutzern. -Diese Netzwerke kommunizieren mit anderen über öffentliche Protokolle, die nicht authentifiziert werden. -Um deine Beiträge zu sehen, müssen diese Netzwerke deine Beiträge als "unbekannte Webbesucher" ansehen. -Wenn wir das erlauben, würde es dazu führen, das absolut jeder deine Beiträge sehen. -Und du hast Friendica so eingestellt, das nicht zuzulassen. +Dein Profil oder deine gesamte Friendica-Seite zu blockieren, hat außerdem ernsthafte Einflüsse auf deine Kommunikation mit GNU Social-Nutzern. +Diese Netzwerke kommunizieren mit anderen über öffentliche Protokolle, die nicht authentifiziert werden. +Um deine Beiträge zu sehen, müssen diese Netzwerke deine Beiträge als "unbekannte Webbesucher" ansehen. +Wenn wir das erlauben, würde es dazu führen, das absolut jeder deine Beiträge sehen. +Und du hast Friendica so eingestellt, das nicht zuzulassen. Beachte also, dass das Blockieren von unbekannten Besuchern auch dazu führen kann, dass öffentliche Netzwerke (wie GNU Social) und Newsfeed-Reader auch geblockt werden. diff --git a/doc/de/Home.md b/doc/de/Home.md index 437208bbbe..ba32c6eb8b 100644 --- a/doc/de/Home.md +++ b/doc/de/Home.md @@ -14,7 +14,7 @@ Friendica - Dokumentation und Ressourcen * Du und andere Nutzer * [Konnektoren (Connectors)](help/Connectors) * [Freunde finden](help/Making-Friends) - * [Gruppen und Privatsphäre](help/Groups-and-Privacy) + * [Circles und Privatsphäre](help/Circles-and-Privacy) * [Tags und Erwähnungen](help/Tags-and-Mentions) * [Community-Foren](help/Forums) * [Chats](help/Chats) diff --git a/doc/de/Tags-and-Mentions.md b/doc/de/Tags-and-Mentions.md index e99d758db2..8ab5bb581d 100644 --- a/doc/de/Tags-and-Mentions.md +++ b/doc/de/Tags-and-Mentions.md @@ -7,37 +7,37 @@ Wie viele andere soziale Netzwerke benutzt auch Friendica eine spezielle Schreib **Erwähnungen** -Personen werden "getaggt", indem du das "@"-Zeichen vor den Namen schreibst. +Personen werden "getaggt", indem du das "@"-Zeichen vor den Namen schreibst. + +Personen **in deiner Kontaktliste** werden „getaggt“, indem du das “@“-Zeichen vor den Namen schreibst. -Personen **in deiner Kontaktliste** werden „getaggt“, indem du das “@“-Zeichen vor den Namen schreibst. - * @mike - deutet auf eine Person hin, die im Netzwerk den Namen "mike" nutzt * @mike_macgirvin - deutet auf eine Person hin, die sich im Netzwerk "Mike Macgirvin" nennt. Beachte, dass Leerzeichen in Tags nicht genutzt werden können. -* @mike+151 - diese Schreibweise deutet auf eine Person hin, die "mike" heißt und deren Kontakt-Identitäts-Nummer 151 ist. Bei der Eingabe erscheint direkt ein Auswahlmenü, sodass du diese Nummer nicht selbst kennen musst. +* @mike+151 - diese Schreibweise deutet auf eine Person hin, die "mike" heißt und deren Kontakt-Identitäts-Nummer 151 ist. Bei der Eingabe erscheint direkt ein Auswahlmenü, sodass du diese Nummer nicht selbst kennen musst. + +Personen, die in einem anderen Netzwerk sind oder die sich **NICHT in deiner Kontaktliste** befinden, werden wie folgt getaggt: -Personen, die in einem anderen Netzwerk sind oder die sich **NICHT in deiner Kontaktliste** befinden, werden wie folgt getaggt: - * @mike@macgirvin.com - diese Schreibweise wird "Fernerwähnung" (remote mention)genannt und kann nur im Email-Stil geschrieben werden, nicht als Internetadresse/URL. -Wenn das System ungewollte Erwähnungen nicht blockiert, erhält diese Person eine Mitteilung oder nimmt direkt an der Diskussion teil, wenn es sich um einen öffentlichen Beitrag handelt. -Bitte beachte, dass Friendica eingehende "Erwähnungs"-Nachrichten von Personen blockt, die du nicht zu deinem Profil hinzugefügt hast. +Wenn das System ungewollte Erwähnungen nicht blockiert, erhält diese Person eine Mitteilung oder nimmt direkt an der Diskussion teil, wenn es sich um einen öffentlichen Beitrag handelt. +Bitte beachte, dass Friendica eingehende "Erwähnungs"-Nachrichten von Personen blockt, die du nicht zu deinem Profil hinzugefügt hast. Diese Maßnahme dient dazu, Spam zu vermeiden. -"Fernerwähnungen" werden durch das OStatus-Protokoll übermittelt. -Dieses Protokoll wird von Friendica, GNU Social und anderen Systemen genutzt, ist allerdings derzeit nicht in Diaspora eingebaut. +"Fernerwähnungen" werden durch das OStatus-Protokoll übermittelt. +Dieses Protokoll wird von Friendica, GNU Social und anderen Systemen genutzt, ist allerdings derzeit nicht in Diaspora eingebaut. -Friendica unterscheidet bei Tags nicht zwischen Personen und Gruppen (einige andere Netzwerke nutzen "!gruppe", um solche zu markieren). +Friendica unterscheidet bei Tags nicht zwischen Personen und Gruppen (einige andere Netzwerke nutzen "!circle", um solche zu markieren). **Thematische Tags** -Thematische Tags werden durch eine "#" gekennzeichnet. -Dieses Zeichen erstellen einen Link zur allgemeinen Seitensuche mit dem ausgewählten Begriff. -So wird z.B. #Autos zu einer Suche führen, die alle Beiträge deiner Seite umfasst, die dieses Wort erwähnen. -Thematische Tags haben generell eine Mindestlänge von 3 Stellen. -Kürzere Suchbegriffe finden meist keine Suchergebnisse, wobei dieses abhängig von der Datenbankeinstellung ist. -Tags mit einem Leerzeichen werden, wie es auch bei Namen der Fall ist, durch einen Unterstrich gekennzeichnet. -Es ist hingegen nicht möglich, Tags zu erstellen, deren gesuchtes Wort einen Unterstrich enthält. +Thematische Tags werden durch eine "#" gekennzeichnet. +Dieses Zeichen erstellen einen Link zur allgemeinen Seitensuche mit dem ausgewählten Begriff. +So wird z.B. #Autos zu einer Suche führen, die alle Beiträge deiner Seite umfasst, die dieses Wort erwähnen. +Thematische Tags haben generell eine Mindestlänge von 3 Stellen. +Kürzere Suchbegriffe finden meist keine Suchergebnisse, wobei dieses abhängig von der Datenbankeinstellung ist. +Tags mit einem Leerzeichen werden, wie es auch bei Namen der Fall ist, durch einen Unterstrich gekennzeichnet. +Es ist hingegen nicht möglich, Tags zu erstellen, deren gesuchtes Wort einen Unterstrich enthält. Thematische Tags werden auch dann nicht verlinkt, wenn sie nur aus Nummern bestehen, wie z.B. #1. Wenn du einen numerischen Tag nutzen willst, füge bitte einen Beschreibungstext hinzu wie z.B. #2012_Wahl. diff --git a/images/default-group-mm.png b/images/default-group-mm.png deleted file mode 100644 index bfc8b335a7..0000000000 Binary files a/images/default-group-mm.png and /dev/null differ diff --git a/images/icons/10/group.png b/images/icons/10/circle.png similarity index 100% rename from images/icons/10/group.png rename to images/icons/10/circle.png diff --git a/images/icons/16/group.png b/images/icons/16/circle.png similarity index 100% rename from images/icons/16/group.png rename to images/icons/16/circle.png diff --git a/images/icons/22/group.png b/images/icons/22/circle.png similarity index 100% rename from images/icons/22/group.png rename to images/icons/22/circle.png diff --git a/images/icons/48/group.png b/images/icons/48/circle.png similarity index 100% rename from images/icons/48/group.png rename to images/icons/48/circle.png diff --git a/images/icons/Makefile b/images/icons/Makefile index bfb5927df1..18094baacb 100644 --- a/images/icons/Makefile +++ b/images/icons/Makefile @@ -1,6 +1,6 @@ IMAGES=add.png edit.png gear.png info.png menu.png \ - notify_off.png star.png delete.png feed.png group.png \ + notify_off.png star.png delete.png feed.png circle.png \ lock.png notice.png notify_on.png user.png link.png \ play.png plugin.png unlock.png zip.png audio.png video.png \ image.png text.png @@ -10,7 +10,7 @@ DESTS=10/ 16/ 22/ 48/ \ $(addprefix 16/, $(IMAGES)) \ $(addprefix 22/, $(IMAGES)) \ $(addprefix 48/, $(IMAGES)) - + all: $(DESTS) %/: @@ -18,7 +18,7 @@ all: $(DESTS) 10/%.png: %.png convert $< -resize 10x10 $@ - + 16/%.png: %.png convert $< -resize 16x16 $@ diff --git a/images/icons/group.png b/images/icons/circle.png similarity index 100% rename from images/icons/group.png rename to images/icons/circle.png diff --git a/mod/photos.php b/mod/photos.php index 0a8dc472d7..233d28a5e7 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -163,14 +163,14 @@ function photos_post(App $a) $aclFormatter = DI::aclFormatter(); $str_contact_allow = isset($_REQUEST['contact_allow']) ? $aclFormatter->toString($_REQUEST['contact_allow']) : $owner_record['allow_cid'] ?? ''; - $str_group_allow = isset($_REQUEST['group_allow']) ? $aclFormatter->toString($_REQUEST['group_allow']) : $owner_record['allow_gid'] ?? ''; + $str_circle_allow = isset($_REQUEST['circle_allow']) ? $aclFormatter->toString($_REQUEST['circle_allow']) : $owner_record['allow_gid'] ?? ''; $str_contact_deny = isset($_REQUEST['contact_deny']) ? $aclFormatter->toString($_REQUEST['contact_deny']) : $owner_record['deny_cid'] ?? ''; - $str_group_deny = isset($_REQUEST['group_deny']) ? $aclFormatter->toString($_REQUEST['group_deny']) : $owner_record['deny_gid'] ?? ''; + $str_circle_deny = isset($_REQUEST['circle_deny']) ? $aclFormatter->toString($_REQUEST['circle_deny']) : $owner_record['deny_gid'] ?? ''; $visibility = $_REQUEST['visibility'] ?? ''; if ($visibility === 'public') { // The ACL selector introduced in version 2019.12 sends ACL input data even when the Public visibility is selected - $str_contact_allow = $str_group_allow = $str_contact_deny = $str_group_deny = ''; + $str_contact_allow = $str_circle_allow = $str_contact_deny = $str_circle_deny = ''; } else if ($visibility === 'custom') { // Since we know from the visibility parameter the item should be private, we have to prevent the empty ACL // case that would make it public. So we always append the author's contact id to the allowed contacts. @@ -338,7 +338,7 @@ function photos_post(App $a) $photo = $photos[0]; $ext = $phototypes[$photo['type']]; Photo::update( - ['desc' => $desc, 'album' => $albname, 'allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow, 'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny], + ['desc' => $desc, 'album' => $albname, 'allow_cid' => $str_contact_allow, 'allow_gid' => $str_circle_allow, 'deny_cid' => $str_contact_deny, 'deny_gid' => $str_circle_deny], ['resource-id' => $resource_id, 'uid' => $page_owner_uid] ); diff --git a/src/Content/Item.php b/src/Content/Item.php index 172729f268..ede78a2173 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -38,7 +38,7 @@ use Friendica\Model\Attach; use Friendica\Model\Contact; use Friendica\Model\Conversation; use Friendica\Model\FileTag; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\Item as ItemModel; use Friendica\Model\Photo; use Friendica\Model\Tag; @@ -542,7 +542,7 @@ class Item if ($private_forum) { $item['allow_cid'] = '<' . $private_id . '>'; - $item['allow_gid'] = '<' . Group::getIdForForum($forum_contact['id']) . '>'; + $item['allow_gid'] = '<' . Circle::getIdForForum($forum_contact['id']) . '>'; } else { $item['allow_cid'] = ''; $item['allow_gid'] = ''; @@ -863,9 +863,9 @@ class Item } $post['allow_cid'] = isset($request['contact_allow']) ? $this->aclFormatter->toString($request['contact_allow']) : $user['allow_cid'] ?? ''; - $post['allow_gid'] = isset($request['group_allow']) ? $this->aclFormatter->toString($request['group_allow']) : $user['allow_gid'] ?? ''; + $post['allow_gid'] = isset($request['circle_allow']) ? $this->aclFormatter->toString($request['circle_allow']) : $user['allow_gid'] ?? ''; $post['deny_cid'] = isset($request['contact_deny']) ? $this->aclFormatter->toString($request['contact_deny']) : $user['deny_cid'] ?? ''; - $post['deny_gid'] = isset($request['group_deny']) ? $this->aclFormatter->toString($request['group_deny']) : $user['deny_gid'] ?? ''; + $post['deny_gid'] = isset($request['circle_deny']) ? $this->aclFormatter->toString($request['circle_deny']) : $user['deny_gid'] ?? ''; $visibility = $request['visibility'] ?? ''; if ($visibility === 'public') { diff --git a/src/Content/Text/HTML.php b/src/Content/Text/HTML.php index 988274f8dc..d17f75f759 100644 --- a/src/Content/Text/HTML.php +++ b/src/Content/Text/HTML.php @@ -531,7 +531,7 @@ class HTML $ignore = false; // A list of some links that should be ignored - $list = ["/user/", "/tag/", "/group/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/", + $list = ["/user/", "/tag/", "/group/", "/circle/", "/profile/", "/search?search=", "/search?tag=", "mailto:", "/u/", "/node/", "//plus.google.com/", "//twitter.com/"]; foreach ($list as $listitem) { if (strpos($treffer[1], $listitem) !== false) { diff --git a/src/Content/Widget.php b/src/Content/Widget.php index 1d10f61427..375d4df114 100644 --- a/src/Content/Widget.php +++ b/src/Content/Widget.php @@ -29,7 +29,7 @@ use Friendica\Core\Search; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Profile; @@ -194,29 +194,29 @@ class Widget } /** - * Return group membership widget + * Return circle membership widget * * @param string $baseurl * @param string $selected * @return string * @throws \Exception */ - public static function groups(string $baseurl, string $selected = ''): string + public static function circles(string $baseurl, string $selected = ''): string { if (!DI::userSession()->getLocalUserId()) { return ''; } - $options = array_map(function ($group) { + $options = array_map(function ($circle) { return [ - 'ref' => $group['id'], - 'name' => $group['name'] + 'ref' => $circle['id'], + 'name' => $circle['name'] ]; - }, Group::getByUserId(DI::userSession()->getLocalUserId())); + }, Circle::getByUserId(DI::userSession()->getLocalUserId())); return self::filter( - 'group', - DI::l10n()->t('Groups'), + 'circle', + DI::l10n()->t('Circles'), '', DI::l10n()->t('Everyone'), $baseurl, diff --git a/src/Core/ACL.php b/src/Core/ACL.php index aa5e2221b7..be32670b7c 100644 --- a/src/Core/ACL.php +++ b/src/Core/ACL.php @@ -25,7 +25,7 @@ use Friendica\App\Page; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\User; /** @@ -182,40 +182,40 @@ class ACL } /** - * Returns the ACL list of groups (including meta-groups) for a given user id + * Returns the ACL list of circles (including meta-circles) for a given user id * * @param int $user_id * @return array */ - public static function getGroupListByUserId(int $user_id) + public static function getCircleListByUserId(int $user_id) { - $acl_groups = [ + $acl_circles = [ [ - 'id' => Group::FOLLOWERS, + 'id' => Circle::FOLLOWERS, 'name' => DI::l10n()->t('Followers'), 'addr' => '', 'micro' => 'images/twopeople.png', - 'type' => 'group', + 'type' => 'circle', ], [ - 'id' => Group::MUTUALS, + 'id' => Circle::MUTUALS, 'name' => DI::l10n()->t('Mutuals'), 'addr' => '', 'micro' => 'images/twopeople.png', - 'type' => 'group', + 'type' => 'circle', ] ]; - foreach (Group::getByUserId($user_id) as $group) { - $acl_groups[] = [ - 'id' => $group['id'], - 'name' => $group['name'], + foreach (Circle::getByUserId($user_id) as $circle) { + $acl_circles[] = [ + 'id' => $circle['id'], + 'name' => $circle['name'], 'addr' => '', 'micro' => 'images/twopeople.png', - 'type' => 'group', + 'type' => 'circle', ]; } - return $acl_groups; + return $acl_circles; } /** @@ -279,7 +279,7 @@ class ACL } else { $visibility = 'public'; // Default permission display for custom panel - $default_permissions['allow_gid'] = [Group::FOLLOWERS]; + $default_permissions['allow_gid'] = [Circle::FOLLOWERS]; } $jotnets_fields = []; @@ -303,15 +303,15 @@ class ACL $acl_contacts = self::getContactListByUserId($user['uid'], $condition); - $acl_groups = self::getGroupListByUserId($user['uid']); + $acl_circles = self::getCircleListByUserId($user['uid']); - $acl_list = array_merge($acl_groups, $acl_contacts); + $acl_list = array_merge($acl_circles, $acl_contacts); $input_names = [ 'visibility' => $form_prefix ? $form_prefix . '[visibility]' : 'visibility', - 'group_allow' => $form_prefix ? $form_prefix . '[group_allow]' : 'group_allow', + 'circle_allow' => $form_prefix ? $form_prefix . '[circle_allow]' : 'circle_allow', 'contact_allow' => $form_prefix ? $form_prefix . '[contact_allow]' : 'contact_allow', - 'group_deny' => $form_prefix ? $form_prefix . '[group_deny]' : 'group_deny', + 'circle_deny' => $form_prefix ? $form_prefix . '[circle_deny]' : 'circle_deny', 'contact_deny' => $form_prefix ? $form_prefix . '[contact_deny]' : 'contact_deny', 'emailcc' => $form_prefix ? $form_prefix . '[emailcc]' : 'emailcc', ]; @@ -321,7 +321,7 @@ class ACL '$public_title' => DI::l10n()->t('Public'), '$public_desc' => DI::l10n()->t('This content will be shown to all your followers and can be seen in the community pages and by anyone with its link.'), '$custom_title' => DI::l10n()->t('Limited/Private'), - '$custom_desc' => DI::l10n()->t('This content will be shown only to the people in the first box, to the exception of the people mentioned in the second box. It won\'t appear anywhere public.') . DI::l10n()->t('Start typing the name of a contact or a group to show a filtered list. You can also mention the special groups "Followers" and "Mutuals".'), + '$custom_desc' => DI::l10n()->t('This content will be shown only to the people in the first box, to the exception of the people mentioned in the second box. It won\'t appear anywhere public.') . DI::l10n()->t('Start typing the name of a contact or a circle to show a filtered list. You can also mention the special circles "Followers" and "Mutuals".'), '$allow_label' => DI::l10n()->t('Show to:'), '$deny_label' => DI::l10n()->t('Except to:'), '$emailcc' => DI::l10n()->t('CC: email addresses'), @@ -329,12 +329,12 @@ class ACL '$jotnets_summary' => DI::l10n()->t('Connectors'), '$visibility' => $visibility, '$acl_contacts' => json_encode($acl_contacts), - '$acl_groups' => json_encode($acl_groups), + '$acl_circles' => json_encode($acl_circles), '$acl_list' => json_encode($acl_list), '$contact_allow' => implode(',', $default_permissions['allow_cid']), - '$group_allow' => implode(',', $default_permissions['allow_gid']), + '$circle_allow' => implode(',', $default_permissions['allow_gid']), '$contact_deny' => implode(',', $default_permissions['deny_cid']), - '$group_deny' => implode(',', $default_permissions['deny_gid']), + '$circle_deny' => implode(',', $default_permissions['deny_gid']), '$for_federation' => $for_federation, '$jotnets_fields' => $jotnets_fields, '$input_names' => $input_names, @@ -381,7 +381,7 @@ class ACL * @return bool * @throws Exception */ - public static function isValidGroup($acl_string, $uid) + public static function isValidCircle($acl_string, $uid) { if (empty($acl_string)) { return true; @@ -394,7 +394,7 @@ class ACL $gid_array = $array[0]; foreach ($gid_array as $gid) { $gid = str_replace(['<', '>'], ['', ''], $gid); - if (!DBA::exists('group', ['id' => $gid, 'uid' => $uid, 'deleted' => false])) { + if (!DBA::exists('circle', ['id' => $gid, 'uid' => $uid, 'deleted' => false])) { return false; } } diff --git a/src/Factory/Api/Friendica/Group.php b/src/Factory/Api/Friendica/Circle.php similarity index 82% rename from src/Factory/Api/Friendica/Group.php rename to src/Factory/Api/Friendica/Circle.php index 4f085cd2b9..bf20ceb6d9 100644 --- a/src/Factory/Api/Friendica/Group.php +++ b/src/Factory/Api/Friendica/Circle.php @@ -27,7 +27,7 @@ use Friendica\Network\HTTPException; use Psr\Log\LoggerInterface; use Friendica\Factory\Api\Twitter\User as TwitterUser; -class Group extends BaseFactory +class Circle extends BaseFactory { /** @var twitterUser entity */ private $twitterUser; @@ -43,19 +43,19 @@ class Group extends BaseFactory } /** - * @param int $id id of the group + * @param int $id id of the circle * @return array * @throws HTTPException\InternalServerErrorException */ public function createFromId(int $id): array { - $group = $this->dba->selectFirst('group', [], ['id' => $id, 'deleted' => false]); - if (empty($group)) { + $circle = $this->dba->selectFirst('group', [], ['id' => $id, 'deleted' => false]); + if (empty($circle)) { return []; } - $user = $this->twitterUser->createFromUserId($group['uid'])->toArray(); - $object = new \Friendica\Object\Api\Friendica\Group($group, $user); + $user = $this->twitterUser->createFromUserId($circle['uid'])->toArray(); + $object = new \Friendica\Object\Api\Friendica\Circle($circle, $user); return $object->toArray(); } diff --git a/src/Factory/Api/Mastodon/ListEntity.php b/src/Factory/Api/Mastodon/ListEntity.php index a78c8dd634..effdd45a14 100644 --- a/src/Factory/Api/Mastodon/ListEntity.php +++ b/src/Factory/Api/Mastodon/ListEntity.php @@ -40,9 +40,9 @@ class ListEntity extends BaseFactory /** * @throws InternalServerErrorException */ - public function createFromGroupId(int $id): \Friendica\Object\Api\Mastodon\ListEntity + public function createFromCircleId(int $id): \Friendica\Object\Api\Mastodon\ListEntity { - $group = $this->dba->selectFirst('group', ['name'], ['id' => $id, 'deleted' => false]); - return new \Friendica\Object\Api\Mastodon\ListEntity($id, $group['name'] ?? '', 'list'); + $circle = $this->dba->selectFirst('group', ['name'], ['id' => $id, 'deleted' => false]); + return new \Friendica\Object\Api\Mastodon\ListEntity($id, $circle['name'] ?? '', 'list'); } } diff --git a/src/Model/Attach.php b/src/Model/Attach.php index 3dfb2e21e7..a008b3a4d3 100644 --- a/src/Model/Attach.php +++ b/src/Model/Attach.php @@ -190,9 +190,9 @@ class Attach * @param string $filetype Mimetype. optional, default = '' * @param integer $filesize File size in bytes. optional, default = null * @param string $allow_cid Permissions, allowed contacts. optional, default = '' - * @param string $allow_gid Permissions, allowed groups. optional, default = '' - * @param string $deny_cid Permissions, denied contacts.optional, default = '' - * @param string $deny_gid Permissions, denied group.optional, default = '' + * @param string $allow_gid Permissions, allowed circles. optional, default = '' + * @param string $deny_cid Permissions, denied contacts. optional, default = '' + * @param string $deny_gid Permissions, denied circle. optional, default = '' * * @return boolean|integer Row id on success, False on errors * @throws \Friendica\Network\HTTPException\InternalServerErrorException diff --git a/src/Model/Group.php b/src/Model/Circle.php similarity index 60% rename from src/Model/Group.php rename to src/Model/Circle.php index 45e1ee72d0..e1ef4ad330 100644 --- a/src/Model/Group.php +++ b/src/Model/Circle.php @@ -34,16 +34,16 @@ use Friendica\Protocol\ActivityPub; /** * functions for interacting with the group database table */ -class Group +class Circle { const FOLLOWERS = '~'; const MUTUALS = '&'; /** - * Fetches group record by user id and maybe includes deleted groups as well + * Fetches circle record by user id and maybe includes deleted circles as well * - * @param int $uid User id to fetch group(s) for - * @param bool $includesDeleted Whether deleted groups should be included + * @param int $uid User id to fetch circle(s) for + * @param bool $includesDeleted Whether deleted circles should be included * @return array|bool Array on success, bool on error */ public static function getByUserId(int $uid, bool $includesDeleted = false) @@ -58,16 +58,16 @@ class Group } /** - * Checks whether given group id is found in database + * Checks whether given circle id is found in database * - * @param int $group_id Group id + * @param int $circle_id Circle id * @param int $uid Optional user id * @return bool * @throws \Exception */ - public static function exists(int $group_id, int $uid = null): bool + public static function exists(int $circle_id, int $uid = null): bool { - $condition = ['id' => $group_id, 'deleted' => false]; + $condition = ['id' => $circle_id, 'deleted' => false]; if (!is_null($uid)) { $condition = [ @@ -79,13 +79,13 @@ class Group } /** - * Create a new contact group + * Create a new contact circle * - * Note: If we found a deleted group with the same name, we restore it + * Note: If we found a deleted circle with the same name, we restore it * - * @param int $uid User id to create group for - * @param string $name Name of group - * @return int|boolean Id of newly created group or false on error + * @param int $uid User id to create circle for + * @param string $name Name of circle + * @return int|boolean Id of newly created circle or false on error * @throws \Exception */ public static function create(int $uid, string $name) @@ -95,14 +95,14 @@ class Group $gid = self::getIdByName($uid, $name); // check for dupes if ($gid !== false) { // This could be a problem. - // Let's assume we've just created a group which we once deleted - // all the old members are gone, but the group remains so we don't break any security - // access lists. What we're doing here is reviving the dead group, but old content which - // was restricted to this group may now be seen by the new group members. - $group = DBA::selectFirst('group', ['deleted'], ['id' => $gid]); - if (DBA::isResult($group) && $group['deleted']) { + // Let's assume we've just created a circle which we once deleted + // all the old members are gone, but the circle remains, so we don't break any security + // access lists. What we're doing here is reviving the dead circle, but old content which + // was restricted to this circle may now be seen by the new circle members. + $circle = DBA::selectFirst('group', ['deleted'], ['id' => $gid]); + if (DBA::isResult($circle) && $circle['deleted']) { DBA::update('group', ['deleted' => 0], ['id' => $gid]); - DI::sysmsg()->addNotice(DI::l10n()->t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.')); + DI::sysmsg()->addNotice(DI::l10n()->t('A deleted circle with this name was revived. Existing item permissions may apply to this circle and any future members. If this is not what you intended, please create another circle with a different name.')); } return true; } @@ -116,10 +116,10 @@ class Group } /** - * Update group information. + * Update circle information. * - * @param int $id Group ID - * @param string $name Group name + * @param int $id Circle ID + * @param string $name Circle name * * @return bool Was the update successful? * @throws \Exception @@ -130,10 +130,10 @@ class Group } /** - * Get a list of group ids a contact belongs to + * Get a list of circle ids a contact belongs to * * @param int $cid Contact id - * @return array Group ids + * @return array Circle ids * @throws \Exception */ public static function getIdsByContactId(int $cid): array @@ -143,50 +143,50 @@ class Group return []; } - $groupIds = []; + $circleIds = []; $stmt = DBA::select('group_member', ['gid'], ['contact-id' => $cid]); - while ($group = DBA::fetch($stmt)) { - $groupIds[] = $group['gid']; + while ($circle = DBA::fetch($stmt)) { + $circleIds[] = $circle['gid']; } DBA::close($stmt); - // Meta-groups + // Meta-circles if ($contact['rel'] == Contact::FOLLOWER || $contact['rel'] == Contact::FRIEND) { - $groupIds[] = self::FOLLOWERS; + $circleIds[] = self::FOLLOWERS; } if ($contact['rel'] == Contact::FRIEND) { - $groupIds[] = self::MUTUALS; + $circleIds[] = self::MUTUALS; } - return $groupIds; + return $circleIds; } /** - * count unread group items + * count unread circle items * - * Count unread items of each groups of the local user + * Count unread items of each circle of the local user * * @return array - * 'id' => group id - * 'name' => group name - * 'count' => counted unseen group items + * 'id' => circle id + * 'name' => circle name + * 'count' => counted unseen circle items * @throws \Exception */ public static function countUnseen() { - $stmt = DBA::p("SELECT `group`.`id`, `group`.`name`, + $stmt = DBA::p("SELECT `circle`.`id`, `circle`.`name`, (SELECT COUNT(*) FROM `post-user` WHERE `uid` = ? AND `unseen` AND `contact-id` IN (SELECT `contact-id` - FROM `group_member` - WHERE `group_member`.`gid` = `group`.`id`) + FROM `group_member` AS `circle_member` + WHERE `circle_member`.`gid` = `circle`.`id`) ) AS `count` - FROM `group` - WHERE `group`.`uid` = ?;", + FROM `group` AS `circle` + WHERE `circle`.`uid` = ?;", DI::userSession()->getLocalUserId(), DI::userSession()->getLocalUserId() ); @@ -195,13 +195,13 @@ class Group } /** - * Get the group id for a user/name couple + * Get the circle id for a user/name couple * - * Returns false if no group has been found. + * Returns false if no circle has been found. * * @param int $uid User id - * @param string $name Group name - * @return int|boolean Groups' id number or false on error + * @param string $name Circle name + * @return int|boolean Circle's id number or false on error * @throws \Exception */ public static function getIdByName(int $uid, string $name) @@ -210,16 +210,16 @@ class Group return false; } - $group = DBA::selectFirst('group', ['id'], ['uid' => $uid, 'name' => $name]); - if (DBA::isResult($group)) { - return $group['id']; + $circle = DBA::selectFirst('group', ['id'], ['uid' => $uid, 'name' => $name]); + if (DBA::isResult($circle)) { + return $circle['id']; } return false; } /** - * Mark a group as deleted + * Mark a circle as deleted * * @param int $gid * @return boolean @@ -231,13 +231,13 @@ class Group return false; } - $group = DBA::selectFirst('group', ['uid'], ['id' => $gid]); - if (!DBA::isResult($group)) { + $circle = DBA::selectFirst('group', ['uid'], ['id' => $gid]); + if (!DBA::isResult($circle)) { return false; } - // remove group from default posting lists - $user = DBA::selectFirst('user', ['def_gid', 'allow_gid', 'deny_gid'], ['uid' => $group['uid']]); + // remove circle from default posting lists + $user = DBA::selectFirst('user', ['def_gid', 'allow_gid', 'deny_gid'], ['uid' => $circle['uid']]); if (DBA::isResult($user)) { $change = false; @@ -255,21 +255,21 @@ class Group } if ($change) { - DBA::update('user', $user, ['uid' => $group['uid']]); + DBA::update('user', $user, ['uid' => $circle['uid']]); } } // remove all members DBA::delete('group_member', ['gid' => $gid]); - // remove group + // remove circle $return = DBA::update('group', ['deleted' => 1], ['id' => $gid]); return $return; } /** - * Adds a contact to a group + * Adds a contact to a circle * * @param int $gid * @param int $cid @@ -283,12 +283,12 @@ class Group } // @TODO Backward compatibility with user contacts, remove by version 2022.03 - $group = DBA::selectFirst('group', ['uid'], ['id' => $gid]); - if (empty($group)) { - throw new HTTPException\NotFoundException('Group not found.'); + $circle = DBA::selectFirst('group', ['uid'], ['id' => $gid]); + if (empty($circle)) { + throw new HTTPException\NotFoundException('Circle not found.'); } - $cdata = Contact::getPublicAndUserContactID($cid, $group['uid']); + $cdata = Contact::getPublicAndUserContactID($cid, $circle['uid']); if (empty($cdata['user'])) { throw new HTTPException\NotFoundException('Invalid contact.'); } @@ -297,7 +297,7 @@ class Group } /** - * Removes a contact from a group + * Removes a contact from a circle * * @param int $gid * @param int $cid @@ -311,12 +311,12 @@ class Group } // @TODO Backward compatibility with user contacts, remove by version 2022.03 - $group = DBA::selectFirst('group', ['uid'], ['id' => $gid]); - if (empty($group)) { - throw new HTTPException\NotFoundException('Group not found.'); + $circle = DBA::selectFirst('group', ['uid'], ['id' => $gid]); + if (empty($circle)) { + throw new HTTPException\NotFoundException('Circle not found.'); } - $cdata = Contact::getPublicAndUserContactID($cid, $group['uid']); + $cdata = Contact::getPublicAndUserContactID($cid, $circle['uid']); if (empty($cdata['user'])) { throw new HTTPException\NotFoundException('Invalid contact.'); } @@ -325,7 +325,7 @@ class Group } /** - * Adds contacts to a group + * Adds contacts to a circle * * @param int $gid * @param array $contacts Array with contact ids @@ -339,13 +339,13 @@ class Group } // @TODO Backward compatibility with user contacts, remove by version 2022.03 - $group = DBA::selectFirst('group', ['uid'], ['id' => $gid]); - if (empty($group)) { - throw new HTTPException\NotFoundException('Group not found.'); + $circle = DBA::selectFirst('group', ['uid'], ['id' => $gid]); + if (empty($circle)) { + throw new HTTPException\NotFoundException('Circle not found.'); } foreach ($contacts as $cid) { - $cdata = Contact::getPublicAndUserContactID($cid, $group['uid']); + $cdata = Contact::getPublicAndUserContactID($cid, $circle['uid']); if (empty($cdata['user'])) { throw new HTTPException\NotFoundException('Invalid contact.'); } @@ -355,9 +355,9 @@ class Group } /** - * Removes contacts from a group + * Removes contacts from a circle * - * @param int $gid Group id + * @param int $gid Circle id * @param array $contacts Contact ids * @return bool * @throws \Exception @@ -369,15 +369,15 @@ class Group } // @TODO Backward compatibility with user contacts, remove by version 2022.03 - $group = DBA::selectFirst('group', ['uid'], ['id' => $gid]); - if (empty($group)) { - throw new HTTPException\NotFoundException('Group not found.'); + $circle = DBA::selectFirst('group', ['uid'], ['id' => $gid]); + if (empty($circle)) { + throw new HTTPException\NotFoundException('Circle not found.'); } $contactIds = []; foreach ($contacts as $cid) { - $cdata = Contact::getPublicAndUserContactID($cid, $group['uid']); + $cdata = Contact::getPublicAndUserContactID($cid, $circle['uid']); if (empty($cdata['user'])) { throw new HTTPException\NotFoundException('Invalid contact.'); } @@ -390,18 +390,18 @@ class Group } /** - * Returns the combined list of contact ids from a group id list + * Returns the combined list of contact ids from a circle id list * * @param int $uid User id - * @param array $group_ids Groups ids + * @param array $circle_ids Circles ids * @param boolean $check_dead Whether check "dead" records (?) * @param boolean $expand_followers Expand the list of followers * @return array * @throws \Exception */ - public static function expand(int $uid, array $group_ids, bool $check_dead = false, bool $expand_followers = true): array + public static function expand(int $uid, array $circle_ids, bool $check_dead = false, bool $expand_followers = true): array { - if (!is_array($group_ids) || !count($group_ids)) { + if (!is_array($circle_ids) || !count($circle_ids)) { return []; } @@ -419,7 +419,7 @@ class Group $networks = array_diff($networks, [Protocol::MAIL]); } - $key = array_search(self::FOLLOWERS, $group_ids); + $key = array_search(self::FOLLOWERS, $circle_ids); if ($key !== false) { if ($expand_followers) { $followers = Contact::selectToArray(['id'], [ @@ -438,10 +438,10 @@ class Group } else { $followers_collection = true; } - unset($group_ids[$key]); + unset($circle_ids[$key]); } - $key = array_search(self::MUTUALS, $group_ids); + $key = array_search(self::MUTUALS, $circle_ids); if ($key !== false) { $mutuals = Contact::selectToArray(['id'], [ 'uid' => $uid, @@ -457,12 +457,12 @@ class Group $return[] = $mutual['id']; } - unset($group_ids[$key]); + unset($circle_ids[$key]); } - $stmt = DBA::select('group_member', ['contact-id'], ['gid' => $group_ids]); - while ($group_member = DBA::fetch($stmt)) { - $return[] = $group_member['contact-id']; + $stmt = DBA::select('group_member', ['contact-id'], ['gid' => $circle_ids]); + while ($circle_member = DBA::fetch($stmt)) { + $return[] = $circle_member['contact-id']; } DBA::close($stmt); @@ -478,17 +478,17 @@ class Group } /** - * Returns a templated group selection list + * Returns a templated circle selection list * * @param int $uid User id - * @param int $gid An optional pre-selected group + * @param int $gid An optional pre-selected circle * @param string $label An optional label of the list * @return string * @throws \Exception */ - public static function displayGroupSelection(int $uid, int $gid = 0, string $label = ''): string + public static function getSelectorHTML(int $uid, int $gid = 0, string $label = ''): string { - $display_groups = [ + $display_circles = [ [ 'name' => '', 'id' => '0', @@ -497,53 +497,53 @@ class Group ]; $stmt = DBA::select('group', [], ['deleted' => false, 'uid' => $uid, 'cid' => null], ['order' => ['name']]); - while ($group = DBA::fetch($stmt)) { - $display_groups[] = [ - 'name' => $group['name'], - 'id' => $group['id'], - 'selected' => $gid == $group['id'] ? 'true' : '' + while ($circle = DBA::fetch($stmt)) { + $display_circles[] = [ + 'name' => $circle['name'], + 'id' => $circle['id'], + 'selected' => $gid == $circle['id'] ? 'true' : '' ]; } DBA::close($stmt); - Logger::info('Got groups', $display_groups); + Logger::info('Got circles', $display_circles); if ($label == '') { - $label = DI::l10n()->t('Default privacy group for new contacts'); + $label = DI::l10n()->t('Default privacy circle for new contacts'); } - $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('group_selection.tpl'), [ + $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('circle_selection.tpl'), [ '$label' => $label, - '$groups' => $display_groups + '$circles' => $display_circles ]); return $o; } /** - * Create group sidebar widget + * Create circle sidebar widget * * @param string $every * @param string $each * @param string $editmode - * 'standard' => include link 'Edit groups' - * 'extended' => include link 'Create new group' - * 'full' => include link 'Create new group' and provide for each group a link to edit this group - * @param string|int $group_id Distinct group id or 'everyone' + * 'standard' => include link 'Edit circles' + * 'extended' => include link 'Create new circle' + * 'full' => include link 'Create new circle' and provide for each circle a link to edit this circle + * @param string|int $circle_id Distinct circle id or 'everyone' * @param int $cid Contact id * @return string Sidebar widget HTML code * @throws \Exception */ - public static function sidebarWidget(string $every = 'contact', string $each = 'group', string $editmode = 'standard', $group_id = '', int $cid = 0) + public static function sidebarWidget(string $every = 'contact', string $each = 'circle', string $editmode = 'standard', $circle_id = '', int $cid = 0) { if (!DI::userSession()->getLocalUserId()) { return ''; } - $display_groups = [ + $display_circles = [ [ 'text' => DI::l10n()->t('Everybody'), 'id' => 0, - 'selected' => (($group_id === 'everyone') ? 'group-selected' : ''), + 'selected' => (($circle_id === 'everyone') ? 'circle-selected' : ''), 'href' => $every, ] ]; @@ -554,66 +554,66 @@ class Group } $stmt = DBA::select('group', [], ['deleted' => false, 'uid' => DI::userSession()->getLocalUserId(), 'cid' => null], ['order' => ['name']]); - while ($group = DBA::fetch($stmt)) { - $selected = (($group_id == $group['id']) ? ' group-selected' : ''); + while ($circle = DBA::fetch($stmt)) { + $selected = (($circle_id == $circle['id']) ? ' circle-selected' : ''); if ($editmode == 'full') { - $groupedit = [ - 'href' => 'group/' . $group['id'], + $circleedit = [ + 'href' => 'circle/' . $circle['id'], 'title' => DI::l10n()->t('edit'), ]; } else { - $groupedit = null; + $circleedit = null; } - if ($each == 'group') { - $count = DBA::count('group_member', ['gid' => $group['id']]); - $group_name = sprintf('%s (%d)', $group['name'], $count); + if ($each == 'circle') { + $count = DBA::count('group_member', ['gid' => $circle['id']]); + $circle_name = sprintf('%s (%d)', $circle['name'], $count); } else { - $group_name = $group['name']; + $circle_name = $circle['name']; } - $display_groups[] = [ - 'id' => $group['id'], + $display_circles[] = [ + 'id' => $circle['id'], 'cid' => $cid, - 'text' => $group_name, - 'href' => $each . '/' . $group['id'], - 'edit' => $groupedit, + 'text' => $circle_name, + 'href' => $each . '/' . $circle['id'], + 'edit' => $circleedit, 'selected' => $selected, - 'ismember' => in_array($group['id'], $member_of), + 'ismember' => in_array($circle['id'], $member_of), ]; } DBA::close($stmt); - // Don't show the groups on the network page when there is only one - if ((count($display_groups) <= 2) && ($each == 'network')) { + // Don't show the circles on the network page when there is only one + if ((count($display_circles) <= 2) && ($each == 'network')) { return ''; } - $tpl = Renderer::getMarkupTemplate('group_side.tpl'); + $tpl = Renderer::getMarkupTemplate('circle_side.tpl'); $o = Renderer::replaceMacros($tpl, [ '$add' => DI::l10n()->t('add'), - '$title' => DI::l10n()->t('Groups'), - '$groups' => $display_groups, - 'newgroup' => $editmode == 'extended' || $editmode == 'full' ? 1 : '', - 'grouppage' => 'group/', - '$edittext' => DI::l10n()->t('Edit group'), - '$ungrouped' => $every === 'contact' ? DI::l10n()->t('Contacts not in any group') : '', - '$ungrouped_selected' => (($group_id === 'none') ? 'group-selected' : ''), - '$createtext' => DI::l10n()->t('Create a new group'), - '$creategroup' => DI::l10n()->t('Group Name: '), - '$editgroupstext' => DI::l10n()->t('Edit groups'), - '$form_security_token' => BaseModule::getFormSecurityToken('group_edit'), + '$title' => DI::l10n()->t('Circles'), + '$circles' => $display_circles, + '$new_circle' => $editmode == 'extended' || $editmode == 'full' ? 1 : '', + '$circle_page' => 'circle/', + '$edittext' => DI::l10n()->t('Edit circle'), + '$uncircled' => $every === 'contact' ? DI::l10n()->t('Contacts not in any circle') : '', + '$uncircled_selected' => (($circle_id === 'none') ? 'circle-selected' : ''), + '$createtext' => DI::l10n()->t('Create a new circle'), + '$create_circle' => DI::l10n()->t('Circle Name: '), + '$edit_circles_text' => DI::l10n()->t('Edit circles'), + '$form_security_token' => BaseModule::getFormSecurityToken('circle_edit'), ]); return $o; } /** - * Fetch the group id for the given contact id + * Fetch the circle id for the given contact id * * @param integer $id Contact ID - * @return integer Group IO + * @return integer Circle ID */ public static function getIdForForum(int $id): int { @@ -623,8 +623,8 @@ class Group return 0; } - $group = DBA::selectFirst('group', ['id'], ['uid' => $contact['uid'], 'cid' => $id]); - if (empty($group)) { + $circle = DBA::selectFirst('group', ['id'], ['uid' => $contact['uid'], 'cid' => $id]); + if (empty($circle)) { $fields = [ 'uid' => $contact['uid'], 'name' => $contact['name'], @@ -633,14 +633,14 @@ class Group DBA::insert('group', $fields); $gid = DBA::lastInsertId(); } else { - $gid = $group['id']; + $gid = $circle['id']; } return $gid; } /** - * Fetch the followers of a given contact id and store them as group members + * Fetch the followers of a given contact id and store them as circle members * * @param integer $id Contact ID * @return void @@ -664,9 +664,9 @@ class Group return; } - $group_members = DBA::selectToArray('group_member', ['contact-id'], ['gid' => $gid]); - if (!empty($group_members)) { - $current = array_unique(array_column($group_members, 'contact-id')); + $circle_members = DBA::selectToArray('group_member', ['contact-id'], ['gid' => $gid]); + if (!empty($circle_members)) { + $current = array_unique(array_column($circle_members, 'contact-id')); } else { $current = []; } diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 134bbc1e5d..78150f1ff4 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -3097,7 +3097,7 @@ class Contact $contact_id = $contact['id']; $result['cid'] = $contact_id; - Group::addMember(User::getDefaultGroup($uid), $contact_id); + Circle::addMember(User::getDefaultCircle($uid), $contact_id); // Update the avatar self::updateAvatar($contact_id, $ret['photo']); @@ -3238,7 +3238,7 @@ class Contact DI::intro()->save($intro); } - Group::addMember(User::getDefaultGroup($importer['uid']), $contact_record['id']); + Circle::addMember(User::getDefaultCircle($importer['uid']), $contact_record['id']); if (($user['notify-flags'] & Notification\Type::INTRO) && $user['page-flags'] == User::PAGE_FLAGS_NORMAL) { DI::notify()->createFromArray([ diff --git a/src/Model/Contact/Group.php b/src/Model/Contact/Circle.php similarity index 72% rename from src/Model/Contact/Group.php rename to src/Model/Contact/Circle.php index 37742f6bb0..d3eea5ac5b 100644 --- a/src/Model/Contact/Group.php +++ b/src/Model/Contact/Circle.php @@ -26,12 +26,12 @@ use Friendica\DI; use Friendica\Model\Contact; /** - * This class provides information about contact groups based on the "group_member" table. + * This class provides information about contact circles based on the "group_member" table. */ -class Group +class Circle { /** - * Returns a list of contacts belonging in a group + * Returns a list of contacts belonging in a circle * * @param int $gid * @return array @@ -42,10 +42,10 @@ class Group $return = []; if (intval($gid)) { - $stmt = DBA::p('SELECT `group_member`.`contact-id`, `contact`.* + $stmt = DBA::p('SELECT `circle_member`.`contact-id`, `contact`.* FROM `contact` - INNER JOIN `group_member` - ON `contact`.`id` = `group_member`.`contact-id` + INNER JOIN `group_member` AS `circle_member` + ON `contact`.`id` = `circle_member`.`contact-id` WHERE `gid` = ? AND `contact`.`uid` = ? AND NOT `contact`.`self` @@ -66,24 +66,24 @@ class Group } /** - * Returns ungrouped contact count or list for user + * Returns uncircled contact count or list for user * - * Returns either the total number of ungrouped contacts for the given user - * id or a paginated list of ungrouped contacts. + * Returns either the total number of uncircled contacts for the given user + * id or a paginated list of uncircled contacts. * * @param int $uid uid * @return array * @throws \Exception */ - public static function listUngrouped(int $uid) + public static function listUncircled(int $uid) { return Contact::selectToArray([], ["`uid` = ? AND NOT `self` AND NOT `deleted` AND NOT `blocked` AND NOT `pending` AND NOT `failed` - AND `id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` INNER JOIN `group` ON `group`.`id` = `group_member`.`gid` - WHERE `group`.`uid` = ? AND `contact-id` = `contact`.`id`)", $uid, $uid]); + AND `id` NOT IN (SELECT DISTINCT(`contact-id`) FROM `group_member` AS `circle_member` INNER JOIN `group` AS `circle` ON `circle`.`id` = `circle_member`.`gid` + WHERE `circle`.`uid` = ? AND `contact-id` = `contact`.`id`)", $uid, $uid]); } /** - * Remove a contact from all groups + * Remove a contact from all circles * * @param integer $contact_id * diff --git a/src/Model/Item.php b/src/Model/Item.php index 8f45b3eb51..60e88757e0 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2254,7 +2254,7 @@ class Item if ($owner['page-flags'] == User::PAGE_FLAGS_PRVGROUP) { $allow_cid = ''; - $allow_gid = '<' . Group::FOLLOWERS . '>'; + $allow_gid = '<' . Circle::FOLLOWERS . '>'; $deny_cid = ''; $deny_gid = ''; self::performActivity($item['id'], 'announce', $uid, $allow_cid, $allow_gid, $deny_cid, $deny_gid); @@ -2528,13 +2528,13 @@ class Item $expand_followers = true; } - $allow_people = $aclFormatter->expand($obj['allow_cid']); - $allow_groups = Group::expand($obj['uid'], $aclFormatter->expand($obj['allow_gid']), $check_dead, $expand_followers); - $deny_people = $aclFormatter->expand($obj['deny_cid']); - $deny_groups = Group::expand($obj['uid'], $aclFormatter->expand($obj['deny_gid']), $check_dead); - $recipients = array_unique(array_merge($allow_people, $allow_groups)); - $deny = array_unique(array_merge($deny_people, $deny_groups)); - $recipients = array_diff($recipients, $deny); + $allow_people = $aclFormatter->expand($obj['allow_cid']); + $allow_circles = Circle::expand($obj['uid'], $aclFormatter->expand($obj['allow_gid']), $check_dead, $expand_followers); + $deny_people = $aclFormatter->expand($obj['deny_cid']); + $deny_circles = Circle::expand($obj['uid'], $aclFormatter->expand($obj['deny_gid']), $check_dead); + $recipients = array_unique(array_merge($allow_people, $allow_circles)); + $deny = array_unique(array_merge($deny_people, $deny_circles)); + $recipients = array_diff($recipients, $deny); return $recipients; } @@ -2900,9 +2900,9 @@ class Item /* * Authenticated visitor. Unless pre-verified, * check that the contact belongs to this $owner_id - * and load the groups the visitor belongs to. + * and load the circles the visitor belongs to. * If pre-verified, the caller is expected to have already - * done this and passed the groups into this function. + * done this and passed the circles into this function. */ $permissionSets = DI::permissionSet()->selectByContactId($remote_user, $owner_id); diff --git a/src/Model/Photo.php b/src/Model/Photo.php index 1b87e82d51..44ee6a6706 100644 --- a/src/Model/Photo.php +++ b/src/Model/Photo.php @@ -414,9 +414,9 @@ class Photo * @param integer $scale Scale * @param integer $type Photo type, optional, default: Photo::DEFAULT * @param string $allow_cid Permissions, allowed contacts. optional, default = "" - * @param string $allow_gid Permissions, allowed groups. optional, default = "" - * @param string $deny_cid Permissions, denied contacts.optional, default = "" - * @param string $deny_gid Permissions, denied group.optional, default = "" + * @param string $allow_gid Permissions, allowed circles. optional, default = "" + * @param string $deny_cid Permissions, denied contacts. optional, default = "" + * @param string $deny_gid Permissions, denied circle. optional, default = "" * @param string $desc Photo caption. optional, default = "" * * @return boolean True on success @@ -836,7 +836,7 @@ class Photo * @return string * @throws \Exception */ - public static function setPermissionFromBody($body, $uid, $original_contact_id, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny) + public static function setPermissionFromBody($body, $uid, $original_contact_id, $str_contact_allow, $str_circle_allow, $str_contact_deny, $str_circle_deny) { // Simplify image codes $img_body = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $body); @@ -881,7 +881,7 @@ class Photo * Then set the permissions to public. */ - self::setPermissionForResource($image_rid, $uid, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny); + self::setPermissionForResource($image_rid, $uid, $str_contact_allow, $str_circle_allow, $str_contact_deny, $str_circle_deny); } return true; @@ -894,15 +894,15 @@ class Photo * @param string $image_rid * @param integer $uid * @param string $str_contact_allow - * @param string $str_group_allow + * @param string $str_circle_allow * @param string $str_contact_deny - * @param string $str_group_deny + * @param string $str_circle_deny * @return void */ - public static function setPermissionForResource(string $image_rid, int $uid, string $str_contact_allow, string $str_group_allow, string $str_contact_deny, string $str_group_deny) + public static function setPermissionForResource(string $image_rid, int $uid, string $str_contact_allow, string $str_circle_allow, string $str_contact_deny, string $str_circle_deny) { - $fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_group_allow, - 'deny_cid' => $str_contact_deny, 'deny_gid' => $str_group_deny, + $fields = ['allow_cid' => $str_contact_allow, 'allow_gid' => $str_circle_allow, + 'deny_cid' => $str_contact_deny, 'deny_gid' => $str_circle_deny, 'accessible' => DI::pConfig()->get($uid, 'system', 'accessible-photos', false)]; $condition = ['resource-id' => $image_rid, 'uid' => $uid]; @@ -1228,9 +1228,9 @@ class Photo * @param string $album Album name * @param string $description Photo caption * @param string $allow_cid Permissions, allowed contacts - * @param string $allow_gid Permissions, allowed groups + * @param string $allow_gid Permissions, allowed circles * @param string $deny_cid Permissions, denied contacts - * @param string $deny_gid Permissions, denied group + * @param string $deny_gid Permissions, denied circles * * @return integer preview photo size * @throws \Friendica\Network\HTTPException\InternalServerErrorException diff --git a/src/Model/User.php b/src/Model/User.php index 3be13bebf1..cb769ce3fc 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -483,23 +483,23 @@ class User } /** - * Returns the default group for a given user and network + * Returns the default circle for a given user and network * * @param int $uid User id * - * @return int group id + * @return int circle id * @throws Exception */ - public static function getDefaultGroup(int $uid): int + public static function getDefaultCircle(int $uid): int { $user = DBA::selectFirst('user', ['def_gid'], ['uid' => $uid]); if (DBA::isResult($user)) { - $default_group = $user["def_gid"]; + $default_circle = $user['def_gid']; } else { - $default_group = 0; + $default_circle = 0; } - return $default_group; + return $default_circle; } /** @@ -1188,13 +1188,13 @@ class User throw new Exception(DI::l10n()->t('An error occurred creating your self contact. Please try again.')); } - // Create a group with no members. This allows somebody to use it - // right away as a default group for new contacts. - $def_gid = Group::create($uid, DI::l10n()->t('Friends')); + // Create a circle with no members. This allows somebody to use it + // right away as a default circle for new contacts. + $def_gid = Circle::create($uid, DI::l10n()->t('Friends')); if (!$def_gid) { DBA::delete('user', ['uid' => $uid]); - throw new Exception(DI::l10n()->t('An error occurred creating your default contact group. Please try again.')); + throw new Exception(DI::l10n()->t('An error occurred creating your default contact circle. Please try again.')); } $fields = ['def_gid' => $def_gid]; diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php index 4f5a35ab71..09624dcfc7 100644 --- a/src/Module/Admin/Site.php +++ b/src/Module/Admin/Site.php @@ -131,7 +131,7 @@ class Site extends BaseAdmin $temppath = (!empty($_POST['temppath']) ? trim($_POST['temppath']) : ''); $singleuser = (!empty($_POST['singleuser']) ? trim($_POST['singleuser']) : ''); $only_tag_search = !empty($_POST['only_tag_search']); - $compute_group_counts = !empty($_POST['compute_group_counts']); + $compute_circle_counts = !empty($_POST['compute_circle_counts']); $check_new_version_url = (!empty($_POST['check_new_version_url']) ? trim($_POST['check_new_version_url']) : 'none'); $worker_queues = (!empty($_POST['worker_queues']) ? intval($_POST['worker_queues']) : 10); @@ -278,7 +278,7 @@ class Site extends BaseAdmin $transactionConfig->set('system', 'temppath', $temppath); $transactionConfig->set('system', 'only_tag_search' , $only_tag_search); - $transactionConfig->set('system', 'compute_group_counts', $compute_group_counts); + $transactionConfig->set('system', 'compute_circle_counts', $compute_circle_counts); $transactionConfig->set('system', 'worker_queues' , $worker_queues); $transactionConfig->set('system', 'worker_fastlane' , $worker_fastlane); @@ -452,7 +452,7 @@ class Site extends BaseAdmin '$block_public' => ['block_public', DI::l10n()->t('Block public'), DI::config()->get('system', 'block_public'), DI::l10n()->t('Check to block public access to all otherwise public personal pages on this site unless you are currently logged in.')], '$force_publish' => ['publish_all', DI::l10n()->t('Force publish'), DI::config()->get('system', 'publish_all'), DI::l10n()->t('Check to force all profiles on this site to be listed in the site directory.') . '' . DI::l10n()->t('Enabling this may violate privacy laws like the GDPR') . ''], '$global_directory' => ['directory', DI::l10n()->t('Global directory URL'), DI::config()->get('system', 'directory'), DI::l10n()->t('URL to the global directory. If this is not set, the global directory is completely unavailable to the application.')], - '$newuser_private' => ['newuser_private', DI::l10n()->t('Private posts by default for new users'), DI::config()->get('system', 'newuser_private'), DI::l10n()->t('Set default post permissions for all new members to the default privacy group rather than public.')], + '$newuser_private' => ['newuser_private', DI::l10n()->t('Private posts by default for new users'), DI::config()->get('system', 'newuser_private'), DI::l10n()->t('Set default post permissions for all new members to the default privacy circle rather than public.')], '$enotify_no_content' => ['enotify_no_content', DI::l10n()->t('Don\'t include post content in email notifications'), DI::config()->get('system', 'enotify_no_content'), DI::l10n()->t('Don\'t include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.')], '$private_addons' => ['private_addons', DI::l10n()->t('Disallow public access to addons listed in the apps menu.'), DI::config()->get('config', 'private_addons'), DI::l10n()->t('Checking this box will restrict addons listed in the apps menu to members only.')], '$disable_embedded' => ['disable_embedded', DI::l10n()->t('Don\'t embed private images in posts'), DI::config()->get('system', 'disable_embedded'), DI::l10n()->t('Don\'t replace locally-hosted private photos in posts with an embedded copy of the image. This means that contacts who receive posts containing private photos will have to authenticate and load each image, which may take a while.')], @@ -504,7 +504,7 @@ class Site extends BaseAdmin '$max_display_comments' => ['max_display_comments', DI::l10n()->t('Maximum numbers of comments per post on the display page'), DI::config()->get('system', 'max_display_comments'), DI::l10n()->t('How many comments should be shown on the single view for each post? Default value is 1000.')], '$temppath' => ['temppath', DI::l10n()->t('Temp path'), DI::config()->get('system', 'temppath'), DI::l10n()->t('If you have a restricted system where the webserver can\'t access the system temp path, enter another path here.')], '$only_tag_search' => ['only_tag_search', DI::l10n()->t('Only search in tags'), DI::config()->get('system', 'only_tag_search'), DI::l10n()->t('On large systems the text search can slow down the system extremely.')], - '$compute_group_counts' => ['compute_group_counts', DI::l10n()->t('Generate counts per contact group when calculating network count'), DI::config()->get('system', 'compute_group_counts'), DI::l10n()->t('On systems with users that heavily use contact groups the query can be very expensive.')], + '$compute_circle_counts' => ['compute_circle_counts', DI::l10n()->t('Generate counts per contact circle when calculating network count'), DI::config()->get('system', 'compute_group_counts') ?? DI::config()->get('system', 'compute_circle_counts'), DI::l10n()->t('On systems with users that heavily use contact circles the query can be very expensive.')], '$worker_queues' => ['worker_queues', DI::l10n()->t('Maximum number of parallel workers'), DI::config()->get('system', 'worker_queues'), DI::l10n()->t('On shared hosters set this to %d. On larger systems, values of %d are great. Default value is %d.', 5, 20, 10)], '$worker_fastlane' => ['worker_fastlane', DI::l10n()->t('Enable fastlane'), DI::config()->get('system', 'worker_fastlane'), DI::l10n()->t('When enabed, the fastlane mechanism starts an additional worker if processes with higher priority are blocked by processes of lower priority.')], diff --git a/src/Module/Api/Friendica/Group/Create.php b/src/Module/Api/Friendica/Circle/Create.php similarity index 77% rename from src/Module/Api/Friendica/Group/Create.php rename to src/Module/Api/Friendica/Circle/Create.php index 2903899312..b2787bdd55 100644 --- a/src/Module/Api/Friendica/Group/Create.php +++ b/src/Module/Api/Friendica/Circle/Create.php @@ -19,14 +19,15 @@ * */ -namespace Friendica\Module\Api\Friendica\Group; +namespace Friendica\Module\Api\Friendica\Circle; use Friendica\Database\DBA; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Module\BaseApi; use Friendica\Network\HTTPException; /** + * API endpoint: /api/friendica/circle_create * API endpoint: /api/friendica/group_create */ class Create extends BaseApi @@ -43,23 +44,22 @@ class Create extends BaseApi // error if no name specified if ($name == '') { - throw new HTTPException\BadRequestException('group name not specified'); + throw new HTTPException\BadRequestException('circle name not specified'); } - // error message if specified group name already exists + // error message if specified circle name already exists if (DBA::exists('group', ['uid' => $uid, 'name' => $name, 'deleted' => false])) { - throw new HTTPException\BadRequestException('group name already exists'); + throw new HTTPException\BadRequestException('circle name already exists'); } - // Check if the group needs to be reactivated + // Check if the circle needs to be reactivated if (DBA::exists('group', ['uid' => $uid, 'name' => $name, 'deleted' => true])) { - $reactivate_group = true; + $reactivate_circle = true; } - // create group - $ret = Group::create($uid, $name); + $ret = Circle::create($uid, $name); if ($ret) { - $gid = Group::getIdByName($uid, $name); + $gid = Circle::getIdByName($uid, $name); } else { throw new HTTPException\BadRequestException('other API error'); } @@ -70,7 +70,7 @@ class Create extends BaseApi foreach ($users as $user) { $cid = $user['cid']; if (DBA::exists('contact', ['id' => $cid, 'uid' => $uid])) { - Group::addMember($gid, $cid); + Circle::addMember($gid, $cid); } else { $erroraddinguser = true; $errorusers[] = $cid; @@ -78,7 +78,7 @@ class Create extends BaseApi } // return success message incl. missing users in array - $status = ($erroraddinguser ? 'missing user' : ((isset($reactivate_group) && $reactivate_group) ? 'reactivated' : 'ok')); + $status = ($erroraddinguser ? 'missing user' : (!empty($reactivate_circle) ? 'reactivated' : 'ok')); $result = ['success' => true, 'gid' => $gid, 'name' => $name, 'status' => $status, 'wrong users' => $errorusers]; diff --git a/src/Module/Api/Friendica/Group/Delete.php b/src/Module/Api/Friendica/Circle/Delete.php similarity index 88% rename from src/Module/Api/Friendica/Group/Delete.php rename to src/Module/Api/Friendica/Circle/Delete.php index 68e0a05788..18db1216b2 100644 --- a/src/Module/Api/Friendica/Group/Delete.php +++ b/src/Module/Api/Friendica/Circle/Delete.php @@ -19,15 +19,16 @@ * */ -namespace Friendica\Module\Api\Friendica\Group; +namespace Friendica\Module\Api\Friendica\Circle; use Friendica\Database\DBA; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Module\BaseApi; use Friendica\Network\HTTPException\BadRequestException; /** * API endpoint: /api/friendica/group/delete + * API endpoint: /api/friendica/circle/delete */ class Delete extends BaseApi { @@ -55,16 +56,16 @@ class Delete extends BaseApi // error message if specified gid is not in database if (!DBA::exists('group', ['uid' => $uid, 'id' => $request['gid'], 'name' => $request['name']])) { - throw new BadRequestException('wrong group name'); + throw new BadRequestException('wrong circle name'); } - // delete group - $gid = Group::getIdByName($uid, $request['name']); + // delete circle + $gid = Circle::getIdByName($uid, $request['name']); if (empty($request['gid'])) { throw new BadRequestException('other API error'); } - $ret = Group::remove($gid); + $ret = Circle::remove($gid); if ($ret) { // return success diff --git a/src/Module/Api/Friendica/Group/Show.php b/src/Module/Api/Friendica/Circle/Show.php similarity index 75% rename from src/Module/Api/Friendica/Group/Show.php rename to src/Module/Api/Friendica/Circle/Show.php index 336393107a..9f2f93ede5 100644 --- a/src/Module/Api/Friendica/Group/Show.php +++ b/src/Module/Api/Friendica/Circle/Show.php @@ -19,7 +19,7 @@ * */ -namespace Friendica\Module\Api\Friendica\Group; +namespace Friendica\Module\Api\Friendica\Circle; use Friendica\Database\DBA; use Friendica\DI; @@ -28,6 +28,7 @@ use Friendica\Module\BaseApi; use Friendica\Network\HTTPException; /** + * API endpoint: /api/friendica/circle_show * API endpoint: /api/friendica/group_show */ class Show extends BaseApi @@ -41,22 +42,22 @@ class Show extends BaseApi // params $gid = $this->getRequestValue($request, 'gid', 0); - // get data of the specified group id or all groups if not specified + // get data of the specified circle id or all circles if not specified if ($gid != 0) { - $groups = DBA::selectToArray('group', [], ['deleted' => false, 'uid' => $uid, 'id' => $gid]); + $circles = DBA::selectToArray('group', [], ['deleted' => false, 'uid' => $uid, 'id' => $gid]); // error message if specified gid is not in database - if (!DBA::isResult($groups)) { + if (!DBA::isResult($circles)) { throw new HTTPException\BadRequestException('gid not available'); } } else { - $groups = DBA::selectToArray('group', [], ['deleted' => false, 'uid' => $uid]); + $circles = DBA::selectToArray('group', [], ['deleted' => false, 'uid' => $uid]); } - // loop through all groups and retrieve all members for adding data in the user array + // loop through all circles and retrieve all members for adding data in the user array $grps = []; - foreach ($groups as $rr) { - $members = Contact\Group::getById($rr['id']); + foreach ($circles as $circle) { + $members = Contact\Circle::getById($circle['id']); $users = []; if ($type == 'xml') { @@ -71,7 +72,7 @@ class Show extends BaseApi $users[] = DI::twitterUser()->createFromContactId($member['contact-id'], $uid, true)->toArray(); } } - $grps[] = ['name' => $rr['name'], 'gid' => $rr['id'], $user_element => $users]; + $grps[] = ['name' => $circle['name'], 'gid' => $circle['id'], $user_element => $users]; } $this->response->exit('group_update', ['group' => $grps], $this->parameters['extension'] ?? null); diff --git a/src/Module/Api/Friendica/Group/Update.php b/src/Module/Api/Friendica/Circle/Update.php similarity index 87% rename from src/Module/Api/Friendica/Group/Update.php rename to src/Module/Api/Friendica/Circle/Update.php index bee037d97f..38bbea382d 100644 --- a/src/Module/Api/Friendica/Group/Update.php +++ b/src/Module/Api/Friendica/Circle/Update.php @@ -19,15 +19,16 @@ * */ -namespace Friendica\Module\Api\Friendica\Group; +namespace Friendica\Module\Api\Friendica\Circle; use Friendica\Database\DBA; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Module\BaseApi; use Friendica\Network\HTTPException\BadRequestException; /** + * API endpoint: /api/friendica/circle_update * API endpoint: /api/friendica/group_update */ class Update extends BaseApi @@ -45,7 +46,7 @@ class Update extends BaseApi // error if no name specified if (!$name) { - throw new BadRequestException('group name not specified'); + throw new BadRequestException('circle name not specified'); } // error if no gid specified @@ -54,15 +55,15 @@ class Update extends BaseApi } // remove members - $members = Contact\Group::getById($gid); + $members = Contact\Circle::getById($gid); foreach ($members as $member) { $cid = $member['id']; foreach ($users as $user) { $found = $user['cid'] == $cid; } if (!isset($found) || !$found) { - $gid = Group::getIdByName($uid, $name); - Group::removeMember($gid, $cid); + $gid = Circle::getIdByName($uid, $name); + Circle::removeMember($gid, $cid); } } @@ -73,7 +74,7 @@ class Update extends BaseApi $cid = $user['cid']; if (DBA::exists('contact', ['id' => $cid, 'uid' => $uid])) { - Group::addMember($gid, $cid); + Circle::addMember($gid, $cid); } else { $erroraddinguser = true; $errorusers[] = $cid; diff --git a/src/Module/Api/Friendica/Events/Create.php b/src/Module/Api/Friendica/Events/Create.php index a0b969ee2a..4eb92e9c86 100644 --- a/src/Module/Api/Friendica/Events/Create.php +++ b/src/Module/Api/Friendica/Events/Create.php @@ -53,9 +53,9 @@ class Create extends BaseApi 'place' => '', //location of the event 'publish' => 0, //publish message 'allow_cid' => '', //array of allowed person, if access restricted - 'allow_gid' => '', //array of allowed groups, if access restricted + 'allow_gid' => '', //array of allowed circles, if access restricted 'deny_cid' => '', //array of denied person, if access restricted - 'deny_gid' => '', //array of denied groups, if access restricted + 'deny_gid' => '', //array of denied circles, if access restricted ], $request); // error if no name specified diff --git a/src/Module/Api/Friendica/Photo/Create.php b/src/Module/Api/Friendica/Photo/Create.php index 6cb9241c99..4190145aa0 100644 --- a/src/Module/Api/Friendica/Photo/Create.php +++ b/src/Module/Api/Friendica/Photo/Create.php @@ -78,8 +78,8 @@ class Create extends BaseApi $acl_input_error = false; $acl_input_error |= !ACL::isValidContact($allow_cid, $uid); $acl_input_error |= !ACL::isValidContact($deny_cid, $uid); - $acl_input_error |= !ACL::isValidGroup($allow_gid, $uid); - $acl_input_error |= !ACL::isValidGroup($deny_gid, $uid); + $acl_input_error |= !ACL::isValidCircle($allow_gid, $uid); + $acl_input_error |= !ACL::isValidCircle($deny_gid, $uid); if ($acl_input_error) { throw new HTTPException\BadRequestException('acl data invalid'); } diff --git a/src/Module/Api/Friendica/Photo/Update.php b/src/Module/Api/Friendica/Photo/Update.php index 0eec5a3444..d9ff769aa9 100644 --- a/src/Module/Api/Friendica/Photo/Update.php +++ b/src/Module/Api/Friendica/Photo/Update.php @@ -79,8 +79,8 @@ class Update extends BaseApi $acl_input_error = false; $acl_input_error |= !ACL::isValidContact($allow_cid, $uid); $acl_input_error |= !ACL::isValidContact($deny_cid, $uid); - $acl_input_error |= !ACL::isValidGroup($allow_gid, $uid); - $acl_input_error |= !ACL::isValidGroup($deny_gid, $uid); + $acl_input_error |= !ACL::isValidCircle($allow_gid, $uid); + $acl_input_error |= !ACL::isValidCircle($deny_gid, $uid); if ($acl_input_error) { throw new HTTPException\BadRequestException('acl data invalid'); } diff --git a/src/Module/Api/Mastodon/Accounts/Lists.php b/src/Module/Api/Mastodon/Accounts/Lists.php index 2d254a2966..e34dd41370 100644 --- a/src/Module/Api/Mastodon/Accounts/Lists.php +++ b/src/Module/Api/Mastodon/Accounts/Lists.php @@ -53,11 +53,11 @@ class Lists extends BaseApi $cdata = Contact::getPublicAndUserContactID($id, $uid); if (!empty($cdata['user'])) { - $groups = DBA::select('group_member', ['gid'], ['contact-id' => $cdata['user']]); - while ($group = DBA::fetch($groups)) { - $lists[] = DI::mstdnList()->createFromGroupId($group['gid']); + $circles = DBA::select('group_member', ['gid'], ['contact-id' => $cdata['user']]); + while ($circle = DBA::fetch($circles)) { + $lists[] = DI::mstdnList()->createFromCircleId($circle['gid']); } - DBA::close($groups); + DBA::close($circles); } System::jsonExit($lists); diff --git a/src/Module/Api/Mastodon/Lists.php b/src/Module/Api/Mastodon/Lists.php index 3e5a471983..a007c80d33 100644 --- a/src/Module/Api/Mastodon/Lists.php +++ b/src/Module/Api/Mastodon/Lists.php @@ -24,7 +24,7 @@ namespace Friendica\Module\Api\Mastodon; use Friendica\Core\System; use Friendica\DI; use Friendica\Module\BaseApi; -use Friendica\Model\Group; +use Friendica\Model\Circle; /** * @see https://docs.joinmastodon.org/methods/timelines/lists/ @@ -40,11 +40,11 @@ class Lists extends BaseApi DI::mstdnError()->UnprocessableEntity(); } - if (!Group::exists($this->parameters['id'], $uid)) { + if (!Circle::exists($this->parameters['id'], $uid)) { DI::mstdnError()->RecordNotFound(); } - if (!Group::remove($this->parameters['id'])) { + if (!Circle::remove($this->parameters['id'])) { DI::mstdnError()->InternalError(); } @@ -64,14 +64,14 @@ class Lists extends BaseApi DI::mstdnError()->UnprocessableEntity(); } - Group::create($uid, $request['title']); + Circle::create($uid, $request['title']); - $id = Group::getIdByName($uid, $request['title']); + $id = Circle::getIdByName($uid, $request['title']); if (!$id) { DI::mstdnError()->InternalError(); } - System::jsonExit(DI::mstdnList()->createFromGroupId($id)); + System::jsonExit(DI::mstdnList()->createFromCircleId($id)); } public function put(array $request = []) @@ -85,7 +85,7 @@ class Lists extends BaseApi DI::mstdnError()->UnprocessableEntity(); } - Group::update($this->parameters['id'], $request['title']); + Circle::update($this->parameters['id'], $request['title']); } /** @@ -99,18 +99,16 @@ class Lists extends BaseApi if (empty($this->parameters['id'])) { $lists = []; - $groups = Group::getByUserId($uid); - - foreach ($groups as $group) { - $lists[] = DI::mstdnList()->createFromGroupId($group['id']); + foreach (Circle::getByUserId($uid) as $circle) { + $lists[] = DI::mstdnList()->createFromCircleId($circle['id']); } } else { $id = $this->parameters['id']; - if (!Group::exists($id, $uid)) { + if (!Circle::exists($id, $uid)) { DI::mstdnError()->RecordNotFound(); } - $lists = DI::mstdnList()->createFromGroupId($id); + $lists = DI::mstdnList()->createFromCircleId($id); } System::jsonExit($lists); diff --git a/src/Module/Api/Mastodon/Lists/Accounts.php b/src/Module/Api/Mastodon/Lists/Accounts.php index e19dfb0314..465f22a268 100644 --- a/src/Module/Api/Mastodon/Lists/Accounts.php +++ b/src/Module/Api/Mastodon/Lists/Accounts.php @@ -24,7 +24,7 @@ namespace Friendica\Module\Api\Mastodon\Lists; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Module\BaseApi; /** @@ -46,7 +46,7 @@ class Accounts extends BaseApi DI::mstdnError()->UnprocessableEntity(); } - return Group::removeMembers($this->parameters['id'], $request['account_ids']); + return Circle::removeMembers($this->parameters['id'], $request['account_ids']); } protected function post(array $request = []) @@ -61,7 +61,7 @@ class Accounts extends BaseApi DI::mstdnError()->UnprocessableEntity(); } - Group::addMembers($this->parameters['id'], $request['account_ids']); + Circle::addMembers($this->parameters['id'], $request['account_ids']); } /** diff --git a/src/Module/Api/Mastodon/Statuses.php b/src/Module/Api/Mastodon/Statuses.php index 72641235d7..dad0451fc4 100644 --- a/src/Module/Api/Mastodon/Statuses.php +++ b/src/Module/Api/Mastodon/Statuses.php @@ -30,7 +30,7 @@ use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\Item; use Friendica\Model\Photo; use Friendica\Model\Post; @@ -230,7 +230,7 @@ class Statuses extends BaseApi $item['deny_gid'] = $owner['deny_gid']; } else { $item['allow_cid'] = ''; - $item['allow_gid'] = '<' . Group::FOLLOWERS . '>'; + $item['allow_gid'] = '<' . Circle::FOLLOWERS . '>'; $item['deny_cid'] = ''; $item['deny_gid'] = ''; } @@ -241,7 +241,7 @@ class Statuses extends BaseApi // The permissions are assigned in "expandTags" break; default: - if (is_numeric($request['visibility']) && Group::exists($request['visibility'], $uid)) { + if (is_numeric($request['visibility']) && Circle::exists($request['visibility'], $uid)) { $item['allow_cid'] = ''; $item['allow_gid'] = '<' . $request['visibility'] . '>'; $item['deny_cid'] = ''; diff --git a/src/Module/Api/Twitter/Lists/Create.php b/src/Module/Api/Twitter/Lists/Create.php index f7612d32fc..1f2f63882a 100644 --- a/src/Module/Api/Twitter/Lists/Create.php +++ b/src/Module/Api/Twitter/Lists/Create.php @@ -24,34 +24,34 @@ namespace Friendica\Module\Api\Twitter\Lists; use Friendica\App; use Friendica\Core\L10n; use Friendica\Database\Database; -use Friendica\Factory\Api\Friendica\Group as FriendicaGroup; +use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; use Friendica\Module\BaseApi; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Module\Api\ApiResponse; use Friendica\Network\HTTPException; use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; /** - * Update information about a group. + * Update information about a circle. * * @see https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-update */ class Create extends BaseApi { - /** @var friendicaGroup */ - private $friendicaGroup; + /** @var FriendicaCircle */ + private $friendicaCircle; /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaGroup $friendicaGroup, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { parent::__construct($app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->dba = $dba; - $this->friendicaGroup = $friendicaGroup; + $this->dba = $dba; + $this->friendicaCircle = $friendicaCircle; } protected function rawContent(array $request = []) @@ -63,22 +63,22 @@ class Create extends BaseApi $name = $this->getRequestValue($request, 'name', ''); if ($name == '') { - throw new HTTPException\BadRequestException('group name not specified'); + throw new HTTPException\BadRequestException('circle name not specified'); } - // error message if specified group name already exists + // error message if specified circle name already exists if ($this->dba->exists('group', ['uid' => $uid, 'name' => $name, 'deleted' => false])) { - throw new HTTPException\BadRequestException('group name already exists'); + throw new HTTPException\BadRequestException('circle name already exists'); } - $ret = Group::create($uid, $name); + $ret = Circle::create($uid, $name); if ($ret) { - $gid = Group::getIdByName($uid, $name); + $gid = Circle::getIdByName($uid, $name); } else { throw new HTTPException\BadRequestException('other API error'); } - $grp = $this->friendicaGroup->createFromId($gid); + $grp = $this->friendicaCircle->createFromId($gid); $this->response->exit('statuses', ['lists' => ['lists' => $grp]], $this->parameters['extension'] ?? null, Contact::getPublicIdByUserId($uid)); } diff --git a/src/Module/Api/Twitter/Lists/Destroy.php b/src/Module/Api/Twitter/Lists/Destroy.php index 6a4e2eab80..0214e3ff6d 100644 --- a/src/Module/Api/Twitter/Lists/Destroy.php +++ b/src/Module/Api/Twitter/Lists/Destroy.php @@ -24,34 +24,34 @@ namespace Friendica\Module\Api\Twitter\Lists; use Friendica\App; use Friendica\Core\L10n; use Friendica\Database\Database; -use Friendica\Factory\Api\Friendica\Group as FriendicaGroup; +use Friendica\Factory\Api\Friendica\Circle as FriendicaCirle; use Friendica\Module\BaseApi; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Module\Api\ApiResponse; use Friendica\Network\HTTPException; use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; /** - * Delete a group. + * Delete a circle. * * @see https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-destroy */ class Destroy extends BaseApi { - /** @var friendicaGroup */ - private $friendicaGroup; + /** @var FriendicaCirle */ + private $friendicaCircle; /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaGroup $friendicaGroup, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCirle $friendicaCircle, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { parent::__construct($app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->dba = $dba; - $this->friendicaGroup = $friendicaGroup; + $this->dba = $dba; + $this->friendicaCircle = $friendicaCircle; } protected function rawContent(array $request = []) @@ -67,16 +67,16 @@ class Destroy extends BaseApi throw new HTTPException\BadRequestException('gid not specified'); } - // get data of the specified group id - $group = $this->dba->selectFirst('group', [], ['uid' => $uid, 'id' => $gid]); + // get data of the specified circle id + $circle = $this->dba->selectFirst('group', [], ['uid' => $uid, 'id' => $gid]); // error message if specified gid is not in database - if (!$group) { + if (!$circle) { throw new HTTPException\BadRequestException('gid not available'); } - $list = $this->friendicaGroup->createFromId($gid); + $list = $this->friendicaCircle->createFromId($gid); - if (Group::remove($gid)) { + if (Circle::remove($gid)) { $this->response->exit('statuses', ['lists' => ['lists' => $list]], $this->parameters['extension'] ?? null, Contact::getPublicIdByUserId($uid)); } } diff --git a/src/Module/Api/Twitter/Lists/Ownership.php b/src/Module/Api/Twitter/Lists/Ownership.php index 6ecd586891..2a1ea5ac60 100644 --- a/src/Module/Api/Twitter/Lists/Ownership.php +++ b/src/Module/Api/Twitter/Lists/Ownership.php @@ -24,7 +24,7 @@ namespace Friendica\Module\Api\Twitter\Lists; use Friendica\App; use Friendica\Core\L10n; use Friendica\Database\Database; -use Friendica\Factory\Api\Friendica\Group as FriendicaGroup; +use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; use Friendica\Module\BaseApi; use Friendica\Model\Contact; use Friendica\Module\Api\ApiResponse; @@ -32,36 +32,36 @@ use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; /** - * Returns all groups the user owns. + * Returns all circles the user owns. * * @see https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-ownerships */ class Ownership extends BaseApi { - /** @var friendicaGroup */ - private $friendicaGroup; + /** @var FriendicaCircle */ + private $friendicaCircle; /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaGroup $friendicaGroup, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { parent::__construct($app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->dba = $dba; - $this->friendicaGroup = $friendicaGroup; + $this->dba = $dba; + $this->friendicaCircle = $friendicaCircle; } protected function rawContent(array $request = []) { BaseApi::checkAllowedScope(BaseApi::SCOPE_READ); $uid = BaseApi::getCurrentUserID(); - $groups = $this->dba->select('group', [], ['deleted' => false, 'uid' => $uid, 'cid' => null]); + $circles = $this->dba->select('group', [], ['deleted' => false, 'uid' => $uid, 'cid' => null]); - // loop through all groups + // loop through all circles $lists = []; - foreach ($groups as $group) { - $lists[] = $this->friendicaGroup->createFromId($group['id']); + foreach ($circles as $circle) { + $lists[] = $this->friendicaCircle->createFromId($circle['id']); } $this->response->exit('statuses', ['lists' => ['lists' => $lists]], $this->parameters['extension'] ?? null, Contact::getPublicIdByUserId($uid)); diff --git a/src/Module/Api/Twitter/Lists/Statuses.php b/src/Module/Api/Twitter/Lists/Statuses.php index 4f64a54e8d..7d159c498b 100644 --- a/src/Module/Api/Twitter/Lists/Statuses.php +++ b/src/Module/Api/Twitter/Lists/Statuses.php @@ -36,7 +36,7 @@ use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; /** - * Returns recent statuses from users in the specified group. + * Returns recent statuses from users in the specified circle. * * @see https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/get-lists-ownerships */ @@ -76,9 +76,9 @@ class Statuses extends BaseApi $start = max(0, ($page - 1) * $count); - $groups = $this->dba->selectToArray('group_member', ['contact-id'], ['gid' => $request['list_id']]); - $gids = array_column($groups, 'contact-id'); - $condition = ['uid' => $uid, 'gravity' => [Item::GRAVITY_PARENT, Item::GRAVITY_COMMENT], 'contact-id' => $gids]; + $members = $this->dba->selectToArray('group_member', ['contact-id'], ['gid' => $request['list_id']]); + $cids = array_column($members, 'contact-id'); + $condition = ['uid' => $uid, 'gravity' => [Item::GRAVITY_PARENT, Item::GRAVITY_COMMENT], 'contact-id' => $cids]; $condition = DBA::mergeConditions($condition, ["`uri-id` > ?", $since_id]); if ($max_id > 0) { diff --git a/src/Module/Api/Twitter/Lists/Update.php b/src/Module/Api/Twitter/Lists/Update.php index d6748d72ee..6a925eeda5 100644 --- a/src/Module/Api/Twitter/Lists/Update.php +++ b/src/Module/Api/Twitter/Lists/Update.php @@ -24,34 +24,34 @@ namespace Friendica\Module\Api\Twitter\Lists; use Friendica\App; use Friendica\Core\L10n; use Friendica\Database\Database; -use Friendica\Factory\Api\Friendica\Group as FriendicaGroup; +use Friendica\Factory\Api\Friendica\Circle as FriendicaCircle; use Friendica\Module\BaseApi; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Module\Api\ApiResponse; use Friendica\Network\HTTPException; use Friendica\Util\Profiler; use Psr\Log\LoggerInterface; /** - * Update information about a group. + * Update information about a circle. * * @see https://developer.twitter.com/en/docs/accounts-and-users/create-manage-lists/api-reference/post-lists-update */ class Update extends BaseApi { - /** @var friendicaGroup */ - private $friendicaGroup; + /** @var FriendicaCircle */ + private $friendicaCircle; /** @var Database */ private $dba; - public function __construct(Database $dba, FriendicaGroup $friendicaGroup, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) + public function __construct(Database $dba, FriendicaCircle $friendicaCircle, App $app, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, ApiResponse $response, array $server, array $parameters = []) { parent::__construct($app, $l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->dba = $dba; - $this->friendicaGroup = $friendicaGroup; + $this->dba = $dba; + $this->friendicaCircle = $friendicaCircle; } protected function rawContent(array $request = []) @@ -68,15 +68,15 @@ class Update extends BaseApi throw new HTTPException\BadRequestException('gid not specified'); } - // get data of the specified group id - $group = $this->dba->selectFirst('group', [], ['uid' => $uid, 'id' => $gid]); + // get data of the specified circle id + $circle = $this->dba->selectFirst('group', [], ['uid' => $uid, 'id' => $gid]); // error message if specified gid is not in database - if (!$group) { + if (!$circle) { throw new HTTPException\BadRequestException('gid not available'); } - if (Group::update($gid, $name)) { - $list = $this->friendicaGroup->createFromId($gid); + if (Circle::update($gid, $name)) { + $list = $this->friendicaCircle->createFromId($gid); $this->response->exit('statuses', ['lists' => ['lists' => $list]], $this->parameters['extension'] ?? null, Contact::getPublicIdByUserId($uid)); } diff --git a/src/Module/Api/Twitter/Statuses/Update.php b/src/Module/Api/Twitter/Statuses/Update.php index df51ff8a84..397e3bbd27 100644 --- a/src/Module/Api/Twitter/Statuses/Update.php +++ b/src/Module/Api/Twitter/Statuses/Update.php @@ -62,9 +62,9 @@ class Update extends BaseApi 'source' => '', 'include_entities' => false, 'contact_allow' => $owner['allow_cid'], - 'group_allow' => $owner['allow_gid'], + 'circle_allow' => $owner['allow_gid'], 'contact_deny' => $owner['deny_cid'], - 'group_deny' => $owner['deny_gid'], + 'circle_deny' => $owner['deny_gid'], ], $request); if (!empty($request['htmlstatus'])) { @@ -102,9 +102,9 @@ class Update extends BaseApi $aclFormatter = DI::aclFormatter(); $item['allow_cid'] = $aclFormatter->toString($request['contact_allow']); - $item['allow_gid'] = $aclFormatter->toString($request['group_allow']); + $item['allow_gid'] = $aclFormatter->toString($request['circle_allow']); $item['deny_cid'] = $aclFormatter->toString($request['contact_deny']); - $item['deny_gid'] = $aclFormatter->toString($request['group_deny']); + $item['deny_gid'] = $aclFormatter->toString($request['circle_deny']); if (!empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) { $item['private'] = Item::PRIVATE; diff --git a/src/Module/Calendar/Event/API.php b/src/Module/Calendar/Event/API.php index acb2dd4ea6..e8fce8ed7e 100644 --- a/src/Module/Calendar/Event/API.php +++ b/src/Module/Calendar/Event/API.php @@ -212,14 +212,14 @@ class API extends BaseModule } $strAclContactAllow = isset($request['contact_allow']) ? $aclFormatter->toString($request['contact_allow']) : $user['allow_cid'] ?? ''; - $strAclGroupAllow = isset($request['group_allow']) ? $aclFormatter->toString($request['group_allow']) : $user['allow_gid'] ?? ''; - $strContactDeny = isset($request['contact_deny']) ? $aclFormatter->toString($request['contact_deny']) : $user['deny_cid'] ?? ''; - $strGroupDeny = isset($request['group_deny']) ? $aclFormatter->toString($request['group_deny']) : $user['deny_gid'] ?? ''; + $strAclCircleAllow = isset($request['circle_allow']) ? $aclFormatter->toString($request['circle_allow']) : $user['allow_gid'] ?? ''; + $strContactDeny = isset($request['contact_deny']) ? $aclFormatter->toString($request['contact_deny']) : $user['deny_cid'] ?? ''; + $strCircleDeny = isset($request['circle_deny']) ? $aclFormatter->toString($request['circle_deny']) : $user['deny_gid'] ?? ''; $visibility = $request['visibility'] ?? ''; if ($visibility === 'public') { // The ACL selector introduced in version 2019.12 sends ACL input data even when the Public visibility is selected - $strAclContactAllow = $strAclGroupAllow = $strContactDeny = $strGroupDeny = ''; + $strAclContactAllow = $strAclCircleAllow = $strContactDeny = $strCircleDeny = ''; } elseif ($visibility === 'custom') { // Since we know from the visibility parameter the item should be private, we have to prevent the empty ACL // case that would make it public. So we always append the author's contact id to the allowed contacts. @@ -228,9 +228,9 @@ class API extends BaseModule } } else { $strAclContactAllow = $aclFormatter->toString($self); - $strAclGroupAllow = ''; + $strAclCircleAllow = ''; $strContactDeny = ''; - $strGroupDeny = ''; + $strCircleDeny = ''; } $datarray = [ @@ -244,9 +244,9 @@ class API extends BaseModule 'uid' => $uid, 'cid' => $cid, 'allow_cid' => $strAclContactAllow, - 'allow_gid' => $strAclGroupAllow, + 'allow_gid' => $strAclCircleAllow, 'deny_cid' => $strContactDeny, - 'deny_gid' => $strGroupDeny, + 'deny_gid' => $strCircleDeny, 'id' => $eventId, ]; diff --git a/src/Module/Group.php b/src/Module/Circle.php similarity index 60% rename from src/Module/Group.php rename to src/Module/Circle.php index 78b49d993f..74d52ee629 100644 --- a/src/Module/Group.php +++ b/src/Module/Circle.php @@ -28,7 +28,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model; -class Group extends BaseModule +class Circle extends BaseModule { protected function post(array $request = []) { @@ -43,34 +43,34 @@ class Group extends BaseModule // @TODO: Replace with parameter from router if ((DI::args()->getArgc() == 2) && (DI::args()->getArgv()[1] === 'new')) { - BaseModule::checkFormSecurityTokenRedirectOnError('/group/new', 'group_edit'); + BaseModule::checkFormSecurityTokenRedirectOnError('/circle/new', 'circle_edit'); - $name = trim($request['groupname']); - $r = Model\Group::create(DI::userSession()->getLocalUserId(), $name); + $name = trim($request['circle_name']); + $r = Model\Circle::create(DI::userSession()->getLocalUserId(), $name); if ($r) { - $r = Model\Group::getIdByName(DI::userSession()->getLocalUserId(), $name); + $r = Model\Circle::getIdByName(DI::userSession()->getLocalUserId(), $name); if ($r) { - DI::baseUrl()->redirect('group/' . $r); + DI::baseUrl()->redirect('circle/' . $r); } } else { - DI::sysmsg()->addNotice(DI::l10n()->t('Could not create group.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Could not create circle.')); } - DI::baseUrl()->redirect('group'); + DI::baseUrl()->redirect('circle'); } // @TODO: Replace with parameter from router if ((DI::args()->getArgc() == 2) && intval(DI::args()->getArgv()[1])) { - BaseModule::checkFormSecurityTokenRedirectOnError('/group', 'group_edit'); + BaseModule::checkFormSecurityTokenRedirectOnError('/circle', 'circle_edit'); - $group = DBA::selectFirst('group', ['id', 'name'], ['id' => DI::args()->getArgv()[1], 'uid' => DI::userSession()->getLocalUserId()]); - if (!DBA::isResult($group)) { - DI::sysmsg()->addNotice(DI::l10n()->t('Group not found.')); + $circle = DBA::selectFirst('group', ['id', 'name'], ['id' => DI::args()->getArgv()[1], 'uid' => DI::userSession()->getLocalUserId()]); + if (!DBA::isResult($circle)) { + DI::sysmsg()->addNotice(DI::l10n()->t('Circle not found.')); DI::baseUrl()->redirect('contact'); } - $groupname = trim($_POST['groupname']); - if (strlen($groupname) && ($groupname != $group['name'])) { - if (!Model\Group::update($group['id'], $groupname)) { - DI::sysmsg()->addNotice(DI::l10n()->t('Group name was not changed.')); + $circlename = trim($_POST['circle_name']); + if (strlen($circlename) && ($circlename != $circle['name'])) { + if (!Model\Circle::update($circle['id'], $circlename)) { + DI::sysmsg()->addNotice(DI::l10n()->t('Circle name was not changed.')); } } } @@ -84,11 +84,11 @@ class Group extends BaseModule } if (isset($this->parameters['command'])) { - $group_id = $this->parameters['group']; + $circle_id = $this->parameters['circle']; $contact_id = $this->parameters['contact']; - if (!Model\Group::exists($group_id, DI::userSession()->getLocalUserId())) { - throw new \Exception(DI::l10n()->t('Unknown group.'), 404); + if (!Model\Circle::exists($circle_id, DI::userSession()->getLocalUserId())) { + throw new \Exception(DI::l10n()->t('Unknown circle.'), 404); } // @TODO Backward compatibility with user contacts, remove by version 2022.03 @@ -112,18 +112,18 @@ class Group extends BaseModule switch($this->parameters['command']) { case 'add': - if (!Model\Group::addMember($group_id, $cdata['user'])) { - throw new \Exception(DI::l10n()->t('Unable to add the contact to the group.'), 500); + if (!Model\Circle::addMember($circle_id, $cdata['user'])) { + throw new \Exception(DI::l10n()->t('Unable to add the contact to the circle.'), 500); } - $message = DI::l10n()->t('Contact successfully added to group.'); + $message = DI::l10n()->t('Contact successfully added to circle.'); break; case 'remove': - if (!Model\Group::removeMember($group_id, $cdata['user'])) { - throw new \Exception(DI::l10n()->t('Unable to remove the contact from the group.'), 500); + if (!Model\Circle::removeMember($circle_id, $cdata['user'])) { + throw new \Exception(DI::l10n()->t('Unable to remove the contact from the circle.'), 500); } - $message = DI::l10n()->t('Contact successfully removed from group.'); + $message = DI::l10n()->t('Contact successfully removed from circle.'); break; } } else { @@ -148,56 +148,58 @@ class Group extends BaseModule $a = DI::app(); - DI::page()['aside'] = Model\Group::sidebarWidget('contact', 'group', 'extended', ((DI::args()->getArgc() > 1) ? DI::args()->getArgv()[1] : 'everyone')); + DI::page()['aside'] = Model\Circle::sidebarWidget('contact', 'circle', 'extended', ((DI::args()->getArgc() > 1) ? DI::args()->getArgv()[1] : 'everyone')); - // With no group number provided we jump to the unassigned contacts as a starting point + // With no circle number provided we jump to the unassigned contacts as a starting point // @TODO: Replace with parameter from router if (DI::args()->getArgc() == 1) { - DI::baseUrl()->redirect('group/none'); + DI::baseUrl()->redirect('circle/none'); } - // Switch to text mode interface if we have more than 'n' contacts or group members - $switchtotext = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'groupedit_image_limit'); + // Switch to text mode interface if we have more than 'n' contacts or circle members + $switchtotext = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'circle_edit_image_limit') ?? + DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'groupedit_image_limit'); if (is_null($switchtotext)) { - $switchtotext = DI::config()->get('system', 'groupedit_image_limit', 200); + $switchtotext = DI::config()->get('system', 'groupedit_image_limit') ?? + DI::config()->get('system', 'circle_edit_image_limit'); } - $tpl = Renderer::getMarkupTemplate('group_edit.tpl'); + $tpl = Renderer::getMarkupTemplate('circle_edit.tpl'); $context = [ - '$submit' => DI::l10n()->t('Save Group'), + '$submit' => DI::l10n()->t('Save Circle'), '$submit_filter' => DI::l10n()->t('Filter'), ]; // @TODO: Replace with parameter from router if ((DI::args()->getArgc() == 2) && (DI::args()->getArgv()[1] === 'new')) { return Renderer::replaceMacros($tpl, $context + [ - '$title' => DI::l10n()->t('Create a group of contacts/friends.'), - '$gname' => ['groupname', DI::l10n()->t('Group Name: '), '', ''], + '$title' => DI::l10n()->t('Create a circle of contacts/friends.'), + '$gname' => ['circle_name', DI::l10n()->t('Circle Name: '), '', ''], '$gid' => 'new', - '$form_security_token' => BaseModule::getFormSecurityToken("group_edit"), + '$form_security_token' => BaseModule::getFormSecurityToken('circle_edit'), ]); } - $nogroup = false; + $nocircle = false; // @TODO: Replace with parameter from router if ((DI::args()->getArgc() == 2) && (DI::args()->getArgv()[1] === 'none') || - (DI::args()->getArgc() == 1) && (DI::args()->getArgv()[0] === 'nogroup')) { + (DI::args()->getArgc() == 1) && (DI::args()->getArgv()[0] === 'nocircle')) { $id = -1; - $nogroup = true; - $group = [ + $nocircle = true; + $circle = [ 'id' => $id, - 'name' => DI::l10n()->t('Contacts not in any group'), + 'name' => DI::l10n()->t('Contacts not in any circle'), ]; $members = []; $preselected = []; $context = $context + [ - '$title' => $group['name'], - '$gname' => ['groupname', DI::l10n()->t('Group Name: '), $group['name'], ''], + '$title' => $circle['name'], + '$gname' => ['circle_name', DI::l10n()->t('Circle Name: '), $circle['name'], ''], '$gid' => $id, '$editable' => 0, ]; @@ -205,25 +207,25 @@ class Group extends BaseModule // @TODO: Replace with parameter from router if ((DI::args()->getArgc() == 3) && (DI::args()->getArgv()[1] === 'drop')) { - BaseModule::checkFormSecurityTokenRedirectOnError('/group', 'group_drop', 't'); + BaseModule::checkFormSecurityTokenRedirectOnError('/circle', 'circle_drop', 't'); // @TODO: Replace with parameter from router if (intval(DI::args()->getArgv()[2])) { - if (!Model\Group::exists(DI::args()->getArgv()[2], DI::userSession()->getLocalUserId())) { - DI::sysmsg()->addNotice(DI::l10n()->t('Group not found.')); + if (!Model\Circle::exists(DI::args()->getArgv()[2], DI::userSession()->getLocalUserId())) { + DI::sysmsg()->addNotice(DI::l10n()->t('Circle not found.')); DI::baseUrl()->redirect('contact'); } - if (!Model\Group::remove(DI::args()->getArgv()[2])) { - DI::sysmsg()->addNotice(DI::l10n()->t('Unable to remove group.')); + if (!Model\Circle::remove(DI::args()->getArgv()[2])) { + DI::sysmsg()->addNotice(DI::l10n()->t('Unable to remove circle.')); } } - DI::baseUrl()->redirect('group'); + DI::baseUrl()->redirect('circle'); } // @TODO: Replace with parameter from router if ((DI::args()->getArgc() > 2) && intval(DI::args()->getArgv()[1]) && intval(DI::args()->getArgv()[2])) { - BaseModule::checkFormSecurityTokenForbiddenOnError('group_member_change', 't'); + BaseModule::checkFormSecurityTokenForbiddenOnError('circle_member_change', 't'); if (DBA::exists('contact', ['id' => DI::args()->getArgv()[2], 'uid' => DI::userSession()->getLocalUserId(), 'self' => false, 'pending' => false, 'blocked' => false])) { $change = intval(DI::args()->getArgv()[2]); @@ -232,13 +234,13 @@ class Group extends BaseModule // @TODO: Replace with parameter from router if ((DI::args()->getArgc() > 1) && intval(DI::args()->getArgv()[1])) { - $group = DBA::selectFirst('group', ['id', 'name'], ['id' => DI::args()->getArgv()[1], 'uid' => DI::userSession()->getLocalUserId(), 'deleted' => false]); - if (!DBA::isResult($group)) { - DI::sysmsg()->addNotice(DI::l10n()->t('Group not found.')); + $circle = DBA::selectFirst('group', ['id', 'name'], ['id' => DI::args()->getArgv()[1], 'uid' => DI::userSession()->getLocalUserId(), 'deleted' => false]); + if (!DBA::isResult($circle)) { + DI::sysmsg()->addNotice(DI::l10n()->t('Circle not found.')); DI::baseUrl()->redirect('contact'); } - $members = Model\Contact\Group::getById($group['id']); + $members = Model\Contact\Circle::getById($circle['id']); $preselected = []; if (count($members)) { @@ -249,12 +251,12 @@ class Group extends BaseModule if ($change) { if (in_array($change, $preselected)) { - Model\Group::removeMember($group['id'], $change); + Model\Circle::removeMember($circle['id'], $change); } else { - Model\Group::addMember($group['id'], $change); + Model\Circle::addMember($circle['id'], $change); } - $members = Model\Contact\Group::getById($group['id']); + $members = Model\Contact\Circle::getById($circle['id']); $preselected = []; if (count($members)) { foreach ($members as $member) { @@ -263,59 +265,59 @@ class Group extends BaseModule } } - $drop_tpl = Renderer::getMarkupTemplate('group_drop.tpl'); + $drop_tpl = Renderer::getMarkupTemplate('circle_drop.tpl'); $drop_txt = Renderer::replaceMacros($drop_tpl, [ - '$id' => $group['id'], - '$delete' => DI::l10n()->t('Delete Group'), - '$form_security_token' => BaseModule::getFormSecurityToken("group_drop"), + '$id' => $circle['id'], + '$delete' => DI::l10n()->t('Delete Circle'), + '$form_security_token' => BaseModule::getFormSecurityToken('circle_drop'), ]); $context = $context + [ - '$title' => $group['name'], - '$gname' => ['groupname', DI::l10n()->t('Group Name: '), $group['name'], ''], - '$gid' => $group['id'], + '$title' => $circle['name'], + '$gname' => ['circle_name', DI::l10n()->t('Circle Name: '), $circle['name'], ''], + '$gid' => $circle['id'], '$drop' => $drop_txt, - '$form_security_token' => BaseModule::getFormSecurityToken('group_edit'), - '$edit_name' => DI::l10n()->t('Edit Group Name'), + '$form_security_token' => BaseModule::getFormSecurityToken('circle_edit'), + '$edit_name' => DI::l10n()->t('Edit Circle Name'), '$editable' => 1, ]; } - if (!isset($group)) { + if (!isset($circle)) { throw new \Friendica\Network\HTTPException\BadRequestException(); } - $groupeditor = [ + $circle_editor = [ 'label_members' => DI::l10n()->t('Members'), 'members' => [], 'label_contacts' => DI::l10n()->t('All Contacts'), - 'group_is_empty' => DI::l10n()->t('Group is empty'), + 'circle_is_empty' => DI::l10n()->t('Circle is empty'), 'contacts' => [], ]; - $sec_token = addslashes(BaseModule::getFormSecurityToken('group_member_change')); + $sec_token = addslashes(BaseModule::getFormSecurityToken('circle_member_change')); - // Format the data of the group members + // Format the data of the circle members foreach ($members as $member) { if ($member['url']) { $entry = Contact::getContactTemplateVars($member); $entry['label'] = 'members'; $entry['photo_menu'] = ''; $entry['change_member'] = [ - 'title' => DI::l10n()->t("Remove contact from group"), - 'gid' => $group['id'], + 'title' => DI::l10n()->t('Remove contact from circle'), + 'gid' => $circle['id'], 'cid' => $member['id'], 'sec_token' => $sec_token ]; - $groupeditor['members'][] = $entry; + $circle_editor['members'][] = $entry; } else { - Model\Group::removeMember($group['id'], $member['id']); + Model\Circle::removeMember($circle['id'], $member['id']); } } - if ($nogroup) { - $contacts = Model\Contact\Group::listUngrouped(DI::userSession()->getLocalUserId()); + if ($nocircle) { + $contacts = Model\Contact\Circle::listUncircled(DI::userSession()->getLocalUserId()); } else { $contacts_stmt = DBA::select('contact', [], ['rel' => [Model\Contact::FOLLOWER, Model\Contact::FRIEND, Model\Contact::SHARING], @@ -327,40 +329,40 @@ class Group extends BaseModule } if (DBA::isResult($contacts)) { - // Format the data of the contacts who aren't in the contact group + // Format the data of the contacts who aren't in the contact circle foreach ($contacts as $member) { if (!in_array($member['id'], $preselected)) { $entry = Contact::getContactTemplateVars($member); $entry['label'] = 'contacts'; - if (!$nogroup) + if (!$nocircle) $entry['photo_menu'] = []; - if (!$nogroup) { + if (!$nocircle) { $entry['change_member'] = [ - 'title' => DI::l10n()->t("Add contact to group"), - 'gid' => $group['id'], + 'title' => DI::l10n()->t('Add contact to circle'), + 'gid' => $circle['id'], 'cid' => $member['id'], 'sec_token' => $sec_token ]; } - $groupeditor['contacts'][] = $entry; + $circle_editor['contacts'][] = $entry; } } } - $context['$groupeditor'] = $groupeditor; + $context['$circle_editor'] = $circle_editor; // If there are to many contacts we could provide an alternative view mode - $total = count($groupeditor['members']) + count($groupeditor['contacts']); + $total = count($circle_editor['members']) + count($circle_editor['contacts']); $context['$shortmode'] = (($switchtotext && ($total > $switchtotext)) ? true : false); if ($change) { - $tpl = Renderer::getMarkupTemplate('groupeditor.tpl'); + $tpl = Renderer::getMarkupTemplate('circle_editor.tpl'); echo Renderer::replaceMacros($tpl, $context); System::exit(); } return Renderer::replaceMacros($tpl, $context); } -} \ No newline at end of file +} diff --git a/src/Module/Contact.php b/src/Module/Contact.php index a70db02345..d3db921333 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -191,7 +191,7 @@ class Contact extends BaseModule $search = trim($_GET['search'] ?? ''); $nets = trim($_GET['nets'] ?? ''); $rel = trim($_GET['rel'] ?? ''); - $group = trim($_GET['group'] ?? ''); + $circle = trim($_GET['circle'] ?? ''); $accounttype = $_GET['accounttype'] ?? ''; $accounttypeid = User::getAccountTypeByString($accounttype); @@ -211,12 +211,12 @@ class Contact extends BaseModule $follow_widget = Widget::follow(); } - $account_widget = Widget::accountTypes($_SERVER['REQUEST_URI'], $accounttype); + $account_widget = Widget::accountTypes($_SERVER['REQUEST_URI'], $accounttype); $networks_widget = Widget::networks($_SERVER['REQUEST_URI'], $nets); - $rel_widget = Widget::contactRels($_SERVER['REQUEST_URI'], $rel); - $groups_widget = Widget::groups($_SERVER['REQUEST_URI'], $group); + $rel_widget = Widget::contactRels($_SERVER['REQUEST_URI'], $rel); + $circles_widget = Widget::circles($_SERVER['REQUEST_URI'], $circle); - DI::page()['aside'] .= $vcard_widget . $findpeople_widget . $follow_widget . $rel_widget . $groups_widget . $networks_widget . $account_widget; + DI::page()['aside'] .= $vcard_widget . $findpeople_widget . $follow_widget . $rel_widget . $circles_widget . $networks_widget . $account_widget; $tpl = Renderer::getMarkupTemplate('contacts-head.tpl'); DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [ @@ -306,9 +306,9 @@ class Contact extends BaseModule break; } - if ($group) { + if ($circle) { $sql_extra .= " AND `id` IN (SELECT `contact-id` FROM `group_member` WHERE `gid` = ?)"; - $sql_values[] = $group; + $sql_values[] = $circle; } $networks = Widget::unavailableNetworks(); @@ -391,11 +391,11 @@ class Contact extends BaseModule 'accesskey' => 'h', ], [ - 'label' => DI::l10n()->t('Groups'), - 'url' => 'group', + 'label' => DI::l10n()->t('Circles'), + 'url' => 'circle', 'sel' => '', - 'title' => DI::l10n()->t('Organize your contact groups'), - 'id' => 'contactgroups-tab', + 'title' => DI::l10n()->t('Organize your contact circles'), + 'id' => 'contactcircles-tab', 'accesskey' => 'e', ], ]; diff --git a/src/Module/Contact/Profile.php b/src/Module/Contact/Profile.php index d80405e235..d38563fbfc 100644 --- a/src/Module/Contact/Profile.php +++ b/src/Module/Contact/Profile.php @@ -37,7 +37,7 @@ use Friendica\Core\Renderer; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Module; use Friendica\Module\Response; use Friendica\Network\HTTPException; @@ -222,13 +222,13 @@ class Profile extends BaseModule } $vcard_widget = Widget\VCard::getHTML($contact); - $groups_widget = ''; + $circles_widget = ''; if (!in_array($localRelationship->rel, [Contact::NOTHING, Contact::SELF])) { - $groups_widget = Group::sidebarWidget('contact', 'group', 'full', 'everyone', $data['user']); + $circles_widget = Circle::sidebarWidget('contact', 'circle', 'full', 'everyone', $data['user']); } - $this->page['aside'] .= $vcard_widget . $groups_widget; + $this->page['aside'] .= $vcard_widget . $circles_widget; $o = ''; Nav::setSelected('contact'); diff --git a/src/Module/Conversation/Network.php b/src/Module/Conversation/Network.php index 5653b128a9..72e541be4b 100644 --- a/src/Module/Conversation/Network.php +++ b/src/Module/Conversation/Network.php @@ -36,7 +36,7 @@ use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Profile; @@ -50,7 +50,7 @@ use Friendica\Util\DateTimeFormat; class Network extends BaseModule { /** @var int */ - private static $groupId; + private static $circleId; /** @var int */ private static $forumContactId; /** @var string */ @@ -89,7 +89,7 @@ class Network extends BaseModule $module = 'network'; DI::page()['aside'] .= Widget::accountTypes($module, self::$accountTypeString); - DI::page()['aside'] .= Group::sidebarWidget($module, $module . '/group', 'standard', self::$groupId); + DI::page()['aside'] .= Circle::sidebarWidget($module, $module . '/circle', 'standard', self::$circleId); DI::page()['aside'] .= ForumManager::widget($module . '/forum', DI::userSession()->getLocalUserId(), self::$forumContactId); DI::page()['aside'] .= Widget::postedByYear($module . '/archive', DI::userSession()->getLocalUserId(), false); DI::page()['aside'] .= Widget::networks($module, !self::$forumContactId ? self::$network : ''); @@ -131,8 +131,8 @@ class Network extends BaseModule $a = DI::app(); $default_permissions = []; - if (self::$groupId) { - $default_permissions['allow_gid'] = [self::$groupId]; + if (self::$circleId) { + $default_permissions['allow_gid'] = [self::$circleId]; } $allowedCids = []; @@ -160,23 +160,23 @@ class Network extends BaseModule } $x = [ - 'lockstate' => self::$groupId || self::$forumContactId || self::$network || ACL::getLockstateForUserId($a->getLoggedInUserId()) ? 'lock' : 'unlock', + 'lockstate' => self::$circleId || self::$forumContactId || self::$network || ACL::getLockstateForUserId($a->getLoggedInUserId()) ? 'lock' : 'unlock', 'acl' => ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId(), true, $default_permissions), - 'bang' => ((self::$groupId || self::$forumContactId || self::$network) ? '!' : ''), + 'bang' => ((self::$circleId || self::$forumContactId || self::$network) ? '!' : ''), 'content' => $content, ]; $o .= DI::conversation()->statusEditor($x); } - if (self::$groupId) { - $group = DBA::selectFirst('group', ['name'], ['id' => self::$groupId, 'uid' => DI::userSession()->getLocalUserId()]); - if (!DBA::isResult($group)) { - DI::sysmsg()->addNotice(DI::l10n()->t('No such group')); + if (self::$circleId) { + $circle = DBA::selectFirst('group', ['name'], ['id' => self::$circleId, 'uid' => DI::userSession()->getLocalUserId()]); + if (!DBA::isResult($circle)) { + DI::sysmsg()->addNotice(DI::l10n()->t('No such circle')); } $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), [ - '$title' => DI::l10n()->t('Group: %s', $group['name']) + '$title' => DI::l10n()->t('Circle: %s', $circle['name']) ]) . $o; } elseif (self::$forumContactId) { $contact = Contact::getById(self::$forumContactId); @@ -305,7 +305,7 @@ class Network extends BaseModule protected function parseRequest(array $get) { - self::$groupId = $this->parameters['group_id'] ?? 0; + self::$circleId = $this->parameters['circle_id'] ?? 0; self::$forumContactId = $this->parameters['contact_id'] ?? 0; @@ -411,8 +411,8 @@ class Network extends BaseModule $conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` >= ? ", DateTimeFormat::convert(self::$dateTo, 'UTC', DI::app()->getTimeZone())]); } - if (self::$groupId) { - $conditionStrings = DBA::mergeConditions($conditionStrings, ["`contact-id` IN (SELECT `contact-id` FROM `group_member` WHERE `gid` = ?)", self::$groupId]); + if (self::$circleId) { + $conditionStrings = DBA::mergeConditions($conditionStrings, ["`contact-id` IN (SELECT `contact-id` FROM `group_member` WHERE `gid` = ?)", self::$circleId]); } elseif (self::$forumContactId) { $conditionStrings = DBA::mergeConditions($conditionStrings, ["((`contact-id` = ?) OR `uri-id` IN (SELECT `parent-uri-id` FROM `post-user-view` WHERE (`contact-id` = ? AND `gravity` = ? AND `vid` = ? AND `uid` = ?)))", @@ -476,10 +476,10 @@ class Network extends BaseModule $parents = []; } - // We aren't going to try and figure out at the item, group, and page + // We aren't going to try and figure out at the item, circle, and page // level which items you've seen and which you haven't. If you're looking // at the top level network page just mark everything seen. - if (!self::$groupId && !self::$forumContactId && !self::$star && !self::$mention) { + if (!self::$circleId && !self::$forumContactId && !self::$star && !self::$mention) { $condition = ['unseen' => true, 'uid' => DI::userSession()->getLocalUserId()]; self::setItemsSeenByCondition($condition); } elseif (!empty($parents)) { diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php index 8201a61a66..6766cb5e51 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -113,9 +113,9 @@ class Compose extends BaseModule $user = User::getById(DI::userSession()->getLocalUserId(), ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'default-location']); $contact_allow_list = $this->ACLFormatter->expand($user['allow_cid']); - $group_allow_list = $this->ACLFormatter->expand($user['allow_gid']); + $circle_allow_list = $this->ACLFormatter->expand($user['allow_gid']); $contact_deny_list = $this->ACLFormatter->expand($user['deny_cid']); - $group_deny_list = $this->ACLFormatter->expand($user['deny_gid']); + $circle_deny_list = $this->ACLFormatter->expand($user['deny_gid']); switch ($posttype) { case Item::PT_PERSONAL_NOTE: @@ -123,9 +123,9 @@ class Compose extends BaseModule $type = 'note'; $doesFederate = false; $contact_allow_list = [$a->getContactId()]; - $group_allow_list = []; + $circle_allow_list = []; $contact_deny_list = []; - $group_deny_list = []; + $circle_deny_list = []; break; default: $compose_title = $this->l10n->t('Compose new post'); @@ -133,19 +133,19 @@ class Compose extends BaseModule $doesFederate = true; $contact_allow = $_REQUEST['contact_allow'] ?? ''; - $group_allow = $_REQUEST['group_allow'] ?? ''; + $circle_allow = $_REQUEST['circle_allow'] ?? ''; $contact_deny = $_REQUEST['contact_deny'] ?? ''; - $group_deny = $_REQUEST['group_deny'] ?? ''; + $circle_deny = $_REQUEST['circle_deny'] ?? ''; if ($contact_allow - . $group_allow + . $circle_allow . $contact_deny - . $group_deny) + . $circle_deny) { $contact_allow_list = $contact_allow ? explode(',', $contact_allow) : []; - $group_allow_list = $group_allow ? explode(',', $group_allow) : []; + $circle_allow_list = $circle_allow ? explode(',', $circle_allow) : []; $contact_deny_list = $contact_deny ? explode(',', $contact_deny) : []; - $group_deny_list = $group_deny ? explode(',', $group_deny) : []; + $circle_deny_list = $circle_deny ? explode(',', $circle_deny) : []; } break; @@ -229,18 +229,18 @@ class Compose extends BaseModule '$body' => $body, '$location' => $location, - '$contact_allow'=> implode(',', $contact_allow_list), - '$group_allow' => implode(',', $group_allow_list), - '$contact_deny' => implode(',', $contact_deny_list), - '$group_deny' => implode(',', $group_deny_list), + '$contact_allow' => implode(',', $contact_allow_list), + '$circle_allow' => implode(',', $circle_allow_list), + '$contact_deny' => implode(',', $contact_deny_list), + '$circle_deny' => implode(',', $circle_deny_list), '$jotplugins' => $jotplugins, '$rand_num' => Crypto::randomDigits(12), '$acl_selector' => ACL::getFullSelectorHTML($this->page, $a->getLoggedInUserId(), $doesFederate, [ 'allow_cid' => $contact_allow_list, - 'allow_gid' => $group_allow_list, + 'allow_gid' => $circle_allow_list, 'deny_cid' => $contact_deny_list, - 'deny_gid' => $group_deny_list, + 'deny_gid' => $circle_deny_list, ]), ]); } diff --git a/src/Module/Notifications/Ping.php b/src/Module/Notifications/Ping.php index 3cd4d70201..dd9e8cccde 100644 --- a/src/Module/Notifications/Ping.php +++ b/src/Module/Notifications/Ping.php @@ -35,7 +35,7 @@ use Friendica\Core\Session\Capability\IHandleUserSessions; use Friendica\Core\System; use Friendica\Database\Database; use Friendica\Database\DBA; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\Post; use Friendica\Model\User; use Friendica\Model\Verb; @@ -108,7 +108,7 @@ class Ping extends BaseModule $network_count = 0; $register_count = 0; $sysnotify_count = 0; - $groups_unseen = []; + $circles_unseen = []; $forums_unseen = []; $event_count = 0; @@ -151,12 +151,12 @@ class Ping extends BaseModule } } - $compute_group_counts = $this->config->get('system','compute_group_counts'); - if ($network_count && $compute_group_counts) { - // Find out how unseen network posts are spread across groups - foreach (Group::countUnseen() as $group_count) { - if ($group_count['count'] > 0) { - $groups_unseen[] = $group_count; + $compute_circle_counts = $this->config->get('system','compute_group_counts') ?? $this->config->get('system','compute_circle_counts'); + if ($network_count && $compute_circle_counts) { + // Find out how unseen network posts are spread across circles + foreach (Circle::countUnseen() as $circle_count) { + if ($circle_count['count'] > 0) { + $circles_unseen[] = $circle_count; } } @@ -289,7 +289,7 @@ class Ping extends BaseModule $data['events-today'] = $today_event_count; $data['birthdays'] = $birthday_count; $data['birthdays-today'] = $today_birthday_count; - $data['groups'] = $groups_unseen; + $data['circles'] = $circles_unseen; $data['forums'] = $forums_unseen; $data['notification'] = ($notification_count < 50) ? $notification_count : '49+'; diff --git a/src/Module/PermissionTooltip.php b/src/Module/PermissionTooltip.php index dbfdd5ef26..4e5191e5a4 100644 --- a/src/Module/PermissionTooltip.php +++ b/src/Module/PermissionTooltip.php @@ -27,7 +27,7 @@ use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\APContact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Tag; @@ -113,29 +113,29 @@ class PermissionTooltip extends \Friendica\BaseModule exit; } - $allowed_users = $model['allow_cid']; - $allowed_groups = $model['allow_gid']; - $deny_users = $model['deny_cid']; - $deny_groups = $model['deny_gid']; + $allowed_users = $model['allow_cid']; + $allowed_circles = $model['allow_gid']; + $deny_users = $model['deny_cid']; + $deny_circles = $model['deny_gid']; $o = DI::l10n()->t('Visible to:') . '
'; $l = []; - if (count($allowed_groups)) { - $key = array_search(Group::FOLLOWERS, $allowed_groups); + if (count($allowed_circles)) { + $key = array_search(Circle::FOLLOWERS, $allowed_circles); if ($key !== false) { $l[] = '' . DI::l10n()->t('Followers') . ''; - unset($allowed_groups[$key]); + unset($allowed_circles[$key]); } - $key = array_search(Group::MUTUALS, $allowed_groups); + $key = array_search(Circle::MUTUALS, $allowed_circles); if ($key !== false) { $l[] = '' . DI::l10n()->t('Mutuals') . ''; - unset($allowed_groups[$key]); + unset($allowed_circles[$key]); } - foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_groups]) as $group) { - $l[] = '' . $group['name'] . ''; + foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_circles]) as $circle) { + $l[] = '' . $circle['name'] . ''; } } @@ -143,21 +143,21 @@ class PermissionTooltip extends \Friendica\BaseModule $l[] = $contact['name']; } - if (count($deny_groups)) { - $key = array_search(Group::FOLLOWERS, $deny_groups); + if (count($deny_circles)) { + $key = array_search(Circle::FOLLOWERS, $deny_circles); if ($key !== false) { $l[] = '' . DI::l10n()->t('Followers') . ''; - unset($deny_groups[$key]); + unset($deny_circles[$key]); } - $key = array_search(Group::MUTUALS, $deny_groups); + $key = array_search(Circle::MUTUALS, $deny_circles); if ($key !== false) { $l[] = '' . DI::l10n()->t('Mutuals') . ''; - unset($deny_groups[$key]); + unset($deny_circles[$key]); } - foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_groups]) as $group) { - $l[] = '' . $group['name'] . ''; + foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_circles]) as $circle) { + $l[] = '' . $circle['name'] . ''; } } diff --git a/src/Module/Profile/Conversations.php b/src/Module/Profile/Conversations.php index 715bf45d3d..edd99e418f 100644 --- a/src/Module/Profile/Conversations.php +++ b/src/Module/Profile/Conversations.php @@ -165,7 +165,7 @@ class Conversations extends BaseProfile $o .= $this->conversation->statusEditor($x); } - // Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched his/her groups + // Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched their circles $condition = Item::getPermissionsConditionArrayByUserId($profile['uid']); $last_updated_array = $this->session->get('last_updated', []); diff --git a/src/Module/Profile/Photos.php b/src/Module/Profile/Photos.php index 9d8b27592c..fcd0b78b09 100644 --- a/src/Module/Profile/Photos.php +++ b/src/Module/Profile/Photos.php @@ -93,14 +93,14 @@ class Photos extends \Friendica\Module\BaseProfile } $str_contact_allow = isset($request['contact_allow']) ? $this->aclFormatter->toString($request['contact_allow']) : $this->owner['allow_cid'] ?? ''; - $str_group_allow = isset($request['group_allow']) ? $this->aclFormatter->toString($request['group_allow']) : $this->owner['allow_gid'] ?? ''; + $str_circle_allow = isset($request['circle_allow']) ? $this->aclFormatter->toString($request['circle_allow']) : $this->owner['allow_gid'] ?? ''; $str_contact_deny = isset($request['contact_deny']) ? $this->aclFormatter->toString($request['contact_deny']) : $this->owner['deny_cid'] ?? ''; - $str_group_deny = isset($request['group_deny']) ? $this->aclFormatter->toString($request['group_deny']) : $this->owner['deny_gid'] ?? ''; + $str_circle_deny = isset($request['circle_deny']) ? $this->aclFormatter->toString($request['circle_deny']) : $this->owner['deny_gid'] ?? ''; $visibility = $request['visibility'] ?? ''; if ($visibility === 'public') { // The ACL selector introduced in version 2019.12 sends ACL input data even when the Public visibility is selected - $str_contact_allow = $str_group_allow = $str_contact_deny = $str_group_deny = ''; + $str_contact_allow = $str_circle_allow = $str_contact_deny = $str_circle_deny = ''; } else if ($visibility === 'custom') { // Since we know from the visibility parameter the item should be private, we have to prevent the empty ACL // case that would make it public. So we always append the author's contact id to the allowed contacts. @@ -231,7 +231,7 @@ class Photos extends \Friendica\Module\BaseProfile $resource_id = Photo::newResource(); - $preview = Photo::storeWithPreview($image, $this->owner['uid'], $resource_id, $filename, $filesize, $album, '', $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny); + $preview = Photo::storeWithPreview($image, $this->owner['uid'], $resource_id, $filename, $filesize, $album, '', $str_contact_allow, $str_circle_allow, $str_contact_deny, $str_circle_deny); if ($preview < 0) { $this->logger->warning('image store failed'); $this->systemMessages->addNotice($this->t('Image upload failed.')); @@ -267,9 +267,9 @@ class Photos extends \Friendica\Module\BaseProfile $arr['author-avatar'] = $this->owner['thumb']; $arr['title'] = ''; $arr['allow_cid'] = $str_contact_allow; - $arr['allow_gid'] = $str_group_allow; + $arr['allow_gid'] = $str_circle_allow; $arr['deny_cid'] = $str_contact_deny; - $arr['deny_gid'] = $str_group_deny; + $arr['deny_gid'] = $str_circle_deny; $arr['visible'] = $visible; $arr['origin'] = 1; diff --git a/src/Module/Search/Acl.php b/src/Module/Search/Acl.php index 11c3eea79f..4aa8922153 100644 --- a/src/Module/Search/Acl.php +++ b/src/Module/Search/Acl.php @@ -46,13 +46,13 @@ use Psr\Log\LoggerInterface; */ class Acl extends BaseModule { - const TYPE_GLOBAL_CONTACT = 'x'; - const TYPE_MENTION_CONTACT = 'c'; - const TYPE_MENTION_GROUP = 'g'; - const TYPE_MENTION_CONTACT_GROUP = ''; - const TYPE_MENTION_FORUM = 'f'; - const TYPE_PRIVATE_MESSAGE = 'm'; - const TYPE_ANY_CONTACT = 'a'; + const TYPE_GLOBAL_CONTACT = 'x'; + const TYPE_MENTION_CONTACT = 'c'; + const TYPE_MENTION_CIRCLE = 'g'; + const TYPE_MENTION_CONTACT_CIRCLE = ''; + const TYPE_MENTION_FORUM = 'f'; + const TYPE_PRIVATE_MESSAGE = 'm'; + const TYPE_ANY_CONTACT = 'a'; /** @var IHandleUserSessions */ private $session; @@ -73,7 +73,7 @@ class Acl extends BaseModule throw new HTTPException\UnauthorizedException($this->t('You must be logged in to use this module.')); } - $type = $request['type'] ?? self::TYPE_MENTION_CONTACT_GROUP; + $type = $request['type'] ?? self::TYPE_MENTION_CONTACT_CIRCLE; if ($type === self::TYPE_GLOBAL_CONTACT) { $o = $this->globalContactSearch($request); } else { @@ -128,28 +128,28 @@ class Acl extends BaseModule $this->logger->info('ACL {action} - {subaction} - start', ['module' => 'acl', 'action' => 'content', 'subaction' => 'search', 'search' => $search, 'type' => $type, 'conversation' => $conv_id]); - $sql_extra = ''; - $condition = ["`uid` = ? AND NOT `deleted` AND NOT `pending` AND NOT `archive`", $this->session->getLocalUserId()]; - $condition_group = ["`uid` = ? AND NOT `deleted`", $this->session->getLocalUserId()]; + $sql_extra = ''; + $condition = ["`uid` = ? AND NOT `deleted` AND NOT `pending` AND NOT `archive`", $this->session->getLocalUserId()]; + $condition_circle = ["`uid` = ? AND NOT `deleted`", $this->session->getLocalUserId()]; if ($search != '') { - $sql_extra = "AND `name` LIKE '%%" . $this->database->escape($search) . "%%'"; - $condition = DBA::mergeConditions($condition, ["(`attag` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?)", + $sql_extra = "AND `name` LIKE '%%" . $this->database->escape($search) . "%%'"; + $condition = DBA::mergeConditions($condition, ["(`attag` LIKE ? OR `name` LIKE ? OR `nick` LIKE ?)", '%' . $search . '%', '%' . $search . '%', '%' . $search . '%']); - $condition_group = DBA::mergeConditions($condition_group, ["`name` LIKE ?", '%' . $search . '%']); + $condition_circle = DBA::mergeConditions($condition_circle, ["`name` LIKE ?", '%' . $search . '%']); } - // count groups and contacts - $group_count = 0; - if ($type == self::TYPE_MENTION_CONTACT_GROUP || $type == self::TYPE_MENTION_GROUP) { - $group_count = $this->database->count('group', $condition_group); + // count circles and contacts + $circle_count = 0; + if ($type == self::TYPE_MENTION_CONTACT_CIRCLE || $type == self::TYPE_MENTION_CIRCLE) { + $circle_count = $this->database->count('group', $condition_circle); } $networks = Widget::unavailableNetworks(); $condition = DBA::mergeConditions($condition, array_merge(["NOT `network` IN (" . substr(str_repeat("?, ", count($networks)), 0, -2) . ")"], $networks)); switch ($type) { - case self::TYPE_MENTION_CONTACT_GROUP: + case self::TYPE_MENTION_CONTACT_CIRCLE: $condition = DBA::mergeConditions($condition, ["NOT `self` AND NOT `blocked` AND `notify` != ? AND `network` != ?", '', Protocol::OSTATUS ]); @@ -176,52 +176,52 @@ class Acl extends BaseModule $contact_count = $this->database->count('contact', $condition); - $resultTotal = $group_count + $contact_count; + $resultTotal = $circle_count + $contact_count; - $resultGroups = []; + $resultCircles = []; $resultContacts = []; - if ($type == self::TYPE_MENTION_CONTACT_GROUP || $type == self::TYPE_MENTION_GROUP) { + if ($type == self::TYPE_MENTION_CONTACT_CIRCLE || $type == self::TYPE_MENTION_CIRCLE) { /// @todo We should cache this query. // This can be done when we can delete cache entries via wildcard - $groups = $this->database->toArray($this->database->p("SELECT `group`.`id`, `group`.`name`, GROUP_CONCAT(DISTINCT `group_member`.`contact-id` SEPARATOR ',') AS uids - FROM `group` - INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` - WHERE NOT `group`.`deleted` AND `group`.`uid` = ? + $circles = $this->database->toArray($this->database->p("SELECT `circle`.`id`, `circle`.`name`, GROUP_CONCAT(DISTINCT `circle_member`.`contact-id` SEPARATOR ',') AS uids + FROM `group` AS `circle` + INNER JOIN `group_member` AS `circle_member` ON `circle_member`.`gid` = `circle`.`id` + WHERE NOT `circle`.`deleted` AND `circle`.`uid` = ? $sql_extra - GROUP BY `group`.`name`, `group`.`id` - ORDER BY `group`.`name` + GROUP BY `circle`.`name`, `circle`.`id` + ORDER BY `circle`.`name` LIMIT ?, ?", $this->session->getLocalUserId(), $start, $count )); - foreach ($groups as $group) { - $resultGroups[] = [ - 'type' => 'g', + foreach ($circles as $circle) { + $resultCircles[] = [ + 'type' => self::TYPE_MENTION_CIRCLE, 'photo' => 'images/twopeople.png', - 'name' => htmlspecialchars($group['name']), - 'id' => intval($group['id']), - 'uids' => array_map('intval', explode(',', $group['uids'])), + 'name' => htmlspecialchars($circle['name']), + 'id' => intval($circle['id']), + 'uids' => array_map('intval', explode(',', $circle['uids'])), 'link' => '', 'forum' => '0' ]; } - if ((count($resultGroups) > 0) && ($search == '')) { - $resultGroups[] = ['separator' => true]; + if ((count($resultCircles) > 0) && ($search == '')) { + $resultCircles[] = ['separator' => true]; } } $contacts = []; - if ($type != self::TYPE_MENTION_GROUP) { + if ($type != self::TYPE_MENTION_CIRCLE) { $contacts = Contact::selectToArray([], $condition, ['order' => ['name']]); } $forums = []; foreach ($contacts as $contact) { $entry = [ - 'type' => 'c', + 'type' => self::TYPE_MENTION_CONTACT, 'photo' => Contact::getMicro($contact, true), 'name' => htmlspecialchars($contact['name']), 'id' => intval($contact['id']), @@ -246,7 +246,7 @@ class Acl extends BaseModule $resultContacts = array_merge($forums, $resultContacts); } - $resultItems = array_merge($resultGroups, $resultContacts); + $resultItems = array_merge($resultCircles, $resultContacts); if ($conv_id) { // In multithreaded posts the conv_id is not the parent of the whole thread @@ -277,7 +277,7 @@ class Acl extends BaseModule $contact = Contact::getByURL($author, false, ['micro', 'name', 'id', 'network', 'nick', 'addr', 'url', 'forum', 'avatar']); if ($contact) { $unknown_contacts[] = [ - 'type' => 'c', + 'type' => self::TYPE_MENTION_CONTACT, 'photo' => Contact::getMicro($contact, true), 'name' => htmlspecialchars($contact['name']), 'id' => intval($contact['id']), @@ -298,7 +298,7 @@ class Acl extends BaseModule 'tot' => $resultTotal, 'start' => $start, 'count' => $count, - 'groups' => $resultGroups, + 'circles' => $resultCircles, 'contacts' => $resultContacts, 'items' => $resultItems, 'type' => $type, diff --git a/src/Module/Settings/Account.php b/src/Module/Settings/Account.php index cba12cc395..c2b227c859 100644 --- a/src/Module/Settings/Account.php +++ b/src/Module/Settings/Account.php @@ -29,7 +29,7 @@ use Friendica\Core\Search; use Friendica\Core\Worker; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\Notification; use Friendica\Model\Post\UserNotification; use Friendica\Model\Profile; @@ -162,23 +162,23 @@ class Account extends BaseSettings $blocktags = empty($request['blocktags']); // this setting is inverted! $unkmail = !empty($request['unkmail']); $cntunkmail = intval($request['cntunkmail'] ?? 0); - $def_gid = intval($request['group-selection'] ?? 0); + $def_gid = intval($request['circle-selection'] ?? 0); $aclFormatter = DI::aclFormatter(); - $str_group_allow = !empty($request['group_allow']) ? $aclFormatter->toString($request['group_allow']) : ''; $str_contact_allow = !empty($request['contact_allow']) ? $aclFormatter->toString($request['contact_allow']) : ''; - $str_group_deny = !empty($request['group_deny']) ? $aclFormatter->toString($request['group_deny']) : ''; - $str_contact_deny = !empty($request['contact_deny']) ? $aclFormatter->toString($request['contact_deny']) : ''; + $str_circle_allow = !empty($request['circle_allow']) ? $aclFormatter->toString($request['circle_allow']) : ''; + $str_contact_deny = !empty($request['contact_deny']) ? $aclFormatter->toString($request['contact_deny']) : ''; + $str_circle_deny = !empty($request['circle_deny']) ? $aclFormatter->toString($request['circle_deny']) : ''; DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'unlisted', !empty($request['unlisted'])); DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'system', 'accessible-photos', !empty($request['accessible-photos'])); $fields = [ 'allow_cid' => $str_contact_allow, - 'allow_gid' => $str_group_allow, + 'allow_gid' => $str_circle_allow, 'deny_cid' => $str_contact_deny, - 'deny_gid' => $str_group_deny, + 'deny_gid' => $str_circle_deny, 'maxreq' => $maxreq, 'def_gid' => $def_gid, 'blockwall' => $blockwall, @@ -329,7 +329,7 @@ class Account extends BaseSettings $fields = [ 'allow_cid' => '', 'allow_gid' => $page_flags == User::PAGE_FLAGS_PRVGROUP ? - '<' . Group::FOLLOWERS . '>' + '<' . Circle::FOLLOWERS . '>' : '', 'deny_cid' => '', 'deny_gid' => '', @@ -592,7 +592,7 @@ class Account extends BaseSettings '$blocktags' => ['blocktags', DI::l10n()->t('Allow friends to tag your posts?'), (intval($user['blocktags']) ? '0' : '1'), DI::l10n()->t('Your contacts can add additional tags to your posts.')], '$unkmail' => ['unkmail', DI::l10n()->t('Permit unknown people to send you private mail?'), $unkmail, DI::l10n()->t('Friendica network users may send you private messages even if they are not in your contact list.')], '$cntunkmail' => ['cntunkmail', DI::l10n()->t('Maximum private messages per day from unknown people:'), $cntunkmail, DI::l10n()->t("(to prevent spam abuse)")], - '$group_select' => Group::displayGroupSelection(DI::userSession()->getLocalUserId(), $user['def_gid']), + '$circle_select' => Circle::getSelectorHTML(DI::userSession()->getLocalUserId(), $user['def_gid']), '$permissions' => DI::l10n()->t('Default Post Permissions'), '$aclselect' => ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId()), diff --git a/src/Module/Settings/Profile/Index.php b/src/Module/Settings/Profile/Index.php index 4e3967ec1b..c8b27e394a 100644 --- a/src/Module/Settings/Profile/Index.php +++ b/src/Module/Settings/Profile/Index.php @@ -260,7 +260,7 @@ class Index extends BaseSettings

You can use BBCodes in the field values.

Reorder by dragging the field title.

Empty the label field to remove a custom field.

-

Non-public fields can only be seen by the selected Friendica contacts or the Friendica contacts in the selected groups.

", +

Non-public fields can only be seen by the selected Friendica contacts or the Friendica contacts in the selected circles.

", 'profile/' . $profile['nickname'] . '/profile' ), '$custom_fields' => $custom_fields, @@ -284,9 +284,9 @@ class Index extends BaseSettings $permissionSet = DI::permissionSet()->selectOrCreate(DI::permissionSetFactory()->createFromString( $uid, DI::aclFormatter()->toString($profileFieldInputs['new']['contact_allow'] ?? ''), - DI::aclFormatter()->toString($profileFieldInputs['new']['group_allow'] ?? ''), + DI::aclFormatter()->toString($profileFieldInputs['new']['circle_allow'] ?? ''), DI::aclFormatter()->toString($profileFieldInputs['new']['contact_deny'] ?? ''), - DI::aclFormatter()->toString($profileFieldInputs['new']['group_deny'] ?? '') + DI::aclFormatter()->toString($profileFieldInputs['new']['circle_deny'] ?? '') )); $profileFields->append(DI::profileFieldFactory()->createFromValues( @@ -305,9 +305,9 @@ class Index extends BaseSettings $permissionSet = DI::permissionSet()->selectOrCreate(DI::permissionSetFactory()->createFromString( $uid, DI::aclFormatter()->toString($profileFieldInput['contact_allow'] ?? ''), - DI::aclFormatter()->toString($profileFieldInput['group_allow'] ?? ''), + DI::aclFormatter()->toString($profileFieldInput['circle_allow'] ?? ''), DI::aclFormatter()->toString($profileFieldInput['contact_deny'] ?? ''), - DI::aclFormatter()->toString($profileFieldInput['group_deny'] ?? '') + DI::aclFormatter()->toString($profileFieldInput['circle_deny'] ?? '') )); $profileFields->append(DI::profileFieldFactory()->createFromValues( diff --git a/src/Module/Settings/UserExport.php b/src/Module/Settings/UserExport.php index 1eecea3f99..7ff08d97b7 100644 --- a/src/Module/Settings/UserExport.php +++ b/src/Module/Settings/UserExport.php @@ -263,12 +263,12 @@ class UserExport extends BaseSettings sprintf("SELECT * FROM `pconfig` WHERE uid = %d", $user_id) ); - $group = $this->exportMultiRow( + $circle = $this->exportMultiRow( sprintf("SELECT * FROM `group` WHERE uid = %d", $user_id) ); - $group_member = $this->exportMultiRow( - sprintf("SELECT `group_member`.`gid`, `group_member`.`contact-id` FROM `group_member` INNER JOIN `group` ON `group`.`id` = `group_member`.`gid` WHERE `group`.`uid` = %d", $user_id) + $circle_member = $this->exportMultiRow( + sprintf("SELECT `circle_member`.`gid`, `circle_member`.`contact-id` FROM `group_member` AS `circle_member` INNER JOIN `group` AS `circle` ON `circle`.`id` = `circle_member`.`gid` WHERE `circle`.`uid` = %d", $user_id) ); $output = [ @@ -281,8 +281,8 @@ class UserExport extends BaseSettings 'profile_fields' => $profile_fields, 'photo' => $photo, 'pconfig' => $pconfig, - 'group' => $group, - 'group_member' => $group_member, + 'circle' => $circle, + 'circle_member' => $circle_member, ]; echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR); diff --git a/src/Module/Update/Profile.php b/src/Module/Update/Profile.php index 53406e195f..bdbe573204 100644 --- a/src/Module/Update/Profile.php +++ b/src/Module/Update/Profile.php @@ -63,7 +63,7 @@ class Profile extends BaseModule System::htmlUpdateExit($o); } - // Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched his/her groups + // Get permissions SQL - if $remote_contact is true, our remote user has been pre-verified and we already have fetched their circles $sql_extra = Item::getPermissionsSQLByUserId($a->getProfileOwner()); $last_updated_array = DI::session()->get('last_updated', []); diff --git a/src/Module/User/Import.php b/src/Module/User/Import.php index 48dc0660f2..33db88da9a 100644 --- a/src/Module/User/Import.php +++ b/src/Module/User/Import.php @@ -231,6 +231,10 @@ class Import extends \Friendica\BaseModule return; } + // Backward compatibility + $account['circle'] = $account['circle'] ?? $account['group']; + $account['circle_member'] = $account['circle_member'] ?? $account['group_member']; + $oldBaseUrl = $account['baseurl']; $newBaseUrl = (string)$this->baseUrl; @@ -312,35 +316,35 @@ class Import extends \Friendica\BaseModule $this->systemMessages->addNotice($this->tt('%d contact not imported', '%d contacts not imported', $errorCount)); } - array_walk($account['group'], function (&$group) use ($newUid) { - $group['uid'] = $newUid; - if ($this->dbImportAssoc('group', $group) === false) { - $this->logger->warning('Error inserting group', ['name' => $group['name'], 'error' => $this->database->errorMessage()]); + array_walk($account['circle'], function (&$circle) use ($newUid) { + $circle['uid'] = $newUid; + if ($this->dbImportAssoc('group', $circle) === false) { + $this->logger->warning('Error inserting circle', ['name' => $circle['name'], 'error' => $this->database->errorMessage()]); } else { - $group['newid'] = $this->lastInsertId(); + $circle['newid'] = $this->lastInsertId(); } }); - foreach ($account['group_member'] as $group_member) { + foreach ($account['circle_member'] as $circle_member) { $import = 0; - foreach ($account['group'] as $group) { - if ($group['id'] == $group_member['gid'] && isset($group['newid'])) { - $group_member['gid'] = $group['newid']; + foreach ($account['circle'] as $circle) { + if ($circle['id'] == $circle_member['gid'] && isset($circle['newid'])) { + $circle_member['gid'] = $circle['newid']; $import++; break; } } foreach ($account['contact'] as $contact) { - if ($contact['id'] == $group_member['contact-id'] && isset($contact['newid'])) { - $group_member['contact-id'] = $contact['newid']; + if ($contact['id'] == $circle_member['contact-id'] && isset($contact['newid'])) { + $circle_member['contact-id'] = $contact['newid']; $import++; break; } } - if ($import == 2 && $this->dbImportAssoc('group_member', $group_member) === false) { - $this->logger->warning('Error inserting group member', ['gid' => $group_member['id'], 'error' => $this->database->errorMessage()]); + if ($import == 2 && $this->dbImportAssoc('group_member', $circle_member) === false) { + $this->logger->warning('Error inserting circle member', ['gid' => $circle_member['id'], 'error' => $this->database->errorMessage()]); } } diff --git a/src/Module/Welcome.php b/src/Module/Welcome.php index f93a7bd23f..ad35f31e89 100644 --- a/src/Module/Welcome.php +++ b/src/Module/Welcome.php @@ -73,9 +73,9 @@ class Welcome extends BaseModule '$finding_link' => DI::l10n()->t('Finding New People'), '$finding_txt' => DI::l10n()->t('On the side panel of the Contacts page are several tools to find new friends. We can match people by interest, look up people by name or interest, and provide suggestions based on network relationships. On a brand new site, friend suggestions will usually begin to be populated within 24 hours.'), - '$groups' => DI::l10n()->t('Groups'), - '$group_contact_link' => DI::l10n()->t('Group Your Contacts'), - '$group_contact_txt' => DI::l10n()->t('Once you have made some friends, organize them into private conversation groups from the sidebar of your Contacts page and then you can interact with each group privately on your Network page.'), + '$circles' => DI::l10n()->t('Circles'), + '$circle_contact_link' => DI::l10n()->t('Add Your Contacts To Circle'), + '$circle_contact_txt' => DI::l10n()->t('Once you have made some friends, organize them into private conversation circles from the sidebar of your Contacts page and then you can interact with each circle privately on your Network page.'), '$newuser_private' => $newuser_private, '$private_link' => DI::l10n()->t('Why Aren\'t My Posts Public?'), '$private_txt' => DI::l10n()->t('Friendica respects your privacy. By default, your posts will only show up to people you\'ve added as friends. For more information, see the help section from the link above.'), diff --git a/src/Object/Api/Friendica/Group.php b/src/Object/Api/Friendica/Circle.php similarity index 77% rename from src/Object/Api/Friendica/Group.php rename to src/Object/Api/Friendica/Circle.php index ce75f9eec1..5ff1a32cce 100644 --- a/src/Object/Api/Friendica/Group.php +++ b/src/Object/Api/Friendica/Circle.php @@ -23,12 +23,7 @@ namespace Friendica\Object\Api\Friendica; use Friendica\BaseDataTransferObject; -/** - * Class Group - * - * - */ -class Group extends BaseDataTransferObject +class Circle extends BaseDataTransferObject { /** @var string */ protected $name; @@ -42,18 +37,16 @@ class Group extends BaseDataTransferObject protected $mode; /** - * Creates an Group entity array - * - * @param array $group + * @param array $circle Circle row array * @param array $user * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - public function __construct(array $group, array $user) + public function __construct(array $circle, array $user) { - $this->name = $group['name']; - $this->id = $group['id']; - $this->id_str = (string)$group['id']; + $this->name = $circle['name']; + $this->id = $circle['id']; + $this->id_str = (string)$circle['id']; $this->user = $user; - $this->mode = $group['visible'] ? 'public' : 'private'; + $this->mode = $circle['visible'] ? 'public' : 'private'; } } diff --git a/src/Protocol/ActivityPub/ClientToServer.php b/src/Protocol/ActivityPub/ClientToServer.php index ee162382b8..2b52d17b76 100644 --- a/src/Protocol/ActivityPub/ClientToServer.php +++ b/src/Protocol/ActivityPub/ClientToServer.php @@ -28,7 +28,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\APContact; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\User; @@ -284,7 +284,7 @@ class ClientToServer $item['private'] = Item::UNLISTED; } elseif (!empty($object_data['target'][Receiver::TARGET_FOLLOWER])) { $item['allow_cid'] = ''; - $item['allow_gid'] = '<' . Group::FOLLOWERS . '>'; + $item['allow_gid'] = '<' . Circle::FOLLOWERS . '>'; $item['deny_cid'] = ''; $item['deny_gid'] = ''; $item['private'] = Item::PRIVATE; diff --git a/src/Protocol/ActivityPub/Receiver.php b/src/Protocol/ActivityPub/Receiver.php index db4196abc4..cf2485186a 100644 --- a/src/Protocol/ActivityPub/Receiver.php +++ b/src/Protocol/ActivityPub/Receiver.php @@ -1098,7 +1098,7 @@ class Receiver if (!empty($actor)) { $profile = APContact::getByURL($actor); $followers = $profile['followers'] ?? ''; - $is_forum = ($actor['type'] ?? '') == 'Group'; + $is_forum = ($profile['type'] ?? '') == 'Group'; if ($push) { Contact::updateByUrlIfNeeded($actor); } diff --git a/src/Security/PermissionSet/Repository/PermissionSet.php b/src/Security/PermissionSet/Repository/PermissionSet.php index 76cd446c14..58cf6e42f5 100644 --- a/src/Security/PermissionSet/Repository/PermissionSet.php +++ b/src/Security/PermissionSet/Repository/PermissionSet.php @@ -25,7 +25,7 @@ use Exception; use Friendica\BaseRepository; use Friendica\Database\Database; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Network\HTTPException\NotFoundException; use Friendica\Security\PermissionSet\Exception\PermissionSetNotFoundException; use Friendica\Security\PermissionSet\Exception\PermissionSetPersistenceException; @@ -140,29 +140,29 @@ class PermissionSet extends BaseRepository $user_contact_str = ''; } - $groups = []; + $circle_ids = []; if (!empty($user_contact_str) && $this->db->exists('contact', [ 'id' => $cid, 'uid' => $uid, 'blocked' => false ])) { - $groups = Group::getIdsByContactId($cid); + $circle_ids = Circle::getIdsByContactId($cid); } - $group_str = '<<>>'; // should be impossible to match - foreach ($groups as $group_id) { - $group_str .= '|<' . preg_quote($group_id) . '>'; + $circle_str = '<<>>'; // should be impossible to match + foreach ($circle_ids as $circle_id) { + $circle_str .= '|<' . preg_quote($circle_id) . '>'; } if (!empty($user_contact_str)) { $condition = ["`uid` = ? AND (NOT (LOCATE(?, `deny_cid`) OR LOCATE(?, `deny_cid`) OR deny_gid REGEXP ?) AND (LOCATE(?, allow_cid) OR LOCATE(?, allow_cid) OR allow_gid REGEXP ? OR (allow_cid = '' AND allow_gid = '')))", - $uid, $user_contact_str, $public_contact_str, $group_str, - $user_contact_str, $public_contact_str, $group_str]; + $uid, $user_contact_str, $public_contact_str, $circle_str, + $user_contact_str, $public_contact_str, $circle_str]; } else { $condition = ["`uid` = ? AND (NOT (LOCATE(?, `deny_cid`) OR deny_gid REGEXP ?) AND (LOCATE(?, allow_cid) OR allow_gid REGEXP ? OR (allow_cid = '' AND allow_gid = '')))", - $uid, $public_contact_str, $group_str, $public_contact_str, $group_str]; + $uid, $public_contact_str, $circle_str, $public_contact_str, $circle_str]; } return $this->select($condition); diff --git a/src/Security/Security.php b/src/Security/Security.php index bc1d98ac16..0774491d02 100644 --- a/src/Security/Security.php +++ b/src/Security/Security.php @@ -24,7 +24,7 @@ namespace Friendica\Security; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\User; /** @@ -117,17 +117,13 @@ class Security if ($local_user && $local_user == $owner_id) { $sql = ''; /* - * Authenticated visitor. Load the groups the visitor belongs to. + * Authenticated visitor. Load the circles the visitor belongs to. */ } elseif ($remote_contact) { - $gs = '<<>>'; // should be impossible to match + $circleIds = '<<>>'; // should be impossible to match - $groups = Group::getIdsByContactId($remote_contact); - - if (is_array($groups)) { - foreach ($groups as $g) { - $gs .= '|<' . intval($g) . '>'; - } + foreach (Circle::getIdsByContactId($remote_contact) as $circleId) { + $circleIds .= '|<' . intval($circleId) . '>'; } $sql = sprintf( @@ -135,9 +131,9 @@ class Security AND (allow_cid REGEXP '<%d>' OR allow_gid REGEXP '%s' OR (allow_cid = '' AND allow_gid = ''))" . $acc_sql . ") ", intval($remote_contact), - DBA::escape($gs), + DBA::escape($circleIds), intval($remote_contact), - DBA::escape($gs) + DBA::escape($circleIds) ); } return $sql; diff --git a/src/Util/ACLFormatter.php b/src/Util/ACLFormatter.php index 0351b27a64..f7a0894e1c 100644 --- a/src/Util/ACLFormatter.php +++ b/src/Util/ACLFormatter.php @@ -21,7 +21,7 @@ namespace Friendica\Util; -use Friendica\Model\Group; +use Friendica\Model\Circle; /** * Util class for ACL formatting @@ -29,7 +29,7 @@ use Friendica\Model\Group; final class ACLFormatter { /** - * Turn user/group ACLs stored as angle bracketed text into arrays + * Turn user/circle ACLs stored as angle bracketed text into arrays * * @param string|null $acl_string A angle-bracketed list of IDs * @@ -44,7 +44,7 @@ final class ACLFormatter // turn string array of angle-bracketed elements into numeric array // e.g. "<1><2><3>" => array(1,2,3); - preg_match_all('/<(' . Group::FOLLOWERS . '|'. Group::MUTUALS . '|[0-9]+)>/', $acl_string, $matches, PREG_PATTERN_ORDER); + preg_match_all('/<(' . Circle::FOLLOWERS . '|'. Circle::MUTUALS . '|[0-9]+)>/', $acl_string, $matches, PREG_PATTERN_ORDER); return $matches[1]; } @@ -86,7 +86,7 @@ final class ACLFormatter if (intval($item)) { $item = '<' . intval($item) . '>'; // The item is a allowed ACL character - } elseif (in_array($item, [Group::FOLLOWERS, Group::MUTUALS])) { + } elseif (in_array($item, [Circle::FOLLOWERS, Circle::MUTUALS])) { $item = '<' . $item . '>'; // The item is already a ACL string } elseif (preg_match('/<\d+?>/', $item)) { diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 7c78896f39..6eb653dec1 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -29,7 +29,7 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Conversation; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Model\GServer; use Friendica\Model\Item; use Friendica\Model\Post; @@ -340,9 +340,9 @@ class Notifier $aclFormatter = DI::aclFormatter(); $allow_people = $aclFormatter->expand($parent['allow_cid']); - $allow_groups = Group::expand($uid, $aclFormatter->expand($parent['allow_gid']),true); + $allow_circles = Circle::expand($uid, $aclFormatter->expand($parent['allow_gid']),true); $deny_people = $aclFormatter->expand($parent['deny_cid']); - $deny_groups = Group::expand($uid, $aclFormatter->expand($parent['deny_gid'])); + $deny_circles = Circle::expand($uid, $aclFormatter->expand($parent['deny_gid'])); foreach ($items as $item) { $recipients[] = $item['contact-id']; @@ -363,8 +363,8 @@ class Notifier Logger::notice('Deliver', ['target' => $target_id, 'guid' => $target_item['guid'], 'recipients' => $url_recipients]); } - $recipients = array_unique(array_merge($recipients, $allow_people, $allow_groups)); - $deny = array_unique(array_merge($deny_people, $deny_groups)); + $recipients = array_unique(array_merge($recipients, $allow_people, $allow_circles)); + $deny = array_unique(array_merge($deny_people, $deny_circles)); $recipients = array_diff($recipients, $deny); // If this is a public message and pubmail is set on the parent, include all your email contacts @@ -797,7 +797,7 @@ class Notifier foreach (Tag::getByURIId($target_item['uri-id'], [Tag::MENTION, Tag::EXCLUSIVE_MENTION]) as $tag) { $target_contact = Contact::getByURL(Strings::normaliseLink($tag['url']), null, [], $uid); if ($target_contact && $target_contact['contact-type'] == Contact::TYPE_COMMUNITY && $target_contact['manually-approve']) { - Group::updateMembersForForum($target_contact['id']); + Circle::updateMembersForForum($target_contact['id']); } } @@ -822,7 +822,7 @@ class Notifier } Logger::info('Remote item will be distributed', ['id' => $target_item['id'], 'url' => $target_item['uri'], 'verb' => $target_item['verb']]); - $check_signature = ($target_item['gravity'] == Item::GRAVITY_ACTIVITY); + $check_signature = ($target_item['gravity'] == Item::GRAVITY_ACTIVITY); } else { Logger::info('Remote activity will not be distributed', ['id' => $target_item['id'], 'url' => $target_item['uri'], 'verb' => $target_item['verb']]); return ['count' => 0, 'contacts' => []]; diff --git a/static/dbstructure.config.php b/static/dbstructure.config.php index ffb66d9701..4c4e3cdbe7 100644 --- a/static/dbstructure.config.php +++ b/static/dbstructure.config.php @@ -311,9 +311,9 @@ return [ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner id of this permission set"], "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"], - "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"], + "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed circles"], "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"], - "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"], + "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied circles"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -513,9 +513,9 @@ return [ "created" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "creation time"], "edited" => ["type" => "datetime", "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "last edit time"], "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>"], - "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"], + "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed circles"], "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"], - "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"], + "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied circles"], "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"], "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"], ], @@ -715,9 +715,9 @@ return [ "nofinish" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "if event does have no end this is 1"], "ignore" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "0 or 1"], "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"], - "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"], + "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed circles"], "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"], - "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"], + "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied circles"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -760,14 +760,14 @@ return [ ] ], "group" => [ - "comment" => "privacy groups, group info", + "comment" => "privacy circles, circle info", "fields" => [ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], "uid" => ["type" => "mediumint unsigned", "not null" => "1", "default" => "0", "foreign" => ["user" => "uid"], "comment" => "Owner User id"], "visible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the member list is not private"], - "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the group has been deleted"], + "deleted" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "1 indicates the circle has been deleted"], "cid" => ["type" => "int unsigned", "foreign" => ["contact" => "id"], "comment" => "Contact id of forum. When this field is filled then the members are synced automatically."], - "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of group"], + "name" => ["type" => "varchar(255)", "not null" => "1", "default" => "", "comment" => "human readable name of circle"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -776,11 +776,11 @@ return [ ] ], "group_member" => [ - "comment" => "privacy groups, member info", + "comment" => "privacy circles, member info", "fields" => [ "id" => ["type" => "int unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1", "comment" => "sequential ID"], - "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "groups.id of the associated group"], - "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated group"], + "gid" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["group" => "id"], "comment" => "group.id of the associated circle"], + "contact-id" => ["type" => "int unsigned", "not null" => "1", "default" => "0", "foreign" => ["contact" => "id"], "comment" => "contact.id of the member assigned to the associated circle"], ], "indexes" => [ "PRIMARY" => ["id"], @@ -1150,9 +1150,9 @@ return [ "scale" => ["type" => "tinyint unsigned", "not null" => "1", "default" => "0", "comment" => ""], "profile" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => ""], "allow_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed contact.id '<19><78>'"], - "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed groups"], + "allow_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of allowed circles"], "deny_cid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied contact.id"], - "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied groups"], + "deny_gid" => ["type" => "mediumtext", "comment" => "Access Control - list of denied circles"], "accessible" => ["type" => "boolean", "not null" => "1", "default" => "0", "comment" => "Make photo publicly accessible, ignoring permissions"], "backend-class" => ["type" => "tinytext", "comment" => "Storage backend class"], "backend-ref" => ["type" => "text", "comment" => "Storage backend data reference"], diff --git a/static/defaults.config.php b/static/defaults.config.php index d0b8262ac7..6a0a619a35 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -310,10 +310,10 @@ return [ // Number of "free" searches when system => permit_crawling is enabled. 'free_crawls' => 10, - // groupedit_image_limit (Integer) - // Number of contacts at which the group editor should switch from display the profile pictures of the contacts to only display the names. + // circle_edit_image_limit (Integer) + // Number of contacts at which the circle editor should switch from display the profile pictures of the contacts to only display the names. // This can alternatively be set on a per-account basis in the pconfig table. - 'groupedit_image_limit' => 400, + 'circle_edit_image_limit' => 400, // gserver_update_limit (Integer) // How many servers should be checked at a time? diff --git a/static/routes.config.php b/static/routes.config.php index 0ff13224c6..8b4b1a9674 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -89,12 +89,20 @@ $apiRoutes = [ '/direct_messages_setseen[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\DirectMessages\Setseen::class, [ R::POST]], '/direct_messages_search[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\DirectMessages\Search ::class, [R::GET ]], '/events[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Events\Index::class, [R::GET ]], - '/event_create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Events\Create::class, [ R::POST]], - '/event_delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Events\Delete::class, [ R::POST]], - '/group_show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Group\Show::class, [R::GET ]], - '/group_create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Group\Create::class, [ R::POST]], - '/group_delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Group\Delete::class, [ R::POST]], - '/group_update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Group\Update::class, [ R::POST]], + '/event_create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Events\Create::class, [ R::POST]], + '/event_delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Events\Delete::class, [ R::POST]], + '/circle_show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Circle\Show::class, [R::GET ]], + '/circle_create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Circle\Create::class, [ R::POST]], + '/circle_delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Circle\Delete::class, [ R::POST]], + '/circle_update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Circle\Update::class, [ R::POST]], + + // Backward compatibility + // @deprecated + '/group_show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Circle\Show::class, [R::GET ]], + '/group_create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Circle\Create::class, [ R::POST]], + '/group_delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Circle\Delete::class, [ R::POST]], + '/group_update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Circle\Update::class, [ R::POST]], + '/profile/show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Profile\Show::class, [R::GET ]], '/photoalbums[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Photoalbum\Index::class, [R::GET ]], '/photoalbum[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Photoalbum\Show::class, [R::GET ]], @@ -446,14 +454,14 @@ return [ '/fsuggest/{contact:\d+}' => [Module\FriendSuggest::class, [R::GET, R::POST]], - '/group' => [ - '[/]' => [Module\Group::class, [R::GET, R::POST]], - '/{group:\d+}' => [Module\Group::class, [R::GET, R::POST]], - '/none' => [Module\Group::class, [R::GET, R::POST]], - '/new' => [Module\Group::class, [R::GET, R::POST]], - '/drop/{group:\d+}' => [Module\Group::class, [R::GET, R::POST]], - '/{group:\d+}/{contact:\d+}' => [Module\Group::class, [R::GET, R::POST]], - '/{group:\d+}/{command:add|remove}/{contact:\d+}' => [Module\Group::class, [R::GET, R::POST]], + '/circle' => [ + '[/]' => [Module\Circle::class, [R::GET, R::POST]], + '/{circle:\d+}' => [Module\Circle::class, [R::GET, R::POST]], + '/none' => [Module\Circle::class, [R::GET, R::POST]], + '/new' => [Module\Circle::class, [R::GET, R::POST]], + '/drop/{circle:\d+}' => [Module\Circle::class, [R::GET, R::POST]], + '/{circle:\d+}/{contact:\d+}' => [Module\Circle::class, [R::GET, R::POST]], + '/{circle:\d+}/{command:add|remove}/{contact:\d+}' => [Module\Circle::class, [R::GET, R::POST]], ], '/hashtag' => [Module\Hashtag::class, [R::GET]], '/help[/{doc:.+}]' => [Module\Help::class, [R::GET]], @@ -511,7 +519,7 @@ return [ '/newmember' => [Module\Welcome::class, [R::GET]], '/nodeinfo/1.0' => [Module\NodeInfo110::class, [R::GET]], '/nodeinfo/2.0' => [Module\NodeInfo120::class, [R::GET]], - '/nogroup' => [Module\Group::class, [R::GET]], + '/nocircle' => [Module\Circle::class, [R::GET]], '/noscrape' => [ '/{nick}' => [Module\NoScrape::class, [R::GET]], @@ -660,7 +668,7 @@ return [ '[/]' => [Module\Conversation\Network::class, [R::GET]], '/archive/{from:\d\d\d\d-\d\d-\d\d}[/{to:\d\d\d\d-\d\d-\d\d}]' => [Module\Conversation\Network::class, [R::GET]], '/forum/{contact_id:\d+}' => [Module\Conversation\Network::class, [R::GET]], - '/group/{group_id:\d+}' => [Module\Conversation\Network::class, [R::GET]], + '/circle/{circle_id:\d+}' => [Module\Conversation\Network::class, [R::GET]], ], '/randprof' => [Module\RandomProfile::class, [R::GET]], @@ -680,7 +688,7 @@ return [ '[/]' => [Module\Update\Network::class, [R::GET]], '/archive/{from:\d\d\d\d-\d\d-\d\d}[/{to:\d\d\d\d-\d\d-\d\d}]' => [Module\Update\Network::class, [R::GET]], '/forum/{contact_id:\d+}' => [Module\Update\Network::class, [R::GET]], - '/group/{group_id:\d+}' => [Module\Update\Network::class, [R::GET]], + '/circle/{circle_id:\d+}' => [Module\Update\Network::class, [R::GET]], ], '/update_profile' => [Module\Update\Profile::class, [R::GET]], diff --git a/static/settings.config.php b/static/settings.config.php index e17fa04424..47d1a51500 100644 --- a/static/settings.config.php +++ b/static/settings.config.php @@ -114,9 +114,9 @@ return [ // Default value comprises classic role names from RFC 2142. 'forbidden_nicknames' => 'info, marketing, sales, support, abuse, noc, security, postmaster, hostmaster, usenet, news, webmaster, www, uucp, ftp, root, sysop', - // compute_group_counts (Boolean) - // Compute contact group level when counting unseen network posts. - 'compute_group_counts' => true, + // compute_circle_counts (Boolean) + // Compute contact circle level when counting unseen network posts. + 'compute_circle_counts' => true, // jpeg_quality (Integer) // Sets the ImageMagick quality level for JPEG images. Values ranges from 50 (awful) to 100 (near perfect). diff --git a/tests/src/Util/ACLFormatterTest.php b/tests/src/Util/ACLFormatterTest.php index afbf435d85..93e1767dc5 100644 --- a/tests/src/Util/ACLFormatterTest.php +++ b/tests/src/Util/ACLFormatterTest.php @@ -21,7 +21,7 @@ namespace Friendica\Test\src\Util; -use Friendica\Model\Group; +use Friendica\Model\Circle; use Friendica\Util\ACLFormatter; use PHPUnit\Framework\TestCase; @@ -56,8 +56,8 @@ class ACLFormatterTest extends TestCase { return [ 'normal' => [ - 'input' => '<1><2><3><' . Group::FOLLOWERS . '><' . Group::MUTUALS . '>', - 'assert' => ['1', '2', '3', Group::FOLLOWERS, Group::MUTUALS], + 'input' => '<1><2><3><' . Circle::FOLLOWERS . '><' . Circle::MUTUALS . '>', + 'assert' => ['1', '2', '3', Circle::FOLLOWERS, Circle::MUTUALS], ], 'nigNumber' => [ 'input' => '<1><' . PHP_INT_MAX . '><15>', @@ -128,12 +128,12 @@ class ACLFormatterTest extends TestCase $aclFormatter = new ACLFormatter(); $allow_people = $aclFormatter->expand(); - $allow_groups = $aclFormatter->expand(); + $allow_circles = $aclFormatter->expand(); self::assertEmpty($aclFormatter->expand(null)); self::assertEmpty($aclFormatter->expand()); - $recipients = array_unique(array_merge($allow_people, $allow_groups)); + $recipients = array_unique(array_merge($allow_people, $allow_circles)); self::assertEmpty($recipients); } @@ -165,13 +165,13 @@ class ACLFormatterTest extends TestCase 'input' => ["<40195>"], 'assert' => "<40195>", ], - Group::FOLLOWERS => [ - 'input' => [Group::FOLLOWERS, 1], - 'assert' => '<' . Group::FOLLOWERS . '><1>', + Circle::FOLLOWERS => [ + 'input' => [Circle::FOLLOWERS, 1], + 'assert' => '<' . Circle::FOLLOWERS . '><1>', ], - Group::MUTUALS => [ - 'input' => [Group::MUTUALS, 1], - 'assert' => '<' . Group::MUTUALS . '><1>', + Circle::MUTUALS => [ + 'input' => [Circle::MUTUALS, 1], + 'assert' => '<' . Circle::MUTUALS . '><1>', ], 'wrong-angle-brackets' => [ 'input' => ["","<123>"], diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 7d5bd0656c..6d4e88382e 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -24,7 +24,7 @@ function contact_search(term, callback, backend_url, type, mode) { for(var t in contact_search.cache[bt]) { if(lterm.indexOf(t) >= 0) { // A more broad search has been performed already, so use those results // Filter old results locally - var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || (typeof x.nick !== 'undefined' && x.nick.toLowerCase().indexOf(lterm) >= 0)); }); // Need to check that nick exists because groups don't have one + var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || (typeof x.nick !== 'undefined' && x.nick.toLowerCase().indexOf(lterm) >= 0)); }); // Need to check that nick exists because circles don't have one matching.unshift({forum:false, text: term, replace: term}); setTimeout(function() { callback(matching); } , 1); // Use "pseudo-thread" to avoid some problems return; diff --git a/view/js/main.js b/view/js/main.js index a1446bca5b..a761f44fc8 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -289,11 +289,11 @@ $(function() { $('#mail-update-li').html(mail); - $(".sidebar-group-li .notify").removeClass("show"); - $(data.groups).each(function(key, group) { - var gid = group.id; - var gcount = group.count; - $(".group-"+gid+" .notify").addClass("show").text(gcount); + $(".sidebar-circle-li .notify").removeClass("show"); + $(data.circles).each(function(key, circle) { + var gid = circle.id; + var gcount = circle.count; + $(".circle-"+gid+" .notify").addClass("show").text(gcount); }); $(".forum-widget-entry .notify").removeClass("show"); @@ -946,21 +946,21 @@ function bin2hex(s) { return a.join(''); } -function groupChangeMember(gid, cid, sec_token) { +function circleChangeMember(gid, cid, sec_token) { $('body .fakelink').css('cursor', 'wait'); - $.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) { - $('#group-update-wrapper').html(data); + $.get('circle/' + gid + '/' + cid + "?t=" + sec_token, function(data) { + $('#circle-update-wrapper').html(data); $('body .fakelink').css('cursor', 'auto'); }); } -function contactgroupChangeMember(checkbox, gid, cid) { +function contactCircleChangeMember(checkbox, gid, cid) { let url; // checkbox.checked is the checkbox state after the click if (checkbox.checked) { - url = 'group/' + gid + '/add/' + cid; + url = 'circle/' + gid + '/add/' + cid; } else { - url = 'group/' + gid + '/remove/' + cid; + url = 'circle/' + gid + '/remove/' + cid; } $('body').css('cursor', 'wait'); $.post(url) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index c2a59b1d4f..f0a7801b1b 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2023.09-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-05-26 07:34+0000\n" +"POT-Creation-Date: 2023-05-27 17:32-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,14 +50,14 @@ msgstr "" #: src/Module/BaseNotifications.php:98 src/Module/BaseSettings.php:52 #: src/Module/Calendar/Event/API.php:88 src/Module/Calendar/Event/Form.php:84 #: src/Module/Calendar/Export.php:82 src/Module/Calendar/Show.php:82 +#: src/Module/Circle.php:40 src/Module/Circle.php:83 #: src/Module/Contact/Advanced.php:60 src/Module/Contact/Follow.php:87 #: src/Module/Contact/Follow.php:160 src/Module/Contact/MatchInterests.php:86 #: src/Module/Contact/Suggestions.php:54 src/Module/Contact/Unfollow.php:66 #: src/Module/Contact/Unfollow.php:80 src/Module/Contact/Unfollow.php:112 #: src/Module/Delegation.php:118 src/Module/FollowConfirm.php:38 -#: src/Module/FriendSuggest.php:57 src/Module/Group.php:40 -#: src/Module/Group.php:83 src/Module/Invite.php:42 src/Module/Invite.php:131 -#: src/Module/Notifications/Notification.php:76 +#: src/Module/FriendSuggest.php:57 src/Module/Invite.php:42 +#: src/Module/Invite.php:131 src/Module/Notifications/Notification.php:76 #: src/Module/Notifications/Notification.php:107 #: src/Module/OStatus/Repair.php:60 src/Module/OStatus/Subscribe.php:66 #: src/Module/Post/Edit.php:76 src/Module/Profile/Common.php:75 @@ -2017,39 +2017,39 @@ msgstr "" msgid "last" msgstr "" -#: src/Content/Text/BBCode.php:713 src/Content/Text/BBCode.php:1619 -#: src/Content/Text/BBCode.php:1620 +#: src/Content/Text/BBCode.php:694 src/Content/Text/BBCode.php:1600 +#: src/Content/Text/BBCode.php:1601 msgid "Image/photo" msgstr "" -#: src/Content/Text/BBCode.php:931 +#: src/Content/Text/BBCode.php:912 #, php-format msgid "" "%2$s %3$s" msgstr "" -#: src/Content/Text/BBCode.php:956 src/Model/Item.php:3649 +#: src/Content/Text/BBCode.php:937 src/Model/Item.php:3649 #: src/Model/Item.php:3655 src/Model/Item.php:3656 msgid "Link to source" msgstr "" -#: src/Content/Text/BBCode.php:1526 src/Content/Text/HTML.php:901 +#: src/Content/Text/BBCode.php:1507 src/Content/Text/HTML.php:901 msgid "Click to open/close" msgstr "" -#: src/Content/Text/BBCode.php:1559 +#: src/Content/Text/BBCode.php:1540 msgid "$1 wrote:" msgstr "" -#: src/Content/Text/BBCode.php:1624 src/Content/Text/BBCode.php:1625 +#: src/Content/Text/BBCode.php:1605 src/Content/Text/BBCode.php:1606 msgid "Encrypted content" msgstr "" -#: src/Content/Text/BBCode.php:1889 +#: src/Content/Text/BBCode.php:1870 msgid "Invalid source protocol" msgstr "" -#: src/Content/Text/BBCode.php:1908 +#: src/Content/Text/BBCode.php:1889 msgid "Invalid link protocol" msgstr "" @@ -2132,9 +2132,9 @@ msgstr "" msgid "Local Directory" msgstr "" -#: src/Content/Widget.php:219 src/Model/Group.php:596 +#: src/Content/Widget.php:219 src/Model/Circle.php:596 #: src/Module/Contact.php:394 src/Module/Welcome.php:76 -msgid "Groups" +msgid "Circles" msgstr "" #: src/Content/Widget.php:221 @@ -2145,8 +2145,8 @@ msgstr "" msgid "Relationships" msgstr "" -#: src/Content/Widget.php:252 src/Module/Contact.php:338 -#: src/Module/Group.php:291 +#: src/Content/Widget.php:252 src/Module/Circle.php:293 +#: src/Module/Contact.php:338 msgid "All Contacts" msgstr "" @@ -2313,8 +2313,8 @@ msgstr "" #: src/Core/ACL.php:324 msgid "" -"Start typing the name of a contact or a group to show a filtered list. You " -"can also mention the special groups \"Followers\" and \"Mutuals\"." +"Start typing the name of a contact or a circle to show a filtered list. You " +"can also mention the special circles \"Followers\" and \"Mutuals\"." msgstr "" #: src/Core/ACL.php:325 @@ -2974,6 +2974,50 @@ msgstr "" msgid "Legacy module file not found: %s" msgstr "" +#: src/Model/Circle.php:105 +msgid "" +"A deleted circle with this name was revived. Existing item permissions " +"may apply to this circle and any future members. If this is " +"not what you intended, please create another circle with a different name." +msgstr "" + +#: src/Model/Circle.php:512 +msgid "Default privacy circle for new contacts" +msgstr "" + +#: src/Model/Circle.php:544 +msgid "Everybody" +msgstr "" + +#: src/Model/Circle.php:563 +msgid "edit" +msgstr "" + +#: src/Model/Circle.php:595 +msgid "add" +msgstr "" + +#: src/Model/Circle.php:600 +msgid "Edit circle" +msgstr "" + +#: src/Model/Circle.php:601 src/Module/Circle.php:194 +msgid "Contacts not in any circle" +msgstr "" + +#: src/Model/Circle.php:603 +msgid "Create a new circle" +msgstr "" + +#: src/Model/Circle.php:604 src/Module/Circle.php:179 src/Module/Circle.php:202 +#: src/Module/Circle.php:277 +msgid "Circle Name: " +msgstr "" + +#: src/Model/Circle.php:605 +msgid "Edit circles" +msgstr "" + #: src/Model/Contact.php:1212 src/Module/Moderation/Users/Pending.php:102 #: src/Module/Notifications/Introductions.php:132 #: src/Module/Notifications/Introductions.php:204 @@ -3154,50 +3198,6 @@ msgstr "" msgid "Happy Birthday %s" msgstr "" -#: src/Model/Group.php:105 -msgid "" -"A deleted group with this name was revived. Existing item permissions " -"may apply to this group and any future members. If this is " -"not what you intended, please create another group with a different name." -msgstr "" - -#: src/Model/Group.php:512 -msgid "Default privacy group for new contacts" -msgstr "" - -#: src/Model/Group.php:544 -msgid "Everybody" -msgstr "" - -#: src/Model/Group.php:563 -msgid "edit" -msgstr "" - -#: src/Model/Group.php:595 -msgid "add" -msgstr "" - -#: src/Model/Group.php:600 -msgid "Edit group" -msgstr "" - -#: src/Model/Group.php:601 src/Module/Group.php:192 -msgid "Contacts not in any group" -msgstr "" - -#: src/Model/Group.php:603 -msgid "Create a new group" -msgstr "" - -#: src/Model/Group.php:604 src/Module/Group.php:177 src/Module/Group.php:200 -#: src/Module/Group.php:275 -msgid "Group Name: " -msgstr "" - -#: src/Model/Group.php:605 -msgid "Edit groups" -msgstr "" - #: src/Model/Item.php:2023 #, php-format msgid "Detected languages in this post:\\n%s" @@ -3560,7 +3560,7 @@ msgstr "" #: src/Model/User.php:1197 msgid "" -"An error occurred creating your default contact group. Please try again." +"An error occurred creating your default contact circle. Please try again." msgstr "" #: src/Model/User.php:1236 @@ -4543,7 +4543,7 @@ msgstr "" #: src/Module/Admin/Site.php:455 msgid "" "Set default post permissions for all new members to the default privacy " -"group rather than public." +"circle rather than public." msgstr "" #: src/Module/Admin/Site.php:456 @@ -4957,12 +4957,12 @@ msgid "On large systems the text search can slow down the system extremely." msgstr "" #: src/Module/Admin/Site.php:507 -msgid "Generate counts per contact group when calculating network count" +msgid "Generate counts per contact circle when calculating network count" msgstr "" #: src/Module/Admin/Site.php:507 msgid "" -"On systems with users that heavily use contact groups the query can be very " +"On systems with users that heavily use contact circles the query can be very " "expensive." msgstr "" @@ -5724,6 +5724,108 @@ msgstr "" msgid "list" msgstr "" +#: src/Module/Circle.php:56 +msgid "Could not create circle." +msgstr "" + +#: src/Module/Circle.php:67 src/Module/Circle.php:215 src/Module/Circle.php:239 +msgid "Circle not found." +msgstr "" + +#: src/Module/Circle.php:73 +msgid "Circle name was not changed." +msgstr "" + +#: src/Module/Circle.php:91 +msgid "Unknown circle." +msgstr "" + +#: src/Module/Circle.php:97 src/Module/Circle.php:106 +#: src/Module/Contact/Advanced.php:70 src/Module/Contact/Advanced.php:109 +#: src/Module/Contact/Contacts.php:71 src/Module/Contact/Conversations.php:84 +#: src/Module/Contact/Conversations.php:89 +#: src/Module/Contact/Conversations.php:94 src/Module/Contact/Media.php:43 +#: src/Module/Contact/Posts.php:78 src/Module/Contact/Posts.php:83 +#: src/Module/Contact/Posts.php:88 src/Module/Contact/Profile.php:142 +#: src/Module/Contact/Profile.php:147 src/Module/Contact/Profile.php:152 +#: src/Module/Contact/Redir.php:94 src/Module/Contact/Redir.php:140 +#: src/Module/FriendSuggest.php:71 src/Module/FriendSuggest.php:109 +msgid "Contact not found." +msgstr "" + +#: src/Module/Circle.php:101 src/Module/Contact/Contacts.php:66 +#: src/Module/Conversation/Network.php:189 +msgid "Invalid contact." +msgstr "" + +#: src/Module/Circle.php:110 src/Module/Contact/Revoke.php:73 +msgid "Contact is deleted." +msgstr "" + +#: src/Module/Circle.php:116 +msgid "Unable to add the contact to the circle." +msgstr "" + +#: src/Module/Circle.php:119 +msgid "Contact successfully added to circle." +msgstr "" + +#: src/Module/Circle.php:123 +msgid "Unable to remove the contact from the circle." +msgstr "" + +#: src/Module/Circle.php:126 +msgid "Contact successfully removed from circle." +msgstr "" + +#: src/Module/Circle.php:130 +msgid "Bad request." +msgstr "" + +#: src/Module/Circle.php:171 +msgid "Save Circle" +msgstr "" + +#: src/Module/Circle.php:172 +msgid "Filter" +msgstr "" + +#: src/Module/Circle.php:178 +msgid "Create a circle of contacts/friends." +msgstr "" + +#: src/Module/Circle.php:220 +msgid "Unable to remove circle." +msgstr "" + +#: src/Module/Circle.php:271 +msgid "Delete Circle" +msgstr "" + +#: src/Module/Circle.php:281 +msgid "Edit Circle Name" +msgstr "" + +#: src/Module/Circle.php:291 +msgid "Members" +msgstr "" + +#: src/Module/Circle.php:294 +msgid "Circle is empty" +msgstr "" + +#: src/Module/Circle.php:307 +msgid "Remove contact from circle" +msgstr "" + +#: src/Module/Circle.php:328 +msgid "Click on a contact to add or remove." +msgstr "" + +#: src/Module/Circle.php:342 +msgid "Add contact to circle" +msgstr "" + #: src/Module/Contact.php:97 #, php-format msgid "%d contact edited." @@ -5787,7 +5889,7 @@ msgid "Only show hidden contacts" msgstr "" #: src/Module/Contact.php:397 -msgid "Organize your contact groups" +msgid "Organize your contact circles" msgstr "" #: src/Module/Contact.php:430 @@ -5871,19 +5973,6 @@ msgstr "" msgid "Visit %s's profile [%s]" msgstr "" -#: src/Module/Contact/Advanced.php:70 src/Module/Contact/Advanced.php:109 -#: src/Module/Contact/Contacts.php:71 src/Module/Contact/Conversations.php:84 -#: src/Module/Contact/Conversations.php:89 -#: src/Module/Contact/Conversations.php:94 src/Module/Contact/Media.php:43 -#: src/Module/Contact/Posts.php:78 src/Module/Contact/Posts.php:83 -#: src/Module/Contact/Posts.php:88 src/Module/Contact/Profile.php:142 -#: src/Module/Contact/Profile.php:147 src/Module/Contact/Profile.php:152 -#: src/Module/Contact/Redir.php:94 src/Module/Contact/Redir.php:140 -#: src/Module/FriendSuggest.php:71 src/Module/FriendSuggest.php:109 -#: src/Module/Group.php:97 src/Module/Group.php:106 -msgid "Contact not found." -msgstr "" - #: src/Module/Contact/Advanced.php:99 msgid "Contact update failed." msgstr "" @@ -5920,11 +6009,6 @@ msgstr "" msgid "New photo from this URL" msgstr "" -#: src/Module/Contact/Contacts.php:66 src/Module/Conversation/Network.php:189 -#: src/Module/Group.php:101 -msgid "Invalid contact." -msgstr "" - #: src/Module/Contact/Contacts.php:89 msgid "No known contacts." msgstr "" @@ -6319,10 +6403,6 @@ msgstr "" msgid "Unknown contact." msgstr "" -#: src/Module/Contact/Revoke.php:73 src/Module/Group.php:110 -msgid "Contact is deleted." -msgstr "" - #: src/Module/Contact/Revoke.php:77 msgid "Contact is being deleted." msgstr "" @@ -6418,12 +6498,12 @@ msgid "Not available." msgstr "" #: src/Module/Conversation/Network.php:175 -msgid "No such group" +msgid "No such circle" msgstr "" #: src/Module/Conversation/Network.php:179 #, php-format -msgid "Group: %s" +msgid "Circle: %s" msgstr "" #: src/Module/Conversation/Network.php:257 @@ -6865,86 +6945,6 @@ msgid "" "Suggestions, praise, etc. - please email \"info\" at \"friendi - dot - ca" msgstr "" -#: src/Module/Group.php:56 -msgid "Could not create group." -msgstr "" - -#: src/Module/Group.php:67 src/Module/Group.php:213 src/Module/Group.php:237 -msgid "Group not found." -msgstr "" - -#: src/Module/Group.php:73 -msgid "Group name was not changed." -msgstr "" - -#: src/Module/Group.php:91 -msgid "Unknown group." -msgstr "" - -#: src/Module/Group.php:116 -msgid "Unable to add the contact to the group." -msgstr "" - -#: src/Module/Group.php:119 -msgid "Contact successfully added to group." -msgstr "" - -#: src/Module/Group.php:123 -msgid "Unable to remove the contact from the group." -msgstr "" - -#: src/Module/Group.php:126 -msgid "Contact successfully removed from group." -msgstr "" - -#: src/Module/Group.php:130 -msgid "Bad request." -msgstr "" - -#: src/Module/Group.php:169 -msgid "Save Group" -msgstr "" - -#: src/Module/Group.php:170 -msgid "Filter" -msgstr "" - -#: src/Module/Group.php:176 -msgid "Create a group of contacts/friends." -msgstr "" - -#: src/Module/Group.php:218 -msgid "Unable to remove group." -msgstr "" - -#: src/Module/Group.php:269 -msgid "Delete Group" -msgstr "" - -#: src/Module/Group.php:279 -msgid "Edit Group Name" -msgstr "" - -#: src/Module/Group.php:289 -msgid "Members" -msgstr "" - -#: src/Module/Group.php:292 -msgid "Group is empty" -msgstr "" - -#: src/Module/Group.php:305 -msgid "Remove contact from group" -msgstr "" - -#: src/Module/Group.php:326 -msgid "Click on a contact to add or remove." -msgstr "" - -#: src/Module/Group.php:340 -msgid "Add contact to group" -msgstr "" - #: src/Module/HCard.php:45 msgid "No profile" msgstr "" @@ -8350,20 +8350,20 @@ msgstr "" #: src/Module/Profile/Conversations.php:106 #: src/Module/Profile/Conversations.php:109 src/Module/Profile/Profile.php:351 -#: src/Module/Profile/Profile.php:354 src/Protocol/Feed.php:1092 +#: src/Module/Profile/Profile.php:354 src/Protocol/Feed.php:1090 #: src/Protocol/OStatus.php:1007 #, php-format msgid "%s's timeline" msgstr "" #: src/Module/Profile/Conversations.php:107 src/Module/Profile/Profile.php:352 -#: src/Protocol/Feed.php:1096 src/Protocol/OStatus.php:1012 +#: src/Protocol/Feed.php:1094 src/Protocol/OStatus.php:1012 #, php-format msgid "%s's posts" msgstr "" #: src/Module/Profile/Conversations.php:108 src/Module/Profile/Profile.php:353 -#: src/Protocol/Feed.php:1099 src/Protocol/OStatus.php:1016 +#: src/Protocol/Feed.php:1097 src/Protocol/OStatus.php:1016 #, php-format msgid "%s's comments" msgstr "" @@ -10029,7 +10029,7 @@ msgid "" "\t\t\t\t

Reorder by dragging the field title.

\n" "\t\t\t\t

Empty the label field to remove a custom field.

\n" "\t\t\t\t

Non-public fields can only be seen by the selected Friendica " -"contacts or the Friendica contacts in the selected groups.

" +"contacts or the Friendica contacts in the selected circles.

" msgstr "" #: src/Module/Settings/Profile/Photo/Crop.php:107 @@ -10580,22 +10580,22 @@ msgstr "" msgid "User '%s' already exists on this server!" msgstr "" -#: src/Module/User/Import.php:263 +#: src/Module/User/Import.php:267 msgid "User creation error" msgstr "" -#: src/Module/User/Import.php:312 +#: src/Module/User/Import.php:316 #, php-format msgid "%d contact not imported" msgid_plural "%d contacts not imported" msgstr[0] "" msgstr[1] "" -#: src/Module/User/Import.php:361 +#: src/Module/User/Import.php:365 msgid "User profile creation error" msgstr "" -#: src/Module/User/Import.php:412 +#: src/Module/User/Import.php:416 msgid "Done. You can now login with your username and password" msgstr "" @@ -10729,14 +10729,14 @@ msgid "" msgstr "" #: src/Module/Welcome.php:77 -msgid "Group Your Contacts" +msgid "Add Your Contacts To Circle" msgstr "" #: src/Module/Welcome.php:78 msgid "" "Once you have made some friends, organize them into private conversation " -"groups from the sidebar of your Contacts page and then you can interact with " -"each group privately on your Network page." +"circles from the sidebar of your Contacts page and then you can interact " +"with each circle privately on your Network page." msgstr "" #: src/Module/Welcome.php:80 diff --git a/view/templates/acl/full_selector.tpl b/view/templates/acl/full_selector.tpl index a2329614eb..fe8c856f15 100644 --- a/view/templates/acl/full_selector.tpl +++ b/view/templates/acl/full_selector.tpl @@ -41,9 +41,9 @@ {{$custom_title}}
- + - +

{{$custom_desc}}

@@ -75,10 +75,10 @@ $(function() { let $acl_allow_input = $('#acl_allow-{{$input_group_id}}'); let $contact_allow_input = $('[name="{{$input_names.contact_allow}}"]'); - let $group_allow_input = $('[name="{{$input_names.group_allow}}"]'); + let $circle_allow_input = $('[name="{{$input_names.circle_allow}}"]'); let $acl_deny_input = $('#acl_deny-{{$input_group_id}}'); let $contact_deny_input = $('[name="{{$input_names.contact_deny}}"]'); - let $group_deny_input = $('[name="{{$input_names.group_deny}}"]'); + let $circle_deny_input = $('[name="{{$input_names.circle_deny}}"]'); let $visibility_public_panel = $('#visibility-public-panel-{{$input_group_id}}'); let $visibility_custom_panel = $('#visibility-custom-panel-{{$input_group_id}}'); let $visibility_public_radio = $('#visibility-public-{{$input_group_id}}'); @@ -125,8 +125,8 @@ }); // Custom visibility tags inputs - let acl_groups = new Bloodhound({ - local: {{$acl_groups nofilter}}, + let acl_circles = new Bloodhound({ + local: {{$acl_circles nofilter}}, identify: function(obj) { return obj.type + '-' + obj.id.toString(); }, datumTokenizer: Bloodhound.tokenizers.obj.whitespace(['name']), queryTokenizer: Bloodhound.tokenizers.whitespace, @@ -163,7 +163,7 @@ freeInput: false, tagClass: function(item) { switch (item.type) { - case 'group' : return 'label label-primary'; + case 'circle' : return 'label label-primary'; case 'contact' : default: return 'label label-info'; @@ -191,7 +191,7 @@ freeInput: false, tagClass: function(item) { switch (item.type) { - case 'group' : return 'label label-primary'; + case 'circle' : return 'label label-primary'; case 'contact' : default: return 'label label-info'; @@ -215,14 +215,14 @@ // Import existing ACL into the tags input fields. - $group_allow_input.val().split(',').forEach(function (group_id) { - $acl_allow_input.tagsinput('add', acl_groups.get('group-' + group_id)[0]); + $circle_allow_input.val().split(',').forEach(function (circle_id) { + $acl_allow_input.tagsinput('add', acl_circles.get('circle-' + circle_id)[0]); }); $contact_allow_input.val().split(',').forEach(function (contact_id) { $acl_allow_input.tagsinput('add', acl_contacts.get('contact-' + contact_id)[0]); }); - $group_deny_input.val().split(',').forEach(function (group_id) { - $acl_deny_input.tagsinput('add', acl_groups.get('group-' + group_id)[0]); + $circle_deny_input.val().split(',').forEach(function (circle_id) { + $acl_deny_input.tagsinput('add', acl_circles.get('circle-' + circle_id)[0]); }); $contact_deny_input.val().split(',').forEach(function (contact_id) { $acl_deny_input.tagsinput('add', acl_contacts.get('contact-' + contact_id)[0]); @@ -237,11 +237,11 @@ } // Update the real acl field - $group_allow_input.val(''); + $circle_allow_input.val(''); $contact_allow_input.val(''); [].forEach.call($acl_allow_input.tagsinput('items'), function (item) { - if (item.type === 'group') { - $group_allow_input.val($group_allow_input.val() + ',' + item.id); + if (item.type === 'circle') { + $circle_allow_input.val($circle_allow_input.val() + ',' + item.id); } else { $contact_allow_input.val($contact_allow_input.val() + ',' + item.id); } @@ -255,11 +255,11 @@ } // Update the real acl field - $group_deny_input.val(''); + $circle_deny_input.val(''); $contact_deny_input.val(''); [].forEach.call($acl_deny_input.tagsinput('items'), function (item) { - if (item.type === 'group') { - $group_deny_input.val($group_deny_input.val() + ',' + item.id); + if (item.type === 'circle') { + $circle_deny_input.val($circle_deny_input.val() + ',' + item.id); } else { $contact_deny_input.val($contact_deny_input.val() + ',' + item.id); } diff --git a/view/templates/acl/self_only.tpl b/view/templates/acl/self_only.tpl index d1c5a00de8..03ad6a7c32 100644 --- a/view/templates/acl/self_only.tpl +++ b/view/templates/acl/self_only.tpl @@ -1,5 +1,5 @@ - + - - \ No newline at end of file + + diff --git a/view/templates/admin/site.tpl b/view/templates/admin/site.tpl index 3cf0729942..17c3189070 100644 --- a/view/templates/admin/site.tpl +++ b/view/templates/admin/site.tpl @@ -108,7 +108,7 @@

{{$performance}}

- {{include file="field_checkbox.tpl" field=$compute_group_counts}} + {{include file="field_checkbox.tpl" field=$compute_circle_counts}} {{include file="field_checkbox.tpl" field=$only_tag_search}} {{include file="field_input.tpl" field=$max_comments}} {{include file="field_input.tpl" field=$max_display_comments}} diff --git a/view/templates/calendar/calendar_head.tpl b/view/templates/calendar/calendar_head.tpl index b5bf8f6fec..9266cecf7d 100644 --- a/view/templates/calendar/calendar_head.tpl +++ b/view/templates/calendar/calendar_head.tpl @@ -153,9 +153,9 @@ } }).trigger('change'); - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { + $('#contact_allow, #contact_deny, #circle_allow, #circle_deny').change(function() { let selstr; - $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { + $('#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected').each( function() { selstr = $(this).html(); $('#jot-public').hide(); }); diff --git a/view/templates/circle_drop.tpl b/view/templates/circle_drop.tpl new file mode 100644 index 0000000000..e37d1e0e0d --- /dev/null +++ b/view/templates/circle_drop.tpl @@ -0,0 +1,12 @@ + +
+ + +
+
diff --git a/view/templates/circle_edit.tpl b/view/templates/circle_edit.tpl new file mode 100644 index 0000000000..aa7ef8b769 --- /dev/null +++ b/view/templates/circle_edit.tpl @@ -0,0 +1,26 @@ + +

{{$title}}

+ + +{{if $editable == 1}} +
+
+ + + {{include file="field_input.tpl" field=$gname}} + {{if $drop}}{{$drop nofilter}}{{/if}} +
+ +
+
+
+
+{{/if}} + + +{{if $circle_editor}} +
+ {{include file="circle_editor.tpl"}} +
+{{/if}} +{{if $desc}}
{{$desc nofilter}}
{{/if}} diff --git a/view/templates/circle_editor.tpl b/view/templates/circle_editor.tpl new file mode 100644 index 0000000000..4f3a30eea9 --- /dev/null +++ b/view/templates/circle_editor.tpl @@ -0,0 +1,62 @@ + +{{* Template for the contact circle list *}} + +{{if $editable == 1}} +{{* The contacts who are already members of the contact circle *}} +
+

{{$circle_editor.label_members}}

+
+ + {{if $circle_editor.members }} + + {{foreach $circle_editor.members as $c}} + {{* If there are too many contacts we use another view mode *}} + {{if $shortmode}} + + {{else}} + {{* The normal view mode *}} +
+ + {{$c.name}} + +
+ {{/if}} + {{/foreach}} + + {{else}} + {{$circle_editor.circle_is_empty}} + {{/if}} +
+ +
+
+
+{{/if}} + +{{* The contacts who are not members of the contact circle *}} +
+

{{$circle_editor.label_contacts}}

+ +
+
diff --git a/view/templates/circle_selection.tpl b/view/templates/circle_selection.tpl new file mode 100644 index 0000000000..d5a7decf8c --- /dev/null +++ b/view/templates/circle_selection.tpl @@ -0,0 +1,9 @@ + +
+ + +
diff --git a/view/templates/circle_side.tpl b/view/templates/circle_side.tpl new file mode 100644 index 0000000000..c33638130c --- /dev/null +++ b/view/templates/circle_side.tpl @@ -0,0 +1,48 @@ + +

{{$title}}

+
+
+ +

{{$title}}

+
+ + + + {{if $new_circle}} + + {{else}} + + {{/if}} + + {{if $uncircled}}{{/if}} +
+ diff --git a/view/templates/group_drop.tpl b/view/templates/group_drop.tpl deleted file mode 100644 index e28411d036..0000000000 --- a/view/templates/group_drop.tpl +++ /dev/null @@ -1,12 +0,0 @@ - -
- - -
-
diff --git a/view/templates/group_edit.tpl b/view/templates/group_edit.tpl deleted file mode 100644 index 1984dc197a..0000000000 --- a/view/templates/group_edit.tpl +++ /dev/null @@ -1,26 +0,0 @@ - -

{{$title}}

- - -{{if $editable == 1}} -
-
- - - {{include file="field_input.tpl" field=$gname}} - {{if $drop}}{{$drop nofilter}}{{/if}} -
- -
-
-
-
-{{/if}} - - -{{if $groupeditor}} -
- {{include file="groupeditor.tpl"}} -
-{{/if}} -{{if $desc}}
{{$desc nofilter}}
{{/if}} diff --git a/view/templates/group_selection.tpl b/view/templates/group_selection.tpl deleted file mode 100644 index 7d01df7a78..0000000000 --- a/view/templates/group_selection.tpl +++ /dev/null @@ -1,9 +0,0 @@ - -
- - -
diff --git a/view/templates/group_side.tpl b/view/templates/group_side.tpl deleted file mode 100644 index 2aca4cdf45..0000000000 --- a/view/templates/group_side.tpl +++ /dev/null @@ -1,48 +0,0 @@ - -

{{$title}}

-
-
- -

{{$title}}

-
- - - - {{if $newgroup}} - - {{else}} - - {{/if}} - - {{if $ungrouped}}{{/if}} -
- diff --git a/view/templates/groupeditor.tpl b/view/templates/groupeditor.tpl deleted file mode 100644 index 0168a7a2d7..0000000000 --- a/view/templates/groupeditor.tpl +++ /dev/null @@ -1,62 +0,0 @@ - -{{* Template for the contact group list *}} - -{{if $editable == 1}} -{{* The contacts who are already members of the contact group *}} -
-

{{$groupeditor.label_members}}

-
- - {{if $groupeditor.members }} - - {{foreach $groupeditor.members as $c}} - {{* If there are too many contacts we use another view mode *}} - {{if $shortmode}} - - {{else}} - {{* The normal view mode *}} -
- - {{$c.name}} - -
- {{/if}} - {{/foreach}} - - {{else}} - {{$groupeditor.group_is_empty}} - {{/if}} -
- -
-
-
-{{/if}} - -{{* The contacts who are not members of the contact group *}} -
-

{{$groupeditor.label_contacts}}

- -
-
diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index c491a0fcf0..c127e317ee 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -90,14 +90,14 @@ {{if $scheduled_at}}{{$scheduled_at nofilter}}{{/if}} {{if $created_at}}{{$created_at nofilter}}{{/if}} {{else}} - + - + {{/if}}
\ No newline at end of file + dzFactory.setupDropzone('#dropzone-{{$id}}', 'comment-edit-text-{{$id}}'); + diff --git a/view/templates/photos_head.tpl b/view/templates/photos_head.tpl index 1d693e103c..b633ee76d7 100644 --- a/view/templates/photos_head.tpl +++ b/view/templates/photos_head.tpl @@ -7,14 +7,14 @@ $(document).ready(function() { - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { + $('#contact_allow, #contact_deny, #circle_allow, #circle_deny').change(function() { var selstr; - $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { + $('#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected').each( function() { selstr = $(this).html(); $('#jot-perms-icon').removeClass('unlock').addClass('lock'); $('#jot-public').hide(); }); - if(selstr == null) { + if(selstr == null) { $('#jot-perms-icon').removeClass('lock').addClass('unlock'); $('#jot-public').show(); } diff --git a/view/templates/settings/account.tpl b/view/templates/settings/account.tpl index 8e9f80dc39..b13576a965 100644 --- a/view/templates/settings/account.tpl +++ b/view/templates/settings/account.tpl @@ -59,7 +59,7 @@ {{include file="field_checkbox.tpl" field=$unkmail}} {{include file="field_input.tpl" field=$cntunkmail}} - {{$group_select nofilter}} + {{$circle_select nofilter}} {{if not $is_community}}

{{$permissions}}

@@ -194,4 +194,4 @@ - \ No newline at end of file + diff --git a/view/templates/settings/head.tpl b/view/templates/settings/head.tpl index 6d58e54a6c..ff85f2cb97 100644 --- a/view/templates/settings/head.tpl +++ b/view/templates/settings/head.tpl @@ -6,20 +6,20 @@ $(document).ready(function() { - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { + $('#contact_allow, #contact_deny, #circle_allow, #circle_deny').change(function() { var selstr; - $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { + $('#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected').each( function() { selstr = $(this).html(); $('#jot-perms-icon').removeClass('unlock').addClass('lock'); $('#jot-public').hide(); }); - if(selstr == null) { + if(selstr == null) { $('#jot-perms-icon').removeClass('lock').addClass('unlock'); $('#jot-public').show(); } }).trigger('change'); - + $('.settings-content-block').hide(); $('.settings-heading').click(function(){ $('.settings-content-block').hide(); diff --git a/view/templates/welcome.tpl b/view/templates/welcome.tpl index 0ac061b47e..02da9b2776 100644 --- a/view/templates/welcome.tpl +++ b/view/templates/welcome.tpl @@ -55,16 +55,16 @@ {{$finding_txt nofilter}} -

{{$groups nofilter}}

+

{{$circles nofilter}}

  • - {{$group_contact_link}}
    - {{$group_contact_txt nofilter}} + {{$circle_contact_link}}
    + {{$circle_contact_txt nofilter}}
  • {{if $newuser_private}}
  • - {{$private_link}}
    + {{$private_link}}
    {{$private_txt nofilter}}
  • {{/if}} diff --git a/view/theme/duepuntozero/deriv/darkzero.css b/view/theme/duepuntozero/deriv/darkzero.css index 2e236e5df9..50b78aecbe 100644 --- a/view/theme/duepuntozero/deriv/darkzero.css +++ b/view/theme/duepuntozero/deriv/darkzero.css @@ -23,13 +23,13 @@ nav #banner #logo-text a { color: #ffffff; } /* Contact-Header for the Network Stream */ #viewcontact_wrapper-network {background-image: url('imgdarkzero/head.jpg');} -.wall-item-content-wrapper { - border: 1px solid #444444; - background: #444444; +.wall-item-content-wrapper { + border: 1px solid #444444; + background: #444444; } .wall-item-outside-wrapper.threaded > .wall-item-content-wrapper { -moz-border-radius: 3px 3px 0px; - border-radius: 3px 3px 0px; + border-radius: 3px 3px 0px; } .wall-item-tools { background-color: #444444; background-image: none;} .comment-wwedit-wrapper{ @@ -39,7 +39,7 @@ nav #banner #logo-text a { color: #ffffff; } border: solid #444444; border-width: 0px 3px 3px; -moz-border-radius: 0px 0px 3px 3px; - border-radius: 0px 0px 3px 3px; + border-radius: 0px 0px 3px 3px; } .editicon { background-color: #333; @@ -91,7 +91,7 @@ footer { background-image: url('imgdarkzero/sectionend.jpg'); background-position: top left; background-repeat: repeat-x; - height: 25px; + height: 25px; } @@ -117,13 +117,13 @@ input#dfrn-url { #jot-title:-moz-placeholder{color: #555555!important;} #jot-category::-webkit-input-placeholder{ color: #555555!important;} #jot-category:-moz-placeholder{color: #555555!important;} - - + + #jot-title:hover, #jot-title:focus, #jot-category:hover, #jot-category:focus { - border: 1px solid #cccccc; + border: 1px solid #cccccc; } #profile-jot-email-label, div#jot-preview-content, div.profile-jot-net { @@ -149,7 +149,7 @@ input#dfrn-url { background:#2e2f2e; } -.widget .selected, .group-selected { +.widget .selected, .circle-selected { background:#2e2f2e; } diff --git a/view/theme/duepuntozero/deriv/slackr.css b/view/theme/duepuntozero/deriv/slackr.css index c096ffa7df..8f6351bcf7 100644 --- a/view/theme/duepuntozero/deriv/slackr.css +++ b/view/theme/duepuntozero/deriv/slackr.css @@ -126,7 +126,7 @@ nav #site-location { } -.contact-entry-photo img, .profile-match-photo img, #photo-photo img, .directory-photo-img, .photo-album-photo, .photo-top-photo, .profile-jot-text, .group-selected, .widget .selected, #profile-jot-submit { +.contact-entry-photo img, .profile-match-photo img, #photo-photo img, .directory-photo-img, .photo-album-photo, .photo-top-photo, .profile-jot-text, .circle-selected, .widget .selected, #profile-jot-submit { border-radius: 3px; -moz-border-radius: 3px; box-shadow: 4px 4px 3px 0 #444444; diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index f5b526c481..8b5ffeea65 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -382,11 +382,11 @@ div.wall-item-content-wrapper.shiny { cursor: pointer; } -#group-sidebar { +#circle-sidebar { margin-bottom: 10px; } -.widget .selected, .group-selected, .forum-selected { +.widget .selected, .circle-selected, .forum-selected { padding: 3px; -moz-border-radius: 3px; border-radius: 3px; @@ -1695,46 +1695,46 @@ input#dfrn-url { overflow: auto; } -#group-new-submit-wrapper { +#circle-new-submit-wrapper { margin-top: 30px; } -#group-edit-name-label { +#circle-edit-name-label { float: left; width: 175px; margin-top: 20px; margin-bottom: 20px; } -#group-edit-name { +#circle-edit-name { float: left; width: 225px; margin-top: 20px; margin-bottom: 20px; } -#group-edit-name-wrapper { +#circle-edit-name-wrapper { } -#group_members_select_label { +#circle_members_select_label { display: block; float: left; width: 175px; } -.group_members_select { +.circle_members_select { float: left; width: 230px; overflow: auto; } -#group_members_select_end { +#circle_members_select_end { clear: both; } -#group-edit-name-end { +#circle-edit-name-end { clear: both; } @@ -1856,10 +1856,10 @@ a.mail-list-link { clear: both; } -#sidebar-group-list ul { +#sidebar-circle-list ul { list-style-type: none; } -.sidebar-group-li .notify, .forum-widget-entry .notify { +.sidebar-circle-li .notify, .forum-widget-entry .notify { display: none; font-size: 9px; border: 1px solid rgb(221, 221, 221); @@ -1867,17 +1867,17 @@ a.mail-list-link { float: right; background-color: #BABDB6; } -.sidebar-group-li .notify.show, .forum-widget-entry .notify.show { +.sidebar-circle-li .notify.show, .forum-widget-entry .notify.show { display: block; } -#sidebar-group-list .icon, #sidebar-group-list .iconspacer { +#sidebar-circle-list .icon, #sidebar-circle-list .iconspacer { display: inline-block; height: 12px; width: 12px; } -#sidebar-group-list li { +#sidebar-circle-list li { margin-top: 10px; } @@ -1911,7 +1911,7 @@ a.mail-list-link { #search-save { margin-left: 5px; } -.groupsideedit { +.circlesideedit { margin-right: 10px; } #saved-search-ul { @@ -2180,7 +2180,7 @@ aside input[type='text'] { margin-left: 200px; } -.group-delete-wrapper { +.circle-delete-wrapper { float: right; margin-right: 50px; } @@ -2546,7 +2546,7 @@ aside input[type='text'] { margin-bottom: 15px; } -#group-members { +#circle-members { margin-top: 20px; padding: 10px; height: 250px; @@ -2554,28 +2554,28 @@ aside input[type='text'] { border: 1px solid #ddd; } -#group-members-end { +#circle-members-end { clear: both; } -#group-separator { +#circle-separator { margin-top: 10px; margin-bottom: 10px; } -#group-all-contacts { +#circle-all-contacts { padding: 10px; height: 450px; overflow: auto; border: 1px solid #ddd; } -#group-all-contacts-end { +#circle-all-contacts-end { clear: both; margin-bottom: 10px; } -#group-edit-desc { +#circle-edit-desc { margin-top: 15px; } diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php index 985e062ac5..71278c659e 100644 --- a/view/theme/duepuntozero/theme.php +++ b/view/theme/duepuntozero/theme.php @@ -69,14 +69,14 @@ $(document).ready(function() { $('html').click(function() { $("#nav-notifications-menu" ).hide(); }); - $('.group-edit-icon').hover( + $('.circle-edit-icon').hover( function() { $(this).addClass('icon'); $(this).removeClass('iconspacer');}, function() { $(this).removeClass('icon'); $(this).addClass('iconspacer');} ); - $('.sidebar-group-element').hover( + $('.sidebar-circle-element').hover( function() { id = $(this).attr('id'); $('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');}, diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index 0758988fcd..82e47331d6 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -368,7 +368,7 @@ aside .badge { opacity: 0.7; } .forum-widget-entry .badge, -.sidebar-group-li .badge { +.sidebar-circle-li .badge { margin-top: 6px; } @@ -1303,23 +1303,23 @@ aside #follow-sidebar .form-group-search .form-button-search { padding: 2px 8px; } -div#sidebar-group-header h3 { +div#sidebar-circle-header h3 { float: left; } -div#sidebar-group-list { +div#sidebar-circle-list { clear: both; } -.group-new-form { +.circle-new-form { clear: both; } -.group-edit-tool { +.circle-edit-tool { padding-top: 0; color: $font_color_darker; } -.sidebar-widget-header .group-edit-tool { +.sidebar-widget-header .circle-edit-tool { margin-top: -5px; } @@ -1339,24 +1339,24 @@ div#sidebar-group-list { aside .widget-action { padding: 5px 10px; } -aside #group-sidebar .sidebar-group-li .group-edit-tool.faded-icon:hover, +aside #circle-sidebar .sidebar-circle-li .circle-edit-tool.faded-icon:hover, aside #saved-search-list .saved-search-li .savedsearchdrop.faded-icon:hover, aside .widget.widget-action.faded-icon:hover { opacity: 0.8; transition: all 0.25s ease-in-out; } -aside #group-sidebar .sidebar-group-li .group-edit-tool.faded-icon:hover, +aside #circle-sidebar .sidebar-circle-li .circle-edit-tool.faded-icon:hover, aside #saved-search-list .saved-search-li .savedsearchdrop.faded-icon:hover, aside .widget .widget-action.faded-icon:hover { opacity: 1; } -aside #group-sidebar li .group-checkbox { +aside #circle-sidebar li .circle-checkbox { margin: 6px 0 0; } -aside #group-sidebar li .group-edit-tool { +aside #circle-sidebar li .circle-edit-tool { padding-right: 10px; } -aside #group-sidebar li .group-edit-tool:first-child { +aside #circle-sidebar li .circle-edit-tool:first-child { padding-right: 0px; } @@ -2448,7 +2448,7 @@ section > .generic-page-wrapper, .dfrn_request-content-wrapper, .friendica-content-wrapper, .credits-content-wrapper, -.nogroup-content-wrapper, +.nocircle-content-wrapper, .profperm-content-wrapper, .invite-content-wrapper, .tos-content-wrapper, @@ -2597,70 +2597,70 @@ ul li:hover .contact-wrapper .contact-action-link:hover { padding-top: 10px; } -/* group edit page */ -.group-actions { +/* circle edit page */ +.circle-actions { margin-top: 4px; margin-bottom: 10px; font-size: 30px; } -.group-actions button, -.group-actions a { +.circle-actions button, +.circle-actions a { font-size: 18px; } -.contact-group-actions .fa-times-circle { +.contact-circle-actions .fa-times-circle { color: #d00000; } -.contact-group-actions .fa-plus-circle { +.contact-circle-actions .fa-plus-circle { color: #008000; } -#group-edit-wrapper { +#circle-edit-wrapper { margin-top: 14px; display: none; } -#group-edit-header { +#circle-edit-header { display: block; } -#group-update-wrapper .contact-photo-overlay { +#circle-update-wrapper .contact-photo-overlay { display: none; } -#group-update-wrapper .viewcontact_wrapper .contact-group-actions { +#circle-update-wrapper .viewcontact_wrapper .contact-circle-actions { height: 100%; display: flex; flex-direction: column; justify-content: center; } -#group-update-wrapper .viewcontact_wrapper .contact-group-link { +#circle-update-wrapper .viewcontact_wrapper .contact-circle-link { opacity: 0.8; font-size: 20px; } -#group-update-wrapper .viewcontact_wrapper .contact-action-link:hover { +#circle-update-wrapper .viewcontact_wrapper .contact-action-link:hover { opacity: 1; } -#group-update-wrapper .shortmode { +#circle-update-wrapper .shortmode { height: 53px; overflow: hidden; } -#group-update-wrapper .shortmode .contact-photo { +#circle-update-wrapper .shortmode .contact-photo { height: 32px; width: 32px; } -#group-update-wrapper .shortmode .media { +#circle-update-wrapper .shortmode .media { overflow: hidden; } -#group-update-wrapper .shortmode .contact-entry-desc { +#circle-update-wrapper .shortmode .contact-entry-desc { font-size: 12px !important; } -#group-update-wrapper .shortmode .contact-entry-desc h4.media-heading { +#circle-update-wrapper .shortmode .contact-entry-desc h4.media-heading { margin: 0; } -#group-update-wrapper .shortmode .contact-entry-desc h4.media-heading a { +#circle-update-wrapper .shortmode .contact-entry-desc h4.media-heading a { font-size: 13px !important; white-space: nowrap; } -#group-update-wrapper .shortmode .contact-entry-desc .contact-entry-rel, -#group-update-wrapper .shortmode .contact-entry-desc .contact-entry-network { +#circle-update-wrapper .shortmode .contact-entry-desc .contact-entry-rel, +#circle-update-wrapper .shortmode .contact-entry-desc .contact-entry-network { display: none; } @@ -3063,7 +3063,7 @@ details.profile-jot-net[open] summary:before { content: "\f0da"; /* Right Plain Pointer */ } .widget > .fakelink > h3:before, -#sidebar-group-header > .fakelink > h3:before { +#sidebar-circle-header > .fakelink > h3:before { font-family: ForkAwesome; content: "\f0d7"; /* Bottom Plain Pointer */ } @@ -3804,7 +3804,7 @@ section .profile-match-wrapper { .dfrn_request-content-wrapper, .friendica-content-wrapper, .credits-content-wrapper, - .nogroup-content-wrapper, + .nocircle-content-wrapper, .profperm-content-wrapper, .invite-content-wrapper, .tos-content-wrapper, diff --git a/view/theme/frio/js/mod_group.js b/view/theme/frio/js/mod_circle.js similarity index 52% rename from view/theme/frio/js/mod_group.js rename to view/theme/frio/js/mod_circle.js index 3e69d581a1..49b7db17c5 100644 --- a/view/theme/frio/js/mod_group.js +++ b/view/theme/frio/js/mod_circle.js @@ -1,67 +1,67 @@ // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later /** - * @file view/theme/frio/js/mod_group.js - * The javascript for the group module + * @file view/theme/frio/js/mod_circle.js + * The javascript for the circle module */ $(document).ready(function () { // Add an event listeners on buttons for switching the contact list view - $("body").on("click", ".group-list-switcher", function () { - switchGroupViewMode(this); + $("body").on("click", ".circle-list-switcher", function () { + switchCircleViewMode(this); }); }); /** - * Change the group membership of the contacts and fetch the new grup list + * Change the circle membership of the contacts and fetch the new grup list * as html * - * @param {int} gid The group ID + * @param {int} gid The circle ID * @param {int} cid The contact ID * @param {string} sec_token The security token * * @returns {undefined} */ -function groupChangeMember(gid, cid, sec_token) { +function circleChangeMember(gid, cid, sec_token) { $("#contact-entry-wrapper-" + cid).fadeTo("fast", 0.33); $(".tooltip").tooltip("hide"); $("body").css("cursor", "wait"); - $.get("group/" + gid + "/" + cid + "?t=" + sec_token, function (data) { - // Insert the new group member list - $("#group-update-wrapper").html(data); + $.get("circle/" + gid + "/" + cid + "?t=" + sec_token, function (data) { + // Insert the new circle member list + $("#circle-update-wrapper").html(data); - // Apply the actual group list view mode to the new - // group list html - var activeMode = $(".group-list-switcher.active"); - switchGroupViewMode(activeMode[0]); + // Apply the actual circle list view mode to the new + // circle list html + var activeMode = $(".circle-list-switcher.active"); + switchCircleViewMode(activeMode[0]); $("body").css("cursor", "auto"); }); } /** - * Change the group list view mode + * Change the circle list view mode * * @param {object} elm The button element of the view mode switcher * @returns {undefined} */ -function switchGroupViewMode(elm) { - // Remove the active class from group list switcher buttons - $(".group-list-switcher").removeClass("active"); +function switchCircleViewMode(elm) { + // Remove the active class from circle list switcher buttons + $(".circle-list-switcher").removeClass("active"); // And add it to the active button element $(elm).addClass("active"); - // Add or remove the css classes for the group list with regard to the active view mode - if (elm.id === "group-list-small") { - $("#contact-group-list > li").addClass("shortmode col-lg-6 col-md-6 col-sm-6 col-xs-12"); + // Add or remove the css classes for the circle list with regard to the active view mode + if (elm.id === "circle-list-small") { + $("#contact-circle-list > li").addClass("shortmode col-lg-6 col-md-6 col-sm-6 col-xs-12"); } else { - $("#contact-group-list > li").removeClass("shortmode col-lg-6 col-md-6 col-sm-6 col-xs-12"); + $("#contact-circle-list > li").removeClass("shortmode col-lg-6 col-md-6 col-sm-6 col-xs-12"); } } /** - * Filter the group member list for contacts + * Filter the circle member list for contacts * * @returns {undefined} */ @@ -70,7 +70,7 @@ function filterList() { var input, filter, ul, li, a, i; input = document.getElementById("contacts-search"); filter = input.value.toUpperCase(); - li = document.querySelectorAll("#contact-group-list>li"); + li = document.querySelectorAll("#contact-circle-list>li"); // Loop through all list items, and hide those who don't match the search query for (i = 0; i < li.length; i++) { diff --git a/view/theme/frio/js/mod_events.js b/view/theme/frio/js/mod_events.js index 4ac669a353..c811760fb2 100644 --- a/view/theme/frio/js/mod_events.js +++ b/view/theme/frio/js/mod_events.js @@ -136,11 +136,11 @@ $(document).ready(function () { .trigger("change"); // JS for the permission section. - $("#contact_allow, #contact_deny, #group_allow, #group_deny") + $("#contact_allow, #contact_deny, #circle_allow, #circle_deny") .change(function () { var selstr; $( - "#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected", + "#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected", ).each(function () { selstr = $(this).html(); $("#jot-public").hide(); diff --git a/view/theme/frio/js/mod_photos.js b/view/theme/frio/js/mod_photos.js index 89a7ba7583..165b422ba6 100644 --- a/view/theme/frio/js/mod_photos.js +++ b/view/theme/frio/js/mod_photos.js @@ -1,11 +1,11 @@ // @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPLv3-or-later $(document).ready(function () { - $("#contact_allow, #contact_deny, #group_allow, #group_deny") + $("#contact_allow, #contact_deny, #circle_allow, #circle_deny") .change(function () { var selstr; $( - "#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected", + "#contact_allow option:selected, #contact_deny option:selected, #circle_allow option:selected, #circle_deny option:selected", ).each(function () { selstr = $(this).html(); $("#jot-perms-icon").removeClass("unlock").addClass("lock"); diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 3846c2c3e3..3ad81f5c05 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -36,9 +36,9 @@ $(document).ready(function () { return false; }); - // add the class "selected" to group widgets li if li > a does have the class group-selected - if ($("#sidebar-group-ul li a").hasClass("group-selected")) { - $("#sidebar-group-ul li a.group-selected").parent("li").addClass("selected"); + // add the class "selected" to circle widgets li if li > a does have the class circle-selected + if ($("#sidebar-circle-ul li a").hasClass("circle-selected")) { + $("#sidebar-circle-ul li a.circle-selected").parent("li").addClass("selected"); } // add the class "selected" to forums widgets li if li > a does have the class forum-selected diff --git a/view/theme/frio/scheme/black.css b/view/theme/frio/scheme/black.css index e6026b4de8..debf9d99b3 100644 --- a/view/theme/frio/scheme/black.css +++ b/view/theme/frio/scheme/black.css @@ -351,7 +351,7 @@ section > .generic-page-wrapper, .dfrn_request-content-wrapper, .friendica-content-wrapper, .credits-content-wrapper, -.nogroup-content-wrapper, +.nocircle-content-wrapper, .profperm-content-wrapper, .invite-content-wrapper, .tos-content-wrapper, diff --git a/view/theme/frio/templates/admin/site.tpl b/view/theme/frio/templates/admin/site.tpl index 4d0553b0c6..e440451a6f 100644 --- a/view/theme/frio/templates/admin/site.tpl +++ b/view/theme/frio/templates/admin/site.tpl @@ -242,7 +242,7 @@
    - {{include file="field_checkbox.tpl" field=$compute_group_counts}} + {{include file="field_checkbox.tpl" field=$compute_circle_counts}} {{include file="field_checkbox.tpl" field=$only_tag_search}} {{include file="field_input.tpl" field=$max_comments}} {{include file="field_input.tpl" field=$max_display_comments}} diff --git a/view/theme/frio/templates/circle_drop.tpl b/view/theme/frio/templates/circle_drop.tpl new file mode 100644 index 0000000000..169b1e6ed3 --- /dev/null +++ b/view/theme/frio/templates/circle_drop.tpl @@ -0,0 +1,5 @@ + +{{* Link for deleting contact circles *}} + + + diff --git a/view/theme/frio/templates/group_edit.tpl b/view/theme/frio/templates/circle_edit.tpl similarity index 53% rename from view/theme/frio/templates/group_edit.tpl rename to view/theme/frio/templates/circle_edit.tpl index 0a8dc3d2d3..49c41f2019 100644 --- a/view/theme/frio/templates/group_edit.tpl +++ b/view/theme/frio/templates/circle_edit.tpl @@ -1,15 +1,15 @@ -{{* This template is for the "group" module. It provides the user the possibility to - modify a specific contact group (remove contact group, edit contact group name, - add or remove contacts to the contact group. +{{* This template is for the "circle" module. It provides the user the possibility to + modify a specific contact circle (remove contact circle, edit contact circle name, + add or remove contacts to the contact circle. *}} - +
    {{if $editable == 1}} - {{* The buttons for editing the contact group (edit name / remove contact group) *}} -
    - {{if $drop}}{{$drop nofilter}}{{/if}} @@ -17,20 +17,20 @@ {{/if}}
    -
    +

    {{$title}}

    - {{* Edit the name of the group *}} -
    + {{* Edit the name of the circle *}} +
    -
    +
    {{include file="field_input.tpl" field=$gname label=false}}
    -
    +
    @@ -55,21 +55,21 @@
    - {{if $groupeditor}} + {{if $circle_editor}} {{* The buttons to switch between the different view modes *}} -
    - -
    - {{* The contact group list *}} -
    - {{include file="groupeditor.tpl"}} + {{* The contact circle list *}} +
    + {{include file="circle_editor.tpl"}}
    {{/if}}
    diff --git a/view/theme/frio/templates/circle_editor.tpl b/view/theme/frio/templates/circle_editor.tpl new file mode 100644 index 0000000000..a013359f56 --- /dev/null +++ b/view/theme/frio/templates/circle_editor.tpl @@ -0,0 +1,19 @@ + +{{* Template for the contact circle list *}} +
    + +
      + + {{* The contacts who are already members of the contact circle *}} + {{foreach $circle_editor.members as $contact}} +
    • {{include file="contact/entry.tpl"}}
    • + {{/foreach}} + + {{* The contacts who are not members of the contact circle *}} + {{foreach $circle_editor.contacts as $contact}} +
    • {{include file="contact/entry.tpl"}}
    • + {{/foreach}} + +
    +
    +
    diff --git a/view/theme/frio/templates/circle_side.tpl b/view/theme/frio/templates/circle_side.tpl new file mode 100644 index 0000000000..d24ce0c814 --- /dev/null +++ b/view/theme/frio/templates/circle_side.tpl @@ -0,0 +1,60 @@ + +

    {{$title}}

    +
    +
    + + +
    + diff --git a/view/theme/frio/templates/contact/entry.tpl b/view/theme/frio/templates/contact/entry.tpl index d4796a7eea..a5fc6d773a 100644 --- a/view/theme/frio/templates/contact/entry.tpl +++ b/view/theme/frio/templates/contact/entry.tpl @@ -76,7 +76,7 @@ {{* The button to add or remove contacts from a contact group - group edit page *}} {{if $contact.change_member}}