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

Sbnm vols #32

Closed
wants to merge 53 commits into from
Closed

Sbnm vols #32

wants to merge 53 commits into from

Conversation

amsclark
Copy link
Contributor

No description provided.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
disable STRICT_TRANS_TABLES to allow the 0000-00-00 00:00:00 default timestamp used several places in this install file. I have not run into this as being an issue on recent CentOS setups, but it caused db install to throw an error on my personal dev machine with Server version: 5.7.24-0ubuntu0.18.04.1 (Ubuntu).

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
I am not sure that anything actually uses menu_problem. Cases older than 2008 use menu_problem_2007 and everything else uses menu_problem_2008. I don't think any org should be recording outcomes in cases opened before 2008.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
PHP 7 does not allow a switch/case structure to have two defaults. This htmlContactList function is only called from a handful of places within Pika, and in none of these places is there a possibility for anything to be passed in besides 'intake', "case_contact', or nothing. And if it is called with no parameter, the function definition sets $mode to 'contacts'. So it does not appear to me that the default: case should even normally come into play. But if it somehow does, I think it makes more sense for it to be on the case: 'contacts' since this corresponds to the default value of the parameter in the function definition.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
There is a behavior in the outcomes module where if outcomes are recorded, then the problem code is changed on the case, and additional outcomes are recorded, that a case can end up with outcomes from multiple problems recorded. This is undesirable and unexpected behavior for at least one organization I've been working with. 

This patch does not require that any database fields be added, but the following line will have to be added to the case-info.html subtemplate:

<input id="prior_problem" name="prior_problem" type="hidden" value="%%[problem]%%">

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add a hidden field that will contain the value of the problem code at the time the page was loaded. Both prior_problem and problem get posted to update_case.php and if they are different, then the outcomes associated with the case will get cleared out.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…ient_id

In certain situations where staff are merging contact cards while also working within the case info tab, it can be possible for an invalid primary client id to exist within the primary client dropdown on the case info tab. It then becomes possible to write this invalid value back to the database. The case then becomes completely inaccesible to staff. 

This patch checks to make sure that the contact ID number being written to cases.client_id actually exists within the contacts table. If it does not, then an empty string '' is written instead to the cases.client_id field.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
When the extensions folder does not exist within cms-custom, (as is the case in the master repository), cms/systems-extensions.php will fail to load with a server error 503. I believe that what is happening is exactly what is described in this comment regarding this type of syntax creating an infinite loop if the filehandle is boolean false (as will be the case when the directory cannot be opened) rather than of a filehandle type:

https://stackoverflow.com/questions/7630245/explaination-of-whilefalse-f-readdird/7630285#comment89057755_7630312

If I understand correctly, I think what is happening is that what the condition is actually doing is checking whether ($entry = readdir($h)) resulted in an assignment, which is not adequate because even when the directory does not exist, an assignment can still occur because readdir() returns boolean false on failure: https://www.geeksforgeeks.org/php-readdir-function/. $entry then is assigned the value false, and because an assignment occurred successfully, then the while loop is evaluating the condition `while (false !== true)`

My suggestion to fix the issue so that this screen does not enter an infinite loop and throw server error 503 when cms-custom/extensions/ does not exist is to simply check to make sure that $h itself is not false as an additional condition in the while loop.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
comment appears to have been carried over from ops/update_zipcode.php and is not an accurate description of the functionality of this file

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
ASC or DESC qualifiers for GROUP BY was removed from MySQL in version 8.0.13 in October 2018. 

From https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-13.html:

SQL Syntax Notes
Incompatible Change: The deprecated ASC or DESC qualifiers for GROUP BY clauses have been removed. Queries that previously relied on GROUP BY sorting may produce results that differ from previous MySQL versions. To produce a given sort order, provide an ORDER BY clause.

Queries and stored program definitions from MySQL 8.0.12 or lower that use ASC or DESC qualifiers for GROUP BY clauses should be amended. Otherwise, upgrading to MySQL 8.0.13 or higher may fail, as may replicating to MySQL 8.0.13 or higher slave servers.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The function getNotes is called from three places in the codebase:
1. modules/case-act.php, where it is called with all 5 arguments specified
2. ops/transfer_case.php where it is called with only two arguments,
3. reports/quick_docket/report.php where it is called with only one argument.

This function as written provides default argument values for only 3 out of the 5 arguments. Prior to PHP version 7.1, passing too few arguments in situations like this would raise only a warning. Beginning with 7.1, it throws an error:
https://www.php.net/manual/en/migration71.incompatible.php

Adding default values for arguments 4 and 5 allows the function to be called with any number of arguments.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
In some reports, clicking the "show sql" checkbox does not have any effect on the generated report because of a missing variable assignment

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Methods with the same name as their class will not be constructors in a future version of PHP; plTable has a deprecated constructor in /opt/bitnami/apache2/htdocs/ocm/cms/app/extralib/lib/plTable.php on line 25.

The new syntax was introduced in PHP5 but the old style did not become deprecated until PHP7.

The syntax in this patch is a drop-in replacement. It should be compatible with both PHP 5 and PHP 7.

https://www.php.net/manual/en/language.oop5.decon.php
https://www.php.net/manual/en/migration70.deprecated.php
https://stackoverflow.com/a/37100413

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
pulling in aworley's master changes from 2018 onward

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Sbnm vols

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
amsclark and others added 23 commits August 20, 2022 10:51

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Patch 5

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Patch 7

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Patch 10

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Patch 9

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
replace PHP4 style constructor for class plTable

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Patch 4

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
ASC or DESC qualifiers for GROUP BY removal

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Patch 16

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Handle calls to getNotes passing too few args

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
update comment

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix for when cms-custom/extensions/ does not exist

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
disable STRICT_TRANS_TABLES

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Sbnm vols

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
merge
@amsclark amsclark closed this Aug 20, 2022
@amsclark
Copy link
Contributor Author

Sorry, accidentally submitted merge request went to wrong repo.

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.

None yet

1 participant