chg: Get rid of the weird http:// baseurls and set some helper variables for the views

- Also load the new OrgImg helper
- @SteveClement wubs global view variables
pull/2883/head
iglocska 2018-01-19 15:38:01 +01:00
parent 4d2e31e771
commit 24801272cf
1 changed files with 7 additions and 2 deletions

View File

@ -44,9 +44,9 @@ class AppController extends Controller {
public $debugMode = false;
public $helpers = array('Utility');
public $helpers = array('Utility', 'OrgImg');
private $__queryVersion = '28';
private $__queryVersion = '29';
public $pyMispVersion = '2.4.85';
public $phpmin = '5.6.5';
public $phprec = '7.0.16';
@ -148,6 +148,9 @@ class AppController extends Controller {
$this->loadModel('Server');
$this->Server->serverSettingsSaveValue('MISP.baseurl', $baseurl);
}
if (trim($baseurl) == 'http://') {
$this->Server->serverSettingsSaveValue('MISP.baseurl', '');
}
$this->set('baseurl', h($baseurl));
// send users away that are using ancient versions of IE
@ -351,6 +354,8 @@ class AppController extends Controller {
} else {
$this->set('me', false);
}
$this->set('br', '<br />');
$this->set('bold', array('<span class="bold">', '</span>'));
if ($this->_isSiteAdmin()) {
if (Configure::read('Session.defaults') == 'database') {
$db = ConnectionManager::getDataSource('default');