Skip to content

Commit caea4c6

Browse files
Merge pull request #57 from VSEphpbb/release-prep
Some minor tweaks
2 parents 71594b8 + 8a55908 commit caea4c6

3 files changed

Lines changed: 24 additions & 15 deletions

File tree

ext.php

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,25 @@ class ext extends \phpbb\extension\base
1717
{
1818
/**
1919
* Check whether or not the extension can be enabled.
20-
* The current phpBB version should meet or exceed
21-
* the minimum version required by this extension:
22-
*
23-
* Requires phpBB 3.1.4
2420
*
2521
* @return bool
2622
*/
2723
public function is_enableable()
2824
{
29-
return class_exists('ZipArchive') && ($this->phpbb_legacy_compatibility() || $this->phpbb_current_compatibility());
25+
return $this->php_requirements() && ($this->phpbb_31x_compatible() || $this->phpbb_current_compatible());
3026
}
3127

3228
/**
33-
* Check phpBB 3.1 compatibility
29+
* Check PHP requirements
3430
*
35-
* Requires phpBB 3.1.4 or greater
31+
* Requires PHP 5.3.9 or greater
32+
* Requires PHP ZipArchive binary
3633
*
3734
* @return bool
3835
*/
39-
protected function phpbb_legacy_compatibility()
36+
protected function php_requirements()
4037
{
41-
return phpbb_version_compare(PHPBB_VERSION, '3.1.4', '>=') && phpbb_version_compare(PHPBB_VERSION, '3.2.0-dev', '<');
38+
return phpbb_version_compare(PHP_VERSION, '5.3.9', '>=') && class_exists('ZipArchive');
4239
}
4340

4441
/**
@@ -48,9 +45,21 @@ protected function phpbb_legacy_compatibility()
4845
*
4946
* @return bool
5047
*/
51-
protected function phpbb_current_compatibility()
48+
protected function phpbb_current_compatible()
5249
{
5350
return phpbb_version_compare(PHPBB_VERSION, '3.2.0-b3', '>=');
5451
}
52+
53+
/**
54+
* Check phpBB 3.1 compatibility
55+
*
56+
* Requires phpBB 3.1.4 or greater
57+
*
58+
* @return bool
59+
*/
60+
protected function phpbb_31x_compatible()
61+
{
62+
return phpbb_version_compare(PHPBB_VERSION, '3.1.4', '>=') && phpbb_version_compare(PHPBB_VERSION, '3.2.0-dev', '<');
63+
}
5564
}
5665

helper/packager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ public function get_composer_dialog_values()
6767
),
6868
'extension' => array(
6969
'vendor_name' => null,
70-
'extension_display_name' => null,
7170
'extension_name' => null,
71+
'extension_display_name' => null,
7272
'extension_description' => null,
7373
'extension_version' => '1.0.0-dev',
74-
'extension_homepage' => null,
7574
'extension_time' => date('Y-m-d'),
75+
'extension_homepage' => null,
7676
),
7777
'requirements' => array(
7878
'php_version' => '>=5.3.3',

language/en/common.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
'SKELETON_QUESTION_VENDOR_NAME' => 'Please enter the vendor name',
3838
'SKELETON_QUESTION_VENDOR_NAME_UI' => 'Vendor name',
3939
'SKELETON_QUESTION_VENDOR_NAME_EXPLAIN' => 'Starting with a letter, letters and numbers only',
40-
'SKELETON_QUESTION_EXTENSION_DISPLAY_NAME' => 'Please enter the display name (title) of the extension',
41-
'SKELETON_QUESTION_EXTENSION_DISPLAY_NAME_UI' => 'Display name',
42-
'SKELETON_QUESTION_EXTENSION_DISPLAY_NAME_EXPLAIN' => 'This is the name (title) of the extension',
4340
'SKELETON_QUESTION_EXTENSION_NAME' => 'Please enter the package (folder) name of the extension',
4441
'SKELETON_QUESTION_EXTENSION_NAME_UI' => 'Package name',
4542
'SKELETON_QUESTION_EXTENSION_NAME_EXPLAIN' => 'Starting with a letter, letters and numbers only',
43+
'SKELETON_QUESTION_EXTENSION_DISPLAY_NAME' => 'Please enter the display name (title) of the extension',
44+
'SKELETON_QUESTION_EXTENSION_DISPLAY_NAME_UI' => 'Display name',
45+
'SKELETON_QUESTION_EXTENSION_DISPLAY_NAME_EXPLAIN' => 'This is the name (title) of the extension',
4646
'SKELETON_QUESTION_EXTENSION_DESCRIPTION' => 'Please enter the Description of the extension',
4747
'SKELETON_QUESTION_EXTENSION_DESCRIPTION_UI'=> 'Description',
4848
'SKELETON_QUESTION_EXTENSION_VERSION' => 'Please enter the version of the extension',

0 commit comments

Comments
 (0)