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

[3.1] - select collections from the url if present #1400

Merged
merged 5 commits into from
Jun 5, 2024

Conversation

Atticus29
Copy link
Collaborator

@Atticus29 Atticus29 commented Jun 4, 2024

Description

This PR addresses the issue brought up by James Mickley here, where the collection IDs in the URL were not being respected on the new search page. Specifically it,

  • Extracts collection IDs from the url if they exist
  • Runs through the protocol of unselecting all collections and re-selecting only those in the extracted collection IDs. The methods uncheckEverything and checkTheCollectionsThatShouldBeChecked had already been created from a previous PR.
  • As an aside (kind of unrelated to the issue at hand), also DRYs up the logic of collectionSource, which I realized contained largely the same logic as uncheckEverything and checkTheCollectionsThatShouldBeChecked.

QA Notes

This is live in https://dev001.symbiota.org/collections/search/index.php?db=[12,81].

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.
    • N/A
  • 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.
    • N/A
  • There are no linter errors
  • New features have responsive design (i.e., look aesthetically pleasing both full screen and with small or mobile screens)
    • N/A
  • 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
    • N/A
  • 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.
    • N/A

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!

@Atticus29 Atticus29 marked this pull request as ready for review June 4, 2024 18:02
@Atticus29 Atticus29 requested review from MuchQuak and themerekat June 4, 2024 18:02
@Atticus29 Atticus29 changed the title select collections from the url if present [3.1] - select collections from the url if present Jun 4, 2024
Copy link
Collaborator

@themerekat themerekat left a comment

Choose a reason for hiding this comment

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

Seems to work!

@@ -567,31 +569,15 @@
ul.outerWidth(this.element.outerWidth());
}
const collectionSource = <?php echo isset($collectionSource) ? json_encode($collectionSource) : 'null'; ?>;
const collIdsFromUrl = <?php echo isset($collIdsFromUrl) ? json_encode($collIdsFromUrl) : 'null'; ?>;
if (collIdsFromUrl.length > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this would need to be collIdsFromUrl && collIdsFromUrl.length to prevent a null pointer access

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in b3cf85a

@@ -567,31 +569,15 @@
ul.outerWidth(this.element.outerWidth());
}
const collectionSource = <?php echo isset($collectionSource) ? json_encode($collectionSource) : 'null'; ?>;
const collIdsFromUrl = <?php echo isset($collIdsFromUrl) ? json_encode($collIdsFromUrl) : 'null'; ?>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is safe current based on its use however the contents of this can be unsafe so just fyi I guess

@Atticus29 Atticus29 merged commit be64c2c into Development Jun 5, 2024
@Atticus29 Atticus29 deleted the 3.1-newsearch-collids-in-url-fix branch June 5, 2024 01:57
themerekat added a commit that referenced this pull request Sep 17, 2024
* Bugfix/3.1/map search polygon snapping (#1314)

* adds condition to snap leaflet map if shape exists before snapping to points so that likely hood of point in view increases

* added min zoom to leafelt map so that if no bounds are specified the view is better

* Pencil fix (#1335)

* Fix spacing issue

* Fix size of pencil icon

* Hotfix 2024-05-17

DwC-A Publishing
- Fix issue with file handler being closed prematurely

* Media API development

- Convert Media POST and PUT data input from parameter values to a data object passed within the body
- Some improvement with response documentation
- Fix duplicate operationId values
- Rebuild Swagger API documentation

* Coloring of Non Observation Points with Direct Updating (#1337)

* uses leaflet path method to set color so that it will update when group is not re drawn closes 1319

* close #1320, addes check for catnum

* Bugfix/collection meta data status fix (#1334)

* adds check for duplicate collectionCode / institutionalCode key when updating collection meta data and gives status msg upon failure closes #1311

* changes wording of duplicate error

* link error to new tab

* fixes lang tag error for collmetadata.php title

* closes #1326, fixes snapping on map with and without circle (#1338)

* Update searchform.js (#1336)

* Update searchform.js

Fix sessionStorage.querystring bug.  Javascript was not handling setting db (collections) checkbox array from user sessionStorage.

* Update searchform.js

Correcting variable name

* Revert "Update searchform.js (#1336)" (#1342)

This reverts commit 79e2a1b.

* removed overarching form tag because it wasn't on both sponsorship forms closes #1329 (#1341)

* Fix Occur Editor Nav visiblity with no results closes #1333 (#1343)

* cloFix Occur Editor Nav visiblity with no results closes #1333

Shifts conditional hiding search form down a level so it only blocks
tabs that way navigation is still possible when there is no query
results

* shifts formating to correct from one less conditional

* occurrence editor images tab (#1350)

The image info was being pushed down to the baseline of the displayed image.  This fix creates a new class that resets the cell alignment to top aligned.

* Update ProfileManager.php (#1347)

* Update ProfileManager.php
Confirms if 'accessibilityPref' is set in user's dynamic properties and sets AccessibilityPreference to false by default if not.

* Fits Table to row size when Smaller than 80vh closes #1340 (#1348)

# Issue 1340
# Summary
This should fit the bottom scroll bar into view when their is few
results.

* [3.1] Font unification (#1301)

* remove some font-family references

* remove in-line styling for font-family in all files not .scss, .css, vendor, .js, .less, .html, or .map

* remove <b> from one of the fieldset-likes

* add reference to font-family in reset.css

* remove unecessary font-size restriction on fields-available chips

* 3.1 search page flow bugfix (#1351)

* fix the page flow bugs but confirm existing collection persistance issues

* display which collections are to be queried in harvest params

* solve the collection selection for the new search page

* clean up and subfunctionalize

* slight refactor to improve readability

* add minor aesthetic improvement

* add styling class

* remove collection display in harvest params

* remove translations that are now cruft

* Occurrence Dataset Refactor

* Revert "Occurrence Dataset Refactor"

This reverts commit 6580a7a.

* othercatalogNumber parsing bug fix

- Parse tags and values found within omoccurrences:otherCatalogNumbers field and display within additional identifiers table within the occurrence editor. If form is saved, parsed values are saved within omoccuridentiers table.

* Taxonomy remap bug

- Fix issue with taxon remapping/merging into another taxon failing due to key violations within taxstatus (relationship already exists). This is another issue with PHP 8.2 throwing fatal error for mysql warnings. Adding an IGNORE to statement solves the issue since already existing relationships don't need to be  transferred, and will be deleted when secondary taxon is deleted.

* 3.1 hamburger menu fix  (#1363)

* Update header.css

Center hamburger menu and flow menu content into body so that menu content is scrollable on small screens.
Remove transitions
Reduce padding around hamburger to unblock 'Home' menu link

* order alphabetically and then by string length (#1358)

* Merge info button (#1368)

* Add dialog box with info about merging records

* Remove redundant lang tags

Discovered when finding lang tags corresponding to "more information" via dialog box code that I copied

* Change dialog box to a link to Symbiota Docs

Seems more consistent with where we're going now

* Update defaultinvoice.php (#1370)

$loanType is a string - was being sanitized as a Int.  Variable is not used in any output to client, so should be safe to just use for comparison without filtering.

* Taxonomy Editor format adjustment

- Minor adjustment to display of parent taxon to fix issue with lack of space between scientific name and author, with additional minor improvements
- Minor improvement to only italicize taxa at genus rank or above
- Move htmlspecailchars and formatting into class assignment so that rankid can be used to decide formating

* Update ImageLocalProcessor.php (#1372)

php current() expects an array while parse_url with  PHP_URL_PATH paramter should return a string or false.

This changes were also committed to hotfix-2024-05-22

* Hotfix 2024 05 22 (#1374)

* Hotfix 2024-05-22

- Checklist management:
-- Adjust taxon merge function to accommodate PHP v8.1 fatal exceptions during foreign key conflicts within SQL update statements, which previously simply returned false value with a warning
- Image processing:
-- Bug resolution to avoid fatal error where an array function is incorrectly used on a string. Resolves issue #1366
- Occurrence Mapping:
-- Fix bug interfering with the exclusion of protected occurrences within the mapping tools when user is not approved to view these records. Associated with issue: #1375 

Co-authored-by: Greg Post <[email protected]>

* 3.1-upload-bug

- Avoid fatal error that are now thrown by PHP v8.1+ instead of the previous warning

* Bugfix/3.1/collection list map clustering (#1373)

* reroute map result to map search b/c this is fully featured

* closes #1345 add add reference marker functionality to map/index so that no funtionality is lost

* inversing switch so logic works out

* default clustering off

* moved cluster switch on by default from needing param and it just defaults to no clustering

* oFixes Map Search Auto searching with no Parameters (#1388)

# Summary
Only adds lat long data restrictions if something is present in the
`sqlWhere` property. That way if checks to sqlWhere don't fire with
everything searches ever.

* Bugfix/3.1/record search contrast (#1386)

* add important to screen reader only class

* fixing contrast adding styling class for the insert border labels

* collection search uses body color instead of grey for better contrast

* updating screen-reader-only for base.css

* fixing use of data-labels with content to just normal spans

* focus now uses medium color for contrast

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty (#1391)

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty

* fix accidental populating of sqlWhere in setGeoSqlWhere

---------

Co-authored-by: Mark <[email protected]>

* [3.1] Merge Duplicate Record bugfix (#1344)

* swaps all the merge record queries to be prepared statements (mostly) and puts them in a try catch so blank errors don't occur on the user side

* Add $collId as arg for dupManager merge Records since collId would be undefined otherwise and fixed control flow to only navigate you when error occurs

* Adds Ignores to mergeRecord and Error Control Flow to deleteOccurrence

* Add forgotten lang tags for dupManager

* saving determinations work

* determination history priortizes source records current determinations

* adding quote filtering for taxa and taxonFilter to prevent link onmouse over xss (#1380)

* make sure the formats are in explicitly in a whitelist in an attempt to make burpsuite happy (#1394)

* [3.1] - burpsuite - emlhandler fix: adds is_numeric checker for collid in collections/datasets/emlhandler… (#1398)

* adds is_numeric checker for collid in collections/datasets/emlhandler.php

* respond to code review feedback. If it does not pass the is_numeric check off the bat, it probably should not be treated as valid

* [3.1] - select collections from the url if present (#1400)

* select collections from the url if present

* DRY up sanitizedCollectionSource section, which has the same pattern as occurs elsewhere

* fix typo

* change default to empty array

* add better type checking to collIdsFromUrl

* Update ImInventories.php

* fixed the icons max-width value (#1410)

* attempt to fix the injection issues in collections/list.php (#1401)

* attempt to fix the injection issues

* change setSciNamesByVerns to use prepared statement

* remove extra htmlspecialchars call now that prepared statement is in place

* removed extra spaces

---------

Co-authored-by: Mark <[email protected]>

* Fixes Geothesaurus Searching Closes #1396 (#1404)

# Issue #1396
# Summary
Adds Parameter to let rpc call reduce output to distict results
Fixes parent dependent search detection so that initial id is used
forever even after the parent param changes

* sort by lenght so more exact match comes up when typed (#1416)

Issue came up when `calif` would show `Baja California` before
`California` because it was sorted by alphabetical but it really should
be the more exact match ie the smaller one usually first

* Enhancement/3.1/mappoint aid better edit (#1417)

* pointaid only autoselects tool if point not present and click to edit is now possible with leaflet draw

* fixes deletion problem with marker and circle present. Also fixes drag not being possible when click editing

* change checklist point aid to just use collection point aid to reduce duplicated effort

* fixed problem that occured while in edit mode and changing the error radius

* more form enhancements so that circle and marker move with each other during position edits

* 3.1 new search to list display (#1411)

* add display format radio button and handle case where user navigates back from table display to list display and then clicks breadcrumbs

* handle logic flow of list->table->list

* add translation and respond to self code review

* fix bug where breadcrumbs in collections/listtabledisplay.php were not respecting whether user was coming from new search page

* Change from button back to input to upload file (#1415)

* htmlentity quote was messing with json_decode closes #1384 (#1419)

* changed to prepared statements (#1422)

* fixes bug there was a db error because voucher manager was missing during kml download attempt (#1421)

* fixes voucher alignment when no search variables are present closes #1378 (#1423)

# Issues #1378

# Summary
Default css in reset.css removed default table vertical alignment which
skewed the inputs in the table

* fix types for taxa id-related prepared statements to match sqls expec… (#1426)

* fix types for taxa id-related prepared statements to match sqls expectation of integer types as well as make some cosmetic fixes to spacing for code readbility

* change result to statement for close

* 3.1 schema patch adjustments (#1413)

Schema patch adjustments based on running patch through a new portal 3.0 install and a 1.x => 3.0 => 3.1 portal update. Install/update tests were run both through command line and using the schema manager tool.
- Remove omoccurrences index keys that are never set within previous schema updates
- Temporarily turn off foreign key checks to allow renaming of omoccurrences collid index

Schema Manager adjustments 
- Adjust code to accept and run the 3.1 patch
- Add try-catch and other db checks to avoid PHP 8.1 throwing fatal errors when SQL statements fail, where the previous action only involved a return of a NULL result set

* 3.1 burpsuite fixes 19 june 2024 (#1433)

* address xss vulnerability for taxa in imagelib/search.php

* fix sql injection bug for cntperpage in imagelib/search.php

* address sql injection of taxa parameter in checklists/checklist.php and, indirectly, /collections/list.php

* hopefully resolves sql injection issue with db/searchvar in /collections/map/kmlhandler.php

* hopefully address sql injection for downloadhandler.php

* [3.1] Minimal header - part 1 (incomplete implementation that defaults as disabled until [3.2] part 2 is done) (#1429)

All requested changes made by @MuchQuak have been incorporated into the Part 2 of the ticket.

* establish minimal_header_template.php

* remove defaults

* freeze of current work to address burpsuite stuff

* continue making aesthetics improvements at both small and large screen sizes for the minimal header

* makes the map header configurable and handles some styling that has to be dynamic depending on presence or absence of map header

* adds minimal header optionally to collections/tools/mappointaid.php

* adds minimal header optionally to CHECKLISTS/tools/mappointaid.php

* move the z-index styling to the css file so that it can be overwritten more easily in collections/georef/georefclone.php. Implements the minimal header in collections/georef/georefclone.php

* fix bug where clicking advanced search from coll profile had a parsing error from the db query param in the url

* implement minimal header in collections/individual/index.php

* remove cruft

* handle cass where [db] is not set

* make progress on /checklists/checklistmap.php?clid=78&thesfilter=0&taxonfilter= and on http://localhost/Symbiota/checklists/clgmap.php?pid=7 but both are currently buggy but commented out

* add default  = false; value to symbini_template

* change defaults to false

* remove absolute and top styling

* Remove imported stylesheet (#1441)

The hardcoded import of the variables.css breaks portals customized using a css/custom folder. (issues presented in /collections/misc/collprofiles.php )

The import also appeared to be unnecessary / redundant as both the customized and v202209 folder version were being brought in.

* Add missing lang file (#1440)

* Determinations import fix (#1435)

* added checks for sciname, date, identifiedBy, added try catch to skip errors instead of stopping

* replaced ERROR with SKIPPED

* unified styling for error/skip displaying

* fixed the sql errors displaying

* go back to original error display

* added note at the end and translations

* added styling for disabled buttons (#1431)

* Taxonomy API Development (#1442)

- Change sciName to scientificName alias
- Make Taxa searchable by taxon search variable
- Support exact, starts with, wildcard, and wholeword search types
- Standardize taxa table indexes
- Update Swagger documentation with new functionality

* Taxonomy Search API Endpoint Dev (#1443)

- Fix bug associated with Swagger documentation
- Update API title output

* Update harvester.php (#1447)

Modifies logic to display available boundary tool when no active geographic thesaurus exist in the DB

* CSS drop-down menus (#1452)

* CSS drop-down menus

Add styling to header.css that enables top drop-down menus

* Update OmCollections.php (#1455)

Errant line of code short circuiting collection meta data update.

* Occurrence editor crowdsource adjustments

- Add formatting for eventDate2
- Adjust exsicati
- Remove from display: additional identifiers, behavior, vitality

* occurrence editor crowdsource adjustments

- Add vertical-align to crowdsource css to override value set within reset.css
- Force refresh of crowdsource.css within client's browsers

* closes #1449 which was preventing checklist polyaid from opening (#1458)

* crowdsource editor styling issue

- resolve vertical-align issue, which persisted when opening in crowdsourcing mode and then switching between long and short forms
- Fix fieldset padding issue within image popout

* Api media 2024 06 (#1463)

- Fix route bug interfering with POST write calls
- Add recordID UUID to POST call
- Improve error output media object isn't found (400 error)
- Improve standardization of all response output
- Add sort fields to api documentation
- Add function that attempts to determine mime type via file header. Has added benefit of ensuring input file exists.
- Update swagger documentation

* Media API

- Add ability to match images based on recordID UUID within PATCH call

* added confirmation windows for project and editor delete icons (#1454)

* [3.1] -burpsuite-fix: do not add taxa to query if there are special characters or quotes (#1436)

* do not add taxa to query if there are special characters or quotes

* cherry pick fix in 6250abd where getTaxonWhereFrag was getting un-cleaned taxon string

* respond to code review feedback

* Occurrence download bug (#1478)

- searchvar term is being sanitized prior to being set as a session variable, which is converting & to &amp;, thus interfering with parsing of all terms after the first term. Translating &amp; to & fixes the issue.
- The cleanOutStr function santizes output using htmlspecialchars. The htmlspecialchars on line 638 will double sanitize output, thus converting "east & west" to "east &amp;amp; west".
- Variable is getting sanitized within index.php with htmlspecialchars twice. Once on line 12 and again on line 205

Addresses GH issue: #1470

* increase font size globally (#843)

* increase font size globally to 14 instead of 12, and then make improvements to other parts that looked a little weird in light of this change and addressed them as well

* Update header_template.php

* swap fonts to 1rem so it always matches html font size, 1rem = font-size of html

* header and footer font fixing

* removing footer font styling

* overhauling base/main/variable css files font sizing

* fixing head template font-size usage

* fixing sitemap fonts

* fixing leafletmap fonts

* removing fonts from occur editor and adding reactive styles to button element

* reactive fonts for occurrencelist from map search page

* jquery-ui-icons-fix

* map search font fixes

* checklist/index.php font fixes

* fixing fonts on collections/list

* font fixes taxa profile and taxa editor

* fixing missing span

* fix merge issues on map search

* fixing sitemap badges to scale with font via height based on rem

* adjusting font styles and solving conflicts with contrast change on col search

* saving col profile layout fixes

* move quicksearch to side and make sticky

* collections/list/spacing

* spacing fix for maps

* making checklist.php layout reactive so it works with different font sizes

* font and layout fixes for checklistadmin

* #tabs font size uses body variable

* Reactive quicksearch colprofile

* layout and font fixes for query form

* fieldset-like alteration

* updating header template

* standardize some spacing in checklists/checklistadminmeta.php

* cleanup on unecessary fonts specs

* fixing collectiontitle layout

* fixing collection group layout with new font size

* fixing error from merge

* more clean up of unused font-size declarations

* add font-size-normalization on tabs ui

* fixing checklist "games" font

* modify jquery ui classes to normalize font

* adjusting searchStyles inner to use rem

* cleanup on some old map inlines that are uneeded

* removing redundant font-size3

* removing uneeded font-family

---------

Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* Bugfix/3.1/spiderfy fix (#1476)

* make random color function produce a color above 40 luminence so that very dark colors are never produced

* add custom clustering strategy so for map/index so that clusters fit in with other points better and also don't cluster far less aggressively

* init slider for clustering aggressiveness

* fix random color gen create rgb values larger than 255

* add cluster to google maps and point oms.js to cdn so it is up to date

* cleaning old gen clusters from leaflet section of map/index

* Paleo bug fix

- Resolve issue interfering with activation of paleo tools

* Collmetadata lang tag audit (#1097)

* Audit collmetadata lang tags

* Minor fix

* Fix popup issue

* Fix to Spanish translations per Samanta's feedback (#1489)

* Shorten Select Language

* Change Contact Us

* Change sample search language

* Search page fix

* Change html characters

* Fix lang tags

* Spacing fix

* Es translation fixes

* Audit lang tags for guidmapper.php (#1083)

* Audit lang tags for guidmapper.php

* Fix guidmapper buttons

* Fix inputs for different actions

* set the initial zoom at 500m (#1493)

* Translation fixes from Samanta's feedback, pt 2 (#1499)

* Translation edits to collprofiles

* List and listtabledisplay translations

* Fix table display translations

* Add basic translation files for usagepolicy

* Small changes to es (#1501)

* symbbase.php refactor

- Remove no longer needed code fragments that ensure that old configuration variable formats are supported after a minor update

* Fix footer to bottom and correct portal login page (#1502)

* switch png to svg, switch button classes to icon-button (#1503)

* Remap old system variables to current format

* Paleo bug fix

- Add activate material sample to collection metadata array

* Material Sample minor style adjust

* Duplicate tool title too long crash fix (#1511)

* added a check for the title length

* added trim for last name, added IGNORE to sql insert query

* Minor bug fix

* change font control (#1512)

* Hotfix 2024 06 24 (#1527)

* Hotfix 2024-06-24
- Image tools
-- Return false when file size cannot be determined within getImgDim1 function
- Glossary (resolves issue: #1526)
-- SQL error causing term list display to fail when a taxon group was included in the search
-- Change table linkages associated with taxon group condition to LEFT JOINs so that all terms are displayed, including those without linkages to **synonyms**

* Null result handle in collections/misc/collstats.php (#1453)

* added null result handle, taxon not found alert

* remove extra line, return empty array for incorrect taxon

* added a check for families and countries

* Occurrence Query String Multiple taxa fix (#1520)

* Colprofile Lang Fix (#1517)

# Issues #1488
# Summary
Exchanged hardcoded string to use a string in the language file

* MappointAid Error Radius Check closes #1487 (#1516)

# Issue #1487
# Summary
Added check for error radius input to error radius. If it doesn't exist
default to 0 so no circle is drawn nor value sent outbound.

* Head template adjustment and base.css into main.css merge (#1514)

- Move majority of php coding out of head_template into symbbase.org. Trying to keep code to a minimum within head import file in order to maintain ability for us to modify code algorithms without having to explicitly change head.php files within each portal install.
- Move css out of head_template.php into separate css file, to again maintain ability to globally modify these styles within future code versions.
- Move header and footer link/import head so that portal administrator can point to different version if they want (e.g. header_button_menu.css)
- Remove css definitions from base.css duplicated within main.css
- Move unique css definitions from base.css into main.css
- Transfer main.css styles that are only used within a single file into target file
- Remove unused or duplicated css from checklist.css
- Remove collectiontable and categorytitle styles, which do not appear to be used anywhere within code

* CSS Refactor

- Remove dependence on $CSS_VERSION_RELEASE and v202209 directory path
- Move all css files out of v202209 directory one directory down into css base directory
- Add $CSS_VERSION to CSS imports within head_template.php, thus allowing force reload of CSS files when that variable is changed within symbbase.php file
- Remove deprecated css/base.css file
- Remove deprecated files within css/symb/directory
- Reduce pixel size of Symbiota icon, which is much larger than a typical icon. Large version of icon is still conserved, but not used as the default icon.

* Fix bold on taxon names closes #1490 (#1529)

# Issue #1490
# Summary
Remove font weight normal from taxon name so that it is going to be bold
(as it should be
)

* Fixing Data Management Tool Subheader Styles (#1531)

# Summary
Css rule to make subheaders not display absolute got overruled during
css fixes so I made the rule more precise to ensure it doesn't get
overridden.

* Fix minors reported within Apache log files

- Ensure that NULL value are not sent to exif_thumbnail function
- Correct a couple language tags used within collections/map/occurrencelist and taxa/index.php
- Add EXTERNAL_RECORDS and PORTAL_LIST language tags to map language files
- Remove unneeded htmlspecialchars used on controlled language tags

* Occurrence Search bug (#1536)

* Occurrence Search bug
- Fix issue with validation of infraspecific taxon names by allowing abbreviations with periods (e.g. var.)
- Allow taxon names to contain hybrid crosses and extinction dagger
- Fix issue with NULL being passed to string function strtoupper

* CSS modification by Logan

* header and footer adjustments

- Move javascript code out of footer into separate js file. This will allow us to make adjustments to code without needing individual non-template footer files to be adjusted to code changes.
- Remove code out of header_template file in preference to code run within symbbase.php file
- Given condition at top of header page testing if language file is imported, individual isset statements for each LANG variable is not needed.

* minimal header adjustments

- Remap minimalheader_template.php to minimalheader.php in support of the currently supported template system
- Add minimalheader_template.php to setup.sh file

* Change html entities to symbols

* Add temporarily to resolve conflict

* Remove dependence on v202209

* fixed the profile accessibility setting (#1534)

* Misc adjustments

- Bug fix: remove php code out of new js file
- Standardize syntax within footer template file
- Remove deprecated code within symbini config file

* Very minor code adjustment

* improved quick search css (#1539)

* Fix for Merge Duplicates Failing when no Determinations need Downgrading (#1484)

* add conditional check for if there are any determinations to downgrade before trying closes #1451

* adds copies of some functions from occurrenceEditorDeterminations to properly merge determinations records

copied functions have been label as such with todos to remove in 3.2
when occurrence editor work to remove latest identification section has
been done

* removing dead code comments

* fix determination merging priority to favor the lasting record

* adds temp function to transfer attributes over to omoccuridentifers if none are present before record merge takes place

* Increase Symbiota size of icon

* Template Lang File Refactor

- Move language variables files for template files into /content/lang/templates/
- Remove template from language file names with intention of including the files as part of the base code
- Standardize header/footer lang variables to ensure that there is not overlap with other existing page specific variables. This is done by adding a prefix of H_ or F_.
- Remove some unused variables from header language file
- Remove /content/lang/header.[LANG_TAG].php include statement from non-header files (clgmap.php, mappointaid.php, georefclone.php).
- Some code cleaning and input variable sanitation adjustments to non-header files referenced above.

* adding variable to control menu font-size for easy customization (#1547)

* adding variable to control menu font-size for easy customization

* move font size control to be out of media query

* Misc adjustments

* Remove 202209 again

* Add break to collection profile title (#1556)

* Template lang file adjustments

- Move image contributors language tags out of header lang file into their own file includes

* Continue to synchronize header and footer lang files

* Update variables.css

correct default header background image path.

* change the default project to 0 (#1546)

* fix typo in request (#1559)

* Add header override files

* Adjustment to resolve conflicts

* minor adjustment

* Change exsicatti to exsicattae (#1563)

* Reapply adjustments lost during previous dev merge

* Change "open" to "toggle" record search form (#1565)

* Remove inline styling for nav icon

* Create customizations.css (#1567)

* Create customizations.css

Creates a new file customizations.css that can be used to store overrides of Symbiota's default styling.  This file should never be modified by Symbiota Dev's so as to not trample on a portal's changes.

* Continued adjustments

* More developments

- dynamic map bug fix: fix link to page that lists all collections
- mappointaid bug fix: fix error importing language files
- Add missing LANG variables within collection search pages

* Additional styling adjustments

- Remove all inline styling of the img elements that were tagged with the "navIcon" attributed. The height of these elements were defined as 15px within the imported css and the inline width defined to 1.3em, thus creating image warping.
- Modified img styling within imported css file to width of 1.3em, which is what was defined within the inline for all elements

* updated the path for accessibility and condensed css (#1572)

* Taxon Description issues

- Add condition testing for language file existence, defaulting to English file upon false
- Make use of cleanOutStr function, thus avoiding null used within htmlspecialchars string function
- Fix bad language keys

* created css class for inverted color, switched location of buttons in taxonomydisplay (#1576)

* Dynamic Map adjustments

- Make use of getDomain() function within the shared Manager class. This function will return the SERVER_HOST value that is set within the symbini config file, or if that variable is not set, generate it dynamically. This reduces the need for this variable to be set within every portal, and centralizes the generation of this so that it can be done safely.
- KML failed to validate within dev environments due to Deprecated Code warning thrown due to undeclared class variable used within a local scope.
- Sanitation adjustments

* Collection Search variable adjustment (#1578)

- Improve the translation of collection input variable (e.g. db) to a database query string, which also improves copy link functions.
- Exclude commas from uri encoding

* Hotfix 2024 07 25 (#1591)

- Inventory and Project Management 
-- Display all checklists that have at least one linked taxon OR is a parent checklist inheriting taxa from a child checklist ([Issue #1532](#1532))
-- Removed limit that required checklist to have at least 10 linked taxa
-- Order checklists by project and checklists names
-- Only display Global symbol within map display option when one or more checklists within a group have lat/long centroids
-- Make project title an active link that opens the project within the project details page
- DwC-A Publishing 
-- Fix fatal error when DwC-A path fails to return a data file

* Disallow glossary download unless you're an editor (#1589)

* Add link to data usage policy to prompt citing glossary (#1590)

* Add link to data usage policy to prompt citing glossary

* Add placeholder for glossary citation

* Make use of getDomin within UtilityFunctions

* Minor adjustments to accommodate failed input variables

* Adjustment to previous submit

* Minor adjustments to checklists lang files

* Rename Taxon / Transfer Vouchers fix (#1594)

* Rename Taxon / Transfer Vouchers fix

Resolves an issue when author is included in the Target Taxon autocomplete suggestions. 

* Modifications

- Add on-change function that nulls tid when data return is null (e.g. invalid name). This clears out tid when one selects a taxon, which populates tid field, but then enters a taxon that is not in the list. Otherwise, the tid would submit the old selected value rather than correctly displaying message that tid is null.
- Remove checkScinameExistence function and rpc call, since it is no longer needed

* Language and JS logic.

---------

Co-authored-by: Edward Gilbert <[email protected]>

* Button styling fix in collprofiles.php (#1535)

* fixed the font styling

* change the primary button font color to white

* unify all buttons styling with body-font-family variable

* Occurrence Editor otherCatNum NULL search

- Bug fix within occurrence editor for when user searches otherCatalogNumbers IS NULL
- Fatal error fix when searching otherCatalogNumber NOT LIKE
Addresses issue: #1582

* Hotfix 2024 08 07 (#1606)

Taxonomy Editor
- Add taxamaps table to data remapping functions when taxon is deleted or remapped. Resolves [issue #1598](#1598)
- Minor error fixes and adjustments to language file imports
Glossary Management 
- Fix issue associated within new sources failing to save when displaying all terms without a taxon group selected. Resolves [issue #1584](#1584) 
- Display all source definitions when taxon group is not selected
- Minor adjustments to language terms and misc code
Occurrence Cleaner - duplicate merge tool
- Replace catalog numbers as the unique identifier for duplicate cluster with numeric key, thus avoiding interference of target form element due to existence of space or period within catalog number. Resolves [issue #1471](#1471) 
- Internationize first submit button
- Add header and footer to cleaning page
Specimen Upload
- Remove display of Data Versioning Checkbox option for snapshot datasets. Batch import data versioning is only available for live managed collections.

* Header / Footer adjustments

- Fix incorrect language tag variables within footer file
- Remove test of H_WELCOME variable, given that no other variables are present
- Comment out js console log output used for debugging

* Checklist Add taxon bugfix (#1604)

* Checklist Add taxon bugfix

see #1602. This fix ties the add taxon feature to a taxonomy.tid (instead of the sciname value returned by the autocomplete.

* refactor based on footer_template.php

Refactored the language value injection based on the pattern Ed used in footer_template.php

* Reset CSS Adjustments

- Remove reset.css from head_template.css in preference of pushing back official rollout of a reset stylesheet to 3.2. Ideally, with normalized.slim.css integrated into a single reset
- Move normalized out of head.php into main so that once merged into reset, we can delete normalized from main without having to adjust head.php files.
- Force refresh of main.css via $CSS_VERSION variable

* increased the width of utm div (#1613)

* removed extra div from for loop (#1614)

* Accessibility adjustments (#1610)

- Move accessibility toggle button and associated components out of footer into single contained file that can be added to footer, header, or other location via an include function
- Move accessibility files into accessibility directory
- Migrate accessibility.footer.css js into accessibilityUtil.js file
- Move accessibility language terms into their own lang files

* Remove Vertical-align from reset.css closes #1498 (#1518)

* Remove Vertical-align from reset.css closes #1498

# Issue #1498
# Summary
Causes undesirable before for things that don't have a default vertical
align like tables, will expand height for some tds if valign top is
used. Also I don't know why reseting the vertical alignment would be
needed

* adding back vertical align but making it top instead of baseline

* fix vertical aligntop for taxa main image

* change over remaing valign propties to styles instead

* remove gridlike-row class from grouped collections (#1618)

* added left margin to heading (#1622)

* fixed the headers, added subheader class (#1623)

* added display inline, added margin (#1624)

* Make SVG icons color controlled by values in variables.css (#1473)

* added styling for svg in icon-buttons, removed inline fill for svgs

* remove fill attributes from svgs in list and occurrencelist

* fixed the css class for icon-button

* Geo thesaurus default data (#1627)

- Add a default thesaurus to 3.0 fresh install. Note that this data file was not included within the 3.1 data patch. Some databases already have some form of a thesaurus, or may wish to create a thesaurus from transferring data from their lookup tables. Running the insert statements when the table is already populated with data would result in an PK conflict errors.  
-- Addresses issue #1605
- Add data file into /schema/3.0/data/ directory so that it could be run as an optional insert. We may want to add a menu option that allows user to run this install from the management interface, and maybe remove the keys from the insert statement so that data would be appended without duplicate key errors, and unique indexes that ensure that duplicate entries are avoided. And/or add a separate script file that only contains SQL that adds continents and links existing countries as children. 
- Deactivate links on non-accepted terms
- Remove ability to add children to non-accepted terms
- Don't display map nor map controls for non-accepted terms
- Add function that appends synonym terms to term output and add synonyms to terms details

* Snapshot collection menu adjustments (#1628)

- Collection admin menu change 
-- Disactivate certain menu options for snapshot collections. The goal is to further discourage folks from live managing specimen records within a Snapshot dataset, which is happening more often than it should. 
-- Keep deactivated items listed within the menu with a clear message stated that these items are only available to Live Managed collection. It is important for snapshot collections to know that these options are still available, but they need to go through the correct channels to activate them.
- Standardization of language tags (internationalization)
-- Add condition test to language file import
-- Remove no longer needed term specific conditions with default language terms
-- Add missing language terms
-- Delete French language file, which only contained English terms. This language file should be created within a separate PR.
- Misc adjustments 
-- Move html output generation out of class file
-- Add rights formatting into a static function within the Utility class. There are a number of locations where this functions need to be called (e.g. images), but this will be done within a separate PR. 
-- Add rights html styling to main.css
-- Misc styling tweaks to collection profile page

Before:
![image](https://github.com/user-attachments/assets/11051792-84d1-48b0-8959-f7eb105c68b5)

After:
![image](https://github.com/user-attachments/assets/0082a9f8-b180-4c0f-b892-788056e2d47e)

* Audit of specupload lang tags (#1084)

* Fix specupload lang tags

* Add home to lang tags

* Update specupload.es.php

* Update specupload.fr.php

* Collection menu adjustment

- Comment out code that deactivates certain menu options within snapshot collections, with the goal of better reviewing these changes and reactivating within 3.2 rollout
- Remove restrictions to label making options, since there are valid reasons for snapshot to make labels

* Update setup.sh (#1630)

* Update setup.sh

Update script to:
- dynamically find all template files
- avoid overwriting existing files unless 'force' option is used
- 'test' option to show example output
- 'verbose' option to give more information about what the script does

Update INSTALL/md

* Hide h1 titles on popups and pages with duplicate titles (#1633)

* added screen-reader-only class

* hide dynamic map heading

* Update OccurrenceIndividual.php (#1648)

* Update OccurrenceIndividual.php

Apply html elements after cleaning DB value

* Add missing language tag (#1642)

* Update geothesaurus (#1636)

- Add counties for Mexico and U.S.A.
- Add accented letters for Mexican states (and fix some too-long state names)
- Remove 3-letter abbreviations for states that were previously just those of the country

* add check for clid and default to 0 if it doesn't exist (#1632)

* Bugfix/3.1/geothesaurus map fixes (#1635)

* Add check for geojson parsing on mapcoordaid that will not parse output into json if there is nothing to parse

* if coordaid changes are made but not saved then save them if save and close is selected

* add warning of unsaved changes when leaving geothesaurus index after making an edit

* removing custom dialog option because they are not allowed

* saves and closes coordaid if edits are saved in leaflet plugin

* Update header_template.php

* Contacts header on collprofiles font fix (#1651)

* removed inline styling

* merge adjustment

* return inline styling on listed colls sections

* Change NSF references to US NSF (#1652)

* Checklist html tags (#1637)

- Fix bug that was html encoding input data prior to be added to the database. All database specific input variables were removed from the view bag in preference to be handled by the class data handlers. 
-- Addresses issue: #1596 
- Removed writable database calls from the ChecklistVoucherAdmin class in preference for shared write statements within the ImInventories class. 
- Add checklist voucher write functions to the shared ImInventories class. 
- Mics bug fixes to the ImInventories class
- Misc style adjustments to improve layout of editor forms

* Populated individual Date fields

- Add code to the occurrence editor that automatically populates year, month, day, startDayOfYear, and endDayOfYear from eventDate fields whenever they are are modified
- Add code to the statistics generator code that populates missing or incorrect individual date fields for a given collection.

* fix geographic cleaning tool (#1659)

* restore the previous code

* restore the badcountrycount functionality

* remove lkupcountry

* added hidden input for default useThes value (#1657)

* Schema Manager adjustments (#1655)

Changes include improved error reporting when database does not exist or is misspelled within connection config file, as well as reporting authentication issues associated with portal base users. If user goes to sitemap and database tables do not yet exist, the user will be forwarded directly to schema manager to assist installing base schema.

Note that the first 3 commits are only associated with batch code adjustments that remove unnecessary code fragements. Looks directly are the last commit to review modifications that are associated with logistically changes (e.g. c54952e).  

Specific changes: 
- Add try/catch to db_connection file and connection test within Manager class that reports when connection to database fails (e.g. no connection, authentication issue, etc)
- Sitemap adjustments that automatically forwards user to schema manager whenever schema is missing (e.g. fresh install).
- Add backward ticks to all table and stored procedure names within schema files so that installation logger is able to properly report table name within logs
- Misc adjustments to schema manager to improved output reports
- Add message to schema manager that warns user when log directories are not writable by web user (e.g. apache)
- Only check users accessibility settings if they are logged in to the portal

* Update DwcArchiverCore.php

- fix issue when custom where statement gets an extra "where" added when string begins with an empty space
Addresses issue: #1653

* Dynamic map checklist dev

- Include points from child checklists when dynamic map is selected within the checklists page
- Add IGNORE to stats INSERT statement in order to avoid fatal error when a duplicate entry it inserted.

* Taxon links bug

- Remove second declaration of taxonlinks array, which was causing the array to be redefined throughout each record loop.

* Fix redundant map (#1663)

That also wasn't reading projArr['displayMap'] variable

* adjust sort comparator to return explcit numbers so v8 doesn't get co… (#1669)

* adjust sort comparator to return explcit numbers so v8 doesn't get confused

* add origin linking to tid

* add origin linking to google map search

* wrapped latitude/longitude in label (#1668)

* Add crowdsourcing language tag

* Update INSTALL.md

Formatting

* Update INSTALL.md

Additional formatting

* Update search.php

- Bug fix resolving issue where collection administrators and editors did not have permission to tag images from their collection.
Addresses issue  #1616

* Hotfix 2024 08 22 (#1677)

- Minor bug fix that was interfering with saving of locationRemarks when a new record is saved (resolves #1445)

* 3.1 preparation updates

- Move still relevant data files into 3.0 data directory
- Update INSTALL.md documentation
- Fix misc spelling error
- Update version number

* Fix typo

* Update UPDATE.md (#1681)

* Fix Backward Compatiblity Issue involving mysqli_execute_query (#1682)

* Adds util function to make use of mysqli_execute_query for older versions of php

# Summary
`mysqli_execute_query` or `$mysqli->execute_query` function is an 8.2
only function provided by mysqli which could break portals that cannot
upgrade to 8.2 from 8 or are running 7.3. Solution is to make a util
function with the same api as mysqli_execute_query but will use the php
version to decide wether to use mysqli_execute_query or normal statement
binding.

* removing comment left over from prototyping

* usage of taxa thesaurus family over occurrence family (#1675)

* usage of taxa thesaurus family over occurrence family

* Modifications

- "ts.taxauthid = 1" needs to be added to the where condition or the recordset would return duplicate records for each taxonomic thesaurus defined within taxstatus table (e.g. there are 4 defined within SEINet). I suppose not including it would not be a big problem since the occid would be the same for each record, and thus the output data array would just copy over existing data. However, it would iterate through more records than needed. Another solution would be to change the statement to "SELECT DISTINCT...", but this can significantly slows down an ordered query.
- Since "ts.taxauthid = 1" is added to the where clause, the getTableJoins function should always add the taxstatus left join, thus we can leave out that test.

* Minor fix to previous submit

---------

Co-authored-by: Edward Gilbert <[email protected]>

* bugfix barcodes (#1683)

fix label printing barcode 500 error

* Update CHANGELOG

* Api occurrence 2024 08 (#1688)

- Occurrence API endpoint development
-- Add collector, collector last name, and collector number as searchable functions
-- Develop write functions (insert, update, delete), but not yet activated for public use 
-- Add new endpoint for loading and processing skeletal occurrence data
-- Add swagger documentation for skeletal record processing 
- Taxonomy API endpoint development
-- Refactor to use query builder for defining search terms (bring code in sync NEON taxonomy developments)  
- Mics
-- Add helper functions to Lumen API

---------

Co-authored-by: Logan Wilt <[email protected]>
Co-authored-by: Edward Gilbert <[email protected]>
Co-authored-by: Greg Post <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: NikitaSalikov <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
themerekat added a commit to GJongsma/Symbiota-light that referenced this pull request Sep 25, 2024
* Bugfix/3.1/map search polygon snapping (BioKIC#1314)

* adds condition to snap leaflet map if shape exists before snapping to points so that likely hood of point in view increases

* added min zoom to leafelt map so that if no bounds are specified the view is better

* Pencil fix (BioKIC#1335)

* Fix spacing issue

* Fix size of pencil icon

* Hotfix 2024-05-17

DwC-A Publishing
- Fix issue with file handler being closed prematurely

* Media API development

- Convert Media POST and PUT data input from parameter values to a data object passed within the body
- Some improvement with response documentation
- Fix duplicate operationId values
- Rebuild Swagger API documentation

* Coloring of Non Observation Points with Direct Updating (BioKIC#1337)

* uses leaflet path method to set color so that it will update when group is not re drawn closes 1319

* close BioKIC#1320, addes check for catnum

* Bugfix/collection meta data status fix (BioKIC#1334)

* adds check for duplicate collectionCode / institutionalCode key when updating collection meta data and gives status msg upon failure closes BioKIC#1311

* changes wording of duplicate error

* link error to new tab

* fixes lang tag error for collmetadata.php title

* closes BioKIC#1326, fixes snapping on map with and without circle (BioKIC#1338)

* Update searchform.js (BioKIC#1336)

* Update searchform.js

Fix sessionStorage.querystring bug.  Javascript was not handling setting db (collections) checkbox array from user sessionStorage.

* Update searchform.js

Correcting variable name

* Revert "Update searchform.js (BioKIC#1336)" (BioKIC#1342)

This reverts commit 79e2a1b.

* removed overarching form tag because it wasn't on both sponsorship forms closes BioKIC#1329 (BioKIC#1341)

* Fix Occur Editor Nav visiblity with no results closes BioKIC#1333 (BioKIC#1343)

* cloFix Occur Editor Nav visiblity with no results closes BioKIC#1333

Shifts conditional hiding search form down a level so it only blocks
tabs that way navigation is still possible when there is no query
results

* shifts formating to correct from one less conditional

* occurrence editor images tab (BioKIC#1350)

The image info was being pushed down to the baseline of the displayed image.  This fix creates a new class that resets the cell alignment to top aligned.

* Update ProfileManager.php (BioKIC#1347)

* Update ProfileManager.php
Confirms if 'accessibilityPref' is set in user's dynamic properties and sets AccessibilityPreference to false by default if not.

* Fits Table to row size when Smaller than 80vh closes BioKIC#1340 (BioKIC#1348)

# Issue 1340
# Summary
This should fit the bottom scroll bar into view when their is few
results.

* [3.1] Font unification (BioKIC#1301)

* remove some font-family references

* remove in-line styling for font-family in all files not .scss, .css, vendor, .js, .less, .html, or .map

* remove <b> from one of the fieldset-likes

* add reference to font-family in reset.css

* remove unecessary font-size restriction on fields-available chips

* 3.1 search page flow bugfix (BioKIC#1351)

* fix the page flow bugs but confirm existing collection persistance issues

* display which collections are to be queried in harvest params

* solve the collection selection for the new search page

* clean up and subfunctionalize

* slight refactor to improve readability

* add minor aesthetic improvement

* add styling class

* remove collection display in harvest params

* remove translations that are now cruft

* Occurrence Dataset Refactor

* Revert "Occurrence Dataset Refactor"

This reverts commit 6580a7a.

* othercatalogNumber parsing bug fix

- Parse tags and values found within omoccurrences:otherCatalogNumbers field and display within additional identifiers table within the occurrence editor. If form is saved, parsed values are saved within omoccuridentiers table.

* Taxonomy remap bug

- Fix issue with taxon remapping/merging into another taxon failing due to key violations within taxstatus (relationship already exists). This is another issue with PHP 8.2 throwing fatal error for mysql warnings. Adding an IGNORE to statement solves the issue since already existing relationships don't need to be  transferred, and will be deleted when secondary taxon is deleted.

* 3.1 hamburger menu fix  (BioKIC#1363)

* Update header.css

Center hamburger menu and flow menu content into body so that menu content is scrollable on small screens.
Remove transitions
Reduce padding around hamburger to unblock 'Home' menu link

* order alphabetically and then by string length (BioKIC#1358)

* Merge info button (BioKIC#1368)

* Add dialog box with info about merging records

* Remove redundant lang tags

Discovered when finding lang tags corresponding to "more information" via dialog box code that I copied

* Change dialog box to a link to Symbiota Docs

Seems more consistent with where we're going now

* Update defaultinvoice.php (BioKIC#1370)

$loanType is a string - was being sanitized as a Int.  Variable is not used in any output to client, so should be safe to just use for comparison without filtering.

* Taxonomy Editor format adjustment

- Minor adjustment to display of parent taxon to fix issue with lack of space between scientific name and author, with additional minor improvements
- Minor improvement to only italicize taxa at genus rank or above
- Move htmlspecailchars and formatting into class assignment so that rankid can be used to decide formating

* Update ImageLocalProcessor.php (BioKIC#1372)

php current() expects an array while parse_url with  PHP_URL_PATH paramter should return a string or false.

This changes were also committed to hotfix-2024-05-22

* Hotfix 2024 05 22 (BioKIC#1374)

* Hotfix 2024-05-22

- Checklist management:
-- Adjust taxon merge function to accommodate PHP v8.1 fatal exceptions during foreign key conflicts within SQL update statements, which previously simply returned false value with a warning
- Image processing:
-- Bug resolution to avoid fatal error where an array function is incorrectly used on a string. Resolves issue BioKIC#1366
- Occurrence Mapping:
-- Fix bug interfering with the exclusion of protected occurrences within the mapping tools when user is not approved to view these records. Associated with issue: BioKIC#1375 

Co-authored-by: Greg Post <[email protected]>

* 3.1-upload-bug

- Avoid fatal error that are now thrown by PHP v8.1+ instead of the previous warning

* Bugfix/3.1/collection list map clustering (BioKIC#1373)

* reroute map result to map search b/c this is fully featured

* closes BioKIC#1345 add add reference marker functionality to map/index so that no funtionality is lost

* inversing switch so logic works out

* default clustering off

* moved cluster switch on by default from needing param and it just defaults to no clustering

* oFixes Map Search Auto searching with no Parameters (BioKIC#1388)

# Summary
Only adds lat long data restrictions if something is present in the
`sqlWhere` property. That way if checks to sqlWhere don't fire with
everything searches ever.

* Bugfix/3.1/record search contrast (BioKIC#1386)

* add important to screen reader only class

* fixing contrast adding styling class for the insert border labels

* collection search uses body color instead of grey for better contrast

* updating screen-reader-only for base.css

* fixing use of data-labels with content to just normal spans

* focus now uses medium color for contrast

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty (BioKIC#1391)

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty

* fix accidental populating of sqlWhere in setGeoSqlWhere

---------

Co-authored-by: Mark <[email protected]>

* [3.1] Merge Duplicate Record bugfix (BioKIC#1344)

* swaps all the merge record queries to be prepared statements (mostly) and puts them in a try catch so blank errors don't occur on the user side

* Add $collId as arg for dupManager merge Records since collId would be undefined otherwise and fixed control flow to only navigate you when error occurs

* Adds Ignores to mergeRecord and Error Control Flow to deleteOccurrence

* Add forgotten lang tags for dupManager

* saving determinations work

* determination history priortizes source records current determinations

* adding quote filtering for taxa and taxonFilter to prevent link onmouse over xss (BioKIC#1380)

* make sure the formats are in explicitly in a whitelist in an attempt to make burpsuite happy (BioKIC#1394)

* [3.1] - burpsuite - emlhandler fix: adds is_numeric checker for collid in collections/datasets/emlhandler… (BioKIC#1398)

* adds is_numeric checker for collid in collections/datasets/emlhandler.php

* respond to code review feedback. If it does not pass the is_numeric check off the bat, it probably should not be treated as valid

* [3.1] - select collections from the url if present (BioKIC#1400)

* select collections from the url if present

* DRY up sanitizedCollectionSource section, which has the same pattern as occurs elsewhere

* fix typo

* change default to empty array

* add better type checking to collIdsFromUrl

* Update ImInventories.php

* fixed the icons max-width value (BioKIC#1410)

* attempt to fix the injection issues in collections/list.php (BioKIC#1401)

* attempt to fix the injection issues

* change setSciNamesByVerns to use prepared statement

* remove extra htmlspecialchars call now that prepared statement is in place

* removed extra spaces

---------

Co-authored-by: Mark <[email protected]>

* Fixes Geothesaurus Searching Closes BioKIC#1396 (BioKIC#1404)

# Issue BioKIC#1396
# Summary
Adds Parameter to let rpc call reduce output to distict results
Fixes parent dependent search detection so that initial id is used
forever even after the parent param changes

* sort by lenght so more exact match comes up when typed (BioKIC#1416)

Issue came up when `calif` would show `Baja California` before
`California` because it was sorted by alphabetical but it really should
be the more exact match ie the smaller one usually first

* Enhancement/3.1/mappoint aid better edit (BioKIC#1417)

* pointaid only autoselects tool if point not present and click to edit is now possible with leaflet draw

* fixes deletion problem with marker and circle present. Also fixes drag not being possible when click editing

* change checklist point aid to just use collection point aid to reduce duplicated effort

* fixed problem that occured while in edit mode and changing the error radius

* more form enhancements so that circle and marker move with each other during position edits

* 3.1 new search to list display (BioKIC#1411)

* add display format radio button and handle case where user navigates back from table display to list display and then clicks breadcrumbs

* handle logic flow of list->table->list

* add translation and respond to self code review

* fix bug where breadcrumbs in collections/listtabledisplay.php were not respecting whether user was coming from new search page

* Change from button back to input to upload file (BioKIC#1415)

* htmlentity quote was messing with json_decode closes BioKIC#1384 (BioKIC#1419)

* changed to prepared statements (BioKIC#1422)

* fixes bug there was a db error because voucher manager was missing during kml download attempt (BioKIC#1421)

* fixes voucher alignment when no search variables are present closes BioKIC#1378 (BioKIC#1423)

# Issues BioKIC#1378

# Summary
Default css in reset.css removed default table vertical alignment which
skewed the inputs in the table

* fix types for taxa id-related prepared statements to match sqls expec… (BioKIC#1426)

* fix types for taxa id-related prepared statements to match sqls expectation of integer types as well as make some cosmetic fixes to spacing for code readbility

* change result to statement for close

* 3.1 schema patch adjustments (BioKIC#1413)

Schema patch adjustments based on running patch through a new portal 3.0 install and a 1.x => 3.0 => 3.1 portal update. Install/update tests were run both through command line and using the schema manager tool.
- Remove omoccurrences index keys that are never set within previous schema updates
- Temporarily turn off foreign key checks to allow renaming of omoccurrences collid index

Schema Manager adjustments 
- Adjust code to accept and run the 3.1 patch
- Add try-catch and other db checks to avoid PHP 8.1 throwing fatal errors when SQL statements fail, where the previous action only involved a return of a NULL result set

* 3.1 burpsuite fixes 19 june 2024 (BioKIC#1433)

* address xss vulnerability for taxa in imagelib/search.php

* fix sql injection bug for cntperpage in imagelib/search.php

* address sql injection of taxa parameter in checklists/checklist.php and, indirectly, /collections/list.php

* hopefully resolves sql injection issue with db/searchvar in /collections/map/kmlhandler.php

* hopefully address sql injection for downloadhandler.php

* [3.1] Minimal header - part 1 (incomplete implementation that defaults as disabled until [3.2] part 2 is done) (BioKIC#1429)

All requested changes made by @MuchQuak have been incorporated into the Part 2 of the ticket.

* establish minimal_header_template.php

* remove defaults

* freeze of current work to address burpsuite stuff

* continue making aesthetics improvements at both small and large screen sizes for the minimal header

* makes the map header configurable and handles some styling that has to be dynamic depending on presence or absence of map header

* adds minimal header optionally to collections/tools/mappointaid.php

* adds minimal header optionally to CHECKLISTS/tools/mappointaid.php

* move the z-index styling to the css file so that it can be overwritten more easily in collections/georef/georefclone.php. Implements the minimal header in collections/georef/georefclone.php

* fix bug where clicking advanced search from coll profile had a parsing error from the db query param in the url

* implement minimal header in collections/individual/index.php

* remove cruft

* handle cass where [db] is not set

* make progress on /checklists/checklistmap.php?clid=78&thesfilter=0&taxonfilter= and on http://localhost/Symbiota/checklists/clgmap.php?pid=7 but both are currently buggy but commented out

* add default  = false; value to symbini_template

* change defaults to false

* remove absolute and top styling

* Remove imported stylesheet (BioKIC#1441)

The hardcoded import of the variables.css breaks portals customized using a css/custom folder. (issues presented in /collections/misc/collprofiles.php )

The import also appeared to be unnecessary / redundant as both the customized and v202209 folder version were being brought in.

* Add missing lang file (BioKIC#1440)

* Determinations import fix (BioKIC#1435)

* added checks for sciname, date, identifiedBy, added try catch to skip errors instead of stopping

* replaced ERROR with SKIPPED

* unified styling for error/skip displaying

* fixed the sql errors displaying

* go back to original error display

* added note at the end and translations

* added styling for disabled buttons (BioKIC#1431)

* Taxonomy API Development (BioKIC#1442)

- Change sciName to scientificName alias
- Make Taxa searchable by taxon search variable
- Support exact, starts with, wildcard, and wholeword search types
- Standardize taxa table indexes
- Update Swagger documentation with new functionality

* Taxonomy Search API Endpoint Dev (BioKIC#1443)

- Fix bug associated with Swagger documentation
- Update API title output

* Update harvester.php (BioKIC#1447)

Modifies logic to display available boundary tool when no active geographic thesaurus exist in the DB

* CSS drop-down menus (BioKIC#1452)

* CSS drop-down menus

Add styling to header.css that enables top drop-down menus

* Update OmCollections.php (BioKIC#1455)

Errant line of code short circuiting collection meta data update.

* Occurrence editor crowdsource adjustments

- Add formatting for eventDate2
- Adjust exsicati
- Remove from display: additional identifiers, behavior, vitality

* occurrence editor crowdsource adjustments

- Add vertical-align to crowdsource css to override value set within reset.css
- Force refresh of crowdsource.css within client's browsers

* closes BioKIC#1449 which was preventing checklist polyaid from opening (BioKIC#1458)

* crowdsource editor styling issue

- resolve vertical-align issue, which persisted when opening in crowdsourcing mode and then switching between long and short forms
- Fix fieldset padding issue within image popout

* Api media 2024 06 (BioKIC#1463)

- Fix route bug interfering with POST write calls
- Add recordID UUID to POST call
- Improve error output media object isn't found (400 error)
- Improve standardization of all response output
- Add sort fields to api documentation
- Add function that attempts to determine mime type via file header. Has added benefit of ensuring input file exists.
- Update swagger documentation

* Media API

- Add ability to match images based on recordID UUID within PATCH call

* added confirmation windows for project and editor delete icons (BioKIC#1454)

* [3.1] -burpsuite-fix: do not add taxa to query if there are special characters or quotes (BioKIC#1436)

* do not add taxa to query if there are special characters or quotes

* cherry pick fix in 6250abd where getTaxonWhereFrag was getting un-cleaned taxon string

* respond to code review feedback

* Occurrence download bug (BioKIC#1478)

- searchvar term is being sanitized prior to being set as a session variable, which is converting & to &amp;, thus interfering with parsing of all terms after the first term. Translating &amp; to & fixes the issue.
- The cleanOutStr function santizes output using htmlspecialchars. The htmlspecialchars on line 638 will double sanitize output, thus converting "east & west" to "east &amp;amp; west".
- Variable is getting sanitized within index.php with htmlspecialchars twice. Once on line 12 and again on line 205

Addresses GH issue: BioKIC#1470

* increase font size globally (BioKIC#843)

* increase font size globally to 14 instead of 12, and then make improvements to other parts that looked a little weird in light of this change and addressed them as well

* Update header_template.php

* swap fonts to 1rem so it always matches html font size, 1rem = font-size of html

* header and footer font fixing

* removing footer font styling

* overhauling base/main/variable css files font sizing

* fixing head template font-size usage

* fixing sitemap fonts

* fixing leafletmap fonts

* removing fonts from occur editor and adding reactive styles to button element

* reactive fonts for occurrencelist from map search page

* jquery-ui-icons-fix

* map search font fixes

* checklist/index.php font fixes

* fixing fonts on collections/list

* font fixes taxa profile and taxa editor

* fixing missing span

* fix merge issues on map search

* fixing sitemap badges to scale with font via height based on rem

* adjusting font styles and solving conflicts with contrast change on col search

* saving col profile layout fixes

* move quicksearch to side and make sticky

* collections/list/spacing

* spacing fix for maps

* making checklist.php layout reactive so it works with different font sizes

* font and layout fixes for checklistadmin

* #tabs font size uses body variable

* Reactive quicksearch colprofile

* layout and font fixes for query form

* fieldset-like alteration

* updating header template

* standardize some spacing in checklists/checklistadminmeta.php

* cleanup on unecessary fonts specs

* fixing collectiontitle layout

* fixing collection group layout with new font size

* fixing error from merge

* more clean up of unused font-size declarations

* add font-size-normalization on tabs ui

* fixing checklist "games" font

* modify jquery ui classes to normalize font

* adjusting searchStyles inner to use rem

* cleanup on some old map inlines that are uneeded

* removing redundant font-size3

* removing uneeded font-family

---------

Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* Bugfix/3.1/spiderfy fix (BioKIC#1476)

* make random color function produce a color above 40 luminence so that very dark colors are never produced

* add custom clustering strategy so for map/index so that clusters fit in with other points better and also don't cluster far less aggressively

* init slider for clustering aggressiveness

* fix random color gen create rgb values larger than 255

* add cluster to google maps and point oms.js to cdn so it is up to date

* cleaning old gen clusters from leaflet section of map/index

* Paleo bug fix

- Resolve issue interfering with activation of paleo tools

* Collmetadata lang tag audit (BioKIC#1097)

* Audit collmetadata lang tags

* Minor fix

* Fix popup issue

* Fix to Spanish translations per Samanta's feedback (BioKIC#1489)

* Shorten Select Language

* Change Contact Us

* Change sample search language

* Search page fix

* Change html characters

* Fix lang tags

* Spacing fix

* Es translation fixes

* Audit lang tags for guidmapper.php (BioKIC#1083)

* Audit lang tags for guidmapper.php

* Fix guidmapper buttons

* Fix inputs for different actions

* set the initial zoom at 500m (BioKIC#1493)

* Translation fixes from Samanta's feedback, pt 2 (BioKIC#1499)

* Translation edits to collprofiles

* List and listtabledisplay translations

* Fix table display translations

* Add basic translation files for usagepolicy

* Small changes to es (BioKIC#1501)

* symbbase.php refactor

- Remove no longer needed code fragments that ensure that old configuration variable formats are supported after a minor update

* Fix footer to bottom and correct portal login page (BioKIC#1502)

* switch png to svg, switch button classes to icon-button (BioKIC#1503)

* Remap old system variables to current format

* Paleo bug fix

- Add activate material sample to collection metadata array

* Material Sample minor style adjust

* Duplicate tool title too long crash fix (BioKIC#1511)

* added a check for the title length

* added trim for last name, added IGNORE to sql insert query

* Minor bug fix

* change font control (BioKIC#1512)

* Hotfix 2024 06 24 (BioKIC#1527)

* Hotfix 2024-06-24
- Image tools
-- Return false when file size cannot be determined within getImgDim1 function
- Glossary (resolves issue: BioKIC#1526)
-- SQL error causing term list display to fail when a taxon group was included in the search
-- Change table linkages associated with taxon group condition to LEFT JOINs so that all terms are displayed, including those without linkages to **synonyms**

* Null result handle in collections/misc/collstats.php (BioKIC#1453)

* added null result handle, taxon not found alert

* remove extra line, return empty array for incorrect taxon

* added a check for families and countries

* Occurrence Query String Multiple taxa fix (BioKIC#1520)

* Colprofile Lang Fix (BioKIC#1517)

# Issues BioKIC#1488
# Summary
Exchanged hardcoded string to use a string in the language file

* MappointAid Error Radius Check closes BioKIC#1487 (BioKIC#1516)

# Issue BioKIC#1487
# Summary
Added check for error radius input to error radius. If it doesn't exist
default to 0 so no circle is drawn nor value sent outbound.

* Head template adjustment and base.css into main.css merge (BioKIC#1514)

- Move majority of php coding out of head_template into symbbase.org. Trying to keep code to a minimum within head import file in order to maintain ability for us to modify code algorithms without having to explicitly change head.php files within each portal install.
- Move css out of head_template.php into separate css file, to again maintain ability to globally modify these styles within future code versions.
- Move header and footer link/import head so that portal administrator can point to different version if they want (e.g. header_button_menu.css)
- Remove css definitions from base.css duplicated within main.css
- Move unique css definitions from base.css into main.css
- Transfer main.css styles that are only used within a single file into target file
- Remove unused or duplicated css from checklist.css
- Remove collectiontable and categorytitle styles, which do not appear to be used anywhere within code

* CSS Refactor

- Remove dependence on $CSS_VERSION_RELEASE and v202209 directory path
- Move all css files out of v202209 directory one directory down into css base directory
- Add $CSS_VERSION to CSS imports within head_template.php, thus allowing force reload of CSS files when that variable is changed within symbbase.php file
- Remove deprecated css/base.css file
- Remove deprecated files within css/symb/directory
- Reduce pixel size of Symbiota icon, which is much larger than a typical icon. Large version of icon is still conserved, but not used as the default icon.

* Fix bold on taxon names closes BioKIC#1490 (BioKIC#1529)

# Issue BioKIC#1490
# Summary
Remove font weight normal from taxon name so that it is going to be bold
(as it should be
)

* Fixing Data Management Tool Subheader Styles (BioKIC#1531)

# Summary
Css rule to make subheaders not display absolute got overruled during
css fixes so I made the rule more precise to ensure it doesn't get
overridden.

* Fix minors reported within Apache log files

- Ensure that NULL value are not sent to exif_thumbnail function
- Correct a couple language tags used within collections/map/occurrencelist and taxa/index.php
- Add EXTERNAL_RECORDS and PORTAL_LIST language tags to map language files
- Remove unneeded htmlspecialchars used on controlled language tags

* Occurrence Search bug (BioKIC#1536)

* Occurrence Search bug
- Fix issue with validation of infraspecific taxon names by allowing abbreviations with periods (e.g. var.)
- Allow taxon names to contain hybrid crosses and extinction dagger
- Fix issue with NULL being passed to string function strtoupper

* CSS modification by Logan

* header and footer adjustments

- Move javascript code out of footer into separate js file. This will allow us to make adjustments to code without needing individual non-template footer files to be adjusted to code changes.
- Remove code out of header_template file in preference to code run within symbbase.php file
- Given condition at top of header page testing if language file is imported, individual isset statements for each LANG variable is not needed.

* minimal header adjustments

- Remap minimalheader_template.php to minimalheader.php in support of the currently supported template system
- Add minimalheader_template.php to setup.sh file

* Change html entities to symbols

* Add temporarily to resolve conflict

* Remove dependence on v202209

* fixed the profile accessibility setting (BioKIC#1534)

* Misc adjustments

- Bug fix: remove php code out of new js file
- Standardize syntax within footer template file
- Remove deprecated code within symbini config file

* Very minor code adjustment

* improved quick search css (BioKIC#1539)

* Fix for Merge Duplicates Failing when no Determinations need Downgrading (BioKIC#1484)

* add conditional check for if there are any determinations to downgrade before trying closes BioKIC#1451

* adds copies of some functions from occurrenceEditorDeterminations to properly merge determinations records

copied functions have been label as such with todos to remove in 3.2
when occurrence editor work to remove latest identification section has
been done

* removing dead code comments

* fix determination merging priority to favor the lasting record

* adds temp function to transfer attributes over to omoccuridentifers if none are present before record merge takes place

* Increase Symbiota size of icon

* Template Lang File Refactor

- Move language variables files for template files into /content/lang/templates/
- Remove template from language file names with intention of including the files as part of the base code
- Standardize header/footer lang variables to ensure that there is not overlap with other existing page specific variables. This is done by adding a prefix of H_ or F_.
- Remove some unused variables from header language file
- Remove /content/lang/header.[LANG_TAG].php include statement from non-header files (clgmap.php, mappointaid.php, georefclone.php).
- Some code cleaning and input variable sanitation adjustments to non-header files referenced above.

* adding variable to control menu font-size for easy customization (BioKIC#1547)

* adding variable to control menu font-size for easy customization

* move font size control to be out of media query

* Misc adjustments

* Remove 202209 again

* Add break to collection profile title (BioKIC#1556)

* Template lang file adjustments

- Move image contributors language tags out of header lang file into their own file includes

* Continue to synchronize header and footer lang files

* Update variables.css

correct default header background image path.

* change the default project to 0 (BioKIC#1546)

* fix typo in request (BioKIC#1559)

* Add header override files

* Adjustment to resolve conflicts

* minor adjustment

* Change exsicatti to exsicattae (BioKIC#1563)

* Reapply adjustments lost during previous dev merge

* Change "open" to "toggle" record search form (BioKIC#1565)

* Remove inline styling for nav icon

* Create customizations.css (BioKIC#1567)

* Create customizations.css

Creates a new file customizations.css that can be used to store overrides of Symbiota's default styling.  This file should never be modified by Symbiota Dev's so as to not trample on a portal's changes.

* Continued adjustments

* More developments

- dynamic map bug fix: fix link to page that lists all collections
- mappointaid bug fix: fix error importing language files
- Add missing LANG variables within collection search pages

* Additional styling adjustments

- Remove all inline styling of the img elements that were tagged with the "navIcon" attributed. The height of these elements were defined as 15px within the imported css and the inline width defined to 1.3em, thus creating image warping.
- Modified img styling within imported css file to width of 1.3em, which is what was defined within the inline for all elements

* updated the path for accessibility and condensed css (BioKIC#1572)

* Taxon Description issues

- Add condition testing for language file existence, defaulting to English file upon false
- Make use of cleanOutStr function, thus avoiding null used within htmlspecialchars string function
- Fix bad language keys

* created css class for inverted color, switched location of buttons in taxonomydisplay (BioKIC#1576)

* Dynamic Map adjustments

- Make use of getDomain() function within the shared Manager class. This function will return the SERVER_HOST value that is set within the symbini config file, or if that variable is not set, generate it dynamically. This reduces the need for this variable to be set within every portal, and centralizes the generation of this so that it can be done safely.
- KML failed to validate within dev environments due to Deprecated Code warning thrown due to undeclared class variable used within a local scope.
- Sanitation adjustments

* Collection Search variable adjustment (BioKIC#1578)

- Improve the translation of collection input variable (e.g. db) to a database query string, which also improves copy link functions.
- Exclude commas from uri encoding

* Hotfix 2024 07 25 (BioKIC#1591)

- Inventory and Project Management 
-- Display all checklists that have at least one linked taxon OR is a parent checklist inheriting taxa from a child checklist ([Issue BioKIC#1532](BioKIC#1532))
-- Removed limit that required checklist to have at least 10 linked taxa
-- Order checklists by project and checklists names
-- Only display Global symbol within map display option when one or more checklists within a group have lat/long centroids
-- Make project title an active link that opens the project within the project details page
- DwC-A Publishing 
-- Fix fatal error when DwC-A path fails to return a data file

* Disallow glossary download unless you're an editor (BioKIC#1589)

* Add link to data usage policy to prompt citing glossary (BioKIC#1590)

* Add link to data usage policy to prompt citing glossary

* Add placeholder for glossary citation

* Make use of getDomin within UtilityFunctions

* Minor adjustments to accommodate failed input variables

* Adjustment to previous submit

* Minor adjustments to checklists lang files

* Rename Taxon / Transfer Vouchers fix (BioKIC#1594)

* Rename Taxon / Transfer Vouchers fix

Resolves an issue when author is included in the Target Taxon autocomplete suggestions. 

* Modifications

- Add on-change function that nulls tid when data return is null (e.g. invalid name). This clears out tid when one selects a taxon, which populates tid field, but then enters a taxon that is not in the list. Otherwise, the tid would submit the old selected value rather than correctly displaying message that tid is null.
- Remove checkScinameExistence function and rpc call, since it is no longer needed

* Language and JS logic.

---------

Co-authored-by: Edward Gilbert <[email protected]>

* Button styling fix in collprofiles.php (BioKIC#1535)

* fixed the font styling

* change the primary button font color to white

* unify all buttons styling with body-font-family variable

* Occurrence Editor otherCatNum NULL search

- Bug fix within occurrence editor for when user searches otherCatalogNumbers IS NULL
- Fatal error fix when searching otherCatalogNumber NOT LIKE
Addresses issue: BioKIC#1582

* Hotfix 2024 08 07 (BioKIC#1606)

Taxonomy Editor
- Add taxamaps table to data remapping functions when taxon is deleted or remapped. Resolves [issue BioKIC#1598](BioKIC#1598)
- Minor error fixes and adjustments to language file imports
Glossary Management 
- Fix issue associated within new sources failing to save when displaying all terms without a taxon group selected. Resolves [issue BioKIC#1584](BioKIC#1584) 
- Display all source definitions when taxon group is not selected
- Minor adjustments to language terms and misc code
Occurrence Cleaner - duplicate merge tool
- Replace catalog numbers as the unique identifier for duplicate cluster with numeric key, thus avoiding interference of target form element due to existence of space or period within catalog number. Resolves [issue BioKIC#1471](BioKIC#1471) 
- Internationize first submit button
- Add header and footer to cleaning page
Specimen Upload
- Remove display of Data Versioning Checkbox option for snapshot datasets. Batch import data versioning is only available for live managed collections.

* Header / Footer adjustments

- Fix incorrect language tag variables within footer file
- Remove test of H_WELCOME variable, given that no other variables are present
- Comment out js console log output used for debugging

* Checklist Add taxon bugfix (BioKIC#1604)

* Checklist Add taxon bugfix

see BioKIC#1602. This fix ties the add taxon feature to a taxonomy.tid (instead of the sciname value returned by the autocomplete.

* refactor based on footer_template.php

Refactored the language value injection based on the pattern Ed used in footer_template.php

* Reset CSS Adjustments

- Remove reset.css from head_template.css in preference of pushing back official rollout of a reset stylesheet to 3.2. Ideally, with normalized.slim.css integrated into a single reset
- Move normalized out of head.php into main so that once merged into reset, we can delete normalized from main without having to adjust head.php files.
- Force refresh of main.css via $CSS_VERSION variable

* increased the width of utm div (BioKIC#1613)

* removed extra div from for loop (BioKIC#1614)

* Accessibility adjustments (BioKIC#1610)

- Move accessibility toggle button and associated components out of footer into single contained file that can be added to footer, header, or other location via an include function
- Move accessibility files into accessibility directory
- Migrate accessibility.footer.css js into accessibilityUtil.js file
- Move accessibility language terms into their own lang files

* Remove Vertical-align from reset.css closes BioKIC#1498 (BioKIC#1518)

* Remove Vertical-align from reset.css closes BioKIC#1498

# Issue BioKIC#1498
# Summary
Causes undesirable before for things that don't have a default vertical
align like tables, will expand height for some tds if valign top is
used. Also I don't know why reseting the vertical alignment would be
needed

* adding back vertical align but making it top instead of baseline

* fix vertical aligntop for taxa main image

* change over remaing valign propties to styles instead

* remove gridlike-row class from grouped collections (BioKIC#1618)

* added left margin to heading (BioKIC#1622)

* fixed the headers, added subheader class (BioKIC#1623)

* added display inline, added margin (BioKIC#1624)

* Make SVG icons color controlled by values in variables.css (BioKIC#1473)

* added styling for svg in icon-buttons, removed inline fill for svgs

* remove fill attributes from svgs in list and occurrencelist

* fixed the css class for icon-button

* Geo thesaurus default data (BioKIC#1627)

- Add a default thesaurus to 3.0 fresh install. Note that this data file was not included within the 3.1 data patch. Some databases already have some form of a thesaurus, or may wish to create a thesaurus from transferring data from their lookup tables. Running the insert statements when the table is already populated with data would result in an PK conflict errors.  
-- Addresses issue BioKIC#1605
- Add data file into /schema/3.0/data/ directory so that it could be run as an optional insert. We may want to add a menu option that allows user to run this install from the management interface, and maybe remove the keys from the insert statement so that data would be appended without duplicate key errors, and unique indexes that ensure that duplicate entries are avoided. And/or add a separate script file that only contains SQL that adds continents and links existing countries as children. 
- Deactivate links on non-accepted terms
- Remove ability to add children to non-accepted terms
- Don't display map nor map controls for non-accepted terms
- Add function that appends synonym terms to term output and add synonyms to terms details

* Snapshot collection menu adjustments (BioKIC#1628)

- Collection admin menu change 
-- Disactivate certain menu options for snapshot collections. The goal is to further discourage folks from live managing specimen records within a Snapshot dataset, which is happening more often than it should. 
-- Keep deactivated items listed within the menu with a clear message stated that these items are only available to Live Managed collection. It is important for snapshot collections to know that these options are still available, but they need to go through the correct channels to activate them.
- Standardization of language tags (internationalization)
-- Add condition test to language file import
-- Remove no longer needed term specific conditions with default language terms
-- Add missing language terms
-- Delete French language file, which only contained English terms. This language file should be created within a separate PR.
- Misc adjustments 
-- Move html output generation out of class file
-- Add rights formatting into a static function within the Utility class. There are a number of locations where this functions need to be called (e.g. images), but this will be done within a separate PR. 
-- Add rights html styling to main.css
-- Misc styling tweaks to collection profile page

Before:
![image](https://github.com/user-attachments/assets/11051792-84d1-48b0-8959-f7eb105c68b5)

After:
![image](https://github.com/user-attachments/assets/0082a9f8-b180-4c0f-b892-788056e2d47e)

* Audit of specupload lang tags (BioKIC#1084)

* Fix specupload lang tags

* Add home to lang tags

* Update specupload.es.php

* Update specupload.fr.php

* Collection menu adjustment

- Comment out code that deactivates certain menu options within snapshot collections, with the goal of better reviewing these changes and reactivating within 3.2 rollout
- Remove restrictions to label making options, since there are valid reasons for snapshot to make labels

* Update setup.sh (BioKIC#1630)

* Update setup.sh

Update script to:
- dynamically find all template files
- avoid overwriting existing files unless 'force' option is used
- 'test' option to show example output
- 'verbose' option to give more information about what the script does

Update INSTALL/md

* Hide h1 titles on popups and pages with duplicate titles (BioKIC#1633)

* added screen-reader-only class

* hide dynamic map heading

* Update OccurrenceIndividual.php (BioKIC#1648)

* Update OccurrenceIndividual.php

Apply html elements after cleaning DB value

* Add missing language tag (BioKIC#1642)

* Update geothesaurus (BioKIC#1636)

- Add counties for Mexico and U.S.A.
- Add accented letters for Mexican states (and fix some too-long state names)
- Remove 3-letter abbreviations for states that were previously just those of the country

* add check for clid and default to 0 if it doesn't exist (BioKIC#1632)

* Bugfix/3.1/geothesaurus map fixes (BioKIC#1635)

* Add check for geojson parsing on mapcoordaid that will not parse output into json if there is nothing to parse

* if coordaid changes are made but not saved then save them if save and close is selected

* add warning of unsaved changes when leaving geothesaurus index after making an edit

* removing custom dialog option because they are not allowed

* saves and closes coordaid if edits are saved in leaflet plugin

* Update header_template.php

* Contacts header on collprofiles font fix (BioKIC#1651)

* removed inline styling

* merge adjustment

* return inline styling on listed colls sections

* Change NSF references to US NSF (BioKIC#1652)

* Checklist html tags (BioKIC#1637)

- Fix bug that was html encoding input data prior to be added to the database. All database specific input variables were removed from the view bag in preference to be handled by the class data handlers. 
-- Addresses issue: BioKIC#1596 
- Removed writable database calls from the ChecklistVoucherAdmin class in preference for shared write statements within the ImInventories class. 
- Add checklist voucher write functions to the shared ImInventories class. 
- Mics bug fixes to the ImInventories class
- Misc style adjustments to improve layout of editor forms

* Populated individual Date fields

- Add code to the occurrence editor that automatically populates year, month, day, startDayOfYear, and endDayOfYear from eventDate fields whenever they are are modified
- Add code to the statistics generator code that populates missing or incorrect individual date fields for a given collection.

* fix geographic cleaning tool (BioKIC#1659)

* restore the previous code

* restore the badcountrycount functionality

* remove lkupcountry

* added hidden input for default useThes value (BioKIC#1657)

* Schema Manager adjustments (BioKIC#1655)

Changes include improved error reporting when database does not exist or is misspelled within connection config file, as well as reporting authentication issues associated with portal base users. If user goes to sitemap and database tables do not yet exist, the user will be forwarded directly to schema manager to assist installing base schema.

Note that the first 3 commits are only associated with batch code adjustments that remove unnecessary code fragements. Looks directly are the last commit to review modifications that are associated with logistically changes (e.g. BioKIC@c54952e).  

Specific changes: 
- Add try/catch to db_connection file and connection test within Manager class that reports when connection to database fails (e.g. no connection, authentication issue, etc)
- Sitemap adjustments that automatically forwards user to schema manager whenever schema is missing (e.g. fresh install).
- Add backward ticks to all table and stored procedure names within schema files so that installation logger is able to properly report table name within logs
- Misc adjustments to schema manager to improved output reports
- Add message to schema manager that warns user when log directories are not writable by web user (e.g. apache)
- Only check users accessibility settings if they are logged in to the portal

* Update DwcArchiverCore.php

- fix issue when custom where statement gets an extra "where" added when string begins with an empty space
Addresses issue: BioKIC#1653

* Dynamic map checklist dev

- Include points from child checklists when dynamic map is selected within the checklists page
- Add IGNORE to stats INSERT statement in order to avoid fatal error when a duplicate entry it inserted.

* Taxon links bug

- Remove second declaration of taxonlinks array, which was causing the array to be redefined throughout each record loop.

* Fix redundant map (BioKIC#1663)

That also wasn't reading projArr['displayMap'] variable

* adjust sort comparator to return explcit numbers so v8 doesn't get co… (BioKIC#1669)

* adjust sort comparator to return explcit numbers so v8 doesn't get confused

* add origin linking to tid

* add origin linking to google map search

* wrapped latitude/longitude in label (BioKIC#1668)

* Add crowdsourcing language tag

* Update INSTALL.md

Formatting

* Update INSTALL.md

Additional formatting

* Update search.php

- Bug fix resolving issue where collection administrators and editors did not have permission to tag images from their collection.
Addresses issue  BioKIC#1616

* Hotfix 2024 08 22 (BioKIC#1677)

- Minor bug fix that was interfering with saving of locationRemarks when a new record is saved (resolves BioKIC#1445)

* 3.1 preparation updates

- Move still relevant data files into 3.0 data directory
- Update INSTALL.md documentation
- Fix misc spelling error
- Update version number

* Fix typo

* Update UPDATE.md (BioKIC#1681)

* Fix Backward Compatiblity Issue involving mysqli_execute_query (BioKIC#1682)

* Adds util function to make use of mysqli_execute_query for older versions of php

# Summary
`mysqli_execute_query` or `$mysqli->execute_query` function is an 8.2
only function provided by mysqli which could break portals that cannot
upgrade to 8.2 from 8 or are running 7.3. Solution is to make a util
function with the same api as mysqli_execute_query but will use the php
version to decide wether to use mysqli_execute_query or normal statement
binding.

* removing comment left over from prototyping

* usage of taxa thesaurus family over occurrence family (BioKIC#1675)

* usage of taxa thesaurus family over occurrence family

* Modifications

- "ts.taxauthid = 1" needs to be added to the where condition or the recordset would return duplicate records for each taxonomic thesaurus defined within taxstatus table (e.g. there are 4 defined within SEINet). I suppose not including it would not be a big problem since the occid would be the same for each record, and thus the output data array would just copy over existing data. However, it would iterate through more records than needed. Another solution would be to change the statement to "SELECT DISTINCT...", but this can significantly slows down an ordered query.
- Since "ts.taxauthid = 1" is added to the where clause, the getTableJoins function should always add the taxstatus left join, thus we can leave out that test.

* Minor fix to previous submit

---------

Co-authored-by: Edward Gilbert <[email protected]>

* bugfix barcodes (BioKIC#1683)

fix label printing barcode 500 error

* Update CHANGELOG

* Api occurrence 2024 08 (BioKIC#1688)

- Occurrence API endpoint development
-- Add collector, collector last name, and collector number as searchable functions
-- Develop write functions (insert, update, delete), but not yet activated for public use 
-- Add new endpoint for loading and processing skeletal occurrence data
-- Add swagger documentation for skeletal record processing 
- Taxonomy API endpoint development
-- Refactor to use query builder for defining search terms (bring code in sync NEON taxonomy developments)  
- Mics
-- Add helper functions to Lumen API

---------

Co-authored-by: Logan Wilt <[email protected]>
Co-authored-by: Edward Gilbert <[email protected]>
Co-authored-by: Greg Post <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: NikitaSalikov <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
themerekat added a commit that referenced this pull request Oct 22, 2024
* Pencil fix (#1335)

* Fix spacing issue

* Fix size of pencil icon

* Media API development

- Convert Media POST and PUT data input from parameter values to a data object passed within the body
- Some improvement with response documentation
- Fix duplicate operationId values
- Rebuild Swagger API documentation

* Coloring of Non Observation Points with Direct Updating (#1337)

* uses leaflet path method to set color so that it will update when group is not re drawn closes 1319

* close #1320, addes check for catnum

* Bugfix/collection meta data status fix (#1334)

* adds check for duplicate collectionCode / institutionalCode key when updating collection meta data and gives status msg upon failure closes #1311

* changes wording of duplicate error

* link error to new tab

* fixes lang tag error for collmetadata.php title

* closes #1326, fixes snapping on map with and without circle (#1338)

* Update searchform.js (#1336)

* Update searchform.js

Fix sessionStorage.querystring bug.  Javascript was not handling setting db (collections) checkbox array from user sessionStorage.

* Update searchform.js

Correcting variable name

* Revert "Update searchform.js (#1336)" (#1342)

This reverts commit 79e2a1b0da2d03e29d2f3658a936279252edce6b.

* removed overarching form tag because it wasn't on both sponsorship forms closes #1329 (#1341)

* Fix Occur Editor Nav visiblity with no results closes #1333 (#1343)

* cloFix Occur Editor Nav visiblity with no results closes #1333

Shifts conditional hiding search form down a level so it only blocks
tabs that way navigation is still possible when there is no query
results

* shifts formating to correct from one less conditional

* occurrence editor images tab (#1350)

The image info was being pushed down to the baseline of the displayed image.  This fix creates a new class that resets the cell alignment to top aligned.

* Update ProfileManager.php (#1347)

* Update ProfileManager.php
Confirms if 'accessibilityPref' is set in user's dynamic properties and sets AccessibilityPreference to false by default if not.

* Fits Table to row size when Smaller than 80vh closes #1340 (#1348)

# Issue 1340
# Summary
This should fit the bottom scroll bar into view when their is few
results.

* [3.1] Font unification (#1301)

* remove some font-family references

* remove in-line styling for font-family in all files not .scss, .css, vendor, .js, .less, .html, or .map

* remove <b> from one of the fieldset-likes

* add reference to font-family in reset.css

* remove unecessary font-size restriction on fields-available chips

* 3.1 search page flow bugfix (#1351)

* fix the page flow bugs but confirm existing collection persistance issues

* display which collections are to be queried in harvest params

* solve the collection selection for the new search page

* clean up and subfunctionalize

* slight refactor to improve readability

* add minor aesthetic improvement

* add styling class

* remove collection display in harvest params

* remove translations that are now cruft

* Occurrence Dataset Refactor

* Revert "Occurrence Dataset Refactor"

This reverts commit 6580a7a57919f986f24890ebe559fb7eeedc5e17.

* othercatalogNumber parsing bug fix

- Parse tags and values found within omoccurrences:otherCatalogNumbers field and display within additional identifiers table within the occurrence editor. If form is saved, parsed values are saved within omoccuridentiers table.

* Taxonomy remap bug

- Fix issue with taxon remapping/merging into another taxon failing due to key violations within taxstatus (relationship already exists). This is another issue with PHP 8.2 throwing fatal error for mysql warnings. Adding an IGNORE to statement solves the issue since already existing relationships don't need to be  transferred, and will be deleted when secondary taxon is deleted.

* 3.1 hamburger menu fix  (#1363)

* Update header.css

Center hamburger menu and flow menu content into body so that menu content is scrollable on small screens.
Remove transitions
Reduce padding around hamburger to unblock 'Home' menu link

* order alphabetically and then by string length (#1358)

* Merge info button (#1368)

* Add dialog box with info about merging records

* Remove redundant lang tags

Discovered when finding lang tags corresponding to "more information" via dialog box code that I copied

* Change dialog box to a link to Symbiota Docs

Seems more consistent with where we're going now

* Update defaultinvoice.php (#1370)

$loanType is a string - was being sanitized as a Int.  Variable is not used in any output to client, so should be safe to just use for comparison without filtering.

* Taxonomy Editor format adjustment

- Minor adjustment to display of parent taxon to fix issue with lack of space between scientific name and author, with additional minor improvements
- Minor improvement to only italicize taxa at genus rank or above
- Move htmlspecailchars and formatting into class assignment so that rankid can be used to decide formating

* Update ImageLocalProcessor.php (#1372)

php current() expects an array while parse_url with  PHP_URL_PATH paramter should return a string or false.

This changes were also committed to hotfix-2024-05-22

* Hotfix 2024 05 22 (#1374)

* Hotfix 2024-05-22

- Checklist management:
-- Adjust taxon merge function to accommodate PHP v8.1 fatal exceptions during foreign key conflicts within SQL update statements, which previously simply returned false value with a warning
- Image processing:
-- Bug resolution to avoid fatal error where an array function is incorrectly used on a string. Resolves issue https://github.com/BioKIC/Symbiota/issues/1366
- Occurrence Mapping:
-- Fix bug interfering with the exclusion of protected occurrences within the mapping tools when user is not approved to view these records. Associated with issue: https://github.com/BioKIC/Symbiota/issues/1375 

Co-authored-by: Greg Post <[email protected]>

* 3.1-upload-bug

- Avoid fatal error that are now thrown by PHP v8.1+ instead of the previous warning

* Bugfix/3.1/collection list map clustering (#1373)

* reroute map result to map search b/c this is fully featured

* closes #1345 add add reference marker functionality to map/index so that no funtionality is lost

* inversing switch so logic works out

* default clustering off

* moved cluster switch on by default from needing param and it just defaults to no clustering

* oFixes Map Search Auto searching with no Parameters (#1388)

# Summary
Only adds lat long data restrictions if something is present in the
`sqlWhere` property. That way if checks to sqlWhere don't fire with
everything searches ever.

* Bugfix/3.1/record search contrast (#1386)

* add important to screen reader only class

* fixing contrast adding styling class for the insert border labels

* collection search uses body color instead of grey for better contrast

* updating screen-reader-only for base.css

* fixing use of data-labels with content to just normal spans

* focus now uses medium color for contrast

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty (#1391)

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty

* fix accidental populating of sqlWhere in setGeoSqlWhere

---------

Co-authored-by: Mark <[email protected]>

* [3.1] Merge Duplicate Record bugfix (#1344)

* swaps all the merge record queries to be prepared statements (mostly) and puts them in a try catch so blank errors don't occur on the user side

* Add $collId as arg for dupManager merge Records since collId would be undefined otherwise and fixed control flow to only navigate you when error occurs

* Adds Ignores to mergeRecord and Error Control Flow to deleteOccurrence

* Add forgotten lang tags for dupManager

* saving determinations work

* determination history priortizes source records current determinations

* adding quote filtering for taxa and taxonFilter to prevent link onmouse over xss (#1380)

* make sure the formats are in explicitly in a whitelist in an attempt to make burpsuite happy (#1394)

* [3.1] - burpsuite - emlhandler fix: adds is_numeric checker for collid in collections/datasets/emlhandler… (#1398)

* adds is_numeric checker for collid in collections/datasets/emlhandler.php

* respond to code review feedback. If it does not pass the is_numeric check off the bat, it probably should not be treated as valid

* [3.1] - select collections from the url if present (#1400)

* select collections from the url if present

* DRY up sanitizedCollectionSource section, which has the same pattern as occurs elsewhere

* fix typo

* change default to empty array

* add better type checking to collIdsFromUrl

* Update ImInventories.php

* fixed the icons max-width value (#1410)

* attempt to fix the injection issues in collections/list.php (#1401)

* attempt to fix the injection issues

* change setSciNamesByVerns to use prepared statement

* remove extra htmlspecialchars call now that prepared statement is in place

* removed extra spaces

---------

Co-authored-by: Mark <[email protected]>

* Fixes Geothesaurus Searching Closes #1396 (#1404)

# Issue #1396
# Summary
Adds Parameter to let rpc call reduce output to distict results
Fixes parent dependent search detection so that initial id is used
forever even after the parent param changes

* sort by lenght so more exact match comes up when typed (#1416)

Issue came up when `calif` would show `Baja California` before
`California` because it was sorted by alphabetical but it really should
be the more exact match ie the smaller one usually first

* Enhancement/3.1/mappoint aid better edit (#1417)

* pointaid only autoselects tool if point not present and click to edit is now possible with leaflet draw

* fixes deletion problem with marker and circle present. Also fixes drag not being possible when click editing

* change checklist point aid to just use collection point aid to reduce duplicated effort

* fixed problem that occured while in edit mode and changing the error radius

* more form enhancements so that circle and marker move with each other during position edits

* 3.1 new search to list display (#1411)

* add display format radio button and handle case where user navigates back from table display to list display and then clicks breadcrumbs

* handle logic flow of list->table->list

* add translation and respond to self code review

* fix bug where breadcrumbs in collections/listtabledisplay.php were not respecting whether user was coming from new search page

* Change from button back to input to upload file (#1415)

* htmlentity quote was messing with json_decode closes #1384 (#1419)

* changed to prepared statements (#1422)

* fixes bug there was a db error because voucher manager was missing during kml download attempt (#1421)

* fixes voucher alignment when no search variables are present closes #1378 (#1423)

# Issues #1378

# Summary
Default css in reset.css removed default table vertical alignment which
skewed the inputs in the table

* fix types for taxa id-related prepared statements to match sqls expec… (#1426)

* fix types for taxa id-related prepared statements to match sqls expectation of integer types as well as make some cosmetic fixes to spacing for code readbility

* change result to statement for close

* 3.1 schema patch adjustments (#1413)

Schema patch adjustments based on running patch through a new portal 3.0 install and a 1.x => 3.0 => 3.1 portal update. Install/update tests were run both through command line and using the schema manager tool.
- Remove omoccurrences index keys that are never set within previous schema updates
- Temporarily turn off foreign key checks to allow renaming of omoccurrences collid index

Schema Manager adjustments 
- Adjust code to accept and run the 3.1 patch
- Add try-catch and other db checks to avoid PHP 8.1 throwing fatal errors when SQL statements fail, where the previous action only involved a return of a NULL result set

* 3.1 burpsuite fixes 19 june 2024 (#1433)

* address xss vulnerability for taxa in imagelib/search.php

* fix sql injection bug for cntperpage in imagelib/search.php

* address sql injection of taxa parameter in checklists/checklist.php and, indirectly, /collections/list.php

* hopefully resolves sql injection issue with db/searchvar in /collections/map/kmlhandler.php

* hopefully address sql injection for downloadhandler.php

* [3.1] Minimal header - part 1 (incomplete implementation that defaults as disabled until [3.2] part 2 is done) (#1429)

All requested changes made by @MuchQuak have been incorporated into the Part 2 of the ticket.

* establish minimal_header_template.php

* remove defaults

* freeze of current work to address burpsuite stuff

* continue making aesthetics improvements at both small and large screen sizes for the minimal header

* makes the map header configurable and handles some styling that has to be dynamic depending on presence or absence of map header

* adds minimal header optionally to collections/tools/mappointaid.php

* adds minimal header optionally to CHECKLISTS/tools/mappointaid.php

* move the z-index styling to the css file so that it can be overwritten more easily in collections/georef/georefclone.php. Implements the minimal header in collections/georef/georefclone.php

* fix bug where clicking advanced search from coll profile had a parsing error from the db query param in the url

* implement minimal header in collections/individual/index.php

* remove cruft

* handle cass where [db] is not set

* make progress on /checklists/checklistmap.php?clid=78&thesfilter=0&taxonfilter= and on http://localhost/Symbiota/checklists/clgmap.php?pid=7 but both are currently buggy but commented out

* add default  = false; value to symbini_template

* change defaults to false

* remove absolute and top styling

* Remove imported stylesheet (#1441)

The hardcoded import of the variables.css breaks portals customized using a css/custom folder. (issues presented in /collections/misc/collprofiles.php )

The import also appeared to be unnecessary / redundant as both the customized and v202209 folder version were being brought in.

* Add missing lang file (#1440)

* Determinations import fix (#1435)

* added checks for sciname, date, identifiedBy, added try catch to skip errors instead of stopping

* replaced ERROR with SKIPPED

* unified styling for error/skip displaying

* fixed the sql errors displaying

* go back to original error display

* added note at the end and translations

* added styling for disabled buttons (#1431)

* Taxonomy API Development (#1442)

- Change sciName to scientificName alias
- Make Taxa searchable by taxon search variable
- Support exact, starts with, wildcard, and wholeword search types
- Standardize taxa table indexes
- Update Swagger documentation with new functionality

* Taxonomy Search API Endpoint Dev (#1443)

- Fix bug associated with Swagger documentation
- Update API title output

* Update harvester.php (#1447)

Modifies logic to display available boundary tool when no active geographic thesaurus exist in the DB

* CSS drop-down menus (#1452)

* CSS drop-down menus

Add styling to header.css that enables top drop-down menus

* Update OmCollections.php (#1455)

Errant line of code short circuiting collection meta data update.

* Occurrence editor crowdsource adjustments

- Add formatting for eventDate2
- Adjust exsicati
- Remove from display: additional identifiers, behavior, vitality

* occurrence editor crowdsource adjustments

- Add vertical-align to crowdsource css to override value set within reset.css
- Force refresh of crowdsource.css within client's browsers

* closes #1449 which was preventing checklist polyaid from opening (#1458)

* crowdsource editor styling issue

- resolve vertical-align issue, which persisted when opening in crowdsourcing mode and then switching between long and short forms
- Fix fieldset padding issue within image popout

* Api media 2024 06 (#1463)

- Fix route bug interfering with POST write calls
- Add recordID UUID to POST call
- Improve error output media object isn't found (400 error)
- Improve standardization of all response output
- Add sort fields to api documentation
- Add function that attempts to determine mime type via file header. Has added benefit of ensuring input file exists.
- Update swagger documentation

* Media API

- Add ability to match images based on recordID UUID within PATCH call

* added confirmation windows for project and editor delete icons (#1454)

* [3.1] -burpsuite-fix: do not add taxa to query if there are special characters or quotes (#1436)

* do not add taxa to query if there are special characters or quotes

* cherry pick fix in 6250abde5 where getTaxonWhereFrag was getting un-cleaned taxon string

* respond to code review feedback

* Occurrence download bug (#1478)

- searchvar term is being sanitized prior to being set as a session variable, which is converting & to &amp;, thus interfering with parsing of all terms after the first term. Translating &amp; to & fixes the issue.
- The cleanOutStr function santizes output using htmlspecialchars. The htmlspecialchars on line 638 will double sanitize output, thus converting "east & west" to "east &amp;amp; west".
- Variable is getting sanitized within index.php with htmlspecialchars twice. Once on line 12 and again on line 205

Addresses GH issue: https://github.com/BioKIC/Symbiota/issues/1470

* increase font size globally (#843)

* increase font size globally to 14 instead of 12, and then make improvements to other parts that looked a little weird in light of this change and addressed them as well

* Update header_template.php

* swap fonts to 1rem so it always matches html font size, 1rem = font-size of html

* header and footer font fixing

* removing footer font styling

* overhauling base/main/variable css files font sizing

* fixing head template font-size usage

* fixing sitemap fonts

* fixing leafletmap fonts

* removing fonts from occur editor and adding reactive styles to button element

* reactive fonts for occurrencelist from map search page

* jquery-ui-icons-fix

* map search font fixes

* checklist/index.php font fixes

* fixing fonts on collections/list

* font fixes taxa profile and taxa editor

* fixing missing span

* fix merge issues on map search

* fixing sitemap badges to scale with font via height based on rem

* adjusting font styles and solving conflicts with contrast change on col search

* saving col profile layout fixes

* move quicksearch to side and make sticky

* collections/list/spacing

* spacing fix for maps

* making checklist.php layout reactive so it works with different font sizes

* font and layout fixes for checklistadmin

* #tabs font size uses body variable

* Reactive quicksearch colprofile

* layout and font fixes for query form

* fieldset-like alteration

* updating header template

* standardize some spacing in checklists/checklistadminmeta.php

* cleanup on unecessary fonts specs

* fixing collectiontitle layout

* fixing collection group layout with new font size

* fixing error from merge

* more clean up of unused font-size declarations

* add font-size-normalization on tabs ui

* fixing checklist "games" font

* modify jquery ui classes to normalize font

* adjusting searchStyles inner to use rem

* cleanup on some old map inlines that are uneeded

* removing redundant font-size3

* removing uneeded font-family

---------

Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* Bugfix/3.1/spiderfy fix (#1476)

* make random color function produce a color above 40 luminence so that very dark colors are never produced

* add custom clustering strategy so for map/index so that clusters fit in with other points better and also don't cluster far less aggressively

* init slider for clustering aggressiveness

* fix random color gen create rgb values larger than 255

* add cluster to google maps and point oms.js to cdn so it is up to date

* cleaning old gen clusters from leaflet section of map/index

* Paleo bug fix

- Resolve issue interfering with activation of paleo tools

* Collmetadata lang tag audit (#1097)

* Audit collmetadata lang tags

* Minor fix

* Fix popup issue

* Fix to Spanish translations per Samanta's feedback (#1489)

* Shorten Select Language

* Change Contact Us

* Change sample search language

* Search page fix

* Change html characters

* Fix lang tags

* Spacing fix

* Es translation fixes

* Audit lang tags for guidmapper.php (#1083)

* Audit lang tags for guidmapper.php

* Fix guidmapper buttons

* Fix inputs for different actions

* set the initial zoom at 500m (#1493)

* Translation fixes from Samanta's feedback, pt 2 (#1499)

* Translation edits to collprofiles

* List and listtabledisplay translations

* Fix table display translations

* Add basic translation files for usagepolicy

* Small changes to es (#1501)

* symbbase.php refactor

- Remove no longer needed code fragments that ensure that old configuration variable formats are supported after a minor update

* Fix footer to bottom and correct portal login page (#1502)

* switch png to svg, switch button classes to icon-button (#1503)

* Remap old system variables to current format

* Paleo bug fix

- Add activate material sample to collection metadata array

* Material Sample minor style adjust

* Duplicate tool title too long crash fix (#1511)

* added a check for the title length

* added trim for last name, added IGNORE to sql insert query

* Minor bug fix

* change font control (#1512)

* Hotfix 2024 06 24 (#1527)

* Hotfix 2024-06-24
- Image tools
-- Return false when file size cannot be determined within getImgDim1 function
- Glossary (resolves issue: https://github.com/BioKIC/Symbiota/issues/1526)
-- SQL error causing term list display to fail when a taxon group was included in the search
-- Change table linkages associated with taxon group condition to LEFT JOINs so that all terms are displayed, including those without linkages to **synonyms**

* Null result handle in collections/misc/collstats.php (#1453)

* added null result handle, taxon not found alert

* remove extra line, return empty array for incorrect taxon

* added a check for families and countries

* Occurrence Query String Multiple taxa fix (#1520)

* Colprofile Lang Fix (#1517)

# Issues #1488
# Summary
Exchanged hardcoded string to use a string in the language file

* MappointAid Error Radius Check closes #1487 (#1516)

# Issue #1487
# Summary
Added check for error radius input to error radius. If it doesn't exist
default to 0 so no circle is drawn nor value sent outbound.

* Head template adjustment and base.css into main.css merge (#1514)

- Move majority of php coding out of head_template into symbbase.org. Trying to keep code to a minimum within head import file in order to maintain ability for us to modify code algorithms without having to explicitly change head.php files within each portal install.
- Move css out of head_template.php into separate css file, to again maintain ability to globally modify these styles within future code versions.
- Move header and footer link/import head so that portal administrator can point to different version if they want (e.g. header_button_menu.css)
- Remove css definitions from base.css duplicated within main.css
- Move unique css definitions from base.css into main.css
- Transfer main.css styles that are only used within a single file into target file
- Remove unused or duplicated css from checklist.css
- Remove collectiontable and categorytitle styles, which do not appear to be used anywhere within code

* CSS Refactor

- Remove dependence on $CSS_VERSION_RELEASE and v202209 directory path
- Move all css files out of v202209 directory one directory down into css base directory
- Add $CSS_VERSION to CSS imports within head_template.php, thus allowing force reload of CSS files when that variable is changed within symbbase.php file
- Remove deprecated css/base.css file
- Remove deprecated files within css/symb/directory
- Reduce pixel size of Symbiota icon, which is much larger than a typical icon. Large version of icon is still conserved, but not used as the default icon.

* Fix bold on taxon names closes #1490 (#1529)

# Issue #1490
# Summary
Remove font weight normal from taxon name so that it is going to be bold
(as it should be
)

* Fixing Data Management Tool Subheader Styles (#1531)

# Summary
Css rule to make subheaders not display absolute got overruled during
css fixes so I made the rule more precise to ensure it doesn't get
overridden.

* Fix minors reported within Apache log files

- Ensure that NULL value are not sent to exif_thumbnail function
- Correct a couple language tags used within collections/map/occurrencelist and taxa/index.php
- Add EXTERNAL_RECORDS and PORTAL_LIST language tags to map language files
- Remove unneeded htmlspecialchars used on controlled language tags

* Occurrence Search bug (#1536)

* Occurrence Search bug
- Fix issue with validation of infraspecific taxon names by allowing abbreviations with periods (e.g. var.)
- Allow taxon names to contain hybrid crosses and extinction dagger
- Fix issue with NULL being passed to string function strtoupper

* CSS modification by Logan

* header and footer adjustments

- Move javascript code out of footer into separate js file. This will allow us to make adjustments to code without needing individual non-template footer files to be adjusted to code changes.
- Remove code out of header_template file in preference to code run within symbbase.php file
- Given condition at top of header page testing if language file is imported, individual isset statements for each LANG variable is not needed.

* minimal header adjustments

- Remap minimalheader_template.php to minimalheader.php in support of the currently supported template system
- Add minimalheader_template.php to setup.sh file

* Change html entities to symbols

* Add temporarily to resolve conflict

* Remove dependence on v202209

* fixed the profile accessibility setting (#1534)

* Misc adjustments

- Bug fix: remove php code out of new js file
- Standardize syntax within footer template file
- Remove deprecated code within symbini config file

* Very minor code adjustment

* improved quick search css (#1539)

* Fix for Merge Duplicates Failing when no Determinations need Downgrading (#1484)

* add conditional check for if there are any determinations to downgrade before trying closes #1451

* adds copies of some functions from occurrenceEditorDeterminations to properly merge determinations records

copied functions have been label as such with todos to remove in 3.2
when occurrence editor work to remove latest identification section has
been done

* removing dead code comments

* fix determination merging priority to favor the lasting record

* adds temp function to transfer attributes over to omoccuridentifers if none are present before record merge takes place

* Increase Symbiota size of icon

* Template Lang File Refactor

- Move language variables files for template files into /content/lang/templates/
- Remove template from language file names with intention of including the files as part of the base code
- Standardize header/footer lang variables to ensure that there is not overlap with other existing page specific variables. This is done by adding a prefix of H_ or F_.
- Remove some unused variables from header language file
- Remove /content/lang/header.[LANG_TAG].php include statement from non-header files (clgmap.php, mappointaid.php, georefclone.php).
- Some code cleaning and input variable sanitation adjustments to non-header files referenced above.

* adding variable to control menu font-size for easy customization (#1547)

* adding variable to control menu font-size for easy customization

* move font size control to be out of media query

* Misc adjustments

* Remove 202209 again

* Add break to collection profile title (#1556)

* Template lang file adjustments

- Move image contributors language tags out of header lang file into their own file includes

* Continue to synchronize header and footer lang files

* Update variables.css

correct default header background image path.

* change the default project to 0 (#1546)

* fix typo in request (#1559)

* Add header override files

* Adjustment to resolve conflicts

* minor adjustment

* Change exsicatti to exsicattae (#1563)

* Reapply adjustments lost during previous dev merge

* Change "open" to "toggle" record search form (#1565)

* Remove inline styling for nav icon

* Create customizations.css (#1567)

* Create customizations.css

Creates a new file customizations.css that can be used to store overrides of Symbiota's default styling.  This file should never be modified by Symbiota Dev's so as to not trample on a portal's changes.

* Continued adjustments

* More developments

- dynamic map bug fix: fix link to page that lists all collections
- mappointaid bug fix: fix error importing language files
- Add missing LANG variables within collection search pages

* Additional styling adjustments

- Remove all inline styling of the img elements that were tagged with the "navIcon" attributed. The height of these elements were defined as 15px within the imported css and the inline width defined to 1.3em, thus creating image warping.
- Modified img styling within imported css file to width of 1.3em, which is what was defined within the inline for all elements

* updated the path for accessibility and condensed css (#1572)

* Taxon Description issues

- Add condition testing for language file existence, defaulting to English file upon false
- Make use of cleanOutStr function, thus avoiding null used within htmlspecialchars string function
- Fix bad language keys

* created css class for inverted color, switched location of buttons in taxonomydisplay (#1576)

* Dynamic Map adjustments

- Make use of getDomain() function within the shared Manager class. This function will return the SERVER_HOST value that is set within the symbini config file, or if that variable is not set, generate it dynamically. This reduces the need for this variable to be set within every portal, and centralizes the generation of this so that it can be done safely.
- KML failed to validate within dev environments due to Deprecated Code warning thrown due to undeclared class variable used within a local scope.
- Sanitation adjustments

* Collection Search variable adjustment (#1578)

- Improve the translation of collection input variable (e.g. db) to a database query string, which also improves copy link functions.
- Exclude commas from uri encoding

* Hotfix 2024 07 25 (#1591)

- Inventory and Project Management 
-- Display all checklists that have at least one linked taxon OR is a parent checklist inheriting taxa from a child checklist ([Issue #1532](https://github.com/BioKIC/Symbiota/issues/1532))
-- Removed limit that required checklist to have at least 10 linked taxa
-- Order checklists by project and checklists names
-- Only display Global symbol within map display option when one or more checklists within a group have lat/long centroids
-- Make project title an active link that opens the project within the project details page
- DwC-A Publishing 
-- Fix fatal error when DwC-A path fails to return a data file

* Disallow glossary download unless you're an editor (#1589)

* Add link to data usage policy to prompt citing glossary (#1590)

* Add link to data usage policy to prompt citing glossary

* Add placeholder for glossary citation

* Make use of getDomin within UtilityFunctions

* Minor adjustments to accommodate failed input variables

* Adjustment to previous submit

* Minor adjustments to checklists lang files

* Rename Taxon / Transfer Vouchers fix (#1594)

* Rename Taxon / Transfer Vouchers fix

Resolves an issue when author is included in the Target Taxon autocomplete suggestions. 

* Modifications

- Add on-change function that nulls tid when data return is null (e.g. invalid name). This clears out tid when one selects a taxon, which populates tid field, but then enters a taxon that is not in the list. Otherwise, the tid would submit the old selected value rather than correctly displaying message that tid is null.
- Remove checkScinameExistence function and rpc call, since it is no longer needed

* Language and JS logic.

---------

Co-authored-by: Edward Gilbert <[email protected]>

* Button styling fix in collprofiles.php (#1535)

* fixed the font styling

* change the primary button font color to white

* unify all buttons styling with body-font-family variable

* Occurrence Editor otherCatNum NULL search

- Bug fix within occurrence editor for when user searches otherCatalogNumbers IS NULL
- Fatal error fix when searching otherCatalogNumber NOT LIKE
Addresses issue: https://github.com/BioKIC/Symbiota/issues/1582

* Hotfix 2024 08 07 (#1606)

Taxonomy Editor
- Add taxamaps table to data remapping functions when taxon is deleted or remapped. Resolves [issue #1598](https://github.com/BioKIC/Symbiota/issues/1598)
- Minor error fixes and adjustments to language file imports
Glossary Management 
- Fix issue associated within new sources failing to save when displaying all terms without a taxon group selected. Resolves [issue #1584](https://github.com/BioKIC/Symbiota/issues/1584) 
- Display all source definitions when taxon group is not selected
- Minor adjustments to language terms and misc code
Occurrence Cleaner - duplicate merge tool
- Replace catalog numbers as the unique identifier for duplicate cluster with numeric key, thus avoiding interference of target form element due to existence of space or period within catalog number. Resolves [issue #1471](https://github.com/BioKIC/Symbiota/issues/1471) 
- Internationize first submit button
- Add header and footer to cleaning page
Specimen Upload
- Remove display of Data Versioning Checkbox option for snapshot datasets. Batch import data versioning is only available for live managed collections.

* Header / Footer adjustments

- Fix incorrect language tag variables within footer file
- Remove test of H_WELCOME variable, given that no other variables are present
- Comment out js console log output used for debugging

* Checklist Add taxon bugfix (#1604)

* Checklist Add taxon bugfix

see #1602. This fix ties the add taxon feature to a taxonomy.tid (instead of the sciname value returned by the autocomplete.

* refactor based on footer_template.php

Refactored the language value injection based on the pattern Ed used in footer_template.php

* Reset CSS Adjustments

- Remove reset.css from head_template.css in preference of pushing back official rollout of a reset stylesheet to 3.2. Ideally, with normalized.slim.css integrated into a single reset
- Move normalized out of head.php into main so that once merged into reset, we can delete normalized from main without having to adjust head.php files.
- Force refresh of main.css via $CSS_VERSION variable

* increased the width of utm div (#1613)

* removed extra div from for loop (#1614)

* Accessibility adjustments (#1610)

- Move accessibility toggle button and associated components out of footer into single contained file that can be added to footer, header, or other location via an include function
- Move accessibility files into accessibility directory
- Migrate accessibility.footer.css js into accessibilityUtil.js file
- Move accessibility language terms into their own lang files

* Remove Vertical-align from reset.css closes #1498 (#1518)

* Remove Vertical-align from reset.css closes #1498

# Issue #1498
# Summary
Causes undesirable before for things that don't have a default vertical
align like tables, will expand height for some tds if valign top is
used. Also I don't know why reseting the vertical alignment would be
needed

* adding back vertical align but making it top instead of baseline

* fix vertical aligntop for taxa main image

* change over remaing valign propties to styles instead

* remove gridlike-row class from grouped collections (#1618)

* added left margin to heading (#1622)

* fixed the headers, added subheader class (#1623)

* added display inline, added margin (#1624)

* Make SVG icons color controlled by values in variables.css (#1473)

* added styling for svg in icon-buttons, removed inline fill for svgs

* remove fill attributes from svgs in list and occurrencelist

* fixed the css class for icon-button

* Geo thesaurus default data (#1627)

- Add a default thesaurus to 3.0 fresh install. Note that this data file was not included within the 3.1 data patch. Some databases already have some form of a thesaurus, or may wish to create a thesaurus from transferring data from their lookup tables. Running the insert statements when the table is already populated with data would result in an PK conflict errors.  
-- Addresses issue https://github.com/BioKIC/Symbiota/issues/1605
- Add data file into /schema/3.0/data/ directory so that it could be run as an optional insert. We may want to add a menu option that allows user to run this install from the management interface, and maybe remove the keys from the insert statement so that data would be appended without duplicate key errors, and unique indexes that ensure that duplicate entries are avoided. And/or add a separate script file that only contains SQL that adds continents and links existing countries as children. 
- Deactivate links on non-accepted terms
- Remove ability to add children to non-accepted terms
- Don't display map nor map controls for non-accepted terms
- Add function that appends synonym terms to term output and add synonyms to terms details

* Snapshot collection menu adjustments (#1628)

- Collection admin menu change 
-- Disactivate certain menu options for snapshot collections. The goal is to further discourage folks from live managing specimen records within a Snapshot dataset, which is happening more often than it should. 
-- Keep deactivated items listed within the menu with a clear message stated that these items are only available to Live Managed collection. It is important for snapshot collections to know that these options are still available, but they need to go through the correct channels to activate them.
- Standardization of language tags (internationalization)
-- Add condition test to language file import
-- Remove no longer needed term specific conditions with default language terms
-- Add missing language terms
-- Delete French language file, which only contained English terms. This language file should be created within a separate PR.
- Misc adjustments 
-- Move html output generation out of class file
-- Add rights formatting into a static function within the Utility class. There are a number of locations where this functions need to be called (e.g. images), but this will be done within a separate PR. 
-- Add rights html styling to main.css
-- Misc styling tweaks to collection profile page

Before:
![image](https://github.com/user-attachments/assets/11051792-84d1-48b0-8959-f7eb105c68b5)

After:
![image](https://github.com/user-attachments/assets/0082a9f8-b180-4c0f-b892-788056e2d47e)

* Audit of specupload lang tags (#1084)

* Fix specupload lang tags

* Add home to lang tags

* Update specupload.es.php

* Update specupload.fr.php

* Collection menu adjustment

- Comment out code that deactivates certain menu options within snapshot collections, with the goal of better reviewing these changes and reactivating within 3.2 rollout
- Remove restrictions to label making options, since there are valid reasons for snapshot to make labels

* Update setup.sh (#1630)

* Update setup.sh

Update script to:
- dynamically find all template files
- avoid overwriting existing files unless 'force' option is used
- 'test' option to show example output
- 'verbose' option to give more information about what the script does

Update INSTALL/md

* Hide h1 titles on popups and pages with duplicate titles (#1633)

* added screen-reader-only class

* hide dynamic map heading

* Update OccurrenceIndividual.php (#1648)

* Update OccurrenceIndividual.php

Apply html elements after cleaning DB value

* Add missing language tag (#1642)

* Update geothesaurus (#1636)

- Add counties for Mexico and U.S.A.
- Add accented letters for Mexican states (and fix some too-long state names)
- Remove 3-letter abbreviations for states that were previously just those of the country

* add check for clid and default to 0 if it doesn't exist (#1632)

* Bugfix/3.1/geothesaurus map fixes (#1635)

* Add check for geojson parsing on mapcoordaid that will not parse output into json if there is nothing to parse

* if coordaid changes are made but not saved then save them if save and close is selected

* add warning of unsaved changes when leaving geothesaurus index after making an edit

* removing custom dialog option because they are not allowed

* saves and closes coordaid if edits are saved in leaflet plugin

* Update header_template.php

* Contacts header on collprofiles font fix (#1651)

* removed inline styling

* merge adjustment

* return inline styling on listed colls sections

* Change NSF references to US NSF (#1652)

* Checklist html tags (#1637)

- Fix bug that was html encoding input data prior to be added to the database. All database specific input variables were removed from the view bag in preference to be handled by the class data handlers. 
-- Addresses issue: https://github.com/BioKIC/Symbiota/issues/1596 
- Removed writable database calls from the ChecklistVoucherAdmin class in preference for shared write statements within the ImInventories class. 
- Add checklist voucher write functions to the shared ImInventories class. 
- Mics bug fixes to the ImInventories class
- Misc style adjustments to improve layout of editor forms

* Populated individual Date fields

- Add code to the occurrence editor that automatically populates year, month, day, startDayOfYear, and endDayOfYear from eventDate fields whenever they are are modified
- Add code to the statistics generator code that populates missing or incorrect individual date fields for a given collection.

* fix geographic cleaning tool (#1659)

* restore the previous code

* restore the badcountrycount functionality

* remove lkupcountry

* added hidden input for default useThes value (#1657)

* Schema Manager adjustments (#1655)

Changes include improved error reporting when database does not exist or is misspelled within connection config file, as well as reporting authentication issues associated with portal base users. If user goes to sitemap and database tables do not yet exist, the user will be forwarded directly to schema manager to assist installing base schema.

Note that the first 3 commits are only associated with batch code adjustments that remove unnecessary code fragements. Looks directly are the last commit to review modifications that are associated with logistically changes (e.g. https://github.com/BioKIC/Symbiota/commit/c54952e651279da22a7efa953d1ea9364cfc9023).  

Specific changes: 
- Add try/catch to db_connection file and connection test within Manager class that reports when connection to database fails (e.g. no connection, authentication issue, etc)
- Sitemap adjustments that automatically forwards user to schema manager whenever schema is missing (e.g. fresh install).
- Add backward ticks to all table and stored procedure names within schema files so that installation logger is able to properly report table name within logs
- Misc adjustments to schema manager to improved output reports
- Add message to schema manager that warns user when log directories are not writable by web user (e.g. apache)
- Only check users accessibility settings if they are logged in to the portal

* Update DwcArchiverCore.php

- fix issue when custom where statement gets an extra "where" added when string begins with an empty space
Addresses issue: https://github.com/BioKIC/Symbiota/issues/1653

* Dynamic map checklist dev

- Include points from child checklists when dynamic map is selected within the checklists page
- Add IGNORE to stats INSERT statement in order to avoid fatal error when a duplicate entry it inserted.

* Taxon links bug

- Remove second declaration of taxonlinks array, which was causing the array to be redefined throughout each record loop.

* Fix redundant map (#1663)

That also wasn't reading projArr['displayMap'] variable

* adjust sort comparator to return explcit numbers so v8 doesn't get co… (#1669)

* adjust sort comparator to return explcit numbers so v8 doesn't get confused

* add origin linking to tid

* add origin linking to google map search

* wrapped latitude/longitude in label (#1668)

* Add crowdsourcing language tag

* Update INSTALL.md

Formatting

* Update INSTALL.md

Additional formatting

* Update search.php

- Bug fix resolving issue where collection administrators and editors did not have permission to tag images from their collection.
Addresses issue  https://github.com/BioKIC/Symbiota/issues/1616

* Hotfix 2024 08 22 (#1677)

- Minor bug fix that was interfering with saving of locationRemarks when a new record is saved (resolves https://github.com/BioKIC/Symbiota/issues/1445)

* 3.1 preparation updates

- Move still relevant data files into 3.0 data directory
- Update INSTALL.md documentation
- Fix misc spelling error
- Update version number

* Fix typo

* Update UPDATE.md (#1681)

* Fix Backward Compatiblity Issue involving mysqli_execute_query (#1682)

* Adds util function to make use of mysqli_execute_query for older versions of php

# Summary
`mysqli_execute_query` or `$mysqli->execute_query` function is an 8.2
only function provided by mysqli which could break portals that cannot
upgrade to 8.2 from 8 or are running 7.3. Solution is to make a util
function with the same api as mysqli_execute_query but will use the php
version to decide wether to use mysqli_execute_query or normal statement
binding.

* removing comment left over from prototyping

* usage of taxa thesaurus family over occurrence family (#1675)

* usage of taxa thesaurus family over occurrence family

* Modifications

- "ts.taxauthid = 1" needs to be added to the where condition or the recordset would return duplicate records for each taxonomic thesaurus defined within taxstatus table (e.g. there are 4 defined within SEINet). I suppose not including it would not be a big problem since the occid would be the same for each record, and thus the output data array would just copy over existing data. However, it would iterate through more records than needed. Another solution would be to change the statement to "SELECT DISTINCT...", but this can significantly slows down an ordered query.
- Since "ts.taxauthid = 1" is added to the where clause, the getTableJoins function should always add the taxstatus left join, thus we can leave out that test.

* Minor fix to previous submit

---------

Co-authored-by: Edward Gilbert <[email protected]>

* bugfix barcodes (#1683)

fix label printing barcode 500 error

* Update CHANGELOG

* Api occurrence 2024 08 (#1688)

- Occurrence API endpoint development
-- Add collector, collector last name, and collector number as searchable functions
-- Develop write functions (insert, update, delete), but not yet activated for public use 
-- Add new endpoint for loading and processing skeletal occurrence data
-- Add swagger documentation for skeletal record processing 
- Taxonomy API endpoint development
-- Refactor to use query builder for defining search terms (bring code in sync NEON taxonomy developments)  
- Mics
-- Add helper functions to Lumen API

* 3.1.1 Release: Merge Hotfix branch into Master (#1747)

* Occurrence Mapping: Adjust SQL to relax enforcement of link to taxon thesaurus, thus to include records with coordinates but lacking thesaurus relationship 
* Styling: Various styling, spacing, and display adjustments 
* Occurrence search: add type attribute to buttons to avoid defaulting as submit buttons 
* Occurrence Profile: Fix error triggered when otherCatalogNumbers are used to create backlink to original snapshot record within external institution web resource
* Occurrence editing functions  
-- Fix fatal error triggered by cloning an occurrence record with the create association option selected
-- Fix fatal error triggered when quick association feature is activated within occurrence editor
-- Fix fatal error when deleting an occurrence when the occurrence was previously deleted (e.g. record already in omoccurarchive)
-- Adjust occurrence restore option to dynamically determine associationType when restoring a record that was deleted prior to this field being added as a required input
-- If resource association does not have an objectID, use url as the display text
* Taxonomy editor: bug fix triggered by adding a child directly to the root node of the thesaurus (e.g. kingdom)
* Scientific name parsing utility functions: Integrate cleanInfra function directly into code. It served no purpose being separate, and was also causing a bug where parent authors were being incorrectly merged with insfraspecific authors

---------

Co-authored-by: Katie Pearson <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* 3.1.2 Release: Merge Hotfix branch into Master (#1770)

---------

Co-authored-by: Edward Gilbert <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>
Co-authored-by: Greg Post <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: NikitaSalikov <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
themerekat added a commit that referenced this pull request Nov 6, 2024
* Media API development

- Convert Media POST and PUT data input from parameter values to a data object passed within the body
- Some improvement with response documentation
- Fix duplicate operationId values
- Rebuild Swagger API documentation

* Coloring of Non Observation Points with Direct Updating (#1337)

* uses leaflet path method to set color so that it will update when group is not re drawn closes 1319

* close #1320, addes check for catnum

* Bugfix/collection meta data status fix (#1334)

* adds check for duplicate collectionCode / institutionalCode key when updating collection meta data and gives status msg upon failure closes #1311

* changes wording of duplicate error

* link error to new tab

* fixes lang tag error for collmetadata.php title

* closes #1326, fixes snapping on map with and without circle (#1338)

* Update searchform.js (#1336)

* Update searchform.js

Fix sessionStorage.querystring bug.  Javascript was not handling setting db (collections) checkbox array from user sessionStorage.

* Update searchform.js

Correcting variable name

* Revert "Update searchform.js (#1336)" (#1342)

This reverts commit 79e2a1b0da2d03e29d2f3658a936279252edce6b.

* removed overarching form tag because it wasn't on both sponsorship forms closes #1329 (#1341)

* Fix Occur Editor Nav visiblity with no results closes #1333 (#1343)

* cloFix Occur Editor Nav visiblity with no results closes #1333

Shifts conditional hiding search form down a level so it only blocks
tabs that way navigation is still possible when there is no query
results

* shifts formating to correct from one less conditional

* occurrence editor images tab (#1350)

The image info was being pushed down to the baseline of the displayed image.  This fix creates a new class that resets the cell alignment to top aligned.

* Update ProfileManager.php (#1347)

* Update ProfileManager.php
Confirms if 'accessibilityPref' is set in user's dynamic properties and sets AccessibilityPreference to false by default if not.

* Fits Table to row size when Smaller than 80vh closes #1340 (#1348)

# Issue 1340
# Summary
This should fit the bottom scroll bar into view when their is few
results.

* [3.1] Font unification (#1301)

* remove some font-family references

* remove in-line styling for font-family in all files not .scss, .css, vendor, .js, .less, .html, or .map

* remove <b> from one of the fieldset-likes

* add reference to font-family in reset.css

* remove unecessary font-size restriction on fields-available chips

* 3.1 search page flow bugfix (#1351)

* fix the page flow bugs but confirm existing collection persistance issues

* display which collections are to be queried in harvest params

* solve the collection selection for the new search page

* clean up and subfunctionalize

* slight refactor to improve readability

* add minor aesthetic improvement

* add styling class

* remove collection display in harvest params

* remove translations that are now cruft

* Occurrence Dataset Refactor

* Revert "Occurrence Dataset Refactor"

This reverts commit 6580a7a57919f986f24890ebe559fb7eeedc5e17.

* othercatalogNumber parsing bug fix

- Parse tags and values found within omoccurrences:otherCatalogNumbers field and display within additional identifiers table within the occurrence editor. If form is saved, parsed values are saved within omoccuridentiers table.

* Taxonomy remap bug

- Fix issue with taxon remapping/merging into another taxon failing due to key violations within taxstatus (relationship already exists). This is another issue with PHP 8.2 throwing fatal error for mysql warnings. Adding an IGNORE to statement solves the issue since already existing relationships don't need to be  transferred, and will be deleted when secondary taxon is deleted.

* 3.1 hamburger menu fix  (#1363)

* Update header.css

Center hamburger menu and flow menu content into body so that menu content is scrollable on small screens.
Remove transitions
Reduce padding around hamburger to unblock 'Home' menu link

* order alphabetically and then by string length (#1358)

* Merge info button (#1368)

* Add dialog box with info about merging records

* Remove redundant lang tags

Discovered when finding lang tags corresponding to "more information" via dialog box code that I copied

* Change dialog box to a link to Symbiota Docs

Seems more consistent with where we're going now

* Update defaultinvoice.php (#1370)

$loanType is a string - was being sanitized as a Int.  Variable is not used in any output to client, so should be safe to just use for comparison without filtering.

* Taxonomy Editor format adjustment

- Minor adjustment to display of parent taxon to fix issue with lack of space between scientific name and author, with additional minor improvements
- Minor improvement to only italicize taxa at genus rank or above
- Move htmlspecailchars and formatting into class assignment so that rankid can be used to decide formating

* Update ImageLocalProcessor.php (#1372)

php current() expects an array while parse_url with  PHP_URL_PATH paramter should return a string or false.

This changes were also committed to hotfix-2024-05-22

* Hotfix 2024 05 22 (#1374)

* Hotfix 2024-05-22

- Checklist management:
-- Adjust taxon merge function to accommodate PHP v8.1 fatal exceptions during foreign key conflicts within SQL update statements, which previously simply returned false value with a warning
- Image processing:
-- Bug resolution to avoid fatal error where an array function is incorrectly used on a string. Resolves issue https://github.com/BioKIC/Symbiota/issues/1366
- Occurrence Mapping:
-- Fix bug interfering with the exclusion of protected occurrences within the mapping tools when user is not approved to view these records. Associated with issue: https://github.com/BioKIC/Symbiota/issues/1375 

Co-authored-by: Greg Post <[email protected]>

* 3.1-upload-bug

- Avoid fatal error that are now thrown by PHP v8.1+ instead of the previous warning

* Bugfix/3.1/collection list map clustering (#1373)

* reroute map result to map search b/c this is fully featured

* closes #1345 add add reference marker functionality to map/index so that no funtionality is lost

* inversing switch so logic works out

* default clustering off

* moved cluster switch on by default from needing param and it just defaults to no clustering

* oFixes Map Search Auto searching with no Parameters (#1388)

# Summary
Only adds lat long data restrictions if something is present in the
`sqlWhere` property. That way if checks to sqlWhere don't fire with
everything searches ever.

* Bugfix/3.1/record search contrast (#1386)

* add important to screen reader only class

* fixing contrast adding styling class for the insert border labels

* collection search uses body color instead of grey for better contrast

* updating screen-reader-only for base.css

* fixing use of data-labels with content to just normal spans

* focus now uses medium color for contrast

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty (#1391)

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty

* fix accidental populating of sqlWhere in setGeoSqlWhere

---------

Co-authored-by: Mark <[email protected]>

* [3.1] Merge Duplicate Record bugfix (#1344)

* swaps all the merge record queries to be prepared statements (mostly) and puts them in a try catch so blank errors don't occur on the user side

* Add $collId as arg for dupManager merge Records since collId would be undefined otherwise and fixed control flow to only navigate you when error occurs

* Adds Ignores to mergeRecord and Error Control Flow to deleteOccurrence

* Add forgotten lang tags for dupManager

* saving determinations work

* determination history priortizes source records current determinations

* adding quote filtering for taxa and taxonFilter to prevent link onmouse over xss (#1380)

* make sure the formats are in explicitly in a whitelist in an attempt to make burpsuite happy (#1394)

* [3.1] - burpsuite - emlhandler fix: adds is_numeric checker for collid in collections/datasets/emlhandler… (#1398)

* adds is_numeric checker for collid in collections/datasets/emlhandler.php

* respond to code review feedback. If it does not pass the is_numeric check off the bat, it probably should not be treated as valid

* [3.1] - select collections from the url if present (#1400)

* select collections from the url if present

* DRY up sanitizedCollectionSource section, which has the same pattern as occurs elsewhere

* fix typo

* change default to empty array

* add better type checking to collIdsFromUrl

* Update ImInventories.php

* fixed the icons max-width value (#1410)

* attempt to fix the injection issues in collections/list.php (#1401)

* attempt to fix the injection issues

* change setSciNamesByVerns to use prepared statement

* remove extra htmlspecialchars call now that prepared statement is in place

* removed extra spaces

---------

Co-authored-by: Mark <[email protected]>

* Fixes Geothesaurus Searching Closes #1396 (#1404)

# Issue #1396
# Summary
Adds Parameter to let rpc call reduce output to distict results
Fixes parent dependent search detection so that initial id is used
forever even after the parent param changes

* sort by lenght so more exact match comes up when typed (#1416)

Issue came up when `calif` would show `Baja California` before
`California` because it was sorted by alphabetical but it really should
be the more exact match ie the smaller one usually first

* Enhancement/3.1/mappoint aid better edit (#1417)

* pointaid only autoselects tool if point not present and click to edit is now possible with leaflet draw

* fixes deletion problem with marker and circle present. Also fixes drag not being possible when click editing

* change checklist point aid to just use collection point aid to reduce duplicated effort

* fixed problem that occured while in edit mode and changing the error radius

* more form enhancements so that circle and marker move with each other during position edits

* 3.1 new search to list display (#1411)

* add display format radio button and handle case where user navigates back from table display to list display and then clicks breadcrumbs

* handle logic flow of list->table->list

* add translation and respond to self code review

* fix bug where breadcrumbs in collections/listtabledisplay.php were not respecting whether user was coming from new search page

* Change from button back to input to upload file (#1415)

* htmlentity quote was messing with json_decode closes #1384 (#1419)

* changed to prepared statements (#1422)

* fixes bug there was a db error because voucher manager was missing during kml download attempt (#1421)

* fixes voucher alignment when no search variables are present closes #1378 (#1423)

# Issues #1378

# Summary
Default css in reset.css removed default table vertical alignment which
skewed the inputs in the table

* fix types for taxa id-related prepared statements to match sqls expec… (#1426)

* fix types for taxa id-related prepared statements to match sqls expectation of integer types as well as make some cosmetic fixes to spacing for code readbility

* change result to statement for close

* 3.1 schema patch adjustments (#1413)

Schema patch adjustments based on running patch through a new portal 3.0 install and a 1.x => 3.0 => 3.1 portal update. Install/update tests were run both through command line and using the schema manager tool.
- Remove omoccurrences index keys that are never set within previous schema updates
- Temporarily turn off foreign key checks to allow renaming of omoccurrences collid index

Schema Manager adjustments 
- Adjust code to accept and run the 3.1 patch
- Add try-catch and other db checks to avoid PHP 8.1 throwing fatal errors when SQL statements fail, where the previous action only involved a return of a NULL result set

* 3.1 burpsuite fixes 19 june 2024 (#1433)

* address xss vulnerability for taxa in imagelib/search.php

* fix sql injection bug for cntperpage in imagelib/search.php

* address sql injection of taxa parameter in checklists/checklist.php and, indirectly, /collections/list.php

* hopefully resolves sql injection issue with db/searchvar in /collections/map/kmlhandler.php

* hopefully address sql injection for downloadhandler.php

* [3.1] Minimal header - part 1 (incomplete implementation that defaults as disabled until [3.2] part 2 is done) (#1429)

All requested changes made by @MuchQuak have been incorporated into the Part 2 of the ticket.

* establish minimal_header_template.php

* remove defaults

* freeze of current work to address burpsuite stuff

* continue making aesthetics improvements at both small and large screen sizes for the minimal header

* makes the map header configurable and handles some styling that has to be dynamic depending on presence or absence of map header

* adds minimal header optionally to collections/tools/mappointaid.php

* adds minimal header optionally to CHECKLISTS/tools/mappointaid.php

* move the z-index styling to the css file so that it can be overwritten more easily in collections/georef/georefclone.php. Implements the minimal header in collections/georef/georefclone.php

* fix bug where clicking advanced search from coll profile had a parsing error from the db query param in the url

* implement minimal header in collections/individual/index.php

* remove cruft

* handle cass where [db] is not set

* make progress on /checklists/checklistmap.php?clid=78&thesfilter=0&taxonfilter= and on http://localhost/Symbiota/checklists/clgmap.php?pid=7 but both are currently buggy but commented out

* add default  = false; value to symbini_template

* change defaults to false

* remove absolute and top styling

* Remove imported stylesheet (#1441)

The hardcoded import of the variables.css breaks portals customized using a css/custom folder. (issues presented in /collections/misc/collprofiles.php )

The import also appeared to be unnecessary / redundant as both the customized and v202209 folder version were being brought in.

* Add missing lang file (#1440)

* Determinations import fix (#1435)

* added checks for sciname, date, identifiedBy, added try catch to skip errors instead of stopping

* replaced ERROR with SKIPPED

* unified styling for error/skip displaying

* fixed the sql errors displaying

* go back to original error display

* added note at the end and translations

* added styling for disabled buttons (#1431)

* Taxonomy API Development (#1442)

- Change sciName to scientificName alias
- Make Taxa searchable by taxon search variable
- Support exact, starts with, wildcard, and wholeword search types
- Standardize taxa table indexes
- Update Swagger documentation with new functionality

* Taxonomy Search API Endpoint Dev (#1443)

- Fix bug associated with Swagger documentation
- Update API title output

* Update harvester.php (#1447)

Modifies logic to display available boundary tool when no active geographic thesaurus exist in the DB

* CSS drop-down menus (#1452)

* CSS drop-down menus

Add styling to header.css that enables top drop-down menus

* Update OmCollections.php (#1455)

Errant line of code short circuiting collection meta data update.

* Occurrence editor crowdsource adjustments

- Add formatting for eventDate2
- Adjust exsicati
- Remove from display: additional identifiers, behavior, vitality

* occurrence editor crowdsource adjustments

- Add vertical-align to crowdsource css to override value set within reset.css
- Force refresh of crowdsource.css within client's browsers

* closes #1449 which was preventing checklist polyaid from opening (#1458)

* crowdsource editor styling issue

- resolve vertical-align issue, which persisted when opening in crowdsourcing mode and then switching between long and short forms
- Fix fieldset padding issue within image popout

* Api media 2024 06 (#1463)

- Fix route bug interfering with POST write calls
- Add recordID UUID to POST call
- Improve error output media object isn't found (400 error)
- Improve standardization of all response output
- Add sort fields to api documentation
- Add function that attempts to determine mime type via file header. Has added benefit of ensuring input file exists.
- Update swagger documentation

* Media API

- Add ability to match images based on recordID UUID within PATCH call

* added confirmation windows for project and editor delete icons (#1454)

* [3.1] -burpsuite-fix: do not add taxa to query if there are special characters or quotes (#1436)

* do not add taxa to query if there are special characters or quotes

* cherry pick fix in 6250abde5 where getTaxonWhereFrag was getting un-cleaned taxon string

* respond to code review feedback

* Occurrence download bug (#1478)

- searchvar term is being sanitized prior to being set as a session variable, which is converting & to &amp;, thus interfering with parsing of all terms after the first term. Translating &amp; to & fixes the issue.
- The cleanOutStr function santizes output using htmlspecialchars. The htmlspecialchars on line 638 will double sanitize output, thus converting "east & west" to "east &amp;amp; west".
- Variable is getting sanitized within index.php with htmlspecialchars twice. Once on line 12 and again on line 205

Addresses GH issue: https://github.com/BioKIC/Symbiota/issues/1470

* increase font size globally (#843)

* increase font size globally to 14 instead of 12, and then make improvements to other parts that looked a little weird in light of this change and addressed them as well

* Update header_template.php

* swap fonts to 1rem so it always matches html font size, 1rem = font-size of html

* header and footer font fixing

* removing footer font styling

* overhauling base/main/variable css files font sizing

* fixing head template font-size usage

* fixing sitemap fonts

* fixing leafletmap fonts

* removing fonts from occur editor and adding reactive styles to button element

* reactive fonts for occurrencelist from map search page

* jquery-ui-icons-fix

* map search font fixes

* checklist/index.php font fixes

* fixing fonts on collections/list

* font fixes taxa profile and taxa editor

* fixing missing span

* fix merge issues on map search

* fixing sitemap badges to scale with font via height based on rem

* adjusting font styles and solving conflicts with contrast change on col search

* saving col profile layout fixes

* move quicksearch to side and make sticky

* collections/list/spacing

* spacing fix for maps

* making checklist.php layout reactive so it works with different font sizes

* font and layout fixes for checklistadmin

* #tabs font size uses body variable

* Reactive quicksearch colprofile

* layout and font fixes for query form

* fieldset-like alteration

* updating header template

* standardize some spacing in checklists/checklistadminmeta.php

* cleanup on unecessary fonts specs

* fixing collectiontitle layout

* fixing collection group layout with new font size

* fixing error from merge

* more clean up of unused font-size declarations

* add font-size-normalization on tabs ui

* fixing checklist "games" font

* modify jquery ui classes to normalize font

* adjusting searchStyles inner to use rem

* cleanup on some old map inlines that are uneeded

* removing redundant font-size3

* removing uneeded font-family

---------

Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* Bugfix/3.1/spiderfy fix (#1476)

* make random color function produce a color above 40 luminence so that very dark colors are never produced

* add custom clustering strategy so for map/index so that clusters fit in with other points better and also don't cluster far less aggressively

* init slider for clustering aggressiveness

* fix random color gen create rgb values larger than 255

* add cluster to google maps and point oms.js to cdn so it is up to date

* cleaning old gen clusters from leaflet section of map/index

* Paleo bug fix

- Resolve issue interfering with activation of paleo tools

* Collmetadata lang tag audit (#1097)

* Audit collmetadata lang tags

* Minor fix

* Fix popup issue

* Fix to Spanish translations per Samanta's feedback (#1489)

* Shorten Select Language

* Change Contact Us

* Change sample search language

* Search page fix

* Change html characters

* Fix lang tags

* Spacing fix

* Es translation fixes

* Audit lang tags for guidmapper.php (#1083)

* Audit lang tags for guidmapper.php

* Fix guidmapper buttons

* Fix inputs for different actions

* set the initial zoom at 500m (#1493)

* Translation fixes from Samanta's feedback, pt 2 (#1499)

* Translation edits to collprofiles

* List and listtabledisplay translations

* Fix table display translations

* Add basic translation files for usagepolicy

* Small changes to es (#1501)

* symbbase.php refactor

- Remove no longer needed code fragments that ensure that old configuration variable formats are supported after a minor update

* Fix footer to bottom and correct portal login page (#1502)

* switch png to svg, switch button classes to icon-button (#1503)

* Remap old system variables to current format

* Paleo bug fix

- Add activate material sample to collection metadata array

* Material Sample minor style adjust

* Duplicate tool title too long crash fix (#1511)

* added a check for the title length

* added trim for last name, added IGNORE to sql insert query

* Minor bug fix

* change font control (#1512)

* Hotfix 2024 06 24 (#1527)

* Hotfix 2024-06-24
- Image tools
-- Return false when file size cannot be determined within getImgDim1 function
- Glossary (resolves issue: https://github.com/BioKIC/Symbiota/issues/1526)
-- SQL error causing term list display to fail when a taxon group was included in the search
-- Change table linkages associated with taxon group condition to LEFT JOINs so that all terms are displayed, including those without linkages to **synonyms**

* Null result handle in collections/misc/collstats.php (#1453)

* added null result handle, taxon not found alert

* remove extra line, return empty array for incorrect taxon

* added a check for families and countries

* Occurrence Query String Multiple taxa fix (#1520)

* Colprofile Lang Fix (#1517)

# Issues #1488
# Summary
Exchanged hardcoded string to use a string in the language file

* MappointAid Error Radius Check closes #1487 (#1516)

# Issue #1487
# Summary
Added check for error radius input to error radius. If it doesn't exist
default to 0 so no circle is drawn nor value sent outbound.

* Head template adjustment and base.css into main.css merge (#1514)

- Move majority of php coding out of head_template into symbbase.org. Trying to keep code to a minimum within head import file in order to maintain ability for us to modify code algorithms without having to explicitly change head.php files within each portal install.
- Move css out of head_template.php into separate css file, to again maintain ability to globally modify these styles within future code versions.
- Move header and footer link/import head so that portal administrator can point to different version if they want (e.g. header_button_menu.css)
- Remove css definitions from base.css duplicated within main.css
- Move unique css definitions from base.css into main.css
- Transfer main.css styles that are only used within a single file into target file
- Remove unused or duplicated css from checklist.css
- Remove collectiontable and categorytitle styles, which do not appear to be used anywhere within code

* CSS Refactor

- Remove dependence on $CSS_VERSION_RELEASE and v202209 directory path
- Move all css files out of v202209 directory one directory down into css base directory
- Add $CSS_VERSION to CSS imports within head_template.php, thus allowing force reload of CSS files when that variable is changed within symbbase.php file
- Remove deprecated css/base.css file
- Remove deprecated files within css/symb/directory
- Reduce pixel size of Symbiota icon, which is much larger than a typical icon. Large version of icon is still conserved, but not used as the default icon.

* Fix bold on taxon names closes #1490 (#1529)

# Issue #1490
# Summary
Remove font weight normal from taxon name so that it is going to be bold
(as it should be
)

* Fixing Data Management Tool Subheader Styles (#1531)

# Summary
Css rule to make subheaders not display absolute got overruled during
css fixes so I made the rule more precise to ensure it doesn't get
overridden.

* Fix minors reported within Apache log files

- Ensure that NULL value are not sent to exif_thumbnail function
- Correct a couple language tags used within collections/map/occurrencelist and taxa/index.php
- Add EXTERNAL_RECORDS and PORTAL_LIST language tags to map language files
- Remove unneeded htmlspecialchars used on controlled language tags

* Occurrence Search bug (#1536)

* Occurrence Search bug
- Fix issue with validation of infraspecific taxon names by allowing abbreviations with periods (e.g. var.)
- Allow taxon names to contain hybrid crosses and extinction dagger
- Fix issue with NULL being passed to string function strtoupper

* CSS modification by Logan

* header and footer adjustments

- Move javascript code out of footer into separate js file. This will allow us to make adjustments to code without needing individual non-template footer files to be adjusted to code changes.
- Remove code out of header_template file in preference to code run within symbbase.php file
- Given condition at top of header page testing if language file is imported, individual isset statements for each LANG variable is not needed.

* minimal header adjustments

- Remap minimalheader_template.php to minimalheader.php in support of the currently supported template system
- Add minimalheader_template.php to setup.sh file

* Change html entities to symbols

* Add temporarily to resolve conflict

* Remove dependence on v202209

* fixed the profile accessibility setting (#1534)

* Misc adjustments

- Bug fix: remove php code out of new js file
- Standardize syntax within footer template file
- Remove deprecated code within symbini config file

* Very minor code adjustment

* improved quick search css (#1539)

* Fix for Merge Duplicates Failing when no Determinations need Downgrading (#1484)

* add conditional check for if there are any determinations to downgrade before trying closes #1451

* adds copies of some functions from occurrenceEditorDeterminations to properly merge determinations records

copied functions have been label as such with todos to remove in 3.2
when occurrence editor work to remove latest identification section has
been done

* removing dead code comments

* fix determination merging priority to favor the lasting record

* adds temp function to transfer attributes over to omoccuridentifers if none are present before record merge takes place

* Increase Symbiota size of icon

* Template Lang File Refactor

- Move language variables files for template files into /content/lang/templates/
- Remove template from language file names with intention of including the files as part of the base code
- Standardize header/footer lang variables to ensure that there is not overlap with other existing page specific variables. This is done by adding a prefix of H_ or F_.
- Remove some unused variables from header language file
- Remove /content/lang/header.[LANG_TAG].php include statement from non-header files (clgmap.php, mappointaid.php, georefclone.php).
- Some code cleaning and input variable sanitation adjustments to non-header files referenced above.

* adding variable to control menu font-size for easy customization (#1547)

* adding variable to control menu font-size for easy customization

* move font size control to be out of media query

* Misc adjustments

* Remove 202209 again

* Add break to collection profile title (#1556)

* Template lang file adjustments

- Move image contributors language tags out of header lang file into their own file includes

* Continue to synchronize header and footer lang files

* Update variables.css

correct default header background image path.

* change the default project to 0 (#1546)

* fix typo in request (#1559)

* Add header override files

* Adjustment to resolve conflicts

* minor adjustment

* Change exsicatti to exsicattae (#1563)

* Reapply adjustments lost during previous dev merge

* Change "open" to "toggle" record search form (#1565)

* Remove inline styling for nav icon

* Create customizations.css (#1567)

* Create customizations.css

Creates a new file customizations.css that can be used to store overrides of Symbiota's default styling.  This file should never be modified by Symbiota Dev's so as to not trample on a portal's changes.

* Continued adjustments

* More developments

- dynamic map bug fix: fix link to page that lists all collections
- mappointaid bug fix: fix error importing language files
- Add missing LANG variables within collection search pages

* Additional styling adjustments

- Remove all inline styling of the img elements that were tagged with the "navIcon" attributed. The height of these elements were defined as 15px within the imported css and the inline width defined to 1.3em, thus creating image warping.
- Modified img styling within imported css file to width of 1.3em, which is what was defined within the inline for all elements

* updated the path for accessibility and condensed css (#1572)

* Taxon Description issues

- Add condition testing for language file existence, defaulting to English file upon false
- Make use of cleanOutStr function, thus avoiding null used within htmlspecialchars string function
- Fix bad language keys

* created css class for inverted color, switched location of buttons in taxonomydisplay (#1576)

* Dynamic Map adjustments

- Make use of getDomain() function within the shared Manager class. This function will return the SERVER_HOST value that is set within the symbini config file, or if that variable is not set, generate it dynamically. This reduces the need for this variable to be set within every portal, and centralizes the generation of this so that it can be done safely.
- KML failed to validate within dev environments due to Deprecated Code warning thrown due to undeclared class variable used within a local scope.
- Sanitation adjustments

* Collection Search variable adjustment (#1578)

- Improve the translation of collection input variable (e.g. db) to a database query string, which also improves copy link functions.
- Exclude commas from uri encoding

* Hotfix 2024 07 25 (#1591)

- Inventory and Project Management 
-- Display all checklists that have at least one linked taxon OR is a parent checklist inheriting taxa from a child checklist ([Issue #1532](https://github.com/BioKIC/Symbiota/issues/1532))
-- Removed limit that required checklist to have at least 10 linked taxa
-- Order checklists by project and checklists names
-- Only display Global symbol within map display option when one or more checklists within a group have lat/long centroids
-- Make project title an active link that opens the project within the project details page
- DwC-A Publishing 
-- Fix fatal error when DwC-A path fails to return a data file

* Disallow glossary download unless you're an editor (#1589)

* Add link to data usage policy to prompt citing glossary (#1590)

* Add link to data usage policy to prompt citing glossary

* Add placeholder for glossary citation

* Make use of getDomin within UtilityFunctions

* Minor adjustments to accommodate failed input variables

* Adjustment to previous submit

* Minor adjustments to checklists lang files

* Rename Taxon / Transfer Vouchers fix (#1594)

* Rename Taxon / Transfer Vouchers fix

Resolves an issue when author is included in the Target Taxon autocomplete suggestions. 

* Modifications

- Add on-change function that nulls tid when data return is null (e.g. invalid name). This clears out tid when one selects a taxon, which populates tid field, but then enters a taxon that is not in the list. Otherwise, the tid would submit the old selected value rather than correctly displaying message that tid is null.
- Remove checkScinameExistence function and rpc call, since it is no longer needed

* Language and JS logic.

---------

Co-authored-by: Edward Gilbert <[email protected]>

* Button styling fix in collprofiles.php (#1535)

* fixed the font styling

* change the primary button font color to white

* unify all buttons styling with body-font-family variable

* Occurrence Editor otherCatNum NULL search

- Bug fix within occurrence editor for when user searches otherCatalogNumbers IS NULL
- Fatal error fix when searching otherCatalogNumber NOT LIKE
Addresses issue: https://github.com/BioKIC/Symbiota/issues/1582

* Hotfix 2024 08 07 (#1606)

Taxonomy Editor
- Add taxamaps table to data remapping functions when taxon is deleted or remapped. Resolves [issue #1598](https://github.com/BioKIC/Symbiota/issues/1598)
- Minor error fixes and adjustments to language file imports
Glossary Management 
- Fix issue associated within new sources failing to save when displaying all terms without a taxon group selected. Resolves [issue #1584](https://github.com/BioKIC/Symbiota/issues/1584) 
- Display all source definitions when taxon group is not selected
- Minor adjustments to language terms and misc code
Occurrence Cleaner - duplicate merge tool
- Replace catalog numbers as the unique identifier for duplicate cluster with numeric key, thus avoiding interference of target form element due to existence of space or period within catalog number. Resolves [issue #1471](https://github.com/BioKIC/Symbiota/issues/1471) 
- Internationize first submit button
- Add header and footer to cleaning page
Specimen Upload
- Remove display of Data Versioning Checkbox option for snapshot datasets. Batch import data versioning is only available for live managed collections.

* Header / Footer adjustments

- Fix incorrect language tag variables within footer file
- Remove test of H_WELCOME variable, given that no other variables are present
- Comment out js console log output used for debugging

* Checklist Add taxon bugfix (#1604)

* Checklist Add taxon bugfix

see #1602. This fix ties the add taxon feature to a taxonomy.tid (instead of the sciname value returned by the autocomplete.

* refactor based on footer_template.php

Refactored the language value injection based on the pattern Ed used in footer_template.php

* Reset CSS Adjustments

- Remove reset.css from head_template.css in preference of pushing back official rollout of a reset stylesheet to 3.2. Ideally, with normalized.slim.css integrated into a single reset
- Move normalized out of head.php into main so that once merged into reset, we can delete normalized from main without having to adjust head.php files.
- Force refresh of main.css via $CSS_VERSION variable

* increased the width of utm div (#1613)

* removed extra div from for loop (#1614)

* Accessibility adjustments (#1610)

- Move accessibility toggle button and associated components out of footer into single contained file that can be added to footer, header, or other location via an include function
- Move accessibility files into accessibility directory
- Migrate accessibility.footer.css js into accessibilityUtil.js file
- Move accessibility language terms into their own lang files

* Remove Vertical-align from reset.css closes #1498 (#1518)

* Remove Vertical-align from reset.css closes #1498

# Issue #1498
# Summary
Causes undesirable before for things that don't have a default vertical
align like tables, will expand height for some tds if valign top is
used. Also I don't know why reseting the vertical alignment would be
needed

* adding back vertical align but making it top instead of baseline

* fix vertical aligntop for taxa main image

* change over remaing valign propties to styles instead

* remove gridlike-row class from grouped collections (#1618)

* added left margin to heading (#1622)

* fixed the headers, added subheader class (#1623)

* added display inline, added margin (#1624)

* Make SVG icons color controlled by values in variables.css (#1473)

* added styling for svg in icon-buttons, removed inline fill for svgs

* remove fill attributes from svgs in list and occurrencelist

* fixed the css class for icon-button

* Geo thesaurus default data (#1627)

- Add a default thesaurus to 3.0 fresh install. Note that this data file was not included within the 3.1 data patch. Some databases already have some form of a thesaurus, or may wish to create a thesaurus from transferring data from their lookup tables. Running the insert statements when the table is already populated with data would result in an PK conflict errors.  
-- Addresses issue https://github.com/BioKIC/Symbiota/issues/1605
- Add data file into /schema/3.0/data/ directory so that it could be run as an optional insert. We may want to add a menu option that allows user to run this install from the management interface, and maybe remove the keys from the insert statement so that data would be appended without duplicate key errors, and unique indexes that ensure that duplicate entries are avoided. And/or add a separate script file that only contains SQL that adds continents and links existing countries as children. 
- Deactivate links on non-accepted terms
- Remove ability to add children to non-accepted terms
- Don't display map nor map controls for non-accepted terms
- Add function that appends synonym terms to term output and add synonyms to terms details

* Snapshot collection menu adjustments (#1628)

- Collection admin menu change 
-- Disactivate certain menu options for snapshot collections. The goal is to further discourage folks from live managing specimen records within a Snapshot dataset, which is happening more often than it should. 
-- Keep deactivated items listed within the menu with a clear message stated that these items are only available to Live Managed collection. It is important for snapshot collections to know that these options are still available, but they need to go through the correct channels to activate them.
- Standardization of language tags (internationalization)
-- Add condition test to language file import
-- Remove no longer needed term specific conditions with default language terms
-- Add missing language terms
-- Delete French language file, which only contained English terms. This language file should be created within a separate PR.
- Misc adjustments 
-- Move html output generation out of class file
-- Add rights formatting into a static function within the Utility class. There are a number of locations where this functions need to be called (e.g. images), but this will be done within a separate PR. 
-- Add rights html styling to main.css
-- Misc styling tweaks to collection profile page

Before:
![image](https://github.com/user-attachments/assets/11051792-84d1-48b0-8959-f7eb105c68b5)

After:
![image](https://github.com/user-attachments/assets/0082a9f8-b180-4c0f-b892-788056e2d47e)

* Audit of specupload lang tags (#1084)

* Fix specupload lang tags

* Add home to lang tags

* Update specupload.es.php

* Update specupload.fr.php

* Collection menu adjustment

- Comment out code that deactivates certain menu options within snapshot collections, with the goal of better reviewing these changes and reactivating within 3.2 rollout
- Remove restrictions to label making options, since there are valid reasons for snapshot to make labels

* Update setup.sh (#1630)

* Update setup.sh

Update script to:
- dynamically find all template files
- avoid overwriting existing files unless 'force' option is used
- 'test' option to show example output
- 'verbose' option to give more information about what the script does

Update INSTALL/md

* Hide h1 titles on popups and pages with duplicate titles (#1633)

* added screen-reader-only class

* hide dynamic map heading

* Update OccurrenceIndividual.php (#1648)

* Update OccurrenceIndividual.php

Apply html elements after cleaning DB value

* Add missing language tag (#1642)

* Update geothesaurus (#1636)

- Add counties for Mexico and U.S.A.
- Add accented letters for Mexican states (and fix some too-long state names)
- Remove 3-letter abbreviations for states that were previously just those of the country

* add check for clid and default to 0 if it doesn't exist (#1632)

* Bugfix/3.1/geothesaurus map fixes (#1635)

* Add check for geojson parsing on mapcoordaid that will not parse output into json if there is nothing to parse

* if coordaid changes are made but not saved then save them if save and close is selected

* add warning of unsaved changes when leaving geothesaurus index after making an edit

* removing custom dialog option because they are not allowed

* saves and closes coordaid if edits are saved in leaflet plugin

* Update header_template.php

* Contacts header on collprofiles font fix (#1651)

* removed inline styling

* merge adjustment

* return inline styling on listed colls sections

* Change NSF references to US NSF (#1652)

* Checklist html tags (#1637)

- Fix bug that was html encoding input data prior to be added to the database. All database specific input variables were removed from the view bag in preference to be handled by the class data handlers. 
-- Addresses issue: https://github.com/BioKIC/Symbiota/issues/1596 
- Removed writable database calls from the ChecklistVoucherAdmin class in preference for shared write statements within the ImInventories class. 
- Add checklist voucher write functions to the shared ImInventories class. 
- Mics bug fixes to the ImInventories class
- Misc style adjustments to improve layout of editor forms

* Populated individual Date fields

- Add code to the occurrence editor that automatically populates year, month, day, startDayOfYear, and endDayOfYear from eventDate fields whenever they are are modified
- Add code to the statistics generator code that populates missing or incorrect individual date fields for a given collection.

* fix geographic cleaning tool (#1659)

* restore the previous code

* restore the badcountrycount functionality

* remove lkupcountry

* added hidden input for default useThes value (#1657)

* Schema Manager adjustments (#1655)

Changes include improved error reporting when database does not exist or is misspelled within connection config file, as well as reporting authentication issues associated with portal base users. If user goes to sitemap and database tables do not yet exist, the user will be forwarded directly to schema manager to assist installing base schema.

Note that the first 3 commits are only associated with batch code adjustments that remove unnecessary code fragements. Looks directly are the last commit to review modifications that are associated with logistically changes (e.g. https://github.com/BioKIC/Symbiota/commit/c54952e651279da22a7efa953d1ea9364cfc9023).  

Specific changes: 
- Add try/catch to db_connection file and connection test within Manager class that reports when connection to database fails (e.g. no connection, authentication issue, etc)
- Sitemap adjustments that automatically forwards user to schema manager whenever schema is missing (e.g. fresh install).
- Add backward ticks to all table and stored procedure names within schema files so that installation logger is able to properly report table name within logs
- Misc adjustments to schema manager to improved output reports
- Add message to schema manager that warns user when log directories are not writable by web user (e.g. apache)
- Only check users accessibility settings if they are logged in to the portal

* Update DwcArchiverCore.php

- fix issue when custom where statement gets an extra "where" added when string begins with an empty space
Addresses issue: https://github.com/BioKIC/Symbiota/issues/1653

* Dynamic map checklist dev

- Include points from child checklists when dynamic map is selected within the checklists page
- Add IGNORE to stats INSERT statement in order to avoid fatal error when a duplicate entry it inserted.

* Taxon links bug

- Remove second declaration of taxonlinks array, which was causing the array to be redefined throughout each record loop.

* Fix redundant map (#1663)

That also wasn't reading projArr['displayMap'] variable

* adjust sort comparator to return explcit numbers so v8 doesn't get co… (#1669)

* adjust sort comparator to return explcit numbers so v8 doesn't get confused

* add origin linking to tid

* add origin linking to google map search

* wrapped latitude/longitude in label (#1668)

* Add crowdsourcing language tag

* Update INSTALL.md

Formatting

* Update INSTALL.md

Additional formatting

* Update search.php

- Bug fix resolving issue where collection administrators and editors did not have permission to tag images from their collection.
Addresses issue  https://github.com/BioKIC/Symbiota/issues/1616

* Hotfix 2024 08 22 (#1677)

- Minor bug fix that was interfering with saving of locationRemarks when a new record is saved (resolves https://github.com/BioKIC/Symbiota/issues/1445)

* 3.1 preparation updates

- Move still relevant data files into 3.0 data directory
- Update INSTALL.md documentation
- Fix misc spelling error
- Update version number

* Fix typo

* Update UPDATE.md (#1681)

* Fix Backward Compatiblity Issue involving mysqli_execute_query (#1682)

* Adds util function to make use of mysqli_execute_query for older versions of php

# Summary
`mysqli_execute_query` or `$mysqli->execute_query` function is an 8.2
only function provided by mysqli which could break portals that cannot
upgrade to 8.2 from 8 or are running 7.3. Solution is to make a util
function with the same api as mysqli_execute_query but will use the php
version to decide wether to use mysqli_execute_query or normal statement
binding.

* removing comment left over from prototyping

* usage of taxa thesaurus family over occurrence family (#1675)

* usage of taxa thesaurus family over occurrence family

* Modifications

- "ts.taxauthid = 1" needs to be added to the where condition or the recordset would return duplicate records for each taxonomic thesaurus defined within taxstatus table (e.g. there are 4 defined within SEINet). I suppose not including it would not be a big problem since the occid would be the same for each record, and thus the output data array would just copy over existing data. However, it would iterate through more records than needed. Another solution would be to change the statement to "SELECT DISTINCT...", but this can significantly slows down an ordered query.
- Since "ts.taxauthid = 1" is added to the where clause, the getTableJoins function should always add the taxstatus left join, thus we can leave out that test.

* Minor fix to previous submit

---------

Co-authored-by: Edward Gilbert <[email protected]>

* bugfix barcodes (#1683)

fix label printing barcode 500 error

* Update CHANGELOG

* Api occurrence 2024 08 (#1688)

- Occurrence API endpoint development
-- Add collector, collector last name, and collector number as searchable functions
-- Develop write functions (insert, update, delete), but not yet activated for public use 
-- Add new endpoint for loading and processing skeletal occurrence data
-- Add swagger documentation for skeletal record processing 
- Taxonomy API endpoint development
-- Refactor to use query builder for defining search terms (bring code in sync NEON taxonomy developments)  
- Mics
-- Add helper functions to Lumen API

* 3.1.1 Release: Merge Hotfix branch into Master (#1747)

* Occurrence Mapping: Adjust SQL to relax enforcement of link to taxon thesaurus, thus to include records with coordinates but lacking thesaurus relationship 
* Styling: Various styling, spacing, and display adjustments 
* Occurrence search: add type attribute to buttons to avoid defaulting as submit buttons 
* Occurrence Profile: Fix error triggered when otherCatalogNumbers are used to create backlink to original snapshot record within external institution web resource
* Occurrence editing functions  
-- Fix fatal error triggered by cloning an occurrence record with the create association option selected
-- Fix fatal error triggered when quick association feature is activated within occurrence editor
-- Fix fatal error when deleting an occurrence when the occurrence was previously deleted (e.g. record already in omoccurarchive)
-- Adjust occurrence restore option to dynamically determine associationType when restoring a record that was deleted prior to this field being added as a required input
-- If resource association does not have an objectID, use url as the display text
* Taxonomy editor: bug fix triggered by adding a child directly to the root node of the thesaurus (e.g. kingdom)
* Scientific name parsing utility functions: Integrate cleanInfra function directly into code. It served no purpose being separate, and was also causing a bug where parent authors were being incorrectly merged with insfraspecific authors

---------

Co-authored-by: Katie Pearson <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* 3.1.2 Release: Merge Hotfix branch into Master (#1770)

* Hotfix v.3.1.3  (#1821)

* Hotfix v3.1.3 
- Adjusted hotfix merge instructions
- Inventory Management: Bug fix interfering with adding new editors to an inventory project
- Image migration modifications
-- Add option to copy over existing target files
-- Add checks and error handling for non-existent source files and already existing target files
-- Direct log files to be written to /content/logs/
- fix misspelled log directory name, with support still maintained for portals that already have the misspelled directory
- Fix jquery selector to be correct so button is enabled when trait is changed
- Misc language file and wording adjustments

---------

Co-authored-by: Edward Gilbert <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>
Co-authored-by: Greg Post <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: NikitaSalikov <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
themerekat added a commit that referenced this pull request Nov 7, 2024
* Media API development

- Convert Media POST and PUT data input from parameter values to a data object passed within the body
- Some improvement with response documentation
- Fix duplicate operationId values
- Rebuild Swagger API documentation

* Coloring of Non Observation Points with Direct Updating (#1337)

* uses leaflet path method to set color so that it will update when group is not re drawn closes 1319

* close #1320, addes check for catnum

* Bugfix/collection meta data status fix (#1334)

* adds check for duplicate collectionCode / institutionalCode key when updating collection meta data and gives status msg upon failure closes #1311

* changes wording of duplicate error

* link error to new tab

* fixes lang tag error for collmetadata.php title

* closes #1326, fixes snapping on map with and without circle (#1338)

* Update searchform.js (#1336)

* Update searchform.js

Fix sessionStorage.querystring bug.  Javascript was not handling setting db (collections) checkbox array from user sessionStorage.

* Update searchform.js

Correcting variable name

* Revert "Update searchform.js (#1336)" (#1342)

This reverts commit 79e2a1b0da2d03e29d2f3658a936279252edce6b.

* removed overarching form tag because it wasn't on both sponsorship forms closes #1329 (#1341)

* Fix Occur Editor Nav visiblity with no results closes #1333 (#1343)

* cloFix Occur Editor Nav visiblity with no results closes #1333

Shifts conditional hiding search form down a level so it only blocks
tabs that way navigation is still possible when there is no query
results

* shifts formating to correct from one less conditional

* occurrence editor images tab (#1350)

The image info was being pushed down to the baseline of the displayed image.  This fix creates a new class that resets the cell alignment to top aligned.

* Update ProfileManager.php (#1347)

* Update ProfileManager.php
Confirms if 'accessibilityPref' is set in user's dynamic properties and sets AccessibilityPreference to false by default if not.

* Fits Table to row size when Smaller than 80vh closes #1340 (#1348)

# Issue 1340
# Summary
This should fit the bottom scroll bar into view when their is few
results.

* [3.1] Font unification (#1301)

* remove some font-family references

* remove in-line styling for font-family in all files not .scss, .css, vendor, .js, .less, .html, or .map

* remove <b> from one of the fieldset-likes

* add reference to font-family in reset.css

* remove unecessary font-size restriction on fields-available chips

* 3.1 search page flow bugfix (#1351)

* fix the page flow bugs but confirm existing collection persistance issues

* display which collections are to be queried in harvest params

* solve the collection selection for the new search page

* clean up and subfunctionalize

* slight refactor to improve readability

* add minor aesthetic improvement

* add styling class

* remove collection display in harvest params

* remove translations that are now cruft

* Occurrence Dataset Refactor

* Revert "Occurrence Dataset Refactor"

This reverts commit 6580a7a57919f986f24890ebe559fb7eeedc5e17.

* othercatalogNumber parsing bug fix

- Parse tags and values found within omoccurrences:otherCatalogNumbers field and display within additional identifiers table within the occurrence editor. If form is saved, parsed values are saved within omoccuridentiers table.

* Taxonomy remap bug

- Fix issue with taxon remapping/merging into another taxon failing due to key violations within taxstatus (relationship already exists). This is another issue with PHP 8.2 throwing fatal error for mysql warnings. Adding an IGNORE to statement solves the issue since already existing relationships don't need to be  transferred, and will be deleted when secondary taxon is deleted.

* 3.1 hamburger menu fix  (#1363)

* Update header.css

Center hamburger menu and flow menu content into body so that menu content is scrollable on small screens.
Remove transitions
Reduce padding around hamburger to unblock 'Home' menu link

* order alphabetically and then by string length (#1358)

* Merge info button (#1368)

* Add dialog box with info about merging records

* Remove redundant lang tags

Discovered when finding lang tags corresponding to "more information" via dialog box code that I copied

* Change dialog box to a link to Symbiota Docs

Seems more consistent with where we're going now

* Update defaultinvoice.php (#1370)

$loanType is a string - was being sanitized as a Int.  Variable is not used in any output to client, so should be safe to just use for comparison without filtering.

* Taxonomy Editor format adjustment

- Minor adjustment to display of parent taxon to fix issue with lack of space between scientific name and author, with additional minor improvements
- Minor improvement to only italicize taxa at genus rank or above
- Move htmlspecailchars and formatting into class assignment so that rankid can be used to decide formating

* Update ImageLocalProcessor.php (#1372)

php current() expects an array while parse_url with  PHP_URL_PATH paramter should return a string or false.

This changes were also committed to hotfix-2024-05-22

* Hotfix 2024 05 22 (#1374)

* Hotfix 2024-05-22

- Checklist management:
-- Adjust taxon merge function to accommodate PHP v8.1 fatal exceptions during foreign key conflicts within SQL update statements, which previously simply returned false value with a warning
- Image processing:
-- Bug resolution to avoid fatal error where an array function is incorrectly used on a string. Resolves issue https://github.com/BioKIC/Symbiota/issues/1366
- Occurrence Mapping:
-- Fix bug interfering with the exclusion of protected occurrences within the mapping tools when user is not approved to view these records. Associated with issue: https://github.com/BioKIC/Symbiota/issues/1375 

Co-authored-by: Greg Post <[email protected]>

* 3.1-upload-bug

- Avoid fatal error that are now thrown by PHP v8.1+ instead of the previous warning

* Bugfix/3.1/collection list map clustering (#1373)

* reroute map result to map search b/c this is fully featured

* closes #1345 add add reference marker functionality to map/index so that no funtionality is lost

* inversing switch so logic works out

* default clustering off

* moved cluster switch on by default from needing param and it just defaults to no clustering

* oFixes Map Search Auto searching with no Parameters (#1388)

# Summary
Only adds lat long data restrictions if something is present in the
`sqlWhere` property. That way if checks to sqlWhere don't fire with
everything searches ever.

* Bugfix/3.1/record search contrast (#1386)

* add important to screen reader only class

* fixing contrast adding styling class for the insert border labels

* collection search uses body color instead of grey for better contrast

* updating screen-reader-only for base.css

* fixing use of data-labels with content to just normal spans

* focus now uses medium color for contrast

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty (#1391)

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty

* fix accidental populating of sqlWhere in setGeoSqlWhere

---------

Co-authored-by: Mark <[email protected]>

* [3.1] Merge Duplicate Record bugfix (#1344)

* swaps all the merge record queries to be prepared statements (mostly) and puts them in a try catch so blank errors don't occur on the user side

* Add $collId as arg for dupManager merge Records since collId would be undefined otherwise and fixed control flow to only navigate you when error occurs

* Adds Ignores to mergeRecord and Error Control Flow to deleteOccurrence

* Add forgotten lang tags for dupManager

* saving determinations work

* determination history priortizes source records current determinations

* adding quote filtering for taxa and taxonFilter to prevent link onmouse over xss (#1380)

* make sure the formats are in explicitly in a whitelist in an attempt to make burpsuite happy (#1394)

* [3.1] - burpsuite - emlhandler fix: adds is_numeric checker for collid in collections/datasets/emlhandler… (#1398)

* adds is_numeric checker for collid in collections/datasets/emlhandler.php

* respond to code review feedback. If it does not pass the is_numeric check off the bat, it probably should not be treated as valid

* [3.1] - select collections from the url if present (#1400)

* select collections from the url if present

* DRY up sanitizedCollectionSource section, which has the same pattern as occurs elsewhere

* fix typo

* change default to empty array

* add better type checking to collIdsFromUrl

* Update ImInventories.php

* fixed the icons max-width value (#1410)

* attempt to fix the injection issues in collections/list.php (#1401)

* attempt to fix the injection issues

* change setSciNamesByVerns to use prepared statement

* remove extra htmlspecialchars call now that prepared statement is in place

* removed extra spaces

---------

Co-authored-by: Mark <[email protected]>

* Fixes Geothesaurus Searching Closes #1396 (#1404)

# Issue #1396
# Summary
Adds Parameter to let rpc call reduce output to distict results
Fixes parent dependent search detection so that initial id is used
forever even after the parent param changes

* sort by lenght so more exact match comes up when typed (#1416)

Issue came up when `calif` would show `Baja California` before
`California` because it was sorted by alphabetical but it really should
be the more exact match ie the smaller one usually first

* Enhancement/3.1/mappoint aid better edit (#1417)

* pointaid only autoselects tool if point not present and click to edit is now possible with leaflet draw

* fixes deletion problem with marker and circle present. Also fixes drag not being possible when click editing

* change checklist point aid to just use collection point aid to reduce duplicated effort

* fixed problem that occured while in edit mode and changing the error radius

* more form enhancements so that circle and marker move with each other during position edits

* 3.1 new search to list display (#1411)

* add display format radio button and handle case where user navigates back from table display to list display and then clicks breadcrumbs

* handle logic flow of list->table->list

* add translation and respond to self code review

* fix bug where breadcrumbs in collections/listtabledisplay.php were not respecting whether user was coming from new search page

* Change from button back to input to upload file (#1415)

* htmlentity quote was messing with json_decode closes #1384 (#1419)

* changed to prepared statements (#1422)

* fixes bug there was a db error because voucher manager was missing during kml download attempt (#1421)

* fixes voucher alignment when no search variables are present closes #1378 (#1423)

# Issues #1378

# Summary
Default css in reset.css removed default table vertical alignment which
skewed the inputs in the table

* fix types for taxa id-related prepared statements to match sqls expec… (#1426)

* fix types for taxa id-related prepared statements to match sqls expectation of integer types as well as make some cosmetic fixes to spacing for code readbility

* change result to statement for close

* 3.1 schema patch adjustments (#1413)

Schema patch adjustments based on running patch through a new portal 3.0 install and a 1.x => 3.0 => 3.1 portal update. Install/update tests were run both through command line and using the schema manager tool.
- Remove omoccurrences index keys that are never set within previous schema updates
- Temporarily turn off foreign key checks to allow renaming of omoccurrences collid index

Schema Manager adjustments 
- Adjust code to accept and run the 3.1 patch
- Add try-catch and other db checks to avoid PHP 8.1 throwing fatal errors when SQL statements fail, where the previous action only involved a return of a NULL result set

* 3.1 burpsuite fixes 19 june 2024 (#1433)

* address xss vulnerability for taxa in imagelib/search.php

* fix sql injection bug for cntperpage in imagelib/search.php

* address sql injection of taxa parameter in checklists/checklist.php and, indirectly, /collections/list.php

* hopefully resolves sql injection issue with db/searchvar in /collections/map/kmlhandler.php

* hopefully address sql injection for downloadhandler.php

* [3.1] Minimal header - part 1 (incomplete implementation that defaults as disabled until [3.2] part 2 is done) (#1429)

All requested changes made by @MuchQuak have been incorporated into the Part 2 of the ticket.

* establish minimal_header_template.php

* remove defaults

* freeze of current work to address burpsuite stuff

* continue making aesthetics improvements at both small and large screen sizes for the minimal header

* makes the map header configurable and handles some styling that has to be dynamic depending on presence or absence of map header

* adds minimal header optionally to collections/tools/mappointaid.php

* adds minimal header optionally to CHECKLISTS/tools/mappointaid.php

* move the z-index styling to the css file so that it can be overwritten more easily in collections/georef/georefclone.php. Implements the minimal header in collections/georef/georefclone.php

* fix bug where clicking advanced search from coll profile had a parsing error from the db query param in the url

* implement minimal header in collections/individual/index.php

* remove cruft

* handle cass where [db] is not set

* make progress on /checklists/checklistmap.php?clid=78&thesfilter=0&taxonfilter= and on http://localhost/Symbiota/checklists/clgmap.php?pid=7 but both are currently buggy but commented out

* add default  = false; value to symbini_template

* change defaults to false

* remove absolute and top styling

* Remove imported stylesheet (#1441)

The hardcoded import of the variables.css breaks portals customized using a css/custom folder. (issues presented in /collections/misc/collprofiles.php )

The import also appeared to be unnecessary / redundant as both the customized and v202209 folder version were being brought in.

* Add missing lang file (#1440)

* Determinations import fix (#1435)

* added checks for sciname, date, identifiedBy, added try catch to skip errors instead of stopping

* replaced ERROR with SKIPPED

* unified styling for error/skip displaying

* fixed the sql errors displaying

* go back to original error display

* added note at the end and translations

* added styling for disabled buttons (#1431)

* Taxonomy API Development (#1442)

- Change sciName to scientificName alias
- Make Taxa searchable by taxon search variable
- Support exact, starts with, wildcard, and wholeword search types
- Standardize taxa table indexes
- Update Swagger documentation with new functionality

* Taxonomy Search API Endpoint Dev (#1443)

- Fix bug associated with Swagger documentation
- Update API title output

* Update harvester.php (#1447)

Modifies logic to display available boundary tool when no active geographic thesaurus exist in the DB

* CSS drop-down menus (#1452)

* CSS drop-down menus

Add styling to header.css that enables top drop-down menus

* Update OmCollections.php (#1455)

Errant line of code short circuiting collection meta data update.

* Occurrence editor crowdsource adjustments

- Add formatting for eventDate2
- Adjust exsicati
- Remove from display: additional identifiers, behavior, vitality

* occurrence editor crowdsource adjustments

- Add vertical-align to crowdsource css to override value set within reset.css
- Force refresh of crowdsource.css within client's browsers

* closes #1449 which was preventing checklist polyaid from opening (#1458)

* crowdsource editor styling issue

- resolve vertical-align issue, which persisted when opening in crowdsourcing mode and then switching between long and short forms
- Fix fieldset padding issue within image popout

* Api media 2024 06 (#1463)

- Fix route bug interfering with POST write calls
- Add recordID UUID to POST call
- Improve error output media object isn't found (400 error)
- Improve standardization of all response output
- Add sort fields to api documentation
- Add function that attempts to determine mime type via file header. Has added benefit of ensuring input file exists.
- Update swagger documentation

* Media API

- Add ability to match images based on recordID UUID within PATCH call

* added confirmation windows for project and editor delete icons (#1454)

* [3.1] -burpsuite-fix: do not add taxa to query if there are special characters or quotes (#1436)

* do not add taxa to query if there are special characters or quotes

* cherry pick fix in 6250abde5 where getTaxonWhereFrag was getting un-cleaned taxon string

* respond to code review feedback

* Occurrence download bug (#1478)

- searchvar term is being sanitized prior to being set as a session variable, which is converting & to &amp;, thus interfering with parsing of all terms after the first term. Translating &amp; to & fixes the issue.
- The cleanOutStr function santizes output using htmlspecialchars. The htmlspecialchars on line 638 will double sanitize output, thus converting "east & west" to "east &amp;amp; west".
- Variable is getting sanitized within index.php with htmlspecialchars twice. Once on line 12 and again on line 205

Addresses GH issue: https://github.com/BioKIC/Symbiota/issues/1470

* increase font size globally (#843)

* increase font size globally to 14 instead of 12, and then make improvements to other parts that looked a little weird in light of this change and addressed them as well

* Update header_template.php

* swap fonts to 1rem so it always matches html font size, 1rem = font-size of html

* header and footer font fixing

* removing footer font styling

* overhauling base/main/variable css files font sizing

* fixing head template font-size usage

* fixing sitemap fonts

* fixing leafletmap fonts

* removing fonts from occur editor and adding reactive styles to button element

* reactive fonts for occurrencelist from map search page

* jquery-ui-icons-fix

* map search font fixes

* checklist/index.php font fixes

* fixing fonts on collections/list

* font fixes taxa profile and taxa editor

* fixing missing span

* fix merge issues on map search

* fixing sitemap badges to scale with font via height based on rem

* adjusting font styles and solving conflicts with contrast change on col search

* saving col profile layout fixes

* move quicksearch to side and make sticky

* collections/list/spacing

* spacing fix for maps

* making checklist.php layout reactive so it works with different font sizes

* font and layout fixes for checklistadmin

* #tabs font size uses body variable

* Reactive quicksearch colprofile

* layout and font fixes for query form

* fieldset-like alteration

* updating header template

* standardize some spacing in checklists/checklistadminmeta.php

* cleanup on unecessary fonts specs

* fixing collectiontitle layout

* fixing collection group layout with new font size

* fixing error from merge

* more clean up of unused font-size declarations

* add font-size-normalization on tabs ui

* fixing checklist "games" font

* modify jquery ui classes to normalize font

* adjusting searchStyles inner to use rem

* cleanup on some old map inlines that are uneeded

* removing redundant font-size3

* removing uneeded font-family

---------

Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* Bugfix/3.1/spiderfy fix (#1476)

* make random color function produce a color above 40 luminence so that very dark colors are never produced

* add custom clustering strategy so for map/index so that clusters fit in with other points better and also don't cluster far less aggressively

* init slider for clustering aggressiveness

* fix random color gen create rgb values larger than 255

* add cluster to google maps and point oms.js to cdn so it is up to date

* cleaning old gen clusters from leaflet section of map/index

* Paleo bug fix

- Resolve issue interfering with activation of paleo tools

* Collmetadata lang tag audit (#1097)

* Audit collmetadata lang tags

* Minor fix

* Fix popup issue

* Fix to Spanish translations per Samanta's feedback (#1489)

* Shorten Select Language

* Change Contact Us

* Change sample search language

* Search page fix

* Change html characters

* Fix lang tags

* Spacing fix

* Es translation fixes

* Audit lang tags for guidmapper.php (#1083)

* Audit lang tags for guidmapper.php

* Fix guidmapper buttons

* Fix inputs for different actions

* set the initial zoom at 500m (#1493)

* Translation fixes from Samanta's feedback, pt 2 (#1499)

* Translation edits to collprofiles

* List and listtabledisplay translations

* Fix table display translations

* Add basic translation files for usagepolicy

* Small changes to es (#1501)

* symbbase.php refactor

- Remove no longer needed code fragments that ensure that old configuration variable formats are supported after a minor update

* Fix footer to bottom and correct portal login page (#1502)

* switch png to svg, switch button classes to icon-button (#1503)

* Remap old system variables to current format

* Paleo bug fix

- Add activate material sample to collection metadata array

* Material Sample minor style adjust

* Duplicate tool title too long crash fix (#1511)

* added a check for the title length

* added trim for last name, added IGNORE to sql insert query

* Minor bug fix

* change font control (#1512)

* Hotfix 2024 06 24 (#1527)

* Hotfix 2024-06-24
- Image tools
-- Return false when file size cannot be determined within getImgDim1 function
- Glossary (resolves issue: https://github.com/BioKIC/Symbiota/issues/1526)
-- SQL error causing term list display to fail when a taxon group was included in the search
-- Change table linkages associated with taxon group condition to LEFT JOINs so that all terms are displayed, including those without linkages to **synonyms**

* Null result handle in collections/misc/collstats.php (#1453)

* added null result handle, taxon not found alert

* remove extra line, return empty array for incorrect taxon

* added a check for families and countries

* Occurrence Query String Multiple taxa fix (#1520)

* Colprofile Lang Fix (#1517)

# Issues #1488
# Summary
Exchanged hardcoded string to use a string in the language file

* MappointAid Error Radius Check closes #1487 (#1516)

# Issue #1487
# Summary
Added check for error radius input to error radius. If it doesn't exist
default to 0 so no circle is drawn nor value sent outbound.

* Head template adjustment and base.css into main.css merge (#1514)

- Move majority of php coding out of head_template into symbbase.org. Trying to keep code to a minimum within head import file in order to maintain ability for us to modify code algorithms without having to explicitly change head.php files within each portal install.
- Move css out of head_template.php into separate css file, to again maintain ability to globally modify these styles within future code versions.
- Move header and footer link/import head so that portal administrator can point to different version if they want (e.g. header_button_menu.css)
- Remove css definitions from base.css duplicated within main.css
- Move unique css definitions from base.css into main.css
- Transfer main.css styles that are only used within a single file into target file
- Remove unused or duplicated css from checklist.css
- Remove collectiontable and categorytitle styles, which do not appear to be used anywhere within code

* CSS Refactor

- Remove dependence on $CSS_VERSION_RELEASE and v202209 directory path
- Move all css files out of v202209 directory one directory down into css base directory
- Add $CSS_VERSION to CSS imports within head_template.php, thus allowing force reload of CSS files when that variable is changed within symbbase.php file
- Remove deprecated css/base.css file
- Remove deprecated files within css/symb/directory
- Reduce pixel size of Symbiota icon, which is much larger than a typical icon. Large version of icon is still conserved, but not used as the default icon.

* Fix bold on taxon names closes #1490 (#1529)

# Issue #1490
# Summary
Remove font weight normal from taxon name so that it is going to be bold
(as it should be
)

* Fixing Data Management Tool Subheader Styles (#1531)

# Summary
Css rule to make subheaders not display absolute got overruled during
css fixes so I made the rule more precise to ensure it doesn't get
overridden.

* Fix minors reported within Apache log files

- Ensure that NULL value are not sent to exif_thumbnail function
- Correct a couple language tags used within collections/map/occurrencelist and taxa/index.php
- Add EXTERNAL_RECORDS and PORTAL_LIST language tags to map language files
- Remove unneeded htmlspecialchars used on controlled language tags

* Occurrence Search bug (#1536)

* Occurrence Search bug
- Fix issue with validation of infraspecific taxon names by allowing abbreviations with periods (e.g. var.)
- Allow taxon names to contain hybrid crosses and extinction dagger
- Fix issue with NULL being passed to string function strtoupper

* CSS modification by Logan

* header and footer adjustments

- Move javascript code out of footer into separate js file. This will allow us to make adjustments to code without needing individual non-template footer files to be adjusted to code changes.
- Remove code out of header_template file in preference to code run within symbbase.php file
- Given condition at top of header page testing if language file is imported, individual isset statements for each LANG variable is not needed.

* minimal header adjustments

- Remap minimalheader_template.php to minimalheader.php in support of the currently supported template system
- Add minimalheader_template.php to setup.sh file

* Change html entities to symbols

* Add temporarily to resolve conflict

* Remove dependence on v202209

* fixed the profile accessibility setting (#1534)

* Misc adjustments

- Bug fix: remove php code out of new js file
- Standardize syntax within footer template file
- Remove deprecated code within symbini config file

* Very minor code adjustment

* improved quick search css (#1539)

* Fix for Merge Duplicates Failing when no Determinations need Downgrading (#1484)

* add conditional check for if there are any determinations to downgrade before trying closes #1451

* adds copies of some functions from occurrenceEditorDeterminations to properly merge determinations records

copied functions have been label as such with todos to remove in 3.2
when occurrence editor work to remove latest identification section has
been done

* removing dead code comments

* fix determination merging priority to favor the lasting record

* adds temp function to transfer attributes over to omoccuridentifers if none are present before record merge takes place

* Increase Symbiota size of icon

* Template Lang File Refactor

- Move language variables files for template files into /content/lang/templates/
- Remove template from language file names with intention of including the files as part of the base code
- Standardize header/footer lang variables to ensure that there is not overlap with other existing page specific variables. This is done by adding a prefix of H_ or F_.
- Remove some unused variables from header language file
- Remove /content/lang/header.[LANG_TAG].php include statement from non-header files (clgmap.php, mappointaid.php, georefclone.php).
- Some code cleaning and input variable sanitation adjustments to non-header files referenced above.

* adding variable to control menu font-size for easy customization (#1547)

* adding variable to control menu font-size for easy customization

* move font size control to be out of media query

* Misc adjustments

* Remove 202209 again

* Add break to collection profile title (#1556)

* Template lang file adjustments

- Move image contributors language tags out of header lang file into their own file includes

* Continue to synchronize header and footer lang files

* Update variables.css

correct default header background image path.

* change the default project to 0 (#1546)

* fix typo in request (#1559)

* Add header override files

* Adjustment to resolve conflicts

* minor adjustment

* Change exsicatti to exsicattae (#1563)

* Reapply adjustments lost during previous dev merge

* Change "open" to "toggle" record search form (#1565)

* Remove inline styling for nav icon

* Create customizations.css (#1567)

* Create customizations.css

Creates a new file customizations.css that can be used to store overrides of Symbiota's default styling.  This file should never be modified by Symbiota Dev's so as to not trample on a portal's changes.

* Continued adjustments

* More developments

- dynamic map bug fix: fix link to page that lists all collections
- mappointaid bug fix: fix error importing language files
- Add missing LANG variables within collection search pages

* Additional styling adjustments

- Remove all inline styling of the img elements that were tagged with the "navIcon" attributed. The height of these elements were defined as 15px within the imported css and the inline width defined to 1.3em, thus creating image warping.
- Modified img styling within imported css file to width of 1.3em, which is what was defined within the inline for all elements

* updated the path for accessibility and condensed css (#1572)

* Taxon Description issues

- Add condition testing for language file existence, defaulting to English file upon false
- Make use of cleanOutStr function, thus avoiding null used within htmlspecialchars string function
- Fix bad language keys

* created css class for inverted color, switched location of buttons in taxonomydisplay (#1576)

* Dynamic Map adjustments

- Make use of getDomain() function within the shared Manager class. This function will return the SERVER_HOST value that is set within the symbini config file, or if that variable is not set, generate it dynamically. This reduces the need for this variable to be set within every portal, and centralizes the generation of this so that it can be done safely.
- KML failed to validate within dev environments due to Deprecated Code warning thrown due to undeclared class variable used within a local scope.
- Sanitation adjustments

* Collection Search variable adjustment (#1578)

- Improve the translation of collection input variable (e.g. db) to a database query string, which also improves copy link functions.
- Exclude commas from uri encoding

* Hotfix 2024 07 25 (#1591)

- Inventory and Project Management 
-- Display all checklists that have at least one linked taxon OR is a parent checklist inheriting taxa from a child checklist ([Issue #1532](https://github.com/BioKIC/Symbiota/issues/1532))
-- Removed limit that required checklist to have at least 10 linked taxa
-- Order checklists by project and checklists names
-- Only display Global symbol within map display option when one or more checklists within a group have lat/long centroids
-- Make project title an active link that opens the project within the project details page
- DwC-A Publishing 
-- Fix fatal error when DwC-A path fails to return a data file

* Disallow glossary download unless you're an editor (#1589)

* Add link to data usage policy to prompt citing glossary (#1590)

* Add link to data usage policy to prompt citing glossary

* Add placeholder for glossary citation

* Make use of getDomin within UtilityFunctions

* Minor adjustments to accommodate failed input variables

* Adjustment to previous submit

* Minor adjustments to checklists lang files

* Rename Taxon / Transfer Vouchers fix (#1594)

* Rename Taxon / Transfer Vouchers fix

Resolves an issue when author is included in the Target Taxon autocomplete suggestions. 

* Modifications

- Add on-change function that nulls tid when data return is null (e.g. invalid name). This clears out tid when one selects a taxon, which populates tid field, but then enters a taxon that is not in the list. Otherwise, the tid would submit the old selected value rather than correctly displaying message that tid is null.
- Remove checkScinameExistence function and rpc call, since it is no longer needed

* Language and JS logic.

---------

Co-authored-by: Edward Gilbert <[email protected]>

* Button styling fix in collprofiles.php (#1535)

* fixed the font styling

* change the primary button font color to white

* unify all buttons styling with body-font-family variable

* Occurrence Editor otherCatNum NULL search

- Bug fix within occurrence editor for when user searches otherCatalogNumbers IS NULL
- Fatal error fix when searching otherCatalogNumber NOT LIKE
Addresses issue: https://github.com/BioKIC/Symbiota/issues/1582

* Hotfix 2024 08 07 (#1606)

Taxonomy Editor
- Add taxamaps table to data remapping functions when taxon is deleted or remapped. Resolves [issue #1598](https://github.com/BioKIC/Symbiota/issues/1598)
- Minor error fixes and adjustments to language file imports
Glossary Management 
- Fix issue associated within new sources failing to save when displaying all terms without a taxon group selected. Resolves [issue #1584](https://github.com/BioKIC/Symbiota/issues/1584) 
- Display all source definitions when taxon group is not selected
- Minor adjustments to language terms and misc code
Occurrence Cleaner - duplicate merge tool
- Replace catalog numbers as the unique identifier for duplicate cluster with numeric key, thus avoiding interference of target form element due to existence of space or period within catalog number. Resolves [issue #1471](https://github.com/BioKIC/Symbiota/issues/1471) 
- Internationize first submit button
- Add header and footer to cleaning page
Specimen Upload
- Remove display of Data Versioning Checkbox option for snapshot datasets. Batch import data versioning is only available for live managed collections.

* Header / Footer adjustments

- Fix incorrect language tag variables within footer file
- Remove test of H_WELCOME variable, given that no other variables are present
- Comment out js console log output used for debugging

* Checklist Add taxon bugfix (#1604)

* Checklist Add taxon bugfix

see #1602. This fix ties the add taxon feature to a taxonomy.tid (instead of the sciname value returned by the autocomplete.

* refactor based on footer_template.php

Refactored the language value injection based on the pattern Ed used in footer_template.php

* Reset CSS Adjustments

- Remove reset.css from head_template.css in preference of pushing back official rollout of a reset stylesheet to 3.2. Ideally, with normalized.slim.css integrated into a single reset
- Move normalized out of head.php into main so that once merged into reset, we can delete normalized from main without having to adjust head.php files.
- Force refresh of main.css via $CSS_VERSION variable

* increased the width of utm div (#1613)

* removed extra div from for loop (#1614)

* Accessibility adjustments (#1610)

- Move accessibility toggle button and associated components out of footer into single contained file that can be added to footer, header, or other location via an include function
- Move accessibility files into accessibility directory
- Migrate accessibility.footer.css js into accessibilityUtil.js file
- Move accessibility language terms into their own lang files

* Remove Vertical-align from reset.css closes #1498 (#1518)

* Remove Vertical-align from reset.css closes #1498

# Issue #1498
# Summary
Causes undesirable before for things that don't have a default vertical
align like tables, will expand height for some tds if valign top is
used. Also I don't know why reseting the vertical alignment would be
needed

* adding back vertical align but making it top instead of baseline

* fix vertical aligntop for taxa main image

* change over remaing valign propties to styles instead

* remove gridlike-row class from grouped collections (#1618)

* added left margin to heading (#1622)

* fixed the headers, added subheader class (#1623)

* added display inline, added margin (#1624)

* Make SVG icons color controlled by values in variables.css (#1473)

* added styling for svg in icon-buttons, removed inline fill for svgs

* remove fill attributes from svgs in list and occurrencelist

* fixed the css class for icon-button

* Geo thesaurus default data (#1627)

- Add a default thesaurus to 3.0 fresh install. Note that this data file was not included within the 3.1 data patch. Some databases already have some form of a thesaurus, or may wish to create a thesaurus from transferring data from their lookup tables. Running the insert statements when the table is already populated with data would result in an PK conflict errors.  
-- Addresses issue https://github.com/BioKIC/Symbiota/issues/1605
- Add data file into /schema/3.0/data/ directory so that it could be run as an optional insert. We may want to add a menu option that allows user to run this install from the management interface, and maybe remove the keys from the insert statement so that data would be appended without duplicate key errors, and unique indexes that ensure that duplicate entries are avoided. And/or add a separate script file that only contains SQL that adds continents and links existing countries as children. 
- Deactivate links on non-accepted terms
- Remove ability to add children to non-accepted terms
- Don't display map nor map controls for non-accepted terms
- Add function that appends synonym terms to term output and add synonyms to terms details

* Snapshot collection menu adjustments (#1628)

- Collection admin menu change 
-- Disactivate certain menu options for snapshot collections. The goal is to further discourage folks from live managing specimen records within a Snapshot dataset, which is happening more often than it should. 
-- Keep deactivated items listed within the menu with a clear message stated that these items are only available to Live Managed collection. It is important for snapshot collections to know that these options are still available, but they need to go through the correct channels to activate them.
- Standardization of language tags (internationalization)
-- Add condition test to language file import
-- Remove no longer needed term specific conditions with default language terms
-- Add missing language terms
-- Delete French language file, which only contained English terms. This language file should be created within a separate PR.
- Misc adjustments 
-- Move html output generation out of class file
-- Add rights formatting into a static function within the Utility class. There are a number of locations where this functions need to be called (e.g. images), but this will be done within a separate PR. 
-- Add rights html styling to main.css
-- Misc styling tweaks to collection profile page

Before:
![image](https://github.com/user-attachments/assets/11051792-84d1-48b0-8959-f7eb105c68b5)

After:
![image](https://github.com/user-attachments/assets/0082a9f8-b180-4c0f-b892-788056e2d47e)

* Audit of specupload lang tags (#1084)

* Fix specupload lang tags

* Add home to lang tags

* Update specupload.es.php

* Update specupload.fr.php

* Collection menu adjustment

- Comment out code that deactivates certain menu options within snapshot collections, with the goal of better reviewing these changes and reactivating within 3.2 rollout
- Remove restrictions to label making options, since there are valid reasons for snapshot to make labels

* Update setup.sh (#1630)

* Update setup.sh

Update script to:
- dynamically find all template files
- avoid overwriting existing files unless 'force' option is used
- 'test' option to show example output
- 'verbose' option to give more information about what the script does

Update INSTALL/md

* Hide h1 titles on popups and pages with duplicate titles (#1633)

* added screen-reader-only class

* hide dynamic map heading

* Update OccurrenceIndividual.php (#1648)

* Update OccurrenceIndividual.php

Apply html elements after cleaning DB value

* Add missing language tag (#1642)

* Update geothesaurus (#1636)

- Add counties for Mexico and U.S.A.
- Add accented letters for Mexican states (and fix some too-long state names)
- Remove 3-letter abbreviations for states that were previously just those of the country

* add check for clid and default to 0 if it doesn't exist (#1632)

* Bugfix/3.1/geothesaurus map fixes (#1635)

* Add check for geojson parsing on mapcoordaid that will not parse output into json if there is nothing to parse

* if coordaid changes are made but not saved then save them if save and close is selected

* add warning of unsaved changes when leaving geothesaurus index after making an edit

* removing custom dialog option because they are not allowed

* saves and closes coordaid if edits are saved in leaflet plugin

* Update header_template.php

* Contacts header on collprofiles font fix (#1651)

* removed inline styling

* merge adjustment

* return inline styling on listed colls sections

* Change NSF references to US NSF (#1652)

* Checklist html tags (#1637)

- Fix bug that was html encoding input data prior to be added to the database. All database specific input variables were removed from the view bag in preference to be handled by the class data handlers. 
-- Addresses issue: https://github.com/BioKIC/Symbiota/issues/1596 
- Removed writable database calls from the ChecklistVoucherAdmin class in preference for shared write statements within the ImInventories class. 
- Add checklist voucher write functions to the shared ImInventories class. 
- Mics bug fixes to the ImInventories class
- Misc style adjustments to improve layout of editor forms

* Populated individual Date fields

- Add code to the occurrence editor that automatically populates year, month, day, startDayOfYear, and endDayOfYear from eventDate fields whenever they are are modified
- Add code to the statistics generator code that populates missing or incorrect individual date fields for a given collection.

* fix geographic cleaning tool (#1659)

* restore the previous code

* restore the badcountrycount functionality

* remove lkupcountry

* added hidden input for default useThes value (#1657)

* Schema Manager adjustments (#1655)

Changes include improved error reporting when database does not exist or is misspelled within connection config file, as well as reporting authentication issues associated with portal base users. If user goes to sitemap and database tables do not yet exist, the user will be forwarded directly to schema manager to assist installing base schema.

Note that the first 3 commits are only associated with batch code adjustments that remove unnecessary code fragements. Looks directly are the last commit to review modifications that are associated with logistically changes (e.g. https://github.com/BioKIC/Symbiota/commit/c54952e651279da22a7efa953d1ea9364cfc9023).  

Specific changes: 
- Add try/catch to db_connection file and connection test within Manager class that reports when connection to database fails (e.g. no connection, authentication issue, etc)
- Sitemap adjustments that automatically forwards user to schema manager whenever schema is missing (e.g. fresh install).
- Add backward ticks to all table and stored procedure names within schema files so that installation logger is able to properly report table name within logs
- Misc adjustments to schema manager to improved output reports
- Add message to schema manager that warns user when log directories are not writable by web user (e.g. apache)
- Only check users accessibility settings if they are logged in to the portal

* Update DwcArchiverCore.php

- fix issue when custom where statement gets an extra "where" added when string begins with an empty space
Addresses issue: https://github.com/BioKIC/Symbiota/issues/1653

* Dynamic map checklist dev

- Include points from child checklists when dynamic map is selected within the checklists page
- Add IGNORE to stats INSERT statement in order to avoid fatal error when a duplicate entry it inserted.

* Taxon links bug

- Remove second declaration of taxonlinks array, which was causing the array to be redefined throughout each record loop.

* Fix redundant map (#1663)

That also wasn't reading projArr['displayMap'] variable

* adjust sort comparator to return explcit numbers so v8 doesn't get co… (#1669)

* adjust sort comparator to return explcit numbers so v8 doesn't get confused

* add origin linking to tid

* add origin linking to google map search

* wrapped latitude/longitude in label (#1668)

* Add crowdsourcing language tag

* Update INSTALL.md

Formatting

* Update INSTALL.md

Additional formatting

* Update search.php

- Bug fix resolving issue where collection administrators and editors did not have permission to tag images from their collection.
Addresses issue  https://github.com/BioKIC/Symbiota/issues/1616

* Hotfix 2024 08 22 (#1677)

- Minor bug fix that was interfering with saving of locationRemarks when a new record is saved (resolves https://github.com/BioKIC/Symbiota/issues/1445)

* 3.1 preparation updates

- Move still relevant data files into 3.0 data directory
- Update INSTALL.md documentation
- Fix misc spelling error
- Update version number

* Fix typo

* Update UPDATE.md (#1681)

* Fix Backward Compatiblity Issue involving mysqli_execute_query (#1682)

* Adds util function to make use of mysqli_execute_query for older versions of php

# Summary
`mysqli_execute_query` or `$mysqli->execute_query` function is an 8.2
only function provided by mysqli which could break portals that cannot
upgrade to 8.2 from 8 or are running 7.3. Solution is to make a util
function with the same api as mysqli_execute_query but will use the php
version to decide wether to use mysqli_execute_query or normal statement
binding.

* removing comment left over from prototyping

* usage of taxa thesaurus family over occurrence family (#1675)

* usage of taxa thesaurus family over occurrence family

* Modifications

- "ts.taxauthid = 1" needs to be added to the where condition or the recordset would return duplicate records for each taxonomic thesaurus defined within taxstatus table (e.g. there are 4 defined within SEINet). I suppose not including it would not be a big problem since the occid would be the same for each record, and thus the output data array would just copy over existing data. However, it would iterate through more records than needed. Another solution would be to change the statement to "SELECT DISTINCT...", but this can significantly slows down an ordered query.
- Since "ts.taxauthid = 1" is added to the where clause, the getTableJoins function should always add the taxstatus left join, thus we can leave out that test.

* Minor fix to previous submit

---------

Co-authored-by: Edward Gilbert <[email protected]>

* bugfix barcodes (#1683)

fix label printing barcode 500 error

* Update CHANGELOG

* Api occurrence 2024 08 (#1688)

- Occurrence API endpoint development
-- Add collector, collector last name, and collector number as searchable functions
-- Develop write functions (insert, update, delete), but not yet activated for public use 
-- Add new endpoint for loading and processing skeletal occurrence data
-- Add swagger documentation for skeletal record processing 
- Taxonomy API endpoint development
-- Refactor to use query builder for defining search terms (bring code in sync NEON taxonomy developments)  
- Mics
-- Add helper functions to Lumen API

* 3.1.1 Release: Merge Hotfix branch into Master (#1747)

* Occurrence Mapping: Adjust SQL to relax enforcement of link to taxon thesaurus, thus to include records with coordinates but lacking thesaurus relationship 
* Styling: Various styling, spacing, and display adjustments 
* Occurrence search: add type attribute to buttons to avoid defaulting as submit buttons 
* Occurrence Profile: Fix error triggered when otherCatalogNumbers are used to create backlink to original snapshot record within external institution web resource
* Occurrence editing functions  
-- Fix fatal error triggered by cloning an occurrence record with the create association option selected
-- Fix fatal error triggered when quick association feature is activated within occurrence editor
-- Fix fatal error when deleting an occurrence when the occurrence was previously deleted (e.g. record already in omoccurarchive)
-- Adjust occurrence restore option to dynamically determine associationType when restoring a record that was deleted prior to this field being added as a required input
-- If resource association does not have an objectID, use url as the display text
* Taxonomy editor: bug fix triggered by adding a child directly to the root node of the thesaurus (e.g. kingdom)
* Scientific name parsing utility functions: Integrate cleanInfra function directly into code. It served no purpose being separate, and was also causing a bug where parent authors were being incorrectly merged with insfraspecific authors

---------

Co-authored-by: Katie Pearson <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* 3.1.2 Release: Merge Hotfix branch into Master (#1770)

* Hotfix v.3.1.3  (#1821)

* Hotfix v3.1.3 
- Adjusted hotfix merge instructions
- Inventory Management: Bug fix interfering with adding new editors to an inventory project
- Image migration modifications
-- Add option to copy over existing target files
-- Add checks and error handling for non-existent source files and already existing target files
-- Direct log files to be written to /content/logs/
- fix misspelled log directory name, with support still maintained for portals that already have the misspelled directory
- Fix jquery selector to be correct so button is enabled when trait is changed
- Misc language file and wording adjustments

---------

Co-authored-by: Edward Gilbert <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>
Co-authored-by: Greg Post <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: NikitaSalikov <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
themerekat added a commit that referenced this pull request Nov 7, 2024
* Media API development

- Convert Media POST and PUT data input from parameter values to a data object passed within the body
- Some improvement with response documentation
- Fix duplicate operationId values
- Rebuild Swagger API documentation

* Coloring of Non Observation Points with Direct Updating (#1337)

* uses leaflet path method to set color so that it will update when group is not re drawn closes 1319

* close #1320, addes check for catnum

* Bugfix/collection meta data status fix (#1334)

* adds check for duplicate collectionCode / institutionalCode key when updating collection meta data and gives status msg upon failure closes #1311

* changes wording of duplicate error

* link error to new tab

* fixes lang tag error for collmetadata.php title

* closes #1326, fixes snapping on map with and without circle (#1338)

* Update searchform.js (#1336)

* Update searchform.js

Fix sessionStorage.querystring bug.  Javascript was not handling setting db (collections) checkbox array from user sessionStorage.

* Update searchform.js

Correcting variable name

* Revert "Update searchform.js (#1336)" (#1342)

This reverts commit 79e2a1b0da2d03e29d2f3658a936279252edce6b.

* removed overarching form tag because it wasn't on both sponsorship forms closes #1329 (#1341)

* Fix Occur Editor Nav visiblity with no results closes #1333 (#1343)

* cloFix Occur Editor Nav visiblity with no results closes #1333

Shifts conditional hiding search form down a level so it only blocks
tabs that way navigation is still possible when there is no query
results

* shifts formating to correct from one less conditional

* occurrence editor images tab (#1350)

The image info was being pushed down to the baseline of the displayed image.  This fix creates a new class that resets the cell alignment to top aligned.

* Update ProfileManager.php (#1347)

* Update ProfileManager.php
Confirms if 'accessibilityPref' is set in user's dynamic properties and sets AccessibilityPreference to false by default if not.

* Fits Table to row size when Smaller than 80vh closes #1340 (#1348)

# Issue 1340
# Summary
This should fit the bottom scroll bar into view when their is few
results.

* [3.1] Font unification (#1301)

* remove some font-family references

* remove in-line styling for font-family in all files not .scss, .css, vendor, .js, .less, .html, or .map

* remove <b> from one of the fieldset-likes

* add reference to font-family in reset.css

* remove unecessary font-size restriction on fields-available chips

* 3.1 search page flow bugfix (#1351)

* fix the page flow bugs but confirm existing collection persistance issues

* display which collections are to be queried in harvest params

* solve the collection selection for the new search page

* clean up and subfunctionalize

* slight refactor to improve readability

* add minor aesthetic improvement

* add styling class

* remove collection display in harvest params

* remove translations that are now cruft

* Occurrence Dataset Refactor

* Revert "Occurrence Dataset Refactor"

This reverts commit 6580a7a57919f986f24890ebe559fb7eeedc5e17.

* othercatalogNumber parsing bug fix

- Parse tags and values found within omoccurrences:otherCatalogNumbers field and display within additional identifiers table within the occurrence editor. If form is saved, parsed values are saved within omoccuridentiers table.

* Taxonomy remap bug

- Fix issue with taxon remapping/merging into another taxon failing due to key violations within taxstatus (relationship already exists). This is another issue with PHP 8.2 throwing fatal error for mysql warnings. Adding an IGNORE to statement solves the issue since already existing relationships don't need to be  transferred, and will be deleted when secondary taxon is deleted.

* 3.1 hamburger menu fix  (#1363)

* Update header.css

Center hamburger menu and flow menu content into body so that menu content is scrollable on small screens.
Remove transitions
Reduce padding around hamburger to unblock 'Home' menu link

* order alphabetically and then by string length (#1358)

* Merge info button (#1368)

* Add dialog box with info about merging records

* Remove redundant lang tags

Discovered when finding lang tags corresponding to "more information" via dialog box code that I copied

* Change dialog box to a link to Symbiota Docs

Seems more consistent with where we're going now

* Update defaultinvoice.php (#1370)

$loanType is a string - was being sanitized as a Int.  Variable is not used in any output to client, so should be safe to just use for comparison without filtering.

* Taxonomy Editor format adjustment

- Minor adjustment to display of parent taxon to fix issue with lack of space between scientific name and author, with additional minor improvements
- Minor improvement to only italicize taxa at genus rank or above
- Move htmlspecailchars and formatting into class assignment so that rankid can be used to decide formating

* Update ImageLocalProcessor.php (#1372)

php current() expects an array while parse_url with  PHP_URL_PATH paramter should return a string or false.

This changes were also committed to hotfix-2024-05-22

* Hotfix 2024 05 22 (#1374)

* Hotfix 2024-05-22

- Checklist management:
-- Adjust taxon merge function to accommodate PHP v8.1 fatal exceptions during foreign key conflicts within SQL update statements, which previously simply returned false value with a warning
- Image processing:
-- Bug resolution to avoid fatal error where an array function is incorrectly used on a string. Resolves issue https://github.com/BioKIC/Symbiota/issues/1366
- Occurrence Mapping:
-- Fix bug interfering with the exclusion of protected occurrences within the mapping tools when user is not approved to view these records. Associated with issue: https://github.com/BioKIC/Symbiota/issues/1375 

Co-authored-by: Greg Post <[email protected]>

* 3.1-upload-bug

- Avoid fatal error that are now thrown by PHP v8.1+ instead of the previous warning

* Bugfix/3.1/collection list map clustering (#1373)

* reroute map result to map search b/c this is fully featured

* closes #1345 add add reference marker functionality to map/index so that no funtionality is lost

* inversing switch so logic works out

* default clustering off

* moved cluster switch on by default from needing param and it just defaults to no clustering

* oFixes Map Search Auto searching with no Parameters (#1388)

# Summary
Only adds lat long data restrictions if something is present in the
`sqlWhere` property. That way if checks to sqlWhere don't fire with
everything searches ever.

* Bugfix/3.1/record search contrast (#1386)

* add important to screen reader only class

* fixing contrast adding styling class for the insert border labels

* collection search uses body color instead of grey for better contrast

* updating screen-reader-only for base.css

* fixing use of data-labels with content to just normal spans

* focus now uses medium color for contrast

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty (#1391)

* adds guard to do either 'AND' or 'WHERE' if $sqlWhere is empty

* fix accidental populating of sqlWhere in setGeoSqlWhere

---------

Co-authored-by: Mark <[email protected]>

* [3.1] Merge Duplicate Record bugfix (#1344)

* swaps all the merge record queries to be prepared statements (mostly) and puts them in a try catch so blank errors don't occur on the user side

* Add $collId as arg for dupManager merge Records since collId would be undefined otherwise and fixed control flow to only navigate you when error occurs

* Adds Ignores to mergeRecord and Error Control Flow to deleteOccurrence

* Add forgotten lang tags for dupManager

* saving determinations work

* determination history priortizes source records current determinations

* adding quote filtering for taxa and taxonFilter to prevent link onmouse over xss (#1380)

* make sure the formats are in explicitly in a whitelist in an attempt to make burpsuite happy (#1394)

* [3.1] - burpsuite - emlhandler fix: adds is_numeric checker for collid in collections/datasets/emlhandler… (#1398)

* adds is_numeric checker for collid in collections/datasets/emlhandler.php

* respond to code review feedback. If it does not pass the is_numeric check off the bat, it probably should not be treated as valid

* [3.1] - select collections from the url if present (#1400)

* select collections from the url if present

* DRY up sanitizedCollectionSource section, which has the same pattern as occurs elsewhere

* fix typo

* change default to empty array

* add better type checking to collIdsFromUrl

* Update ImInventories.php

* fixed the icons max-width value (#1410)

* attempt to fix the injection issues in collections/list.php (#1401)

* attempt to fix the injection issues

* change setSciNamesByVerns to use prepared statement

* remove extra htmlspecialchars call now that prepared statement is in place

* removed extra spaces

---------

Co-authored-by: Mark <[email protected]>

* Fixes Geothesaurus Searching Closes #1396 (#1404)

# Issue #1396
# Summary
Adds Parameter to let rpc call reduce output to distict results
Fixes parent dependent search detection so that initial id is used
forever even after the parent param changes

* sort by lenght so more exact match comes up when typed (#1416)

Issue came up when `calif` would show `Baja California` before
`California` because it was sorted by alphabetical but it really should
be the more exact match ie the smaller one usually first

* Enhancement/3.1/mappoint aid better edit (#1417)

* pointaid only autoselects tool if point not present and click to edit is now possible with leaflet draw

* fixes deletion problem with marker and circle present. Also fixes drag not being possible when click editing

* change checklist point aid to just use collection point aid to reduce duplicated effort

* fixed problem that occured while in edit mode and changing the error radius

* more form enhancements so that circle and marker move with each other during position edits

* 3.1 new search to list display (#1411)

* add display format radio button and handle case where user navigates back from table display to list display and then clicks breadcrumbs

* handle logic flow of list->table->list

* add translation and respond to self code review

* fix bug where breadcrumbs in collections/listtabledisplay.php were not respecting whether user was coming from new search page

* Change from button back to input to upload file (#1415)

* htmlentity quote was messing with json_decode closes #1384 (#1419)

* changed to prepared statements (#1422)

* fixes bug there was a db error because voucher manager was missing during kml download attempt (#1421)

* fixes voucher alignment when no search variables are present closes #1378 (#1423)

# Issues #1378

# Summary
Default css in reset.css removed default table vertical alignment which
skewed the inputs in the table

* fix types for taxa id-related prepared statements to match sqls expec… (#1426)

* fix types for taxa id-related prepared statements to match sqls expectation of integer types as well as make some cosmetic fixes to spacing for code readbility

* change result to statement for close

* 3.1 schema patch adjustments (#1413)

Schema patch adjustments based on running patch through a new portal 3.0 install and a 1.x => 3.0 => 3.1 portal update. Install/update tests were run both through command line and using the schema manager tool.
- Remove omoccurrences index keys that are never set within previous schema updates
- Temporarily turn off foreign key checks to allow renaming of omoccurrences collid index

Schema Manager adjustments 
- Adjust code to accept and run the 3.1 patch
- Add try-catch and other db checks to avoid PHP 8.1 throwing fatal errors when SQL statements fail, where the previous action only involved a return of a NULL result set

* 3.1 burpsuite fixes 19 june 2024 (#1433)

* address xss vulnerability for taxa in imagelib/search.php

* fix sql injection bug for cntperpage in imagelib/search.php

* address sql injection of taxa parameter in checklists/checklist.php and, indirectly, /collections/list.php

* hopefully resolves sql injection issue with db/searchvar in /collections/map/kmlhandler.php

* hopefully address sql injection for downloadhandler.php

* [3.1] Minimal header - part 1 (incomplete implementation that defaults as disabled until [3.2] part 2 is done) (#1429)

All requested changes made by @MuchQuak have been incorporated into the Part 2 of the ticket.

* establish minimal_header_template.php

* remove defaults

* freeze of current work to address burpsuite stuff

* continue making aesthetics improvements at both small and large screen sizes for the minimal header

* makes the map header configurable and handles some styling that has to be dynamic depending on presence or absence of map header

* adds minimal header optionally to collections/tools/mappointaid.php

* adds minimal header optionally to CHECKLISTS/tools/mappointaid.php

* move the z-index styling to the css file so that it can be overwritten more easily in collections/georef/georefclone.php. Implements the minimal header in collections/georef/georefclone.php

* fix bug where clicking advanced search from coll profile had a parsing error from the db query param in the url

* implement minimal header in collections/individual/index.php

* remove cruft

* handle cass where [db] is not set

* make progress on /checklists/checklistmap.php?clid=78&thesfilter=0&taxonfilter= and on http://localhost/Symbiota/checklists/clgmap.php?pid=7 but both are currently buggy but commented out

* add default  = false; value to symbini_template

* change defaults to false

* remove absolute and top styling

* Remove imported stylesheet (#1441)

The hardcoded import of the variables.css breaks portals customized using a css/custom folder. (issues presented in /collections/misc/collprofiles.php )

The import also appeared to be unnecessary / redundant as both the customized and v202209 folder version were being brought in.

* Add missing lang file (#1440)

* Determinations import fix (#1435)

* added checks for sciname, date, identifiedBy, added try catch to skip errors instead of stopping

* replaced ERROR with SKIPPED

* unified styling for error/skip displaying

* fixed the sql errors displaying

* go back to original error display

* added note at the end and translations

* added styling for disabled buttons (#1431)

* Taxonomy API Development (#1442)

- Change sciName to scientificName alias
- Make Taxa searchable by taxon search variable
- Support exact, starts with, wildcard, and wholeword search types
- Standardize taxa table indexes
- Update Swagger documentation with new functionality

* Taxonomy Search API Endpoint Dev (#1443)

- Fix bug associated with Swagger documentation
- Update API title output

* Update harvester.php (#1447)

Modifies logic to display available boundary tool when no active geographic thesaurus exist in the DB

* CSS drop-down menus (#1452)

* CSS drop-down menus

Add styling to header.css that enables top drop-down menus

* Update OmCollections.php (#1455)

Errant line of code short circuiting collection meta data update.

* Occurrence editor crowdsource adjustments

- Add formatting for eventDate2
- Adjust exsicati
- Remove from display: additional identifiers, behavior, vitality

* occurrence editor crowdsource adjustments

- Add vertical-align to crowdsource css to override value set within reset.css
- Force refresh of crowdsource.css within client's browsers

* closes #1449 which was preventing checklist polyaid from opening (#1458)

* crowdsource editor styling issue

- resolve vertical-align issue, which persisted when opening in crowdsourcing mode and then switching between long and short forms
- Fix fieldset padding issue within image popout

* Api media 2024 06 (#1463)

- Fix route bug interfering with POST write calls
- Add recordID UUID to POST call
- Improve error output media object isn't found (400 error)
- Improve standardization of all response output
- Add sort fields to api documentation
- Add function that attempts to determine mime type via file header. Has added benefit of ensuring input file exists.
- Update swagger documentation

* Media API

- Add ability to match images based on recordID UUID within PATCH call

* added confirmation windows for project and editor delete icons (#1454)

* [3.1] -burpsuite-fix: do not add taxa to query if there are special characters or quotes (#1436)

* do not add taxa to query if there are special characters or quotes

* cherry pick fix in 6250abde5 where getTaxonWhereFrag was getting un-cleaned taxon string

* respond to code review feedback

* Occurrence download bug (#1478)

- searchvar term is being sanitized prior to being set as a session variable, which is converting & to &amp;, thus interfering with parsing of all terms after the first term. Translating &amp; to & fixes the issue.
- The cleanOutStr function santizes output using htmlspecialchars. The htmlspecialchars on line 638 will double sanitize output, thus converting "east & west" to "east &amp;amp; west".
- Variable is getting sanitized within index.php with htmlspecialchars twice. Once on line 12 and again on line 205

Addresses GH issue: https://github.com/BioKIC/Symbiota/issues/1470

* increase font size globally (#843)

* increase font size globally to 14 instead of 12, and then make improvements to other parts that looked a little weird in light of this change and addressed them as well

* Update header_template.php

* swap fonts to 1rem so it always matches html font size, 1rem = font-size of html

* header and footer font fixing

* removing footer font styling

* overhauling base/main/variable css files font sizing

* fixing head template font-size usage

* fixing sitemap fonts

* fixing leafletmap fonts

* removing fonts from occur editor and adding reactive styles to button element

* reactive fonts for occurrencelist from map search page

* jquery-ui-icons-fix

* map search font fixes

* checklist/index.php font fixes

* fixing fonts on collections/list

* font fixes taxa profile and taxa editor

* fixing missing span

* fix merge issues on map search

* fixing sitemap badges to scale with font via height based on rem

* adjusting font styles and solving conflicts with contrast change on col search

* saving col profile layout fixes

* move quicksearch to side and make sticky

* collections/list/spacing

* spacing fix for maps

* making checklist.php layout reactive so it works with different font sizes

* font and layout fixes for checklistadmin

* #tabs font size uses body variable

* Reactive quicksearch colprofile

* layout and font fixes for query form

* fieldset-like alteration

* updating header template

* standardize some spacing in checklists/checklistadminmeta.php

* cleanup on unecessary fonts specs

* fixing collectiontitle layout

* fixing collection group layout with new font size

* fixing error from merge

* more clean up of unused font-size declarations

* add font-size-normalization on tabs ui

* fixing checklist "games" font

* modify jquery ui classes to normalize font

* adjusting searchStyles inner to use rem

* cleanup on some old map inlines that are uneeded

* removing redundant font-size3

* removing uneeded font-family

---------

Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* Bugfix/3.1/spiderfy fix (#1476)

* make random color function produce a color above 40 luminence so that very dark colors are never produced

* add custom clustering strategy so for map/index so that clusters fit in with other points better and also don't cluster far less aggressively

* init slider for clustering aggressiveness

* fix random color gen create rgb values larger than 255

* add cluster to google maps and point oms.js to cdn so it is up to date

* cleaning old gen clusters from leaflet section of map/index

* Paleo bug fix

- Resolve issue interfering with activation of paleo tools

* Collmetadata lang tag audit (#1097)

* Audit collmetadata lang tags

* Minor fix

* Fix popup issue

* Fix to Spanish translations per Samanta's feedback (#1489)

* Shorten Select Language

* Change Contact Us

* Change sample search language

* Search page fix

* Change html characters

* Fix lang tags

* Spacing fix

* Es translation fixes

* Audit lang tags for guidmapper.php (#1083)

* Audit lang tags for guidmapper.php

* Fix guidmapper buttons

* Fix inputs for different actions

* set the initial zoom at 500m (#1493)

* Translation fixes from Samanta's feedback, pt 2 (#1499)

* Translation edits to collprofiles

* List and listtabledisplay translations

* Fix table display translations

* Add basic translation files for usagepolicy

* Small changes to es (#1501)

* symbbase.php refactor

- Remove no longer needed code fragments that ensure that old configuration variable formats are supported after a minor update

* Fix footer to bottom and correct portal login page (#1502)

* switch png to svg, switch button classes to icon-button (#1503)

* Remap old system variables to current format

* Paleo bug fix

- Add activate material sample to collection metadata array

* Material Sample minor style adjust

* Duplicate tool title too long crash fix (#1511)

* added a check for the title length

* added trim for last name, added IGNORE to sql insert query

* Minor bug fix

* change font control (#1512)

* Hotfix 2024 06 24 (#1527)

* Hotfix 2024-06-24
- Image tools
-- Return false when file size cannot be determined within getImgDim1 function
- Glossary (resolves issue: https://github.com/BioKIC/Symbiota/issues/1526)
-- SQL error causing term list display to fail when a taxon group was included in the search
-- Change table linkages associated with taxon group condition to LEFT JOINs so that all terms are displayed, including those without linkages to **synonyms**

* Null result handle in collections/misc/collstats.php (#1453)

* added null result handle, taxon not found alert

* remove extra line, return empty array for incorrect taxon

* added a check for families and countries

* Occurrence Query String Multiple taxa fix (#1520)

* Colprofile Lang Fix (#1517)

# Issues #1488
# Summary
Exchanged hardcoded string to use a string in the language file

* MappointAid Error Radius Check closes #1487 (#1516)

# Issue #1487
# Summary
Added check for error radius input to error radius. If it doesn't exist
default to 0 so no circle is drawn nor value sent outbound.

* Head template adjustment and base.css into main.css merge (#1514)

- Move majority of php coding out of head_template into symbbase.org. Trying to keep code to a minimum within head import file in order to maintain ability for us to modify code algorithms without having to explicitly change head.php files within each portal install.
- Move css out of head_template.php into separate css file, to again maintain ability to globally modify these styles within future code versions.
- Move header and footer link/import head so that portal administrator can point to different version if they want (e.g. header_button_menu.css)
- Remove css definitions from base.css duplicated within main.css
- Move unique css definitions from base.css into main.css
- Transfer main.css styles that are only used within a single file into target file
- Remove unused or duplicated css from checklist.css
- Remove collectiontable and categorytitle styles, which do not appear to be used anywhere within code

* CSS Refactor

- Remove dependence on $CSS_VERSION_RELEASE and v202209 directory path
- Move all css files out of v202209 directory one directory down into css base directory
- Add $CSS_VERSION to CSS imports within head_template.php, thus allowing force reload of CSS files when that variable is changed within symbbase.php file
- Remove deprecated css/base.css file
- Remove deprecated files within css/symb/directory
- Reduce pixel size of Symbiota icon, which is much larger than a typical icon. Large version of icon is still conserved, but not used as the default icon.

* Fix bold on taxon names closes #1490 (#1529)

# Issue #1490
# Summary
Remove font weight normal from taxon name so that it is going to be bold
(as it should be
)

* Fixing Data Management Tool Subheader Styles (#1531)

# Summary
Css rule to make subheaders not display absolute got overruled during
css fixes so I made the rule more precise to ensure it doesn't get
overridden.

* Fix minors reported within Apache log files

- Ensure that NULL value are not sent to exif_thumbnail function
- Correct a couple language tags used within collections/map/occurrencelist and taxa/index.php
- Add EXTERNAL_RECORDS and PORTAL_LIST language tags to map language files
- Remove unneeded htmlspecialchars used on controlled language tags

* Occurrence Search bug (#1536)

* Occurrence Search bug
- Fix issue with validation of infraspecific taxon names by allowing abbreviations with periods (e.g. var.)
- Allow taxon names to contain hybrid crosses and extinction dagger
- Fix issue with NULL being passed to string function strtoupper

* CSS modification by Logan

* header and footer adjustments

- Move javascript code out of footer into separate js file. This will allow us to make adjustments to code without needing individual non-template footer files to be adjusted to code changes.
- Remove code out of header_template file in preference to code run within symbbase.php file
- Given condition at top of header page testing if language file is imported, individual isset statements for each LANG variable is not needed.

* minimal header adjustments

- Remap minimalheader_template.php to minimalheader.php in support of the currently supported template system
- Add minimalheader_template.php to setup.sh file

* Change html entities to symbols

* Add temporarily to resolve conflict

* Remove dependence on v202209

* fixed the profile accessibility setting (#1534)

* Misc adjustments

- Bug fix: remove php code out of new js file
- Standardize syntax within footer template file
- Remove deprecated code within symbini config file

* Very minor code adjustment

* improved quick search css (#1539)

* Fix for Merge Duplicates Failing when no Determinations need Downgrading (#1484)

* add conditional check for if there are any determinations to downgrade before trying closes #1451

* adds copies of some functions from occurrenceEditorDeterminations to properly merge determinations records

copied functions have been label as such with todos to remove in 3.2
when occurrence editor work to remove latest identification section has
been done

* removing dead code comments

* fix determination merging priority to favor the lasting record

* adds temp function to transfer attributes over to omoccuridentifers if none are present before record merge takes place

* Increase Symbiota size of icon

* Template Lang File Refactor

- Move language variables files for template files into /content/lang/templates/
- Remove template from language file names with intention of including the files as part of the base code
- Standardize header/footer lang variables to ensure that there is not overlap with other existing page specific variables. This is done by adding a prefix of H_ or F_.
- Remove some unused variables from header language file
- Remove /content/lang/header.[LANG_TAG].php include statement from non-header files (clgmap.php, mappointaid.php, georefclone.php).
- Some code cleaning and input variable sanitation adjustments to non-header files referenced above.

* adding variable to control menu font-size for easy customization (#1547)

* adding variable to control menu font-size for easy customization

* move font size control to be out of media query

* Misc adjustments

* Remove 202209 again

* Add break to collection profile title (#1556)

* Template lang file adjustments

- Move image contributors language tags out of header lang file into their own file includes

* Continue to synchronize header and footer lang files

* Update variables.css

correct default header background image path.

* change the default project to 0 (#1546)

* fix typo in request (#1559)

* Add header override files

* Adjustment to resolve conflicts

* minor adjustment

* Change exsicatti to exsicattae (#1563)

* Reapply adjustments lost during previous dev merge

* Change "open" to "toggle" record search form (#1565)

* Remove inline styling for nav icon

* Create customizations.css (#1567)

* Create customizations.css

Creates a new file customizations.css that can be used to store overrides of Symbiota's default styling.  This file should never be modified by Symbiota Dev's so as to not trample on a portal's changes.

* Continued adjustments

* More developments

- dynamic map bug fix: fix link to page that lists all collections
- mappointaid bug fix: fix error importing language files
- Add missing LANG variables within collection search pages

* Additional styling adjustments

- Remove all inline styling of the img elements that were tagged with the "navIcon" attributed. The height of these elements were defined as 15px within the imported css and the inline width defined to 1.3em, thus creating image warping.
- Modified img styling within imported css file to width of 1.3em, which is what was defined within the inline for all elements

* updated the path for accessibility and condensed css (#1572)

* Taxon Description issues

- Add condition testing for language file existence, defaulting to English file upon false
- Make use of cleanOutStr function, thus avoiding null used within htmlspecialchars string function
- Fix bad language keys

* created css class for inverted color, switched location of buttons in taxonomydisplay (#1576)

* Dynamic Map adjustments

- Make use of getDomain() function within the shared Manager class. This function will return the SERVER_HOST value that is set within the symbini config file, or if that variable is not set, generate it dynamically. This reduces the need for this variable to be set within every portal, and centralizes the generation of this so that it can be done safely.
- KML failed to validate within dev environments due to Deprecated Code warning thrown due to undeclared class variable used within a local scope.
- Sanitation adjustments

* Collection Search variable adjustment (#1578)

- Improve the translation of collection input variable (e.g. db) to a database query string, which also improves copy link functions.
- Exclude commas from uri encoding

* Hotfix 2024 07 25 (#1591)

- Inventory and Project Management 
-- Display all checklists that have at least one linked taxon OR is a parent checklist inheriting taxa from a child checklist ([Issue #1532](https://github.com/BioKIC/Symbiota/issues/1532))
-- Removed limit that required checklist to have at least 10 linked taxa
-- Order checklists by project and checklists names
-- Only display Global symbol within map display option when one or more checklists within a group have lat/long centroids
-- Make project title an active link that opens the project within the project details page
- DwC-A Publishing 
-- Fix fatal error when DwC-A path fails to return a data file

* Disallow glossary download unless you're an editor (#1589)

* Add link to data usage policy to prompt citing glossary (#1590)

* Add link to data usage policy to prompt citing glossary

* Add placeholder for glossary citation

* Make use of getDomin within UtilityFunctions

* Minor adjustments to accommodate failed input variables

* Adjustment to previous submit

* Minor adjustments to checklists lang files

* Rename Taxon / Transfer Vouchers fix (#1594)

* Rename Taxon / Transfer Vouchers fix

Resolves an issue when author is included in the Target Taxon autocomplete suggestions. 

* Modifications

- Add on-change function that nulls tid when data return is null (e.g. invalid name). This clears out tid when one selects a taxon, which populates tid field, but then enters a taxon that is not in the list. Otherwise, the tid would submit the old selected value rather than correctly displaying message that tid is null.
- Remove checkScinameExistence function and rpc call, since it is no longer needed

* Language and JS logic.

---------

Co-authored-by: Edward Gilbert <[email protected]>

* Button styling fix in collprofiles.php (#1535)

* fixed the font styling

* change the primary button font color to white

* unify all buttons styling with body-font-family variable

* Occurrence Editor otherCatNum NULL search

- Bug fix within occurrence editor for when user searches otherCatalogNumbers IS NULL
- Fatal error fix when searching otherCatalogNumber NOT LIKE
Addresses issue: https://github.com/BioKIC/Symbiota/issues/1582

* Hotfix 2024 08 07 (#1606)

Taxonomy Editor
- Add taxamaps table to data remapping functions when taxon is deleted or remapped. Resolves [issue #1598](https://github.com/BioKIC/Symbiota/issues/1598)
- Minor error fixes and adjustments to language file imports
Glossary Management 
- Fix issue associated within new sources failing to save when displaying all terms without a taxon group selected. Resolves [issue #1584](https://github.com/BioKIC/Symbiota/issues/1584) 
- Display all source definitions when taxon group is not selected
- Minor adjustments to language terms and misc code
Occurrence Cleaner - duplicate merge tool
- Replace catalog numbers as the unique identifier for duplicate cluster with numeric key, thus avoiding interference of target form element due to existence of space or period within catalog number. Resolves [issue #1471](https://github.com/BioKIC/Symbiota/issues/1471) 
- Internationize first submit button
- Add header and footer to cleaning page
Specimen Upload
- Remove display of Data Versioning Checkbox option for snapshot datasets. Batch import data versioning is only available for live managed collections.

* Header / Footer adjustments

- Fix incorrect language tag variables within footer file
- Remove test of H_WELCOME variable, given that no other variables are present
- Comment out js console log output used for debugging

* Checklist Add taxon bugfix (#1604)

* Checklist Add taxon bugfix

see #1602. This fix ties the add taxon feature to a taxonomy.tid (instead of the sciname value returned by the autocomplete.

* refactor based on footer_template.php

Refactored the language value injection based on the pattern Ed used in footer_template.php

* Reset CSS Adjustments

- Remove reset.css from head_template.css in preference of pushing back official rollout of a reset stylesheet to 3.2. Ideally, with normalized.slim.css integrated into a single reset
- Move normalized out of head.php into main so that once merged into reset, we can delete normalized from main without having to adjust head.php files.
- Force refresh of main.css via $CSS_VERSION variable

* increased the width of utm div (#1613)

* removed extra div from for loop (#1614)

* Accessibility adjustments (#1610)

- Move accessibility toggle button and associated components out of footer into single contained file that can be added to footer, header, or other location via an include function
- Move accessibility files into accessibility directory
- Migrate accessibility.footer.css js into accessibilityUtil.js file
- Move accessibility language terms into their own lang files

* Remove Vertical-align from reset.css closes #1498 (#1518)

* Remove Vertical-align from reset.css closes #1498

# Issue #1498
# Summary
Causes undesirable before for things that don't have a default vertical
align like tables, will expand height for some tds if valign top is
used. Also I don't know why reseting the vertical alignment would be
needed

* adding back vertical align but making it top instead of baseline

* fix vertical aligntop for taxa main image

* change over remaing valign propties to styles instead

* remove gridlike-row class from grouped collections (#1618)

* added left margin to heading (#1622)

* fixed the headers, added subheader class (#1623)

* added display inline, added margin (#1624)

* Make SVG icons color controlled by values in variables.css (#1473)

* added styling for svg in icon-buttons, removed inline fill for svgs

* remove fill attributes from svgs in list and occurrencelist

* fixed the css class for icon-button

* Geo thesaurus default data (#1627)

- Add a default thesaurus to 3.0 fresh install. Note that this data file was not included within the 3.1 data patch. Some databases already have some form of a thesaurus, or may wish to create a thesaurus from transferring data from their lookup tables. Running the insert statements when the table is already populated with data would result in an PK conflict errors.  
-- Addresses issue https://github.com/BioKIC/Symbiota/issues/1605
- Add data file into /schema/3.0/data/ directory so that it could be run as an optional insert. We may want to add a menu option that allows user to run this install from the management interface, and maybe remove the keys from the insert statement so that data would be appended without duplicate key errors, and unique indexes that ensure that duplicate entries are avoided. And/or add a separate script file that only contains SQL that adds continents and links existing countries as children. 
- Deactivate links on non-accepted terms
- Remove ability to add children to non-accepted terms
- Don't display map nor map controls for non-accepted terms
- Add function that appends synonym terms to term output and add synonyms to terms details

* Snapshot collection menu adjustments (#1628)

- Collection admin menu change 
-- Disactivate certain menu options for snapshot collections. The goal is to further discourage folks from live managing specimen records within a Snapshot dataset, which is happening more often than it should. 
-- Keep deactivated items listed within the menu with a clear message stated that these items are only available to Live Managed collection. It is important for snapshot collections to know that these options are still available, but they need to go through the correct channels to activate them.
- Standardization of language tags (internationalization)
-- Add condition test to language file import
-- Remove no longer needed term specific conditions with default language terms
-- Add missing language terms
-- Delete French language file, which only contained English terms. This language file should be created within a separate PR.
- Misc adjustments 
-- Move html output generation out of class file
-- Add rights formatting into a static function within the Utility class. There are a number of locations where this functions need to be called (e.g. images), but this will be done within a separate PR. 
-- Add rights html styling to main.css
-- Misc styling tweaks to collection profile page

Before:
![image](https://github.com/user-attachments/assets/11051792-84d1-48b0-8959-f7eb105c68b5)

After:
![image](https://github.com/user-attachments/assets/0082a9f8-b180-4c0f-b892-788056e2d47e)

* Audit of specupload lang tags (#1084)

* Fix specupload lang tags

* Add home to lang tags

* Update specupload.es.php

* Update specupload.fr.php

* Collection menu adjustment

- Comment out code that deactivates certain menu options within snapshot collections, with the goal of better reviewing these changes and reactivating within 3.2 rollout
- Remove restrictions to label making options, since there are valid reasons for snapshot to make labels

* Update setup.sh (#1630)

* Update setup.sh

Update script to:
- dynamically find all template files
- avoid overwriting existing files unless 'force' option is used
- 'test' option to show example output
- 'verbose' option to give more information about what the script does

Update INSTALL/md

* Hide h1 titles on popups and pages with duplicate titles (#1633)

* added screen-reader-only class

* hide dynamic map heading

* Update OccurrenceIndividual.php (#1648)

* Update OccurrenceIndividual.php

Apply html elements after cleaning DB value

* Add missing language tag (#1642)

* Update geothesaurus (#1636)

- Add counties for Mexico and U.S.A.
- Add accented letters for Mexican states (and fix some too-long state names)
- Remove 3-letter abbreviations for states that were previously just those of the country

* add check for clid and default to 0 if it doesn't exist (#1632)

* Bugfix/3.1/geothesaurus map fixes (#1635)

* Add check for geojson parsing on mapcoordaid that will not parse output into json if there is nothing to parse

* if coordaid changes are made but not saved then save them if save and close is selected

* add warning of unsaved changes when leaving geothesaurus index after making an edit

* removing custom dialog option because they are not allowed

* saves and closes coordaid if edits are saved in leaflet plugin

* Update header_template.php

* Contacts header on collprofiles font fix (#1651)

* removed inline styling

* merge adjustment

* return inline styling on listed colls sections

* Change NSF references to US NSF (#1652)

* Checklist html tags (#1637)

- Fix bug that was html encoding input data prior to be added to the database. All database specific input variables were removed from the view bag in preference to be handled by the class data handlers. 
-- Addresses issue: https://github.com/BioKIC/Symbiota/issues/1596 
- Removed writable database calls from the ChecklistVoucherAdmin class in preference for shared write statements within the ImInventories class. 
- Add checklist voucher write functions to the shared ImInventories class. 
- Mics bug fixes to the ImInventories class
- Misc style adjustments to improve layout of editor forms

* Populated individual Date fields

- Add code to the occurrence editor that automatically populates year, month, day, startDayOfYear, and endDayOfYear from eventDate fields whenever they are are modified
- Add code to the statistics generator code that populates missing or incorrect individual date fields for a given collection.

* fix geographic cleaning tool (#1659)

* restore the previous code

* restore the badcountrycount functionality

* remove lkupcountry

* added hidden input for default useThes value (#1657)

* Schema Manager adjustments (#1655)

Changes include improved error reporting when database does not exist or is misspelled within connection config file, as well as reporting authentication issues associated with portal base users. If user goes to sitemap and database tables do not yet exist, the user will be forwarded directly to schema manager to assist installing base schema.

Note that the first 3 commits are only associated with batch code adjustments that remove unnecessary code fragements. Looks directly are the last commit to review modifications that are associated with logistically changes (e.g. https://github.com/BioKIC/Symbiota/commit/c54952e651279da22a7efa953d1ea9364cfc9023).  

Specific changes: 
- Add try/catch to db_connection file and connection test within Manager class that reports when connection to database fails (e.g. no connection, authentication issue, etc)
- Sitemap adjustments that automatically forwards user to schema manager whenever schema is missing (e.g. fresh install).
- Add backward ticks to all table and stored procedure names within schema files so that installation logger is able to properly report table name within logs
- Misc adjustments to schema manager to improved output reports
- Add message to schema manager that warns user when log directories are not writable by web user (e.g. apache)
- Only check users accessibility settings if they are logged in to the portal

* Update DwcArchiverCore.php

- fix issue when custom where statement gets an extra "where" added when string begins with an empty space
Addresses issue: https://github.com/BioKIC/Symbiota/issues/1653

* Dynamic map checklist dev

- Include points from child checklists when dynamic map is selected within the checklists page
- Add IGNORE to stats INSERT statement in order to avoid fatal error when a duplicate entry it inserted.

* Taxon links bug

- Remove second declaration of taxonlinks array, which was causing the array to be redefined throughout each record loop.

* Fix redundant map (#1663)

That also wasn't reading projArr['displayMap'] variable

* adjust sort comparator to return explcit numbers so v8 doesn't get co… (#1669)

* adjust sort comparator to return explcit numbers so v8 doesn't get confused

* add origin linking to tid

* add origin linking to google map search

* wrapped latitude/longitude in label (#1668)

* Add crowdsourcing language tag

* Update INSTALL.md

Formatting

* Update INSTALL.md

Additional formatting

* Update search.php

- Bug fix resolving issue where collection administrators and editors did not have permission to tag images from their collection.
Addresses issue  https://github.com/BioKIC/Symbiota/issues/1616

* Hotfix 2024 08 22 (#1677)

- Minor bug fix that was interfering with saving of locationRemarks when a new record is saved (resolves https://github.com/BioKIC/Symbiota/issues/1445)

* 3.1 preparation updates

- Move still relevant data files into 3.0 data directory
- Update INSTALL.md documentation
- Fix misc spelling error
- Update version number

* Fix typo

* Update UPDATE.md (#1681)

* Fix Backward Compatiblity Issue involving mysqli_execute_query (#1682)

* Adds util function to make use of mysqli_execute_query for older versions of php

# Summary
`mysqli_execute_query` or `$mysqli->execute_query` function is an 8.2
only function provided by mysqli which could break portals that cannot
upgrade to 8.2 from 8 or are running 7.3. Solution is to make a util
function with the same api as mysqli_execute_query but will use the php
version to decide wether to use mysqli_execute_query or normal statement
binding.

* removing comment left over from prototyping

* usage of taxa thesaurus family over occurrence family (#1675)

* usage of taxa thesaurus family over occurrence family

* Modifications

- "ts.taxauthid = 1" needs to be added to the where condition or the recordset would return duplicate records for each taxonomic thesaurus defined within taxstatus table (e.g. there are 4 defined within SEINet). I suppose not including it would not be a big problem since the occid would be the same for each record, and thus the output data array would just copy over existing data. However, it would iterate through more records than needed. Another solution would be to change the statement to "SELECT DISTINCT...", but this can significantly slows down an ordered query.
- Since "ts.taxauthid = 1" is added to the where clause, the getTableJoins function should always add the taxstatus left join, thus we can leave out that test.

* Minor fix to previous submit

---------

Co-authored-by: Edward Gilbert <[email protected]>

* bugfix barcodes (#1683)

fix label printing barcode 500 error

* Update CHANGELOG

* Api occurrence 2024 08 (#1688)

- Occurrence API endpoint development
-- Add collector, collector last name, and collector number as searchable functions
-- Develop write functions (insert, update, delete), but not yet activated for public use 
-- Add new endpoint for loading and processing skeletal occurrence data
-- Add swagger documentation for skeletal record processing 
- Taxonomy API endpoint development
-- Refactor to use query builder for defining search terms (bring code in sync NEON taxonomy developments)  
- Mics
-- Add helper functions to Lumen API

* 3.1.1 Release: Merge Hotfix branch into Master (#1747)

* Occurrence Mapping: Adjust SQL to relax enforcement of link to taxon thesaurus, thus to include records with coordinates but lacking thesaurus relationship 
* Styling: Various styling, spacing, and display adjustments 
* Occurrence search: add type attribute to buttons to avoid defaulting as submit buttons 
* Occurrence Profile: Fix error triggered when otherCatalogNumbers are used to create backlink to original snapshot record within external institution web resource
* Occurrence editing functions  
-- Fix fatal error triggered by cloning an occurrence record with the create association option selected
-- Fix fatal error triggered when quick association feature is activated within occurrence editor
-- Fix fatal error when deleting an occurrence when the occurrence was previously deleted (e.g. record already in omoccurarchive)
-- Adjust occurrence restore option to dynamically determine associationType when restoring a record that was deleted prior to this field being added as a required input
-- If resource association does not have an objectID, use url as the display text
* Taxonomy editor: bug fix triggered by adding a child directly to the root node of the thesaurus (e.g. kingdom)
* Scientific name parsing utility functions: Integrate cleanInfra function directly into code. It served no purpose being separate, and was also causing a bug where parent authors were being incorrectly merged with insfraspecific authors

---------

Co-authored-by: Katie Pearson <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>

* 3.1.2 Release: Merge Hotfix branch into Master (#1770)

* Hotfix v.3.1.3  (#1821)

* Hotfix v3.1.3 
- Adjusted hotfix merge instructions
- Inventory Management: Bug fix interfering with adding new editors to an inventory project
- Image migration modifications
-- Add option to copy over existing target files
-- Add checks and error handling for non-existent source files and already existing target files
-- Direct log files to be written to /content/logs/
- fix misspelled log directory name, with support still maintained for portals that already have the misspelled directory
- Fix jquery selector to be correct so button is enabled when trait is changed
- Misc language file and wording adjustments

---------

Co-authored-by: Edward Gilbert <[email protected]>
Co-authored-by: Logan Wilt <[email protected]>
Co-authored-by: Greg Post <[email protected]>
Co-authored-by: Mark <[email protected]>
Co-authored-by: NikitaSalikov <[email protected]>
Co-authored-by: MuchQuak <[email protected]>
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.

3 participants