mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
remove static copyright-year in templates; fix possible undefined theme-variable in phpErrHandler by specifying a fallback-default
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
parent
c1ca72dd3c
commit
19f5f2a7a4
@ -982,6 +982,7 @@ class FroxlorInstall {
|
||||
) {
|
||||
// use sparkle theme for the notice
|
||||
$installed_hint = file_get_contents($this->_basepath.'/templates/Sparkle/misc/alreadyinstalledhint.tpl');
|
||||
$installed_hint = str_replace("<CURRENT_YEAR>", date('Y', time()), $installed_hint);
|
||||
die($installed_hint);
|
||||
}
|
||||
}
|
||||
|
@ -364,6 +364,7 @@ class Database {
|
||||
// replace values
|
||||
$err_hint = str_replace("<TEXT>", $error_message, $err_hint);
|
||||
$err_hint = str_replace("<DEBUG>", $error_trace, $err_hint);
|
||||
$err_hint = str_replace("<CURRENT_YEAR>", date('Y', time()), $err_hint);
|
||||
|
||||
$err_report_html = '';
|
||||
if (is_array($userinfo) && (
|
||||
|
@ -20,6 +20,11 @@ function phpErrHandler($errno, $errstr, $errfile, $errline, array $errcontext) {
|
||||
|
||||
if (!isset($_SERVER['SHELL']) || (isset($_SERVER['SHELL']) && $_SERVER['SHELL'] == '')) {
|
||||
global $theme;
|
||||
|
||||
// fallback
|
||||
if (empty($theme)) {
|
||||
$theme = "Sparkle";
|
||||
}
|
||||
// if we're not on the shell, output a nicer error-message
|
||||
$err_hint = file_get_contents(FROXLOR_INSTALL_DIR.'/templates/'.$theme.'/misc/phperrornice.tpl');
|
||||
// replace values
|
||||
|
@ -78,6 +78,7 @@ define('FROXLOR_INSTALL_DIR', dirname(dirname(__FILE__)));
|
||||
// check whether the userdata file exists
|
||||
if (!file_exists(FROXLOR_INSTALL_DIR.'/lib/userdata.inc.php')) {
|
||||
$config_hint = file_get_contents(FROXLOR_INSTALL_DIR.'/templates/'.$_deftheme.'/misc/configurehint.tpl');
|
||||
$config_hint = str_replace("<CURRENT_YEAR>", date('Y', time()), $config_hint);
|
||||
die($config_hint);
|
||||
}
|
||||
|
||||
@ -92,6 +93,7 @@ if (!is_readable(FROXLOR_INSTALL_DIR.'/lib/userdata.inc.php')) {
|
||||
$owner_hint = str_replace("<USER>", $posixusername['name'], $owner_hint);
|
||||
$owner_hint = str_replace("<GROUP>", $posixgroup['name'], $owner_hint);
|
||||
$owner_hint = str_replace("<FROXLOR_INSTALL_DIR>", FROXLOR_INSTALL_DIR, $owner_hint);
|
||||
$owner_hint = str_replace("<CURRENT_YEAR>", date('Y', time()), $owner_hint);
|
||||
// show
|
||||
die($owner_hint);
|
||||
}
|
||||
@ -105,6 +107,7 @@ if (!isset($sql)
|
||||
|| !is_array($sql)
|
||||
) {
|
||||
$config_hint = file_get_contents(FROXLOR_INSTALL_DIR.'/templates/'.$_deftheme.'/misc/configurehint.tpl');
|
||||
$config_hint = str_replace("<CURRENT_YEAR>", date('Y', time()), $config_hint);
|
||||
die($config_hint);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<footer>
|
||||
<span>
|
||||
Froxlor © 2009-2013 by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
Froxlor © 2009-<CURRENT_YEAR> by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
|
2
templates/Sparkle/misc/configurehint.tpl
vendored
2
templates/Sparkle/misc/configurehint.tpl
vendored
@ -37,7 +37,7 @@
|
||||
</div>
|
||||
<footer>
|
||||
<span>
|
||||
Froxlor © 2009-2013 by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
Froxlor © 2009-<CURRENT_YEAR> by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
|
2
templates/Sparkle/misc/dberrornice.tpl
vendored
2
templates/Sparkle/misc/dberrornice.tpl
vendored
@ -50,7 +50,7 @@
|
||||
</div>
|
||||
<footer>
|
||||
<span>
|
||||
Froxlor © 2009-2013 by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
Froxlor © 2009-<CURRENT_YEAR> by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
|
2
templates/Sparkle/misc/ownershiphint.tpl
vendored
2
templates/Sparkle/misc/ownershiphint.tpl
vendored
@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<footer>
|
||||
<span>
|
||||
Froxlor © 2009-2013 by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
Froxlor © 2009-<CURRENT_YEAR> by <a href="http://www.froxlor.org/" rel="external">the Froxlor Team</a>
|
||||
</span>
|
||||
</footer>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user