From 0732d32f508045da40fe9df607b9ef20ce2d198f Mon Sep 17 00:00:00 2001
From: xaver <xaver@ispconfig3>
Date: Tue, 06 Mar 2012 10:03:23 -0500
Subject: [PATCH] join fix - disappered in commit + Switch traffic joins, because its faster - Tested in a productive system (MySQL 5.1) as query few tausend domains 1-3 sec for Webtraffic sort, faster SQL = faster and MySQL 5.5 is much faster with joins (standard is not sorted with slow traffic querys) -> slowest part is coping the tables into temp -> more tweeks on cache... -> faster by heavy use
---
interface/web/admin/users_del.php | 32 ++++++++++----------------------
1 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/interface/web/admin/users_del.php b/interface/web/admin/users_del.php
index 4fe36df..dfea889 100644
--- a/interface/web/admin/users_del.php
+++ b/interface/web/admin/users_del.php
@@ -1,6 +1,7 @@
<?php
+
/*
-Copyright (c) 2005, Till Brehm, projektfarm Gmbh
+Copyright (c) 2007, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
@@ -26,39 +27,26 @@
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
/******************************************
* Begin Form configuration
******************************************/
$list_def_file = "list/users.list.php";
+$tform_def_file = "form/users.tform.php";
/******************************************
* End Form configuration
******************************************/
-// Checke Berechtigungen f�r Modul
-if(!stristr($_SESSION["s"]["user"]["modules"],$_SESSION["s"]["module"]["name"])) {
- header("Location: ../index.php");
- exit;
-}
+require_once('../../lib/config.inc.php');
+require_once('../../lib/app.inc.php');
-include_once($list_def_file);
+//* Check permissions for module
+$app->auth->check_module_permissions('admin');
+if($conf['demo_mode'] == true && $_REQUEST['id'] <= 3) $app->error('This function is disabled in demo mode.');
-// ID importieren
-$id = intval($_REQUEST["id"]);
+$app->uses("tform_actions");
+$app->tform_actions->onDelete();
-if($id > 0) {
- if($_SESSION["s"]["user"]["typ"] == "admin") {
- $app->db->query("DELETE FROM ".$liste["table"]." WHERE ".$liste["table_idx"]." = $id");
- } else {
- $app->db->query("DELETE FROM ".$liste["table"]." WHERE ".$liste["table_idx"]." = $id and userid = ".$_SESSION["s"]["user"]["userid"]);
- }
-}
-
-
-header("Location: ".$liste["file"]."?PHPSESSID=".$_SESSION["s"]["id"]);
-exit;
?>
\ No newline at end of file
--
Gitblit v1.9.1