http headers can be passed to htmlStartPage()

This commit is contained in:
Uwe Steinmann 2017-10-19 13:47:25 +02:00
parent bd6d66858a
commit 51c3b90a58

View File

@ -49,7 +49,7 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
$this->footerjs[] = $script;
} /* }}} */
function htmlStartPage($title="", $bodyClass="", $base="") { /* {{{ */
function htmlStartPage($title="", $bodyClass="", $base="", $httpheader=array()) { /* {{{ */
if(1 || method_exists($this, 'js')) {
/* We still need unsafe-eval, because printDocumentChooserHtml and
* printFolderChooserHtml will include a javascript file with ajax
@ -64,6 +64,11 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
header($csp . ": " . $csp_rules);
}
}
if($httpheader) {
foreach($httpheader as $name=>$value) {
header($name . ": " . $value);
}
}
$hookObjs = $this->getHookObjects('SeedDMS_View_Bootstrap');
foreach($hookObjs as $hookObj) {
if (method_exists($hookObj, 'startPage')) {