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

Do not call functions from ExternalModules directly #97

Open
ChemiKyle opened this issue Jan 29, 2020 · 1 comment
Open

Do not call functions from ExternalModules directly #97

ChemiKyle opened this issue Jan 29, 2020 · 1 comment
Assignees

Comments

@ChemiKyle
Copy link
Contributor

See official documentation and issue.

Recommend something like sed s/ExternalModules::/$this->/g to correct but each line will need to be inspected.

@ChemiKyle ChemiKyle self-assigned this Jan 29, 2020
@ChemiKyle
Copy link
Contributor Author

ChemiKyle commented May 1, 2020

$q = ExternalModules::getSettings('send_rx', $project_id);

Likely replacement:
getProjectSettings()
Due to being part of a separate function file, the $this EM object is not available, $module is also not available due to being outside of a plugin page context.

The rest of the function needs a refactor as it's unrolling the (inconvenient) mysqli_result and processing on each row individually as opposed to operating on a complete result array.

@jrpence jrpence self-assigned this Aug 5, 2020
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

No branches or pull requests

2 participants