Skip to content

Commit c594682

Browse files
committed
Define the plugin's version in a class constant
1 parent ae91a21 commit c594682

File tree

10 files changed

+20
-10
lines changed

10 files changed

+20
-10
lines changed

SourceBitBucket/SourceBitBucket.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
class SourceBitBucketPlugin extends MantisSourcePlugin {
1313

14+
const PLUGIN_VERSION = '0.19';
1415
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
1516

1617
protected $main_url = "https://bitbucket.org/";
@@ -23,7 +24,7 @@ public function register() {
2324
$this->name = plugin_lang_get( 'title' );
2425
$this->description = plugin_lang_get( 'description' );
2526

26-
$this->version = '0.19';
27+
$this->version = self::PLUGIN_VERSION;
2728
$this->requires = array(
2829
'MantisCore' => self::MANTIS_VERSION,
2930
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceCgit/SourceCgit.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616

1717
class SourceCgitPlugin extends MantisSourcePlugin {
1818

19+
const PLUGIN_VERSION = '0.16';
1920
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
2021

2122
public function register() {
2223
$this->name = plugin_lang_get( 'title' );
2324
$this->description = plugin_lang_get( 'description' );
2425

25-
$this->version = '0.16';
26+
$this->version = self::PLUGIN_VERSION;
2627
$this->requires = array(
2728
'MantisCore' => self::MANTIS_VERSION,
2829
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceGithub/SourceGithub.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
class SourceGithubPlugin extends MantisSourcePlugin {
1313

14+
const PLUGIN_VERSION = '1.3.0';
1415
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
1516

1617
const ERROR_INVALID_PRIMARY_BRANCH = 'invalid_branch';
@@ -21,7 +22,7 @@ public function register() {
2122
$this->name = plugin_lang_get( 'title' );
2223
$this->description = plugin_lang_get( 'description' );
2324

24-
$this->version = '1.3.0';
25+
$this->version = self::PLUGIN_VERSION;
2526
$this->requires = array(
2627
'MantisCore' => self::MANTIS_VERSION,
2728
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceGitlab/SourceGitlab.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
class SourceGitlabPlugin extends MantisSourcePlugin {
1515

16+
const PLUGIN_VERSION = '1.0.4';
1617
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
1718

1819
const ERROR_INVALID_PRIMARY_BRANCH = 'invalid_branch';
@@ -21,7 +22,7 @@ public function register() {
2122
$this->name = plugin_lang_get( 'title' );
2223
$this->description = plugin_lang_get( 'description' );
2324

24-
$this->version = '1.0.4';
25+
$this->version = self::PLUGIN_VERSION;
2526
$this->requires = array(
2627
'MantisCore' => self::MANTIS_VERSION,
2728
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceGitweb/SourceGitweb.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
class SourceGitwebPlugin extends MantisSourcePlugin {
1313

14+
const PLUGIN_VERSION = '0.18';
1415
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
1516

1617
public function register() {
1718
$this->name = plugin_lang_get( 'title' );
1819
$this->description = plugin_lang_get( 'description' );
1920

20-
$this->version = '0.18';
21+
$this->version = self::PLUGIN_VERSION;
2122
$this->requires = array(
2223
'MantisCore' => self::MANTIS_VERSION,
2324
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceHgWeb/SourceHgWeb.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919

2020
class SourceHgWebPlugin extends MantisSourcePlugin {
2121

22+
const PLUGIN_VERSION = '0.15';
2223
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
2324

2425
function register() {
2526
$this->name = plugin_lang_get( 'title' );
2627
$this->description = plugin_lang_get( 'description' );
2728

28-
$this->version = '0.15';
29+
$this->version = self::PLUGIN_VERSION;
2930
$this->requires = array(
3031
'MantisCore' => self::MANTIS_VERSION,
3132
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceSFSVN/SourceSFSVN.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99

1010
class SourceSFSVNPlugin extends SourceSVNPlugin {
1111

12+
const PLUGIN_VERSION = '0.16';
1213
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
1314
const SOURCESVN_VERSION_REQUIRED = '0.16';
1415

1516
public function register() {
1617
$this->name = lang_get( 'plugin_SourceSFSVN_title' );
1718
$this->description = lang_get( 'plugin_SourceSFSVN_description' );
1819

19-
$this->version = '0.16';
20+
$this->version = self::PLUGIN_VERSION;
2021
$this->requires = array(
2122
'MantisCore' => self::MANTIS_VERSION,
2223
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceSVN/SourceSVN.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99

1010
class SourceSVNPlugin extends MantisSourcePlugin {
1111

12+
const PLUGIN_VERSION = '0.19';
1213
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
1314

1415
public function register() {
1516
$this->name = plugin_lang_get( 'title' );
1617
$this->description = plugin_lang_get( 'description' );
1718

18-
$this->version = '0.19';
19+
$this->version = self::PLUGIN_VERSION;
1920
$this->requires = array(
2021
'MantisCore' => self::MANTIS_VERSION,
2122
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceViewVC/SourceViewVC.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@
1010

1111
class SourceViewVCPlugin extends SourceSVNPlugin {
1212

13+
const PLUGIN_VERSION = '0.1';
1314
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
1415
const SOURCESVN_VERSION_REQUIRED = '0.16';
1516

1617
public function register() {
1718
$this->name = lang_get( 'plugin_SourceViewVC_title' );
1819
$this->description = lang_get( 'plugin_SourceViewVC_description' );
1920

20-
$this->version = '0.1';
21+
$this->version = self::PLUGIN_VERSION;
2122
$this->requires = array(
2223
'MantisCore' => self::MANTIS_VERSION,
2324
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

SourceWebSVN/SourceWebSVN.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99

1010
class SourceWebSVNPlugin extends SourceSVNPlugin {
1111

12+
const PLUGIN_VERSION = '0.18';
1213
const FRAMEWORK_VERSION_REQUIRED = '1.3.2';
1314
const SOURCESVN_VERSION_REQUIRED = '0.16';
1415

1516
public function register() {
1617
$this->name = lang_get( 'plugin_SourceWebSVN_title' );
1718
$this->description = lang_get( 'plugin_SourceWebSVN_description' );
1819

19-
$this->version = '0.18';
20+
$this->version = self::PLUGIN_VERSION;
2021
$this->requires = array(
2122
'MantisCore' => self::MANTIS_VERSION,
2223
'Source' => self::FRAMEWORK_VERSION_REQUIRED,

0 commit comments

Comments
 (0)