Skip to content

Commit 43c07c7

Browse files
committed
wip
1 parent a825165 commit 43c07c7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Installers/NodeBB/NodeBBSetup.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
namespace Hestia\WebApp\Installers\NodeBB;
44
use Hestia\WebApp\Installers\BaseSetup as BaseSetup;
55
require_once( '/usr/local/hestia/web/pluginable.php' );
6-
$nodebb_version = file_get_contents( '/usr/local/hestia/plugins/nodebb/nodebb_version.sh' );
7-
$nodebb_version = str_replace( 'nodebb_version=', "", $nodebb_version );
8-
$nodebb_version = trim( $nodebb_version, '"' );
96

107
class NodeBBSetup extends BaseSetup {
118
protected $appInfo = [
129
"name" => "NodeBB",
1310
"group" => "forum",
1411
"enabled" => true,
15-
"version" => $nodebb_version,
12+
"version" => "",
1613
"thumbnail" => "nodebb-thumb.png",
1714
];
1815

@@ -35,6 +32,14 @@ class NodeBBSetup extends BaseSetup {
3532
],
3633
];
3734

35+
public function __construct($domain, $appcontext) {
36+
$v = file_get_contents( '/usr/local/hestia/plugins/nodebb/nodebb_version.sh' );
37+
$v = str_replace( 'nodebb_version=', "", $v );
38+
$v = trim( $v, '"' );
39+
$this->appInfo['version'] = $v;
40+
parent::__construct($domain, $appcontext);
41+
}
42+
3843
public function install(array $options = null) {
3944
global $hcpp;
4045
$parse = explode( '/', $this->getDocRoot() );

0 commit comments

Comments
 (0)