Skip to content

Commit 55a8e09

Browse files
committed
Required Mantis version as MantisSourceBase constant
Instead of hardcoding the Mantis version in each child plugin, we now use a constant defined in the base class, so it only needs to be updated in a single place.
1 parent 03d9e0d commit 55a8e09

File tree

12 files changed

+17
-11
lines changed

12 files changed

+17
-11
lines changed

Source/MantisSourceBase.class.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,10 @@ abstract class MantisSourceBase extends MantisPlugin
2020
* The framework version is incremented when the plugin's core file change.
2121
*/
2222
const FRAMEWORK_VERSION = '1.3.1';
23+
24+
/**
25+
* Minimum required MantisBT version.
26+
* Used to define the MantisCore dependency for all child plugins
27+
*/
28+
const MANTIS_VERSION = '1.3.0';
2329
}

Source/Source.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function register() {
3030

3131
$this->version = self::FRAMEWORK_VERSION;
3232
$this->requires = array(
33-
'MantisCore' => '1.3.0',
33+
'MantisCore' => self::MANTIS_VERSION,
3434
);
3535
$this->uses = array(
3636
'jQuery' => '1.3',

SourceBitBucket/SourceBitBucket.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function register() {
2222

2323
$this->version = '0.19';
2424
$this->requires = array(
25-
'MantisCore' => '1.3.0',
25+
'MantisCore' => self::MANTIS_VERSION,
2626
'Source' => '0.18',
2727
);
2828

SourceCgit/SourceCgit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function register() {
2121

2222
$this->version = '0.16';
2323
$this->requires = array(
24-
'MantisCore' => '1.3.0',
24+
'MantisCore' => self::MANTIS_VERSION,
2525
'Source' => '0.16',
2626
);
2727

SourceGithub/SourceGithub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function register() {
2121

2222
$this->version = '1.3.0';
2323
$this->requires = array(
24-
'MantisCore' => '1.3.0',
24+
'MantisCore' => self::MANTIS_VERSION,
2525
'Source' => '1.3.0',
2626
);
2727

SourceGitlab/SourceGitlab.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function register() {
2121

2222
$this->version = '1.0.4';
2323
$this->requires = array(
24-
'MantisCore' => '1.3.0',
24+
'MantisCore' => self::MANTIS_VERSION,
2525
'Source' => '1.3.0',
2626
);
2727

SourceGitweb/SourceGitweb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function register() {
1616

1717
$this->version = '0.18';
1818
$this->requires = array(
19-
'MantisCore' => '1.3.0',
19+
'MantisCore' => self::MANTIS_VERSION,
2020
'Source' => '0.16',
2121
);
2222

SourceHgWeb/SourceHgWeb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function register() {
2424

2525
$this->version = '0.15';
2626
$this->requires = array(
27-
'MantisCore' => '1.3.0',
27+
'MantisCore' => self::MANTIS_VERSION,
2828
'Source' => '0.14',
2929
);
3030

SourceSFSVN/SourceSFSVN.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function register() {
1414

1515
$this->version = '0.16';
1616
$this->requires = array(
17-
'MantisCore' => '1.3.0',
17+
'MantisCore' => self::MANTIS_VERSION,
1818
'Source' => '0.16',
1919
'SourceSVN' => '0.16',
2020
);

SourceSVN/SourceSVN.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function register() {
1414

1515
$this->version = '0.19';
1616
$this->requires = array(
17-
'MantisCore' => '1.3.0',
17+
'MantisCore' => self::MANTIS_VERSION,
1818
'Source' => '0.16',
1919
);
2020

0 commit comments

Comments
 (0)