Skip to content

Commit 2ad98a1

Browse files
committed
wip
1 parent 11b4f7c commit 2ad98a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ghost.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class Ghost {
1717
public function __construct() {
1818
global $hcpp;
1919
$hcpp->ghost = $this;
20-
$hcpp->ghost->version = basename( readlink('/opt/ghost/current') );
2120
$hcpp->add_action( 'hcpp_invoke_plugin', [ $this, 'setup' ] );
2221
$hcpp->add_action( 'hcpp_render_body', [ $this, 'hcpp_render_body' ] );
2322
}
@@ -182,7 +181,8 @@ public function hcpp_render_body( $args ) {
182181

183182
// Fill out version on app listing page
184183
if ( $args['page'] == 'list_webapps' ) {
185-
$args['content'] = str_replace( '%ghost_version%', $hcpp->ghost->version, $args['content'] );
184+
$version = shell_exec( 'basename $(readlink /opt/ghost/current)' );
185+
$args['content'] = str_replace( '%ghost_version%', $version, $args['content'] );
186186
return $args;
187187
}
188188

0 commit comments

Comments
 (0)