Skip to content
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

Remap old config variables #1509

Merged
merged 4 commits into from
Jul 15, 2024
Merged

Remap old config variables #1509

merged 4 commits into from
Jul 15, 2024

Conversation

egbot
Copy link
Member

@egbot egbot commented Jul 13, 2024

  • Ensure that all old configuration variable formats are remapped to new global variable format. This includes when variables are used directly or via the GLOBALS variable.
  • Remove temp code from symbbase that translated new configuration variables to the old formats. This code is no longer needed because all old configuration variables are now remapped to new format.

Pull Request Checklist:

Pre-Approval

  • There is a description section in the pull request that details what the proposed changes do. It can be very brief if need be, but it ought to exist.
  • Hotfixes should be branched off of the master branch and squash and merged back into the master branch.
  • Features and backlog bugs should be merged into the Development branch, NOT master
  • All new text is preferably internationalized (i.e., no end-user-visible text is hard-coded on the PHP pages), and the spreadsheet tracking internationalizations has been updated either with a new row or with checkmarks to existing rows.
  • There are no linter errors
  • New features have responsive design (i.e., look aesthetically pleasing both full screen and with small or mobile screens)
  • Symbiota coding standards have been followed
  • If any files have been reformatted (e.g., by an autoformatter), the reformat is its own, separate commit in the PR
  • Comment which GitHub issue(s), if any does this PR address
  • If this PR makes any changes that would require additional configuration of any Symbiota portals outside of the files tracked in this repository, make sure that those changes are detailed in this document.

Post-Approval

  • It is the code author's responsibility to merge their own pull request after it has been approved
  • If this PR represents a merge into the Development branch, remember to use the squash & merge option
  • If this PR represents a merge from the Development branch into the master branch, remember to use the merge option
  • If this PR represents a hotfix into the master branch, a subsequent PR from master into Development should be made merge option (i.e., no squash).
  • If the dev team has agreed that this PR represents the last PR going into the Development branch before a tagged release (i.e., before an imminent merge into the master branch), make sure to notify the team and lock the Development branch to prevent accidental merges while QA takes place. Follow the release protocol here.
  • Don't forget to delete your feature branch upon merge. Ignore this step as required.

Thanks for contributing and keeping it clean!

- Remove no longer needed code fragments that ensure that old configuration variable formats are supported after a minor update
@egbot egbot requested a review from GregoryPost July 13, 2024 16:53
$tPath = ini_get('upload_tmp_dir');
}
if(!$tPath && isset($GLOBALS["TEMP_DIR_ROOT"])){
$tPath = ini_get('upload_tmp_dir');
Copy link
Member

Choose a reason for hiding this comment

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

Confirming this is an intended change in logic. The proposed code will default to using the upload_temp_directory returned by ini_get('upload_tmp_dir') unless that function returns false. The previous logic appears to default to the value in $GLOBALS["tempDirRoot"] . Perhaps the intent is to default to the new $GLOBALS["TEMP_DIR_ROOT"] and fallback to ini_get('upload_tmp_dir') if that global is empty ? (line 446 will short-circuit on !$Path )

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, defaulting to upload_tmp_dir is the attended action. The old code defaulted to using the old variable format (tempDirRoot), and then upload_tmp_dir, and then the new format (TEMP_DIR_ROOT), which is a little screwy. Simply defaulting to upload_tmp_dir, and then TEMP_DIR_ROOT, is perfect. Thanks for checking.

Copy link
Member

@GregoryPost GregoryPost left a comment

Choose a reason for hiding this comment

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

See previous comments

@egbot egbot requested a review from GregoryPost July 15, 2024 21:45
@egbot egbot merged commit 82852df into Development Jul 15, 2024
@egbot egbot deleted the remap-old-config-variables branch July 15, 2024 21:56
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