Skip to content

Commit

Permalink
fixed a nasty bug related to capture of the controller version
Browse files Browse the repository at this point in the history
fixed a nasty bug related to capture of the controller version caused by
the fact that it can only be captured when a site is selected
  • Loading branch information
malle-pietje committed Dec 21, 2015
1 parent d223d18 commit 5bf33cb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@
}

/*
get the version of the controller (if not already stored in $_SESSION)
get the version of the controller (if not already stored in $_SESSION or when empty)
*/
if(!isset($_SESSION['detected_controller_version'])) {
if(!isset($_SESSION['detected_controller_version']) || $_SESSION['detected_controller_version'] === '') {
$site_info = $unifidata->stat_sysinfo();
$_SESSION['detected_controller_version'] = $site_info[0]->version;
$detected_controller_version = $site_info[0]->version;
$_SESSION['detected_controller_version'] = $detected_controller_version;
}

/*
Expand Down Expand Up @@ -515,7 +516,7 @@ function to print the output
</div>
<div class="row">
<div class="col-sm-3 col-sm-offset-2">version detected</div>
<div class="col-sm-5"><span class="label label-primary"><?php echo $_SESSION['detected_controller_version'] ?></span></div>
<div class="col-sm-5"><span class="label label-primary"><?php echo $detected_controller_version ?></span></div>
</div>
<hr>
<div class="row">
Expand Down

0 comments on commit 5bf33cb

Please sign in to comment.