Skip to content

Commit ac73308

Browse files
committed
Merge branch 'develop' into 'master'
Develop See merge request ILIAS/Plugins/Community/MDViewer!7
2 parents a8206f3 + a59f7c8 commit ac73308

File tree

2 files changed

+9
-27
lines changed

2 files changed

+9
-27
lines changed

classes/class.ilMDViewerPluginGUI.php

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ public function __construct()
5656
$this->http = $DIC->http();
5757
$this->ctrl = $DIC->ctrl();
5858
$this->ui = $DIC->ui();
59-
60-
if ($this->isVersionAboveSix()) {
61-
$this->refinery = $DIC->refinery();
62-
}
59+
$this->refinery = $DIC->refinery();
6360

6461
parent::__construct();
6562
}
@@ -281,29 +278,13 @@ protected function showForm()
281278
*/
282279
protected function getExternalUrlValidation()
283280
{
284-
$fn = static function ($value) {
281+
return $this->refinery->custom()->transformation(static function ($value) {
285282
if (preg_match('/^(https:\/\/raw\.githubusercontent\.com\/ILIAS.*\.md)$/', $value)) {
286283
return $value;
287284
}
288285

289286
return null;
290-
};
291-
292-
if ($this->isVersionAboveSix()) {
293-
return $this->refinery->custom()->transformation(
294-
$fn
295-
);
296-
}
297-
298-
return (new \ILIAS\Transformation\Factory())->custom($fn);
299-
}
300-
301-
/**
302-
* @return bool
303-
*/
304-
protected function isVersionAboveSix()
305-
{
306-
return (bool) version_compare('6.0', ILIAS_VERSION_NUMERIC, '<=');
287+
});
307288
}
308289

309290
/**

plugin.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?php
22
$id = 'md_tme';
3-
$version = '1.4.0';
4-
$ilias_min_version = '5.4.0';
5-
$ilias_max_version = '6.999';
6-
$responsible = 'studer + raimann ag';
7-
$responsible_mail = 'support@studer-raimann.ch';
3+
$version = '2.0.0';
4+
$ilias_min_version = '6.000';
5+
$ilias_max_version = '7.999';
6+
$responsible = 'sr solutions ag';
7+
$responsible_mail = 'support@sr.solutions';
8+
$supports_cli_setup = true;

0 commit comments

Comments
 (0)