git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lead users to setup check page when no config file given
[phorkie.git]
/
www
/
www-header.php
diff --git
a/www/www-header.php
b/www/www-header.php
index 94ee1d7e658424d160f58aa803b4289988bb5b2c..5381eed67a4f01e89b528ad7a47a8630d6031d9d 100644
(file)
--- a/
www/www-header.php
+++ b/
www/www-header.php
@@
-1,5
+1,7
@@
<?php
namespace phorkie;
<?php
namespace phorkie;
+error_reporting(error_reporting() & ~E_STRICT);
+session_set_cookie_params(14 * 86400);//2 weeks session expiry time
session_start();
require_once __DIR__ . '/../src/phorkie/autoload.php';
session_start();
require_once __DIR__ . '/../src/phorkie/autoload.php';
@@
-38,9
+40,12
@@
if ($pharFile == '') {
$cfgFilePath = substr($pharFile, 7) . '.config.php';
}
$GLOBALS['phorkie']['cfgfiles'][$cfgFilePath] = false;
$cfgFilePath = substr($pharFile, 7) . '.config.php';
}
$GLOBALS['phorkie']['cfgfiles'][$cfgFilePath] = false;
+$GLOBALS['phorkie']['suggestSetupCheck'] = false;
if (file_exists($cfgFilePath)) {
$GLOBALS['phorkie']['cfgfiles'][$cfgFilePath] = true;
require_once $cfgFilePath;
if (file_exists($cfgFilePath)) {
$GLOBALS['phorkie']['cfgfiles'][$cfgFilePath] = true;
require_once $cfgFilePath;
+} else if ($GLOBALS['phorkie']['cfg']['setupcheck']) {
+ $GLOBALS['phorkie']['suggestSetupCheck'] = true;
}
if ($GLOBALS['phorkie']['cfg']['baseurl'] === null) {
}
if ($GLOBALS['phorkie']['cfg']['baseurl'] === null) {
@@
-99,6
+104,7
@@
function render($tplname, $vars = array())
if (!isset($vars['htmlhelper'])) {
$vars['htmlhelper'] = new HtmlHelper();
}
if (!isset($vars['htmlhelper'])) {
$vars['htmlhelper'] = new HtmlHelper();
}
+ $vars['suggestSetupCheck'] = $GLOBALS['phorkie']['suggestSetupCheck'];
$template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
echo $template->render($vars);
$template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
echo $template->render($vars);