-
-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRM-20821 & CRM-20938 - fix bugs in managing premium product images #10720
Commits on Jul 24, 2017
-
CRM-20821 - Move resizeImage() to Utils class
- Move resizeImage() from CRM_Contribute_Form_ManagePremiums to CRM_Utils_File - Make it public static - Don't change anything about how it works
Configuration menu - View commit details
-
Copy full SHA for 3cd6a7b - Browse repository at this point
Copy the full SHA 3cd6a7bView commit details -
CRM-20821 - Refactor resizeImage()
- Clean up CRM_Utils_File::resizeImage() - No major functionality changes - Better docblock - Better error handling - Better variable names
Configuration menu - View commit details
-
Copy full SHA for 62b3b6e - Browse repository at this point
Copy the full SHA 62b3b6eView commit details -
CRM-20821 - Refactor PremiumProduct BAO add()
- Refactor CRM_Contribute_BAO_ManagePremiums::add - Don't change any functionality - Improve docblock - Use a $defaults array
Configuration menu - View commit details
-
Copy full SHA for 706f6a0 - Browse repository at this point
Copy the full SHA 706f6a0View commit details -
CRM-20821 - Refactor ManagePremiums postProcess()
- Refactor CRM_Contribute_Form_ManagePremiums::postProcess() - No major changes to functionality - Eliminate deeply nested code (addressing "FIXME" comment) - Split code into multiple functions - Add more comments
Configuration menu - View commit details
-
Copy full SHA for 5459a6d - Browse repository at this point
Copy the full SHA 5459a6dView commit details -
CRM-20821 - Improve ManagePremiums formRule()
- Improve CRM_Contribute_Form_ManagePremiums::formRule() - Require an image file, if "upload" is chosen - Remove the commented-out code for a rule which required images to be within a certain size - Minor refactoring to improve code clarity
Configuration menu - View commit details
-
Copy full SHA for aa4ad33 - Browse repository at this point
Copy the full SHA aa4ad33View commit details -
CRM-20821 - Use smarter logic to adjust img URL
This change is the crux of CRM-20821. Before this change, editing a premium product would automatically break the image URL. After this change, premium products can be edited while retaining the image URL. Functionality is preserved which changes the URL to a local URL when possible. This commit adds two new Utils functions (along with tests) to handle the logic of changing a supplied URL to a local URL.
Configuration menu - View commit details
-
Copy full SHA for 6c094ca - Browse repository at this point
Copy the full SHA 6c094caView commit details -
CRM-20938 - Maintain aspect ratio in resizeImage()
Make CRM_Utils_File::resizeImage() preserve image aspect ratio by default.
Configuration menu - View commit details
-
Copy full SHA for ae969bc - Browse repository at this point
Copy the full SHA ae969bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for e0d4afb - Browse repository at this point
Copy the full SHA e0d4afbView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb80d2f - Browse repository at this point
Copy the full SHA bb80d2fView commit details