Skip to content

Commit 8bfd4a5

Browse files
Hannes FunkPhMemmel
authored andcommitted
MBS-10346: Change PARAM for tenant to allow blank spaces
1 parent b790e64 commit 8bfd4a5

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

ai_info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
global $CFG, $DB, $OUTPUT, $PAGE, $USER;
3131

32-
$tenantid = optional_param('tenant', '', PARAM_ALPHANUM);
32+
$tenantid = optional_param('tenant', '', PARAM_TEXT);
3333
$purposes = optional_param_array('purposes', [], PARAM_TEXT);
3434

3535
// Check permissions.

classes/base_instance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ final public function edit_form_definition(\MoodleQuickForm $mform, array $custo
510510
$mform->addElement('text', 'name', get_string('instancename', 'local_ai_manager'), $textelementparams);
511511
$mform->setType('name', PARAM_TEXT);
512512
$mform->addElement('text', 'tenant', get_string('tenant', 'local_ai_manager'), $textelementparams);
513-
$mform->setType('tenant', PARAM_ALPHANUM);
513+
$mform->setType('tenant', PARAM_TEXT);
514514
if (empty($this->_customdata['id'])) {
515515
$mform->setDefault('tenant', $customdata['tenant']);
516516
}

classes/form/purpose_config_form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function definition() {
4646
$mform = &$this->_form;
4747

4848
$mform->addElement('hidden', 'tenant', $tenant->get_identifier());
49-
$mform->setType('tenant', PARAM_ALPHANUM);
49+
$mform->setType('tenant', PARAM_TEXT);
5050

5151
foreach (base_purpose::get_all_purposes() as $purpose) {
5252
$factory = \core\di::get(connector_factory::class);

classes/form/quota_config_form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function definition() {
4444
$mform = &$this->_form;
4545

4646
$mform->addElement('hidden', 'tenant', $tenant);
47-
$mform->setType('tenant', PARAM_ALPHANUM);
47+
$mform->setType('tenant', PARAM_TEXT);
4848

4949
$mform->addElement(
5050
'header',

classes/form/rights_config_form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function definition() {
6262
$mform = &$this->_form;
6363

6464
$mform->addElement('hidden', 'tenant', $tenant->get_identifier());
65-
$mform->setType('tenant', PARAM_ALPHANUM);
65+
$mform->setType('tenant', PARAM_TEXT);
6666

6767
$mform->addElement('hidden', 'userids', '', ['id' => 'rights-table-userids']);
6868
$mform->setType('userids', PARAM_TEXT);

classes/form/tenant_config_form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function definition() {
3939
$mform = &$this->_form;
4040

4141
$mform->addElement('hidden', 'tenant', $tenant);
42-
$mform->setType('tenant', PARAM_ALPHANUM);
42+
$mform->setType('tenant', PARAM_TEXT);
4343

4444
$mform->addElement('selectyesno', 'tenantenabled', get_string('enable_ai_integration', 'local_ai_manager'));
4545

classes/local/tenant_config_output_utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class tenant_config_output_utils {
3636
*/
3737
public static function setup_tenant_config_page(moodle_url $url): void {
3838
global $PAGE, $SESSION;
39-
$tenantid = optional_param('tenant', '', PARAM_ALPHANUM);
39+
$tenantid = optional_param('tenant', '', PARAM_TEXT);
4040

4141
if (!empty($tenantid)) {
4242
$tenant = new \local_ai_manager\local\tenant($tenantid);

view_prompts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
global $CFG, $DB, $OUTPUT, $PAGE, $USER;
3636

3737
global $PAGE;
38-
$tenantid = optional_param('tenant', '', PARAM_ALPHANUM);
38+
$tenantid = optional_param('tenant', '', PARAM_TEXT);
3939
$contextid = optional_param('contextid', '', PARAM_INT);
4040

4141
if (!empty($tenantid) && !empty($contextid)) {

0 commit comments

Comments
 (0)