Skip to content

Commit

Permalink
AdvMD: increase max length for external links (41567)
Browse files Browse the repository at this point in the history
schmitz-ilias committed Jul 18, 2024
1 parent bcde769 commit 3982418
Showing 3 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@

class ilADTExternalLink extends ilADT
{
public const MAX_LENGTH = 500;
public const MAX_LENGTH = 2000;

protected ?string $value;
protected ?string $title;
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@ public function addToForm(): void
$both->addCombinationItem('title', $title, $this->lng->txt('title'));

$url = new ilTextInputGUI('', $this->getElementId() . '_url');
$url->setSize(250);
$url->setMaxLength(1000);
$url->setValue($this->getADT()->getUrl());
$both->addCombinationItem('url', $url, $this->lng->txt('url'));

Original file line number Diff line number Diff line change
@@ -121,4 +121,17 @@ public function step_3(): void
}
}
}

public function step_4(): void
{
$this->db->modifyTableColumn(
'adv_md_values_extlink',
'value',
[
'type' => 'text',
'length' => 2000,
'notnull' => false
]
);
}
}

0 comments on commit 3982418

Please sign in to comment.