Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes deprecated Google Photos support from ChurchCRM. The Picasa Web Albums Data API (used via http://picasaweb.google.com/data/entry/api/user/) has been deprecated by Google and is no longer functional. The PR removes all Google Photos integration code, including the configuration option, API calls, and photo loading logic, while preserving Gravatar support.
Key Changes:
- Removed
bEnableGooglePhotosconfiguration option from SystemConfig and database - Deleted
loadFromGoogle()method from Photo class that handled Picasa API integration - Added database migration script to clean up config entries from existing installations
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/mysql/upgrade/6.2.0.sql |
Database migration to delete deprecated bEnableGooglePhotos config entries |
src/mysql/upgrade.json |
Restructured version mapping to add pre-6.0.0 block and register 6.2.0 upgrade script |
src/mysql/install/Install.sql |
Added comment noting Google Photos config removal |
src/ChurchCRM/dto/SystemConfig.php |
Removed bEnableGooglePhotos config definition and from Integration category |
src/ChurchCRM/dto/Photo.php |
Removed Google Photos logic from constructor and deleted loadFromGoogle() method |
src/ChurchCRM/Service/GroupService.php |
Added addUserToGroupInternal() method (unrelated to Google Photos removal) |
| public function addUserToGroupInternal(int $iGroupID, int $iPersonID, int $iRoleID): array | ||
| { | ||
| $result = false; | ||
| try { | ||
| $person2group2role = new Person2group2roleP2g2r(); | ||
| $person2group2role | ||
| ->setPersonId($iPersonID) | ||
| ->setGroupId($iGroupID) | ||
| ->setRoleId($iRoleID); | ||
| $person2group2role->save(); | ||
| $result = true; | ||
| } catch (\Throwable $t) { | ||
| // do nothing | ||
| } | ||
|
|
||
| if ($result) { | ||
| // Check if this group has special properties | ||
| $group = GroupQuery::create()->findOneById($iGroupID); | ||
| if ($group && $group->getHasSpecialProps()) { | ||
| $this->addPersonToGroupProperties($iGroupID, $iPersonID); | ||
| } | ||
| } | ||
|
|
||
| return $this->getGroupMembers($iGroupID, $iPersonID); | ||
| } | ||
|
|
There was a problem hiding this comment.
The addUserToGroupInternal method appears to be unrelated to removing Google Photos support. This change should be in a separate PR focused on group management functionality. Mixing unrelated changes makes it harder to review and track the purpose of each change.
| public function addUserToGroupInternal(int $iGroupID, int $iPersonID, int $iRoleID): array | |
| { | |
| $result = false; | |
| try { | |
| $person2group2role = new Person2group2roleP2g2r(); | |
| $person2group2role | |
| ->setPersonId($iPersonID) | |
| ->setGroupId($iGroupID) | |
| ->setRoleId($iRoleID); | |
| $person2group2role->save(); | |
| $result = true; | |
| } catch (\Throwable $t) { | |
| // do nothing | |
| } | |
| if ($result) { | |
| // Check if this group has special properties | |
| $group = GroupQuery::create()->findOneById($iGroupID); | |
| if ($group && $group->getHasSpecialProps()) { | |
| $this->addPersonToGroupProperties($iGroupID, $iPersonID); | |
| } | |
| } | |
| return $this->getGroupMembers($iGroupID, $iPersonID); | |
| } |
| UNIQUE KEY `cfg_name` (`cfg_name`) | ||
| ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_unicode_ci; | ||
|
|
||
| -- `src/mysql/upgrade/6.2.0.sql` to delete the deprecated config row. |
There was a problem hiding this comment.
[nitpick] This comment is unclear. It should explain what was done, not reference the upgrade script. Consider: -- Note: The bEnableGooglePhotos config (cfg_id 2016) was removed in 6.2.0 or simply remove this comment if it doesn't add value to the Install.sql schema.
| -- `src/mysql/upgrade/6.2.0.sql` to delete the deprecated config row. |
What Changed
Type
Testing
Screenshots
Security Check
Code Quality
Pre-Merge