mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
Finally get rid of variables.inc.php
Initialize $error and $tMailbox where needed. The other variables in variables.inc.php are already initialized everywhere.
This commit is contained in:
parent
1ec2ec1199
commit
9df6de65af
@ -34,6 +34,8 @@ if ($CONF['sendmail'] != 'YES') {
|
||||
exit;
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
|
||||
$smtp_from_email = smtp_get_admin_email();
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == "POST")
|
||||
|
@ -60,8 +60,6 @@ function postfixadmin_autoload($class) {
|
||||
}
|
||||
spl_autoload_register('postfixadmin_autoload');
|
||||
|
||||
require_once("$incpath/variables.inc.php");
|
||||
|
||||
if(!is_file("$incpath/config.inc.php")) {
|
||||
die("config.inc.php is missing!");
|
||||
}
|
||||
|
@ -212,11 +212,12 @@ $query = "$sql_select\n$mailbox_pagebrowser_query\n$sql_limit";
|
||||
|
||||
$result = db_query ($query);
|
||||
|
||||
$tMailbox = array();
|
||||
|
||||
if ($result['rows'] > 0) {
|
||||
$delimiter = preg_quote($CONF['recipient_delimiter'], "/");
|
||||
$goto_single_rec_del = "";
|
||||
|
||||
$tMailbox = array();
|
||||
while ($row = db_array ($result['result'])) {
|
||||
if ($display_mailbox_aliases) {
|
||||
$goto_split = explode(",", $row['goto']);
|
||||
|
@ -51,6 +51,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST")
|
||||
$tBody = stripslashes($tBody); # TODO: check for get_magic_quotes_gpc inside safepost/safeget
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
$email_check = check_email ($fTo);
|
||||
if (empty ($fTo) or ($email_check != ''))
|
||||
{
|
||||
|
@ -67,6 +67,8 @@ if($CONF['vacation'] == 'NO') {
|
||||
|
||||
date_default_timezone_set(@date_default_timezone_get()); # Suppress date.timezone warnings
|
||||
|
||||
$error = 0;
|
||||
|
||||
$vh = new VacationHandler($fUsername);
|
||||
|
||||
$choice_of_reply = Config::read('vacation_choice_of_reply');
|
||||
|
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Postfix Admin
|
||||
*
|
||||
* LICENSE
|
||||
* This source file is subject to the GPL license that is bundled with
|
||||
* this package in the file LICENSE.TXT.
|
||||
*
|
||||
* Further details on the project are available at http://postfixadmin.sf.net
|
||||
*
|
||||
* @version $Id$
|
||||
* @license GNU GPL v2 or later.
|
||||
*
|
||||
* File: variables.inc.php
|
||||
* Contains varoius pre-defined variables.
|
||||
*
|
||||
* XXX Probably a hack to save having to declare variables before using them in pages.
|
||||
*
|
||||
* TODO: get rid of the remaining variables declared here!
|
||||
*/
|
||||
|
||||
$error = "";
|
||||
$fPassword = "";
|
||||
$fWhere = "";
|
||||
$tAlias = "";
|
||||
$tDescription = "";
|
||||
$tMailbox = "";
|
||||
|
||||
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|
||||
?>
|
@ -37,6 +37,8 @@ else {
|
||||
}
|
||||
|
||||
$fDomain = '';
|
||||
$error = 0;
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == "GET")
|
||||
{
|
||||
if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) $fDomain = $list_domains[0];
|
||||
|
Loading…
Reference in New Issue
Block a user