Harmonize version reporting in ui and api

Everything should use the version from the VERSION file created by the installer like this.
This commit is contained in:
Lucas Bickel 2017-03-10 20:28:54 +01:00
parent e3785e25f9
commit bd18caf69d
8 changed files with 23 additions and 31 deletions

View file

@ -105,8 +105,9 @@ class ApiController extends Zend_Controller_Action
public function versionAction()
{
$config = Config::getConfig();
$this->_helper->json->sendJson( array(
"airtime_version" => Application_Model_Preference::GetAirtimeVersion(),
"airtime_version" => $config['airtime_version'],
"api_version" => AIRTIME_API_VERSION));
}
@ -685,7 +686,8 @@ class ApiController extends Zend_Controller_Action
$this->_helper->json->sendJson(
array("jsonrpc" => "2.0", "error" => array("code" => $result['code'], "message" => $result['message']))
);
}*/
}
**/
}
public function uploadRecordedAction()
@ -944,10 +946,11 @@ class ApiController extends Zend_Controller_Action
{
$request = $this->getRequest();
$getDiskInfo = $request->getParam('diskinfo') == "true";
$config = Config::getConfig();
$status = array(
"platform"=>Application_Model_Systemstatus::GetPlatformInfo(),
"airtime_version"=>Application_Model_Preference::GetAirtimeVersion(),
"airtime_version"=>$config['airtime_version'],
"services"=>array(
"pypo"=>Application_Model_Systemstatus::GetPypoStatus(),
"liquidsoap"=>Application_Model_Systemstatus::GetLiquidsoapStatus(),

View file

@ -109,8 +109,9 @@ class DashboardController extends Zend_Controller_Action
public function aboutAction()
{
$config = Config::getConfig();
Zend_Layout::getMvcInstance()->assign('parent_page', 'Help');
$this->view->airtime_version = Application_Model_Preference::GetAirtimeVersion();
$this->view->airtime_version = $config['airtime_version'];
}
public function tableTestAction()

View file

@ -114,7 +114,7 @@ class LoginController extends Zend_Controller_Action
}
$this->view->form = $form;
$this->view->airtimeVersion = Application_Model_Preference::GetAirtimeVersion();
$this->view->airtimeVersion = $CC_CONFIG['airtime_version'];
$this->view->airtimeCopyright = AIRTIME_COPYRIGHT_DATE;
if (isset($CC_CONFIG['demo'])) {
$this->view->demo = $CC_CONFIG['demo'];