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

New insert system #3

Merged
merged 14 commits into from Jul 29, 2019

Conversation

@SimonGrn
Copy link
Collaborator

commented Jul 24, 2019

New insert system.
Uses an URL to insert data, called by the script when the nightly ends.

@SimonGrn SimonGrn requested a review from PrestaShop/prestashop-core-developers Jul 24, 2019

@SimonGrn SimonGrn self-assigned this Jul 24, 2019

README.md Show resolved Hide resolved
application/controllers/Hook.php Outdated Show resolved Hide resolved
application/controllers/Hook.php Outdated Show resolved Hide resolved
application/controllers/Hook.php Outdated Show resolved Hide resolved
application/controllers/Hook.php Outdated Show resolved Hide resolved
application/controllers/Hook.php Outdated Show resolved Hide resolved
* @param $text
* @return string
*/
private function sanitize($text) {

This comment has been minimized.

Copy link
@matks

matks Jul 24, 2019

I dont understand what this function does internally. Why if ($CharNo == 163) { $NewStr .= $Char; continue; } ? Can you explain ?

This comment has been minimized.

Copy link
@SimonGrn

SimonGrn Jul 24, 2019

Author Collaborator

This method is a mess. It's the result of a lot of trial and error to sanitize weird characters in the JSON that makes the json_decode method fails. It works and I'm kinda afraid to touch it now.

This comment has been minimized.

Copy link
@SimonGrn

SimonGrn Jul 24, 2019

Author Collaborator

As I understand it, it removes characters that are not in a certain range and thus break the json_decode function.

application/core/MY_Base.php Outdated Show resolved Hide resolved
application/models/Execution.php Show resolved Hide resolved
application/models/Execution.php Show resolved Hide resolved

@SimonGrn SimonGrn requested a review from matks Jul 24, 2019

@SimonGrn SimonGrn merged commit 8abb7e3 into PrestaShop:master Jul 29, 2019

@SimonGrn SimonGrn deleted the SimonGrn:new_insert_system branch Jul 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.