Merge pull request #1352 from mafoo/BugFix-Install

added correct bits detection
This commit is contained in:
FusionPBX 2015-12-30 10:46:50 -07:00
commit 1b3e475b0f
2 changed files with 3 additions and 2 deletions

View File

@ -336,7 +336,7 @@ if(!$install_step) { $install_step = 'select_language'; }
echo "<form method='post' name='frm' action=''>\n";
echo " <div style='text-align:right'>\n";
echo " <button type='button' onclick=\"history.go(-1);\">".$text['button-back']."</button>\n";
echo " <button type='button' onclick=\"location.reload(true);\">".$text['button-install_execute']."</button>\n";
echo " <button type='button' onclick=\"location.reload(true);\">".$text['button-execute']."</button>\n";
echo " </div>\n";
echo "</form>\n";
}

View File

@ -122,10 +122,11 @@ require_once "resources/classes/EventSocket.php";
throw new Exception('Failed to use event socket');
}
$FS_Version = $this->event_socket_request('api version');
preg_match("/FreeSWITCH Version (\d+\.\d+\.\d+(?:\.\d+)?).*\(.*?(\d+\w+)\s*\)/", $FS_Version, $matches);
preg_match("/FreeSWITCH Version (\d+)\.(\d+)\.(\d+(?:\.\d+)?).*\(.*?(\d+\w+)\s*\)/", $FS_Version, $matches);
$this->_major = $matches[1];
$this->_minor = $matches[2];
$this->_build = $matches[3];
$this->_bits = $matches[4];
$FS_Vars = $this->event_socket_request('api global_getvar');
foreach (explode("\n",$FS_Vars) as $FS_Var){
preg_match("/(\w+_dir)=(.*)/", $FS_Var, $matches);