Removed unnecessary exit - calls

Signed-off-by: Florian Aders <eleras@froxlor.org>
This commit is contained in:
Florian Aders
2016-02-22 12:10:06 +01:00
parent f00a1ca092
commit deb19f2625
13 changed files with 13 additions and 44 deletions

View File

@@ -155,7 +155,6 @@ if ($page == 'admins'
if ($result['loginname'] != '') { if ($result['loginname'] != '') {
if ($result['adminid'] == $userinfo['userid']) { if ($result['adminid'] == $userinfo['userid']) {
standard_error('youcantdeleteyourself'); standard_error('youcantdeleteyourself');
exit;
} }
if (isset($_POST['send']) if (isset($_POST['send'])

View File

@@ -46,7 +46,6 @@ if (!function_exists('apcu_cache_info') ||
!function_exists('apcu_sma_info') !function_exists('apcu_sma_info')
) { ) {
standard_error($lng['error']['no_apcuinfo']); standard_error($lng['error']['no_apcuinfo']);
exit();
} }
if ($page == 'showinfo' if ($page == 'showinfo'

View File

@@ -554,7 +554,6 @@ if ($page == 'customers'
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1') || ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
) { ) {
standard_error('youcantallocatemorethanyouhave'); standard_error('youcantallocatemorethanyouhave');
exit;
} }
// Either $name and $firstname or the $company must be inserted // Either $name and $firstname or the $company must be inserted
@@ -1208,7 +1207,6 @@ if ($page == 'customers'
|| ($subdomains == '-1' && $userinfo['subdomains'] != '-1') || ($subdomains == '-1' && $userinfo['subdomains'] != '-1')
) { ) {
standard_error('youcantallocatemorethanyouhave'); standard_error('youcantallocatemorethanyouhave');
exit;
} }
// Either $name and $firstname or the $company must be inserted // Either $name and $firstname or the $company must be inserted

View File

@@ -301,7 +301,6 @@ if ($page == 'domains'
if ($_POST['domain'] == Settings::Get('system.hostname')) { if ($_POST['domain'] == Settings::Get('system.hostname')) {
standard_error('admin_domain_emailsystemhostname'); standard_error('admin_domain_emailsystemhostname');
exit;
} }
$domain = $idna_convert->encode(preg_replace(array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain'))); $domain = $idna_convert->encode(preg_replace(array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain')));
@@ -756,7 +755,6 @@ if ($page == 'domains'
|| $_POST[$question_name] != $question_name || $_POST[$question_name] != $question_name
) { ) {
ask_yesno('admin_domain_' . $question_name, $filename, $params, $question_nr); ask_yesno('admin_domain_' . $question_name, $filename, $params, $question_nr);
exit;
} }
} }
$question_nr++; $question_nr++;
@@ -1520,7 +1518,6 @@ if ($page == 'domains'
|| $_POST[$question_name] != $question_name || $_POST[$question_name] != $question_name
) { ) {
ask_yesno('admin_domain_' . $question_name, $filename, $params); ask_yesno('admin_domain_' . $question_name, $filename, $params);
exit;
} }
} }
} }

View File

@@ -42,7 +42,6 @@ if ($action == 'logout') {
Database::pexecute($stmt, $params); Database::pexecute($stmt, $params);
redirectTo('index.php'); redirectTo('index.php');
exit;
} }
if (isset($_POST['id'])) { if (isset($_POST['id'])) {
@@ -201,7 +200,6 @@ if ($page == 'overview') {
if (!validatePasswordLogin($userinfo,$old_password,TABLE_PANEL_ADMINS,'adminid')) { if (!validatePasswordLogin($userinfo,$old_password,TABLE_PANEL_ADMINS,'adminid')) {
standard_error('oldpasswordnotcorrect'); standard_error('oldpasswordnotcorrect');
exit;
} }
$new_password = validate($_POST['new_password'], 'new password'); $new_password = validate($_POST['new_password'], 'new password');

View File

@@ -35,7 +35,6 @@ if ($action == 'reset' &&
if (!function_exists('opcache_get_configuration') if (!function_exists('opcache_get_configuration')
) { ) {
standard_error($lng['error']['no_opcacheinfo']); standard_error($lng['error']['no_opcacheinfo']);
exit();
} }
if ($page == 'showinfo' if ($page == 'showinfo'

View File

@@ -201,7 +201,6 @@ if ($action == '') {
} else { } else {
standard_error('templatenotfound'); standard_error('templatenotfound');
exit;
} }
} elseif($action == 'add') { } elseif($action == 'add') {
@@ -358,7 +357,6 @@ if ($action == '') {
eval("echo \"" . getTemplate("templates/templates_add_1") . "\";"); eval("echo \"" . getTemplate("templates/templates_add_1") . "\";");
} else { } else {
standard_error('alltemplatesdefined'); standard_error('alltemplatesdefined');
exit;
} }
} else { } else {
@@ -371,7 +369,6 @@ if ($action == '') {
if (Database::num_rows() == count($file_templates)) { if (Database::num_rows() == count($file_templates)) {
standard_error('alltemplatesdefined'); standard_error('alltemplatesdefined');
exit;
} else { } else {
@@ -514,6 +511,5 @@ if ($action == '') {
} else { } else {
standard_error('templatenotfound'); standard_error('templatenotfound');
exit;
} }
} }

View File

@@ -27,7 +27,6 @@ if ($action == 'logout') {
); );
Database::pexecute($logout_stmt, array('adminid' => $userinfo['adminid'])); Database::pexecute($logout_stmt, array('adminid' => $userinfo['adminid']));
redirectTo('index.php'); redirectTo('index.php');
exit;
} }
if (isset($_POST['id'])) { if (isset($_POST['id'])) {

View File

@@ -87,21 +87,17 @@ if ($page == 'overview') {
} }
} }
$row['termination_date'] = str_replace("0000-00-00", "", $row['termination_date']); $row['termination_date'] = str_replace("0000-00-00", "", $row['termination_date']);
if($row['termination_date'] != "") if($row['termination_date'] != "") {
{ $cdate = strtotime($row['termination_date'] . " 23:59:59");
$cdate = strtotime($row['termination_date'] . " 23:59:59"); $today = time();
$today = time();
if($cdate < $today) if($cdate < $today) {
{ $row['termination_css'] = 'domain-expired';
$row['termination_css'] = 'domain-expired'; } else {
} $row['termination_css'] = 'domain-canceled';
else }
{ }
$row['termination_css'] = 'domain-canceled';
}
}
$domains_count++; $domains_count++;
$domain_array[$row['domain']] = $row; $domain_array[$row['domain']] = $row;
@@ -264,7 +260,6 @@ if ($page == 'overview') {
if ($completedomain == Settings::Get('system.hostname')) { if ($completedomain == Settings::Get('system.hostname')) {
standard_error('admin_domain_emailsystemhostname'); standard_error('admin_domain_emailsystemhostname');
exit;
} }
$completedomain_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` $completedomain_stmt = Database::prepare("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "`

View File

@@ -244,7 +244,6 @@ if ($page == 'overview') {
standard_error('emailexistalready', $email_full); standard_error('emailexistalready', $email_full);
} elseif ($email_check['email'] == $email) { } elseif ($email_check['email'] == $email) {
standard_error('youhavealreadyacatchallforthisdomain'); standard_error('youhavealreadyacatchallforthisdomain');
exit;
} else { } else {
$stmt = Database::prepare("INSERT INTO `" . TABLE_MAIL_VIRTUAL . "` $stmt = Database::prepare("INSERT INTO `" . TABLE_MAIL_VIRTUAL . "`
(`customerid`, `email`, `email_full`, `iscatchall`, `domainid`) (`customerid`, `email`, `email_full`, `iscatchall`, `domainid`)
@@ -377,7 +376,6 @@ if ($page == 'overview') {
if ($email_check['email'] == $email) { if ($email_check['email'] == $email) {
standard_error('youhavealreadyacatchallforthisdomain'); standard_error('youhavealreadyacatchallforthisdomain');
exit;
} else { } else {
$stmt = Database::prepare("UPDATE `" . TABLE_MAIL_VIRTUAL . "` $stmt = Database::prepare("UPDATE `" . TABLE_MAIL_VIRTUAL . "`
SET `email` = :email , `iscatchall` = '1' SET `email` = :email , `iscatchall` = '1'
@@ -461,7 +459,9 @@ if ($page == 'overview') {
$maildirname=trim(Settings::Get('system.vmail_maildirname')); $maildirname=trim(Settings::Get('system.vmail_maildirname'));
// Add trailing slash to Maildir if needed // Add trailing slash to Maildir if needed
$maildirpath=$maildirname; $maildirpath=$maildirname;
if (!empty($maildirname) and substr($maildirname,-1) != "/") $maildirpath.="/"; if (!empty($maildirname) && substr($maildirname,-1) != "/") {
$maildirpath.="/";
}
$stmt = Database::prepare("INSERT INTO `" . TABLE_MAIL_USERS . "` $stmt = Database::prepare("INSERT INTO `" . TABLE_MAIL_USERS . "`
(`customerid`, `email`, `username`, " . (Settings::Get('system.mailpwcleartext') == '1' ? '`password`, ' : '') . " `password_enc`, `homedir`, `maildir`, `uid`, `gid`, `domainid`, `postfix`, `quota`, `imap`, `pop3`) ". (`customerid`, `email`, `username`, " . (Settings::Get('system.mailpwcleartext') == '1' ? '`password`, ' : '') . " `password_enc`, `homedir`, `maildir`, `uid`, `gid`, `domainid`, `postfix`, `quota`, `imap`, `pop3`) ".
@@ -633,11 +633,9 @@ if ($page == 'overview') {
if ($password == '') { if ($password == '') {
standard_error(array('stringisempty', 'mypassword')); standard_error(array('stringisempty', 'mypassword'));
exit;
} }
elseif ($password == $result['email_full']) { elseif ($password == $result['email_full']) {
standard_error('passwordshouldnotbeusername'); standard_error('passwordshouldnotbeusername');
exit;
} }
$password = validatePassword($password); $password = validatePassword($password);

View File

@@ -363,10 +363,8 @@ if ($page == 'overview') {
if ($_setnewpass) { if ($_setnewpass) {
if ($password == '') { if ($password == '') {
standard_error(array('stringisempty', 'mypassword')); standard_error(array('stringisempty', 'mypassword'));
exit;
} elseif ($result['username'] == $password) { } elseif ($result['username'] == $password) {
standard_error('passwordshouldnotbeusername'); standard_error('passwordshouldnotbeusername');
exit;
} }
$log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'"); $log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'");
$cryptPassword = makeCryptPassword($password); $cryptPassword = makeCryptPassword($password);

View File

@@ -40,7 +40,6 @@ if ($action == 'logout') {
Database::pexecute($stmt, $params); Database::pexecute($stmt, $params);
redirectTo('index.php'); redirectTo('index.php');
exit;
} }
if ($page == 'overview') { if ($page == 'overview') {
@@ -101,7 +100,6 @@ if ($page == 'overview') {
$old_password = validate($_POST['old_password'], 'old password'); $old_password = validate($_POST['old_password'], 'old password');
if (!validatePasswordLogin($userinfo,$old_password,TABLE_PANEL_CUSTOMERS,'customerid')) { if (!validatePasswordLogin($userinfo,$old_password,TABLE_PANEL_CUSTOMERS,'customerid')) {
standard_error('oldpasswordnotcorrect'); standard_error('oldpasswordnotcorrect');
exit;
} }
$new_password = validatePassword($_POST['new_password'], 'new password'); $new_password = validatePassword($_POST['new_password'], 'new password');

View File

@@ -42,11 +42,6 @@ function includeFunctions($dirname)
closedir($dirhandle); closedir($dirhandle);
} }
function exportDetails($fielddata, $newfieldvalue)
{
print_r($newfieldvalue);
}
Autoloader::init(); Autoloader::init();
/** /**