token psalm fixes

pull/229/head
David Goodwin 6 years ago
parent 5bc6e93347
commit 76ec4bc84d

@ -12,14 +12,28 @@ chdir("..");
if (!defined('SM_PATH')) {
define('SM_PATH', '../');
}
include_once(dirname(__FILE__) . '/config.php');
$config_file = dirname(__FILE__ ) . '/config.php';
$validate_file = dirname(__FILE__) . '/../include/validate.php';
if(!file_exists($config_file)) {
die("$config_file is missing");
}
include_once($config_file);
include_once(dirname(__FILE__) . '/functions.inc.php');
include_if_exists(dirname(__FILE__) . '/../include/validate.php');
if (file_exists(dirname(__FILE__) . '/../include/validate.php')) {
include_once(dirname(__FILE__) . '/include/validate.php');
} else {
include_if_exists(SM_PATH . 'src/validate.php');
if(file_exists($validate_file)) {
include_once($validate_file);
}
else {
$validate_file = SM_PATH . '/src/validate.php';
if(file_exists($validate_file)) {
include_once($validate_file);
}
}
include_once(SM_PATH . 'functions/page_header.php');
include_once(SM_PATH . 'functions/display_messages.php');
include_once(SM_PATH . 'functions/imap.php');

@ -43,7 +43,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
unset($array[$key]);
continue;
}
if (!check_email($email_address)) {
if (check_email($email_address) != "") {
$error = 1;
$tGoto = $goto;
bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');

@ -1,5 +1,8 @@
<?php
// vim:ts=4:sw=4:et
if(!defined('SM_PATH')) {
die("Invalid internal state (don't access file directly)");
}
include_once(SM_PATH . 'functions/i18n.php');
function squirrelmail_plugin_init_postfixadmin() {

@ -50,13 +50,13 @@ function deldir($dir) {
$current_dir = opendir($dir);
while ($entryname = readdir($current_dir)) {
if (is_dir("$dir/$entryname") and ($entryname != "." and $entryname!="..")) {
deldir("${dir}/${entryname}");
deldir("{$dir}/{$entryname}");
} elseif ($entryname != "." and $entryname!="..") {
unlink("${dir}/${entryname}");
unlink("{$dir}/{$entryname}");
}
}
closedir($current_dir);
@rmdir(${dir});
@rmdir($dir);
}
// --- Main Start ---
@ -110,7 +110,7 @@ $conx = mysqli_connect($CONF['database_host'], $CONF['database_user'], $CONF['da
// Is there a problem connecting?
//
if (! $conx || mysqli_connect_errno()) {
var_dump("DB connection failed." . mysqli_connect_error());
echo "DB connection failed." . mysqli_connect_error() . "\n";
die("Problem connecting to the database. ");
}

Loading…
Cancel
Save