From a9b83b3c01e1885652180908b5d3dd33d16ec3f5 Mon Sep 17 00:00:00 2001 From: Shamim Rezaie Date: Mon, 16 Nov 2020 21:37:45 +1100 Subject: [PATCH] MDL-70237 payment: Allow html tags in gateway description --- payment/classes/external/get_available_gateways.php | 2 +- payment/gateway/paypal/db/install.php | 2 ++ payment/templates/gateway.mustache | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/payment/classes/external/get_available_gateways.php b/payment/classes/external/get_available_gateways.php index b8a1abf0f6697..b926a3fe73f34 100644 --- a/payment/classes/external/get_available_gateways.php +++ b/payment/classes/external/get_available_gateways.php @@ -96,7 +96,7 @@ public static function execute_returns(): external_multiple_structure { new external_single_structure([ 'shortname' => new external_value(PARAM_PLUGIN, 'Name of the plugin'), 'name' => new external_value(PARAM_TEXT, 'Human readable name of the gateway'), - 'description' => new external_value(PARAM_TEXT, 'description of the gateway'), + 'description' => new external_value(PARAM_RAW, 'description of the gateway'), 'surcharge' => new external_value(PARAM_INT, 'percentage of surcharge when using the gateway'), 'cost' => new external_value(PARAM_TEXT, 'Cost in human-readable form (amount plus surcharge with currency sign)'), diff --git a/payment/gateway/paypal/db/install.php b/payment/gateway/paypal/db/install.php index f9ca2d6eb8fce..59db98939b47b 100644 --- a/payment/gateway/paypal/db/install.php +++ b/payment/gateway/paypal/db/install.php @@ -23,6 +23,8 @@ */ function xmldb_paygw_paypal_install() { + global $CFG; + // Enable the Paypal payment gateway on installation. It still needs to be configured and enabled for accounts. $order = (!empty($CFG->paygw_plugins_sortorder)) ? explode(',', $CFG->paygw_plugins_sortorder) : []; set_config('paygw_plugins_sortorder', join(',', array_merge($order, ['paypal']))); diff --git a/payment/templates/gateway.mustache b/payment/templates/gateway.mustache index 4189f9ffef0f2..fed351fd5ae01 100644 --- a/payment/templates/gateway.mustache +++ b/payment/templates/gateway.mustache @@ -45,7 +45,7 @@ \ No newline at end of file