-
-
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
Export - small cleanup #12864
Export - small cleanup #12864
Conversation
edc6a48
to
29034a9
Compare
@@ -749,7 +710,7 @@ public static function exportCustom($customSearchClass, $formValues, $order) { | |||
$rows[] = $row; | |||
} | |||
|
|||
CRM_Core_Report_Excel::writeCSVFile(self::getExportFileName(), $header, $rows); | |||
CRM_Core_Report_Excel::writeCSVFile(ts('CiviCRM Contact Search'), $header, $rows); | |||
CRM_Utils_System::civiExit(); |
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.
Not sure about this change as it duplicates a string - do we need to make this change?
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.
The point is to stop it calling what is essentially an unrelated function for a different export process - ie. to break dumb interdependencies
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.
Right. Totally makes sense then :-)
I've looked through this and made one trivial comment. The code looks good to me, it's cleanup and will make the code easier to maintain. @twomice are you able to run this? |
test this please |
CiviCRM Review Template DEL-1.1)
|
what a beautiful PR review :-) - merging |
Overview
Minor tidy up on export
Before
parameters $saveFile & $batchItems are passed in but never set in calling functions. Export mode passed in
After
unneeded params not passed in. processor object passed in instead of exportMode. This is part of a bigger picture effort to move processing off to that object rather than passing around parameters
Technical Details
getExportFileName appears to be called from 2 places. One is on the file where it always passed no params & gets the same result so this is now hard-coded. The second is moved to the ExportProcessor class, with some handling for the possibility that mode might be invalid - but I think that is never true.
Comments
Follow up on #12586