Skip to content

Use DplusRequest for Dplus Requests #67

@Pauldro

Description

@Pauldro

I'm submitting a ...

[ ] Bug Report

[X] Feature Request

[ ] Code Review Issue

Use DplusRequest for making

** Affected Files**
site/modules/Dplus/CodeTables/CodeTables.module

public function update_dplus_cobol($table, $code) {
$config = $this->wire('config');
$dplusdb = $this->wire('modules')->get('DplusConnectDatabase')->db_name;
$table = strtoupper($table);
$data = array("DBNAME=$dplusdb", 'UPDATECODETABLE', "TABLE=$table", "CODE=$code");
$this->write_dplusfile($data, session_id());
$this->http_get_dplus();
}

Replace Lines 62-63 with

$requestor = $this->wire('modules')->get('DplusRequest');
$requestor->write_dplusfile($data, session_id());
$requestor->cgi_request($config->cgis['database'], session_id());

This will work for most of the CodeTables, however you'll have to look through the CodeTables Modules and look if they have the functon update_dplus_cobol() if they do you'll have to replace the write_dplusfile and http_get_dplus() lines with the lines above.

When finish, test them, CodeTablesTarm has its own update_dplus_cobol function so test that one especially. After that remove the write_dplusfile, http_get_dplus functions from CodeTables

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions