turn on csp by adding method js()

This commit is contained in:
Uwe Steinmann 2016-03-16 15:11:33 +01:00
parent a758b29369
commit cfaa11a02c
2 changed files with 11 additions and 2 deletions

View File

@ -36,9 +36,14 @@ if (isset($_GET["day"])&&is_numeric($_GET["day"])) $day=$_GET["day"];
else $day = (int)date("d", $currDate);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user,'mode'=>$mode, 'year'=>$year, 'month'=>$month, 'day'=>$day, 'firstdayofweek'=>$settings->_firstDayOfWeek));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user));
if($view) {
$view->show();
$view->setParam('mode', $mode);
$view->setParam('year', $year);
$view->setParam('month', $month);
$view->setParam('day', $day);
$view->setParam('firstdayofweek', $settings->_firstDayOfWeek);
$view($_GET);
exit;
}

View File

@ -182,6 +182,10 @@ class SeedDMS_View_Calendar extends SeedDMS_Bootstrap_Style {
print "</table>\n";
} /* }}} */
function js() { /* {{{ */
header('Content-Type: application/javascript');
} /* }}} */
function show() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];