From 06034bcf6b0c7a6eb9ff9b38ba00e8cf66844c04 Mon Sep 17 00:00:00 2001 From: radiskull Date: Thu, 1 Sep 2011 19:17:51 +0000 Subject: [PATCH] Usergruppen Variablen umbenannt --- cronjob/gross_Turnier2.php | 4 ++-- cronjob/include/usergroup.inc.php | 15 ++++++++------- cronjob/training.php | 3 ++- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cronjob/gross_Turnier2.php b/cronjob/gross_Turnier2.php index 78cc776..20f66c1 100644 --- a/cronjob/gross_Turnier2.php +++ b/cronjob/gross_Turnier2.php @@ -117,8 +117,8 @@ distributeFruit($win_user['besitzer']); //Schutz vor automatischem löschen hinzufügen für den sieger :) $usergroups = getUserGroups($win_user['besitzer']); -if(!isUserInGroup($usergroups, inaktiv_loeschschutz) && !isUserInGroup($usergroups, aktiv_loeschschutz)) { - addUserToGroup($win_user['besitzer'], inaktiv_loeschschutz); +if(!isUserInGroup($usergroups, INAKTIV_LOESCHSCHUTZ) && !isUserInGroup($usergroups, AKTIV_LOESCHSCHUTZ)) { + addUserToGroup($win_user['besitzer'], INAKTIV_LOESCHSCHUTZ); } // Durchschnittslevel diff --git a/cronjob/include/usergroup.inc.php b/cronjob/include/usergroup.inc.php index e3c0c81..c0acdce 100644 --- a/cronjob/include/usergroup.inc.php +++ b/cronjob/include/usergroup.inc.php @@ -7,13 +7,14 @@ */ //Konstanten -define("admin", 1); -define("tester", 2); -define("entwickler", 3); -define("designer", 4); -define("Werbung_an", 5); -define("inaktiv_loeschschutz", 6); -define("aktiv_loeschschutz", 7); +define("ADMIN", 1); +define("TESTER", 2); +define("ENTWICKLER", 3); +define("DESIGNER", 4); +define("WERBUNG_AN", 5); +define("INAKTIV_LOESCHSCHUTZ", 6); +define("AKTIV_LOESCHSCHUTZ", 7); +define("AKTIV_CHAT", 8); include_once($_SERVER['DOCUMENT_ROOT'].'ag/include/parse.inc.php'); diff --git a/cronjob/training.php b/cronjob/training.php index 81ff9c6..a3855ec 100644 --- a/cronjob/training.php +++ b/cronjob/training.php @@ -9,6 +9,7 @@ $test = date("H"); include "db.php"; include_once ('inclu/messagefunctions.inc.php'); +include_once ('include/usergroup.inc.php'); include_once ('clanfights.inc.php'); if ($test == "02") { @@ -187,7 +188,7 @@ mysql_query('DELETE FROM user_activation where TIMESTAMPDIFF(day, registerdate, mysql_query('DELETE FROM anon_chatter WHERE TIMESTAMPDIFF(day, online, now()) > 35'); // 5 Wochen // Loesche inaktive user! -$sql = 'Select * from user where TIMESTAMPDIFF(week, online_zeit, now()) > 10 and id > 2 and id not in (SELECT user_id FROM user_gruppe_zuordnung WHERE gruppen_id = '.aktiv_loeschschutz.' AND user_id = id)'; +$sql = 'Select * from user where TIMESTAMPDIFF(week, online_zeit, now()) > 10 and id > 2 and id not in (SELECT user_id FROM user_gruppe_zuordnung WHERE gruppen_id = '.AKTIV_LOESCHSCHUTZ.' AND user_id = id)'; //echo $sql;