-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
[Ref] Minor code extraction #18739
[Ref] Minor code extraction #18739
Conversation
(Standard links)
|
if (!is_array($options) || !in_array($id, $validPriceFieldIds)) { | ||
continue; | ||
} | ||
elseif ($hideAdminValues && !in_array($className, $formClasses)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton I think this needs to be !$hideAdminValues because in the original code if the Perm check is true then hideAdminValues gets set to FALSE https://github.com/civicrm/civicrm-core/pull/18739/files#diff-9bb0aa4010a43713521df361cca72fe6L895 where was in your code it will be set to TRUE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @seamuslee001 - I've fixed to
$hideAdminValues = !CRM_Core_Permission::check('edit contributions');
@@ -0,0 +1 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton looks like this snuck in by accident
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still there for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
second time lucky..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seamuslee001 it has passed now
This looks safe now. I'd say ok to merge. |
Merging based on @demeritcowboy review |
Overview
Simple function extraction
Before
Long block of code
After
Extracted function
Technical Details
Much of the preceding code is doing stuff depending on the form calling it & should be moved back to the actual forms
Comments