Skip to content

Commit

Permalink
fix: suppress deprecation and add visibility for modules (openemr#6323)
Browse files Browse the repository at this point in the history
* fix: suppress deprecation and add visibility for modules

* fixes issue 6285, register new app php 8.2 deprecation

* live with FHIR R4 deprecation for now

* remove indent

* clean up

* remove indent

* fix visibility
  • Loading branch information
stephenwaite committed Mar 31, 2023
1 parent 912ffc4 commit 883fa02
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 21 deletions.
2 changes: 1 addition & 1 deletion _rest_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static function getRequestEndPoint(): string
if (strpos($_SERVER['REQUEST_URI'], '?') > 0) {
$resource = strstr($_SERVER['REQUEST_URI'], '?', true);
} else {
$resource = str_replace(self::$ROOT_URL, '', $_SERVER['REQUEST_URI']);
$resource = str_replace(self::$ROOT_URL ?? '', '', $_SERVER['REQUEST_URI']);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,42 @@

class TelehealthGlobalConfig
{
const MODULE_INSTALLATION_PATH = "/interface/modules/custom_modules/";
public const MODULE_INSTALLATION_PATH = "/interface/modules/custom_modules/";

const COMLINK_VIDEO_TELEHEALTH_API = 'comlink_telehealth_video_uri';
const COMLINK_VIDEO_REGISTRATION_API = 'comlink_telehealth_registration_uri';
const COMLINK_VIDEO_API_USER_ID = 'comlink_telehealth_user_id';
const COMLINK_VIDEO_API_USER_PASSWORD = 'comlink_telehealth_user_password';
const COMLINK_VIDEO_TELEHEALTH_CMS_ID = 'comlink_telehealth_cms_id';
public const COMLINK_VIDEO_TELEHEALTH_API = 'comlink_telehealth_video_uri';
public const COMLINK_VIDEO_REGISTRATION_API = 'comlink_telehealth_registration_uri';
public const COMLINK_VIDEO_API_USER_ID = 'comlink_telehealth_user_id';
public const COMLINK_VIDEO_API_USER_PASSWORD = 'comlink_telehealth_user_password';
public const COMLINK_VIDEO_TELEHEALTH_CMS_ID = 'comlink_telehealth_cms_id';
// note patients always auto provision
const COMLINK_AUTO_PROVISION_PROVIDER = 'comlink_autoprovision_provider';
const COMLINK_ENABLE_THIRDPARTY_INVITATIONS = "comlink_telehealth_thirdparty_enabled";
const UNIQUE_INSTALLATION_ID = "unique_installation_id";
const INSTALLATION_NAME = "openemr_name";
const DEBUG_MODE_FLAG = "comlink_telehealth_debug";
public const COMLINK_AUTO_PROVISION_PROVIDER = 'comlink_autoprovision_provider';
public const COMLINK_ENABLE_THIRDPARTY_INVITATIONS = "comlink_telehealth_thirdparty_enabled";
public const UNIQUE_INSTALLATION_ID = "unique_installation_id";
public const INSTALLATION_NAME = "openemr_name";
public const DEBUG_MODE_FLAG = "comlink_telehealth_debug";

const COMLINK_MINIMIZED_SESSION_POSITION_DEFAULT = "comlink_telehealth_minimized_position_default";
const DEFAULT_MINIMIZED_SESSION_POSITION_DEFAULT = 'bottom-left';
public const COMLINK_MINIMIZED_SESSION_POSITION_DEFAULT = "comlink_telehealth_minimized_position_default";
public const DEFAULT_MINIMIZED_SESSION_POSITION_DEFAULT = 'bottom-left';


// character length to generate for the unique registration code for the user
const APP_REGISTRATION_CODE_LENGTH = 12;
public const APP_REGISTRATION_CODE_LENGTH = 12;

// TODO: @adunsulag replace this with the name of the app that comlink is using.
const COMLINK_MOBILE_APP_TITLE = "Comlink App";
public const COMLINK_MOBILE_APP_TITLE = "Comlink App";

const VERIFY_SETTINGS_BUTTON = "comlink_verify_settings_button";
public const VERIFY_SETTINGS_BUTTON = "comlink_verify_settings_button";

/**
* @var CryptoGen
*/
private $cryptoGen;

/**
* @var publicWebPath
*/
private $publicWebPath;

public function __construct($publicWebPath)
{
$this->cryptoGen = new CryptoGen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,20 @@ class InstModule implements InputFilterAwareInterface
public $date;
public $sqlRun;
public $type;
public $fld_type;
public $obj_name;
public $menu_name;
public $id;
public $name;
public $group_id;
public $user;
public $cnt;
public $mod_directory;
public $enabled_hooks;
public $attached_to;
public $sql_action;
public $sql_version;
public $acl_action;
public $acl_version;
public function exchangeArray($data)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use Laminas\Db\Adapter\Driver\Pdo\Result;
use Laminas\Db\TableGateway\TableGateway;
use Laminas\Db\TableGateway\Feature\GlobalAdapterFeature;
use Laminas\Config\Reader\Ini;
use Laminas\Db\ResultSet\ResultSet;
use Application\Model\ApplicationTable;
Expand All @@ -29,6 +30,8 @@
class InstModuleTable
{
protected $tableGateway;
protected $adapter;
protected $resultSetPrototype;

/**
* @var ApplicationTable
Expand All @@ -47,13 +50,13 @@ class InstModuleTable
*/
private $module_zend_path;

const MODULE_TYPE_ZEND = 1;
const MODULE_TYPE_CUSTOM = 0;
public const MODULE_TYPE_ZEND = 1;
public const MODULE_TYPE_CUSTOM = 0;

public function __construct(TableGateway $tableGateway, ContainerInterface $container)
{
$this->tableGateway = $tableGateway;
$adapter = \Laminas\Db\TableGateway\Feature\GlobalAdapterFeature::getStaticAdapter();
$adapter = GlobalAdapterFeature::getStaticAdapter();
$this->adapter = $adapter;
$this->resultSetPrototype = new ResultSet();
$this->applicationTable = new ApplicationTable();
Expand Down Expand Up @@ -448,7 +451,7 @@ public function unRegister($id)
}
if ($results == false) {
return 'failure';
} else if (is_string($results) && stripos($results, 'ERROR') !== false) {
} elseif (is_string($results) && stripos($results, 'ERROR') !== false) {
return 'failure';
} else {
return 'success';
Expand Down
1 change: 1 addition & 0 deletions src/Events/RestApiExtend/RestApiScopeEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class RestApiScopeEvent extends Event
const EVENT_TYPE_GET_SUPPORTED_SCOPES = "api.scope.get-supported-scopes";

private $scopes;
private $type;
private $apiType;

public function __construct()
Expand Down
2 changes: 2 additions & 0 deletions src/Services/FHIR/Group/FhirPatientProviderGroupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class FhirPatientProviderGroupService extends FhirServiceBase
use FhirServiceBaseEmptyTrait;
use PatientSearchTrait;

private $service;

public function __construct($fhirApiURL = null)
{
parent::__construct($fhirApiURL);
Expand Down
1 change: 1 addition & 0 deletions src/Services/VitalsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class VitalsService extends BaseService
private $shouldConvertVitalMeasurements;

private $dispatcher;
private $units_of_measurement;

public function __construct(?int $units_of_measurement = null)
{
Expand Down

0 comments on commit 883fa02

Please sign in to comment.