Skip to content

Commit b97f6e1

Browse files
committed
version number fix
1 parent 3bc683f commit b97f6e1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Installers/NodeBB/NodeBBSetup.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ class NodeBBSetup extends BaseSetup {
3333
];
3434

3535
public function __construct($domain, $appcontext) {
36-
$v = file_get_contents( '/usr/local/hestia/plugins/nodebb/nodebb_version.sh' );
36+
$v = trim( file_get_contents( '/usr/local/hestia/plugins/nodebb/nodebb_version.sh' ) );
3737
$v = str_replace( ['nodebb_version=', '"'], "", $v );
38-
$v = trim( $v, '"' );
3938
$this->appInfo['version'] = $v;
4039
parent::__construct($domain, $appcontext);
4140
}

nodebb.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ public function setup( $args ) {
6565
shell_exec( $cmd );
6666

6767
// Copy over nodebb core files
68-
$nodebb_version = file_get_contents( __DIR__ . '/nodebb_version.sh' );
69-
$nodebb_version = str_replace( 'nodebb_version=', "", $nodebb_version );
70-
$nodebb_version = trim( $nodebb_version, '"' );
68+
$nodebb_version = trim( file_get_contents( __DIR__ . '/nodebb_version.sh' ) );
69+
$nodebb_version = str_replace( ['nodebb_version=', '"'], "", $nodebb_version );
7170
$opt_nodebb = '/opt/nodebb/v' . $nodebb_version . '/nodebb';
7271
$hcpp->copy_folder( $opt_nodebb, $nodebb_folder, $user );
7372

0 commit comments

Comments
 (0)