From e1ceb050e19c7574bca146a8da7047ee4ff456b5 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 10 Jul 2016 05:02:35 -0400
Subject: [PATCH] Merge branch 'stable-3.1'

---
 interface/web/mail/mailinglist.php |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/interface/web/mail/mailinglist.php b/interface/web/mail/mailinglist.php
index 9940e64..15f61c9 100644
--- a/interface/web/mail/mailinglist.php
+++ b/interface/web/mail/mailinglist.php
@@ -28,28 +28,28 @@
 */
 
 
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
+require_once '../../lib/config.inc.php';
+require_once '../../lib/app.inc.php';
 
 //* Check permissions for module
 $app->auth->check_module_permissions('mail');
 
 /* get the id of the mail (must be int!) */
 if (!isset($_GET['id'])){
-    die ("No List selected!");
+	die ("No List selected!");
 }
-$listId = intval($_GET['id']);
+$listId = $app->functions->intval($_GET['id']);
 
 /*
  * Get the data to connect to the database
  */
-$dbData = $app->db->queryAllRecords("SELECT server_id, listname FROM mail_mailinglist WHERE mailinglist_id = " . $listId);
-$serverId = intval($dbData[0]['server_id']);
+$dbData = $app->db->queryAllRecords("SELECT server_id, listname FROM mail_mailinglist WHERE mailinglist_id = ?", $listId);
+$serverId = $app->functions->intval($dbData[0]['server_id']);
 if ($serverId == 0){
-    die ("No List - Server found!");
+	die ("No List - Server found!");
 }
 
-$serverData = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$serverId);
+$serverData = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $serverId);
 
 $app->uses('getconf');
 $global_config = $app->getconf->get_global_config('mail');
@@ -58,11 +58,11 @@
 	header('Location:' . $global_config['mailmailinglist_url']);
 } else {
 
-/*
+	/*
  * We only redirect to the login-form, so there is no need, to check any rights
  */
 	isset($_SERVER['HTTPS'])? $http = 'https' : $http = 'http';
 	header('Location:' . $http . '://' . $serverData['server_name'] . '/cgi-bin/mailman/admin/' . $dbData[0]['listname']);
 }
 exit;
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1