mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
add a lib directory; move smarty into it; add random_compat phar (for random_bytes() on PHP < 7)
This commit is contained in:
parent
a4760ef53c
commit
b97decb7c2
@ -69,6 +69,7 @@ Config::write($CONF);
|
|||||||
|
|
||||||
require_once("$incpath/languages/language.php");
|
require_once("$incpath/languages/language.php");
|
||||||
require_once("$incpath/functions.inc.php");
|
require_once("$incpath/functions.inc.php");
|
||||||
|
require_once("$incpath/lib/random_compat.phar");
|
||||||
|
|
||||||
if (defined('POSTFIXADMIN_CLI')) {
|
if (defined('POSTFIXADMIN_CLI')) {
|
||||||
$language = 'en'; # TODO: make configurable or autodetect from locale settings
|
$language = 'en'; # TODO: make configurable or autodetect from locale settings
|
||||||
@ -89,10 +90,10 @@ Config::write('__LANG', $PALANG);
|
|||||||
unset($incpath);
|
unset($incpath);
|
||||||
|
|
||||||
if (!defined('POSTFIXADMIN_CLI')) {
|
if (!defined('POSTFIXADMIN_CLI')) {
|
||||||
if (!is_file(dirname(__FILE__) . "/smarty.inc.php")) {
|
if (!is_file(dirname(__FILE__) . "/lib/smarty.inc.php")) {
|
||||||
die("smarty.inc.php is missing! Something is wrong...");
|
die("smarty.inc.php is missing! Something is wrong...");
|
||||||
}
|
}
|
||||||
require_once(dirname(__FILE__) . "/smarty.inc.php");
|
require_once(dirname(__FILE__) . "/lib/smarty.inc.php");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
||||||
|
BIN
lib/random_compat.phar
Normal file
BIN
lib/random_compat.phar
Normal file
Binary file not shown.
5
lib/random_compat.phar.pubkey
Normal file
5
lib/random_compat.phar.pubkey
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm
|
||||||
|
pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p
|
||||||
|
+h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc
|
||||||
|
-----END PUBLIC KEY-----
|
4
lib/random_compat.txt
Normal file
4
lib/random_compat.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Downloaded on 2018/04/29.
|
||||||
|
|
||||||
|
https://github.com/paragonie/random_compat/releases/download/v2.0.12/random_compat.phar.pubkey
|
||||||
|
https://github.com/paragonie/random_compat/releases/download/v2.0.12/random_compat.phar
|
@ -12,10 +12,10 @@ class PFASmarty {
|
|||||||
$this->template = new Smarty();
|
$this->template = new Smarty();
|
||||||
|
|
||||||
//$this->template->debugging = true;
|
//$this->template->debugging = true;
|
||||||
$this->template->setTemplateDir(dirname(__FILE__) . '/templates');
|
$this->template->setTemplateDir(dirname(__FILE__) . '/../templates');
|
||||||
|
|
||||||
// if it's not present or writeable, smarty should just not cache.
|
// if it's not present or writeable, smarty should just not cache.
|
||||||
$templates_c = dirname(__FILE__) . '/templates_c';
|
$templates_c = dirname(__FILE__) . '/../templates_c';
|
||||||
if (is_dir($templates_c) && is_writeable($templates_c)) {
|
if (is_dir($templates_c) && is_writeable($templates_c)) {
|
||||||
$this->template->setCompileDir($templates_c);
|
$this->template->setCompileDir($templates_c);
|
||||||
} else {
|
} else {
|
||||||
@ -25,7 +25,7 @@ class PFASmarty {
|
|||||||
die("ERROR: the templates_c directory doesn't exist or isn't writeable for the webserver");
|
die("ERROR: the templates_c directory doesn't exist or isn't writeable for the webserver");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->template->setConfigDir(dirname(__FILE__) . '/configs');
|
$this->template->setConfigDir(dirname(__FILE__) . '/../configs');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assign($key, $value, $sanitise = true) {
|
public function assign($key, $value, $sanitise = true) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user