Skip to content

Remove google photos support#7634

Merged
DawoudIO merged 10 commits intomasterfrom
feature/remove-google-photos
Nov 24, 2025
Merged

Remove google photos support#7634
DawoudIO merged 10 commits intomasterfrom
feature/remove-google-photos

Conversation

@DawoudIO
Copy link
Contributor

What Changed

Type

  • ✨ Feature
  • 🐛 Bug fix
  • ♻️ Refactor
  • 🏗️ Build/Infrastructure
  • 🔒 Security

Testing

Screenshots

Security Check

  • Introduces new input validation
  • Modifies authentication/authorization
  • Affects data privacy/GDPR

Code Quality

  • Database: Propel ORM only, no raw SQL
  • No deprecated attributes (align, valign, nowrap, border, cellpadding, cellspacing, bgcolor)
  • Bootstrap CSS classes used
  • All CSS bundled via webpack

Pre-Merge

  • Tested locally
  • No new warnings
  • Build passes
  • Backward compatible (or migration documented)

@DawoudIO DawoudIO added this to the 6.2.0 milestone Nov 24, 2025
@DawoudIO DawoudIO requested a review from a team as a code owner November 24, 2025 06:58
@DawoudIO DawoudIO requested review from Copilot, grayeul and respencer and removed request for a team November 24, 2025 06:58
@DawoudIO DawoudIO added the bug label Nov 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 bEnableGooglePhotos configuration 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)

Comment on lines +127 to +152
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);
}

Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested 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);
}

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
-- `src/mysql/upgrade/6.2.0.sql` to delete the deprecated config row.

Copilot uses AI. Check for mistakes.
@DawoudIO DawoudIO merged commit 4d41a6b into master Nov 24, 2025
13 checks passed
@DawoudIO DawoudIO deleted the feature/remove-google-photos branch November 24, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants