From: Roland Häder Date: Mon, 16 Mar 2009 18:43:54 +0000 (+0000) Subject: A lot rewrites from double-quote to single-quote, some fixes for extension handling... X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=a090e351c49fe021fb3064325694da03402332e0 A lot rewrites from double-quote to single-quote, some fixes for extension handling (still possibly broken) --- diff --git a/admin.php b/admin.php index abad82df30..29886806c5 100644 --- a/admin.php +++ b/admin.php @@ -37,23 +37,23 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module -$GLOBALS['module'] = "admin"; +$GLOBALS['module'] = 'admin'; $GLOBALS['output_mode'] = -1; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); // Is the script installed? if (isInstalled()) { // Is the admin logged-in and no sql_patches installed? - if ((IS_ADMIN()) && (!EXT_IS_ACTIVE("sql_patches"))) { + if ((IS_ADMIN()) && (!EXT_IS_ACTIVE('sql_patches'))) { // Extension 'sql_patches' is missing! LOAD_URL("modules.php?module=admin&sql_patches=1"); } else { @@ -62,7 +62,7 @@ if (isInstalled()) { } } else { // You have to install first! - LOAD_URL("install.php"); + LOAD_URL('install.php'); } // Really all done here... ;-) diff --git a/agb.php b/agb.php index 08c851751a..a05c889d0b 100644 --- a/agb.php +++ b/agb.php @@ -37,26 +37,26 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module -$GLOBALS['module'] = "agb"; +$GLOBALS['module'] = 'agb'; $GLOBALS['output_mode'] = -1; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); // Is the script installed? if (isInstalled()) { // Simply redirect... :-) - LOAD_URL("modules.php?module=index&what=agb"); + LOAD_URL('modules.php?module=index&what=agb'); } else { // You have to install first! - LOAD_URL("install.php"); + LOAD_URL('install.php'); } // Really all done here... ;-) diff --git a/beg.php b/beg.php index 6494eb4fe4..f849daf87e 100644 --- a/beg.php +++ b/beg.php @@ -37,29 +37,29 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" $GLOBALS['startTime'] = microtime(true); -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module -$GLOBALS['module'] = "beg"; +$GLOBALS['module'] = 'beg'; $GLOBALS['refid'] = 0; $GLOBALS['output_mode'] = -1; $msg = null; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); -// Is the "beg" extension active? -REDIRCT_ON_UNINSTALLED_EXTENSION("beg"); +// Is the 'beg' extension active? +REDIRCT_ON_UNINSTALLED_EXTENSION('beg'); // Is the script installed? if (isInstalled()) { // Check for userid - if (REQUEST_ISSET_GET(('uid'))) { + if (REQUEST_ISSET_GET('uid')) { // Init variables $uid = 0; $result = false; @@ -70,7 +70,7 @@ if (isInstalled()) { // Validate if it is not a number if ("".(REQUEST_GET('uid') + 0)."" !== "".REQUEST_GET('uid')."") { - if (EXT_IS_ACTIVE("nickname")) { + if (EXT_IS_ACTIVE('nickname')) { // Maybe we have found a nickname? $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", array(REQUEST_GET('uid')), __FILE__, __LINE__); @@ -104,7 +104,7 @@ if (isInstalled()) { $points = mt_rand((getConfig('beg_points') * 100000), (getConfig('beg_points_max') * 100000)) / 100000; // Set nickname / userid for the template(s - define('__BEG_UID' , REQUEST_GET(('uid'))); + define('__BEG_UID' , REQUEST_GET('uid')); define('__BEG_CLICKS', ($clicks + 1)); define('__BEG_BANNER', LOAD_TEMPLATE("beg_banner", true)); define('__BEG_POINTS', TRANSLATE_COMMA($points)); @@ -185,7 +185,7 @@ if (isInstalled()) { SQL_FREERESULT($result); // Include header - LOAD_INC_ONCE("inc/header.php"); + LOAD_INC_ONCE('inc/header.php'); // Load final template LOAD_TEMPLATE("beg_link"); @@ -205,7 +205,7 @@ if (isInstalled()) { } // Include footer - LOAD_INC_ONCE("inc/footer.php"); + LOAD_INC_ONCE('inc/footer.php'); } elseif (($status != "CONFIRMED") && ($status != "failed")) { // Maybe locked/unconfirmed account? $msg = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status); @@ -229,14 +229,14 @@ if (isInstalled()) { } // Reload to index module - if ((!empty($msg)) && (!empty($msg))) LOAD_URL("modules.php?module=index&msg=".$msg."&ext=beg"); + if ((!empty($msg)) && (!empty($msg))) LOAD_URL('modules.php?module=index&msg='.$msg.'&ext=beg'); } else { // No userid entered - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } } else { // You have to install first! - LOAD_URL("install.php"); + LOAD_URL('install.php'); } // Really all done here... ;-) diff --git a/birthday_confirm.php b/birthday_confirm.php index 69690c782a..3d71b7971e 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -37,21 +37,21 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module -$GLOBALS['module'] = "birthday_confirm"; +$GLOBALS['module'] = 'birthday_confirm'; $GLOBALS['output_mode'] = -1; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); -// Is the "birthday" extension active? -REDIRECT_ON_UNINSTALLED_EXTENSION("birthday"); +// Is the 'birthday' extension active? +REDIRECT_ON_UNINSTALLED_EXTENSION('birthday'); // Is the script installed? if (isInstalled()) { @@ -76,19 +76,19 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", $data = SQL_FETCHARRAY($result, false); // Is the account confirmed? - if ($data['status'] == "CONFIRMED") { + if ($data['status'] == 'CONFIRMED') { // Set mode depending on how many mails the member has to confirm $locked = false; - if (($data['ref_payout'] > 0) && (getConfig('allow_direct_pay') != "Y")) $locked = true; + if (($data['ref_payout'] > 0) && (getConfig('allow_direct_pay') != 'Y')) $locked = true; // Add points to account unset($GLOBALS['ref_level']); - ADD_POINTS_REFSYSTEM("birthday_confirm", $uid, $data['points'], false, "0", $locked, strtolower(getConfig('birthday_mode'))); + ADD_POINTS_REFSYSTEM('birthday_confirm', $uid, $data['points'], false, '0', $locked, strtolower(getConfig('birthday_mode'))); // Update mediadata if version is 0.0.4 or newer - if (GET_EXT_VERSION("mediadata") >= "0.0.4") { + if (GET_EXT_VERSION('mediadata') >= '0.0.4') { // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "add", $data['points']); + MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $data['points']); } // Remove entry from table @@ -102,7 +102,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", define('__GIFT' , TRANSLATE_COMMA($data['points'])); // Load message from template - define('__MSG', LOAD_TEMPLATE("birthday_msg", true)); + define('__MSG', LOAD_TEMPLATE('birthday_msg', true)); } else { // Unconfirmed / locked accounts cannot get points define('__MSG', sprintf(getMessage('BIRTHDAY_CANNOT_STATUS'), TRANSLATE_STATUS($data['status']))); @@ -116,25 +116,25 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", SQL_FREERESULT($result); // Set this because we have no module in URI - $GLOBALS['module'] = "birthday_confirm"; + $GLOBALS['module'] = 'birthday_confirm'; // Include header - LOAD_INC("inc/header.php"); + LOAD_INC('inc/header.php'); // Load birthday header template (for your banners, e.g.?) - define('__BIRTHDAY_HEADER', LOAD_TEMPLATE("birthday_header", true)); + define('__BIRTHDAY_HEADER', LOAD_TEMPLATE('birthday_header', true)); // Load birthday footer template (for your banners, e.g.?) - define('__BIRTHDAY_FOOTER', LOAD_TEMPLATE("birthday_footer", true)); + define('__BIRTHDAY_FOOTER', LOAD_TEMPLATE('birthday_footer', true)); // Load final template and output it - LOAD_TEMPLATE("birthday_confirm"); + LOAD_TEMPLATE('birthday_confirm'); // Include footer - LOAD_INC("inc/footer.php"); + LOAD_INC('inc/footer.php'); } else { // You have to install first! - LOAD_URL("install.php"); + LOAD_URL('install.php'); } // Really all done here... ;-) diff --git a/click.php b/click.php index e6108f118f..d5addc6764 100644 --- a/click.php +++ b/click.php @@ -37,33 +37,33 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module -$GLOBALS['module'] = "click"; +$GLOBALS['module'] = 'click'; $GLOBALS['output_mode'] = -1; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); if (((REQUEST_ISSET_GET(('user'))) || (REQUEST_ISSET_GET(('reseller')))) && (REQUEST_ISSET_GET(('banner')))) { // Update clicks counter... SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET clicks=clicks+1 WHERE id=%s LIMIT 1", array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { if (REQUEST_ISSET_GET(('user'))) { - LOAD_URL("ref.php?refid=".bigintval(REQUEST_GET('user'))); + LOAD_URL('ref.php?refid=' . bigintval(REQUEST_GET('user'))); } elseif (REQUEST_ISSET_GET(('reseller'))) { - LOAD_URL("shop_reseller.php?reseller=".bigintval(REQUEST_GET('reseller'))); + LOAD_URL('shop_reseller.php?reseller=' . bigintval(REQUEST_GET('reseller'))); } } // END - if } // END - if // Load index page -LOAD_URL("index.php"); +LOAD_URL('index.php'); // Shutdown shutdown(); diff --git a/confirm.php b/confirm.php index 36be7d0643..3ca3a5e3be 100644 --- a/confirm.php +++ b/confirm.php @@ -37,26 +37,26 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module to confirm -$GLOBALS['module'] = "confirm"; +$GLOBALS['module'] = 'confirm'; $GLOBALS['output_mode'] = -1; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); // Is the script installed? if ((isInstalled()) && (isAdminRegistered())) { // Base URL for redirection - $URL = "modules.php?module=index&what=confirm&hash="; + $URL = 'modules.php?module=index&what=confirm&hash='; if (!REQUEST_ISSET_GET(('hash'))) { // No refid and we add our refid (don't forget to set $def_refid!) - $URL = "modules.php?module=index"; + $URL = 'modules.php?module=index'; } else { // We have an refid here. So we simply add it $URL .= REQUEST_GET('hash'); @@ -66,7 +66,7 @@ if ((isInstalled()) && (isAdminRegistered())) { LOAD_URL($URL); } else { // You have to install first! - LOAD_URL("install.php"); + LOAD_URL('install.php'); } // Really all done here... ;-) diff --git a/css.php b/css.php index 072d4020ea..3babf5ce26 100644 --- a/css.php +++ b/css.php @@ -37,33 +37,33 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Footer is disabled in CSS mode $GLOBALS['footer_sent'] = "-1"; // Init variables -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // This is a CSS file loader! -$GLOBALS['output_mode'] = "1"; -$GLOBALS['module'] = "css"; +$GLOBALS['output_mode'] = '1'; +$GLOBALS['module'] = 'css'; // Set header -header("Content-type: text/css"); +header('Content-type: text/css'); // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); // Load header -LOAD_INC("inc/header.php"); +LOAD_INC('inc/header.php'); // Load CSS code -LOAD_INC("inc/stylesheet.php"); +LOAD_INC('inc/stylesheet.php'); // Load footer -LOAD_INC("inc/footer.php"); +LOAD_INC('inc/footer.php'); // ?> diff --git a/debug.php b/debug.php index 59a1c0e0aa..39248d2dfd 100644 --- a/debug.php +++ b/debug.php @@ -37,23 +37,23 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module and fake "CSS mode" -$GLOBALS['module'] = "debug"; +$GLOBALS['module'] = 'debug'; $GLOBALS['output_mode'] = -1; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); // Redirect only to registration page when this script is installed if ((isInstalled()) && (getTotalFatalErrors() == 0)) { // Is the extension installed? - if (!EXT_IS_ACTIVE("debug")) { + if (!EXT_IS_ACTIVE('debug')) { // Then abort here shutdown(); } // END - if @@ -74,19 +74,19 @@ if ((isInstalled()) && (getTotalFatalErrors() == 0)) { LOAD_INC($INC); } else { // Missing request file, may happen while development - DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_404", REQUEST_POST('request')); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', REQUEST_POST('request')); } } else { // Unhandled request detected - DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_unhandled", REQUEST_POST('request')); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', REQUEST_POST('request')); } } else { // Empty request - DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_empty", ""); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_empty', ''); } } else { // Not installed or fatal errors - DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_fatal", getTotalFatalErrors()); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_fatal', getTotalFatalErrors()); } // END - if // Really all done here... ;-) diff --git a/doubler.php b/doubler.php index 8f147a4996..189925ac4c 100644 --- a/doubler.php +++ b/doubler.php @@ -37,23 +37,23 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" $GLOBALS['startTime'] = microtime(true); -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module -$GLOBALS['module'] = "doubler"; +$GLOBALS['module'] = 'doubler'; $GLOBALS['refid'] = 0; $GLOBALS['output_mode'] = 0; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); -// Is the "doubler" extension active? -REDIRECT_ON_UNINSTALLED_EXTENSION("doubler"); +// Is the 'doubler' extension active? +REDIRECT_ON_UNINSTALLED_EXTENSION('doubler'); // Is the script installed? if (isInstalled()) { @@ -63,7 +63,7 @@ if (isInstalled()) { // Only check this if refid is provided! if ($GLOBALS['refid'] > 0) { // Probe for nickname extension and if a nickname was supplied by URL - $probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round($GLOBALS['refid'])."") != $GLOBALS['refid'])); + $probe_nickname = ((EXT_IS_ACTIVE('nickname')) && ((''.round($GLOBALS['refid']).'') != $GLOBALS['refid'])); // Do we have nickname or userid set? if ($probe_nickname) { @@ -90,7 +90,7 @@ if (isInstalled()) { // If no account was found set default refid and status to CONFIRMED if (empty($GLOBALS['refid'])) { $GLOBALS['refid'] = getConfig('def_refid'); - $status = "CONFIRMED"; + $status = 'CONFIRMED'; } // END - if // Begin with doubler script... @@ -101,7 +101,7 @@ if (isInstalled()) { // Begin with doubling process if ((REQUEST_ISSET_POST(('userid'))) && (REQUEST_ISSET_POST(('pass'))) && (REQUEST_ISSET_POST(('points')))) { // Probe for nickname extension and if a nickname was entered - $probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round(REQUEST_POST('userid'))."") != REQUEST_POST('userid'))); + $probe_nickname = ((EXT_IS_ACTIVE('nickname')) && ((''.round(REQUEST_POST('userid')).'') != REQUEST_POST('userid'))); if ($probe_nickname) { // Nickname in URL, so load the ID $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", @@ -126,12 +126,12 @@ if (isInstalled()) { $probe_points = ((REQUEST_POST('points') >= getConfig('doubler_min')) && (REQUEST_POST('points') <= getConfig('doubler_max'))); // Check all together - if ((!empty($uid)) && ($password == generateHash(REQUEST_POST('pass'), substr($password, 0, -40))) && ($status == "CONFIRMED") && ($probe_points)) { + if ((!empty($uid)) && ($password == generateHash(REQUEST_POST('pass'), substr($password, 0, -40))) && ($status == 'CONFIRMED') && ($probe_points)) { // Nickname resolved to a unique userid or direct userid entered by the member $GLOBALS['doubler_uid'] = $uid; // Calulcate points - $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points"); + $points = GET_TOTAL_DATA($uid, 'user_points', 'points') - GET_TOTAL_DATA($uid, 'user_data', 'used_points'); // So let's continue with probing his points amount if (($points - getConfig('doubler_left') - REQUEST_POST('points') * getConfig('doubler_charge')) >= 0) @@ -141,11 +141,11 @@ if (isInstalled()) { array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__); // Subtract entered points - SUB_POINTS("doubler", $uid, REQUEST_POST('points')); + SUB_POINTS('doubler', $uid, REQUEST_POST('points')); // Add points to "total payed" including charge $points = REQUEST_POST('points') - REQUEST_POST('points') * getConfig('doubler_charge'); - UPDATE_CONFIG("doubler_points", $points, "+"); + UPDATE_CONFIG('doubler_points', $points, '+'); incrementConfigEntry('doubler_points', $points); // Add second line for the referal but only when uid != refid @@ -161,21 +161,21 @@ if (isInstalled()) { } // END - if // Update usage counter - UPDATE_CONFIG("doubler_counter", 1, "+"); + UPDATE_CONFIG('doubler_counter', 1, '+'); // Set constant - define('__DOUBLER_MSG', LOAD_TEMPLATE("doubler_reflink", true, REQUEST_POST('userid'))); + define('__DOUBLER_MSG', LOAD_TEMPLATE('doubler_reflink', true, REQUEST_POST('userid'))); } else { // Not enougth points left define('__ERROR_MSG', getMessage('DOUBLER_FORM_NO_POINTS_LEFT')); } - } elseif ($status == "CONFIRMED") { + } elseif ($status == 'CONFIRMED') { // Account is unconfirmed! define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS')); - } elseif ($status == "UNCONFIRMED") { + } elseif ($status == 'UNCONFIRMED') { // Account is unconfirmed! define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED')); - } elseif ($status == "LOCKED") { + } elseif ($status == 'LOCKED') { // Account is locked by admin / holiday! define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED')); } elseif (REQUEST_POST('points') < getConfig('doubler_min')) { @@ -204,21 +204,21 @@ if (isInstalled()) { } // Set messages to nothing - if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', ""); - if (!defined('__ERROR_MSG')) define('__ERROR_MSG' , ""); + if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', ''); + if (!defined('__ERROR_MSG')) define('__ERROR_MSG' , ''); // Shall I check for points immediately? - if (getConfig('doubler_send_mode') == "DIRECT") LOAD_INC("inc/doubler_send.php"); + if (getConfig('doubler_send_mode') == 'DIRECT') LOAD_INC('inc/doubler_send.php'); // Output header - LOAD_INC("inc/header.php"); + LOAD_INC('inc/header.php'); // Banner in text - define('__DOUBLER_BANNER', LOAD_TEMPLATE("doubler_banner", true)); + define('__DOUBLER_BANNER', LOAD_TEMPLATE('doubler_banner', true)); // Load header/footer templates - define('__DOUBLER_HEADER', LOAD_TEMPLATE("doubler_header", true)); - define('__DOUBLER_FOOTER', LOAD_TEMPLATE("doubler_footer", true)); + define('__DOUBLER_HEADER', LOAD_TEMPLATE('doubler_header', true)); + define('__DOUBLER_FOOTER', LOAD_TEMPLATE('doubler_footer', true)); if (!empty($uid)) { // Transfer userid/nickname to constant @@ -236,7 +236,7 @@ if (isInstalled()) { define('__MAX_VALUE' , TRANSLATE_COMMA(getConfig('doubler_max'))); // Text "Enter login" - if (EXT_IS_ACTIVE("nickname")) { + if (EXT_IS_ACTIVE('nickname')) { // Choose login/nickname define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME')); } else { @@ -247,17 +247,17 @@ if (isInstalled()) { // Which mail-send-mode did the admin setup? switch (getConfig('doubler_send_mode')) { - case "DIRECT": + case 'DIRECT': define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT')); break; - case "RESET": + case 'RESET': define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET')); break; } // Generate table with already payed out doubles - define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE("0", "Y", "N", "DESC")); + define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC')); // Generate timemark define('__TIMEOUT_MARK', CREATE_FANCY_TIME(getConfig('doubler_timeout'))); @@ -269,13 +269,13 @@ if (isInstalled()) { define('__LEFT_VALUE', TRANSLATE_COMMA(DOUBLER_GET_TOTAL_POINTS_LEFT())); // Output neccessary form for this - LOAD_TEMPLATE("doubler_index"); + LOAD_TEMPLATE('doubler_index'); // Output footer - LOAD_INC("inc/footer.php"); + LOAD_INC('inc/footer.php'); } else { // You have to install first! - LOAD_URL("install.php"); + LOAD_URL('install.php'); } // Really all done here... ;-) diff --git a/img.php b/img.php index 46d8eb651d..cac96c6648 100644 --- a/img.php +++ b/img.php @@ -37,23 +37,23 @@ ************************************************************************/ // Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) ) -require("inc/libs/security_functions.php"); +require('inc/libs/security_functions.php'); // Init "action" and "what" -$GLOBALS['what'] = ""; -$GLOBALS['action'] = ""; +$GLOBALS['what'] = ''; +$GLOBALS['action'] = ''; // Set module -$GLOBALS['module'] = "img"; +$GLOBALS['module'] = 'img'; $GLOBALS['output_mode'] = -1; // Load the required file(s) -require("inc/config.php"); +require('inc/config.php'); // Script installed? if (isInstalled()) { // Load header - LOAD_INC_ONCE("inc/header.php"); + LOAD_INC_ONCE('inc/header.php'); // Code set? if (REQUEST_ISSET_GET(('code'))) { @@ -73,10 +73,10 @@ if (isInstalled()) { } // Finish generation here - LOAD_INC_ONCE("inc/footer.php"); + LOAD_INC_ONCE('inc/footer.php'); } else { // You have to install first! - LOAD_URL("install.php"); + LOAD_URL('install.php'); } // Really all done here... ;-) diff --git a/inc/autopurge.php b/inc/autopurge.php index d824f93912..5ddf9941a7 100644 --- a/inc/autopurge.php +++ b/inc/autopurge.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { // Init & set the include pool INIT_INC_POOL(); -SET_INC_POOL(GET_DIR_AS_ARRAY("inc/autopurge/", "purge-")); +SET_INC_POOL(GET_DIR_AS_ARRAY('inc/autopurge/', 'purge-')); // Run the filter runFilterChain('load_includes'); diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php index dc3454f566..4129c58c99 100644 --- a/inc/autopurge/purge-general.php +++ b/inc/autopurge/purge-general.php @@ -44,12 +44,12 @@ if (!defined('__SECURITY')) { } // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) { +if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) { // Abort here return false; } -if ((getConfig('auto_purge_active') == "Y") && (getConfig('auto_purge') > 0)) { +if ((getConfig('auto_purge_active') == 'Y') && (getConfig('auto_purge') > 0)) { // Init SQLs INIT_SQLS(); @@ -105,7 +105,7 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", SQL_FREERESULT($result); // Is the 'bonus' extension installed and activated? - if (EXT_IS_ACTIVE("bonus", true)) { + if (EXT_IS_ACTIVE('bonus', true)) { // Check for bonus campaigns $result = SQL_QUERY_ESC("SELECT id, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE data_type='SEND' AND timestamp <= %s ORDER BY `id`", array(bigintval($PURGE)), __FILE__, __LINE__); diff --git a/inc/autopurge/purge-inact.php b/inc/autopurge/purge-inact.php index e555678268..c5dca29141 100644 --- a/inc/autopurge/purge-inact.php +++ b/inc/autopurge/purge-inact.php @@ -43,13 +43,13 @@ if (!defined('__SECURITY')) { } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) { +if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) { // Abort here return false; } // END - if // Shall I look for inactive accounts and autopurge inactive accounts? -if (getConfig('autopurge_inactive') == "Y") { +if (getConfig('autopurge_inactive') == 'Y') { // Init SQLs INIT_SQLS(); @@ -57,18 +57,18 @@ if (getConfig('autopurge_inactive') == "Y") { $since = getConfig(('ap_inactive_since')); // Init exclusion list - $EXCLUDE_LIST = ""; + $EXCLUDE_LIST = ''; if (getConfig('def_refid') > 0) { $EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid'); } // END - if // Check for more extensions - if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid').""; - if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid').""; - if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid').""; + if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid').""; + if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid').""; + if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid').""; // Check for new holiday extension - if (GET_EXT_VERSION("holiday") >= "0.1.3") { + if (GET_EXT_VERSION('holiday') >= '0.1.3') { // Include only users with no active holiday $EXCLUDE_LIST .= " AND d.holiday_active='N'"; } // END - if @@ -82,7 +82,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); if (SQL_NUMROWS($result_inactive) > 0) { // Prepare variables and constants... - $UIDs = ""; + $UIDs = ''; define('__INACTIVE_SINCE', (getConfig('ap_inactive_since') / 60 / 60)); define('__INACTIVE_TIME' , (getConfig('ap_in_time') / 60 / 60)); @@ -107,7 +107,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); // Send mail notification to admin - SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_INACTIVE_SUBJECT'), "admin_autopurge_inactive", $UIDs, ""); + SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_INACTIVE_SUBJECT'), "admin_autopurge_inactive", $UIDs, ''); } // END - if // Free memory @@ -124,7 +124,7 @@ ORDER BY userid", array($since, $since, $time), __FILE__, __LINE__); if (SQL_NUMROWS($result_inactive) > 0) { // Prepare variable... - $UIDs = ""; + $UIDs = ''; // Delete inactive accounts while ($content = SQL_FETCHARRAY($result_inactive)) { @@ -135,15 +135,15 @@ ORDER BY userid", $content['last_online'] = MAKE_DATETIME($content['last_online'], "0"); // Finnaly delete this inactive account - DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_delete", $content['last_online'], "")); + DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_delete", $content['last_online'], '')); } // END - while // Remove last comma $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); // Send mail notification to admin - if (getConfig('ap_in_notify') == "Y") { - SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_DELETE_SUBJECT'), "admin_autopurge_delete", $UIDs, ""); + if (getConfig('ap_in_notify') == 'Y') { + SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_DELETE_SUBJECT'), "admin_autopurge_delete", $UIDs, ''); } // END - if } // END - if diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php index 389c9279dd..a592cc5a7d 100644 --- a/inc/autopurge/purge-mails.php +++ b/inc/autopurge/purge-mails.php @@ -43,13 +43,13 @@ if (!defined('__SECURITY')) { } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) { +if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) { // Abort here return false; } // END - if // Search for mails from deleted members? -if (getConfig('ap_del_mails') == "Y") { +if (getConfig('ap_del_mails') == 'Y') { // Okay, let's check for them... $since = getConfig(('ap_dm_timeout')); $result_mails = SQL_QUERY_ESC("SELECT sender @@ -122,9 +122,9 @@ ORDER BY sender ASC", SQL_FREERESULT($result_mails); // Do we have deleted mails and the admin want's to receive a notification - if (($DELETED > 0) && (getConfig('ap_dm_notify') == "Y")) { + if (($DELETED > 0) && (getConfig('ap_dm_notify') == 'Y')) { // Send out email to admin - SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT'), "admin_autopurge_del_mails", $DELETED, ""); + SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT'), "admin_autopurge_del_mails", $DELETED, ''); } // END - if } diff --git a/inc/autopurge/purge-tsks.php b/inc/autopurge/purge-tsks.php index 8ef2be43f5..a27bc73cb7 100644 --- a/inc/autopurge/purge-tsks.php +++ b/inc/autopurge/purge-tsks.php @@ -43,13 +43,13 @@ if (!defined('__SECURITY')) { } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) { +if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) { // Abort here return false; } // END - if // Check version (must be > 0.0) -if ((GET_EXT_VERSION("task") > "0.0") && (getConfig('ap_tasks') == "Y")) { +if ((GET_EXT_VERSION('task') > '0.0') && (getConfig('ap_tasks') == 'Y')) { // Since when shall we purge? $since = getConfig(('ap_tasks_time')); @@ -63,9 +63,9 @@ WHERE `status`='DELETED' AND task_created <= (UNIX_TIMESTAMP() - %s)", $DELETED = SQL_AFFECTEDROWS(); // Do we need to send a notification? - if (($DELETED > 0) && (getConfig('ap_tasks_notify') == "Y")) { + if (($DELETED > 0) && (getConfig('ap_tasks_notify') == 'Y')) { // Send out email to admin - SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_TASKS_SUBJECT'), "admin_autopurge_tsks", $DELETED, ""); + SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_TASKS_SUBJECT'), "admin_autopurge_tsks", $DELETED, ''); } // END - if } // END - if diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php index 6066b60985..b029147dcf 100644 --- a/inc/autopurge/purge-unconfirmed.php +++ b/inc/autopurge/purge-unconfirmed.php @@ -43,13 +43,13 @@ if (!defined('__SECURITY')) { } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) { +if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) { // Abort here return false; } // END - if // Shall I auto-purge unconfirmed accounts? -if (getConfig('autopurge_unconfirmed') == "Y") { +if (getConfig('autopurge_unconfirmed') == 'Y') { // Init variables and find unconfirmed accounts which I shall auto-purge $time = getConfig(('ap_un_time')); $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined @@ -59,7 +59,7 @@ ORDER BY userid ASC", array($time), __FILE__, __LINE__); if (SQL_NUMROWS($result_uncon) > 0) { // Prepare variable... - $UIDs = ""; + $UIDs = ''; define('__UNCONFIRMED_TIME' , (getConfig('ap_un_time') / 60 / 60)); // Delete inactive accounts @@ -71,15 +71,15 @@ ORDER BY userid ASC", $content['joined'] = MAKE_DATETIME($content['joined'], "0"); // Finnaly delete this inactive account - DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $content['joined'], "")); + DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $content['joined'], '')); } // END - while // Remove last comma $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); // Send mail notification to admin - if (getConfig('ap_un_notify') == "Y") { - SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT'), "admin_autopurge_unconfirmed", $UIDs, ""); + if (getConfig('ap_un_notify') == 'Y') { + SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT'), "admin_autopurge_unconfirmed", $UIDs, ''); } // END - if } // END - if diff --git a/inc/config-functions.php b/inc/config-functions.php index 66ae2e02f6..b977e2af62 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -127,10 +127,10 @@ function loadConfiguration ($no="0") { } // END - foreach // Count cache hits if exists - if ((isset($_CONFIG['cache_hits'])) && (EXT_IS_ACTIVE("cache"))) { + if ((isset($_CONFIG['cache_hits'])) && (EXT_IS_ACTIVE('cache'))) { $_CONFIG['cache_hits']++; } // END - if - } elseif ((!EXT_IS_ACTIVE("cache")) || (!isset($GLOBALS['cache_array']['config'][$no]))) { + } elseif ((!EXT_IS_ACTIVE('cache')) || (!isset($GLOBALS['cache_array']['config'][$no]))) { // Load config from DB $result_config = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_config` WHERE config=%d LIMIT 1", array(bigintval($no)), __FUNCTION__, __LINE__); diff --git a/inc/databases.php b/inc/databases.php index 7aac6dd321..8e7f98bf0c 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -111,7 +111,7 @@ define('CACHE_BUSTER', mt_rand(1000000, 9999999)); define('DEBUG_SQL', false); // Extra title is empty by default -$EXTRA_TITLE = ""; +$EXTRA_TITLE = ''; // ?> diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index e0c63d2f01..5346e70595 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -90,7 +90,7 @@ Query string:
fwrite($fp, "Module=".$GLOBALS['module']."\n"); $GLOBALS['sql_first_entry'] = true; } // END - if - fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace('\r', "", str_replace('\n', " ", $sql_string))."\n"); + fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace('\r', '', str_replace('\n', " ", $sql_string))."\n"); fclose($fp); } // END - if @@ -212,12 +212,12 @@ function SQL_CLOSE ($F, $L) { // Do we need to update cache/db counter? //* DEBUG: */ echo "DB=".getConfig('db_hits').",CACHE=".getConfig('cache_hits')."
\n"; - if ((GET_EXT_VERSION("cache") >= "0.0.7") && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (isCacheInstanceValid())) { + if ((GET_EXT_VERSION('cache') >= '0.0.7') && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (isCacheInstanceValid())) { // Add new hits incrementConfigEntry('db_hits', getConfig('db_hits_run')); // Update counter for db/cache - UPDATE_CONFIG(array("db_hits", "cache_hits"), array(getConfig(('db_hits')), getConfig(('cache_hits')))); + UPDATE_CONFIG(array('db_hits', 'cache_hits'), array(getConfig(('db_hits')), getConfig(('cache_hits')))); } // END - if // Close database link and forget the link @@ -274,7 +274,7 @@ function SQL_QUERY_ESC ($qstring, $data, $F, $L, $run=true, $strip=true, $secure // Debugging // //* DEBUG: */ $fp = fopen(constant('PATH')."inc/cache/escape_debug.log", 'a') or app_die(__FILE__, __LINE__, "Cannot write debug.log!"); - //* DEBUG: */ fwrite($fp, $F."(".$L."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n"); + //* DEBUG: */ fwrite($fp, $F."(".$L."): ".str_replace("\r", '', str_replace("\n", " ", $eval))."\n"); //* DEBUG: */ fclose($fp); // Run the code @@ -356,12 +356,12 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { // Extract table name $tableArray = explode(" ", $sql); - $tableName = str_replace("`", "", $tableArray[2]); + $tableName = str_replace("`", '', $tableArray[2]); // Shall we add/drop? if (((ereg("ADD", $sql)) || (ereg("DROP", $sql))) && ($noIndex)) { // And column name as well - $columnName = str_replace("`", "", $tableArray[4]); + $columnName = str_replace("`", '', $tableArray[4]); // Get column information $result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'", @@ -379,7 +379,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Skipped FULLTEXT: sql=%s,file=%s,line=%s", $sql, $F, $L)); } elseif (!$noIndex) { // And column name as well - $columnName = str_replace("`", "", $tableArray[4]); + $columnName = str_replace("`", '', $tableArray[4]); // Is this "UNIQUE" or so? FULLTEXT has been handled the elseif() block above if (in_array(strtoupper($columnName), array("INDEX", "UNIQUE", "KEY", "FULLTEXT"))) { @@ -387,11 +387,11 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { $begin = 1; $columnName = ","; while (strpos($columnName, ",") !== false) { // Use last - $columnName = str_replace("`", "", $tableArray[count($tableArray) - $begin]); + $columnName = str_replace("`", '', $tableArray[count($tableArray) - $begin]); //* DEBUG: */ print __LINE__.":".$columnName."----------------".$begin."
\n"; // Remove brackes - $columnName = str_replace("(", "", str_replace(")", "", $columnName)); + $columnName = str_replace("(", '', str_replace(")", '', $columnName)); //* DEBUG: */ print __LINE__.":".$columnName."----------------".$begin."
\n"; // Continue diff --git a/inc/doubler_send.php b/inc/doubler_send.php index 8aceddd494..1ba26c71d3 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -55,7 +55,7 @@ if ($DOUBLER_POINTS == 0) { // If not currently doubled set it to zero unset($_GET['DOUBLER_UID']); unset($_POST['DOUBLER_UID']); -set_session('DOUBLER_UID', ""); +set_session('DOUBLER_UID', ''); if (empty($GLOBALS['doubler_uid'])) $GLOBALS['doubler_uid'] = 0; // Check for doubles which we can pay out @@ -77,17 +77,17 @@ ORDER BY d.timemark LIMIT %d", array($DOUBLER_POINTS, $min, getConfig('doubler_max_sent')), __FILE__, __LINE__); // Do we have entries found? -if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) || ((SQL_NUMROWS($result_main) == getConfig('doubler_group_sent')) && (getConfig('doubler_sent_all') != "Y"))) { +if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) || ((SQL_NUMROWS($result_main) == getConfig('doubler_group_sent')) && (getConfig('doubler_sent_all') != "Y"))) { // Switch to matching SQL resource $result_load = $result_main; - if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) $result_load = $result_total; + if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) $result_load = $result_total; // At least one account was found while ($content = SQL_FETCHARRAY($result_load)) { // Only double when points are enougth! if ($DOUBLER_POINTS >= $content['points']) { // Check for his ref points - $ref = GET_TOTAL_DATA($content['userid'], "doubler", "points", "refid", false, " AND completed='N' AND is_ref='Y'"); + $ref = GET_TOTAL_DATA($content['userid'], 'doubler', 'points', 'refid', false, " AND completed='N' AND is_ref='Y'"); // Zero refid when empty (might be helpful!) if (empty($ref)) $ref = 0; @@ -113,7 +113,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) $okay = false; // Check for jackpot inclusion in doubling process - if (($jackpot > 0) && ($jackpot >= $content['points']) && (getConfig('doubler_jackpot') == "Y")) { + if (($jackpot > 0) && ($jackpot >= $content['points']) && (getConfig('doubler_jackpot') == 'Y')) { // Subtract points from jackpot SUB_JACKPOT($content['points']); $jackpot -= $content['points']; diff --git a/inc/extensions.php b/inc/extensions.php index 2ef4bb88fd..18650ab5e0 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -113,7 +113,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = "", $EXT_VER = "", $dry_run require($FQFN); // Is this extension deprecated? - if (EXT_GET_DEPRECATED() == "Y") { + if (EXT_GET_DEPRECATED() == 'Y') { // Deactivate the extension DEACTIVATE_EXTENSION($ext_name); @@ -184,7 +184,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr // Does this extension exists? //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME().""); - if (LOAD_EXTENSION(EXT_GET_CURR_NAME(), "register", "", $dry_run)) { + if (LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'register', '', $dry_run)) { // Set current extension name again EXT_SET_CURR_NAME($ext_name); @@ -194,7 +194,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr foreach ($history as $ver) { //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name=".EXT_GET_CURR_NAME().", ext_ver={$ver}"); // Load extension in update mode - LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $ver, $dry_run); + LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'update', $ver, $dry_run); // Add update notes to our output ADD_EXTENSION_NOTES($ver); @@ -209,7 +209,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr EXT_INCREMENT_UPDATE_INTERATOR(); // Check for required file - if (LOAD_EXTENSION($ext_update, "register", "", $dry_run)) { + if (LOAD_EXTENSION($ext_update, 'register', '', $dry_run)) { // Set current extension name again EXT_SET_CURR_NAME($ext_name); @@ -255,7 +255,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr } // END - if // Switch back to register mode - $EXT_LOAD_MODE = "register"; + $EXT_LOAD_MODE = 'register'; // Remains true if extension registration reports no failures //* DEBUG: */ print __FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME().":"; var_dump($test); @@ -275,6 +275,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr runFilterChain('pre_extension_installed', array('dry_run' => $dry_run)); // Register extension + //* DEBUG: */ print __FUNCTION__."[".__LINE__."]:insert=".EXT_GET_CURR_NAME()."/".EXT_GET_VERSION()." - INSERT!
\n"; SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_extensions` (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')", array(EXT_GET_CURR_NAME(), EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FUNCTION__, __LINE__); @@ -320,7 +321,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr // Is this the sql_patches? //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":".EXT_GET_CURR_NAME()."/{$EXT_LOAD_MODE}"); - if ((EXT_GET_CURR_NAME() == "sql_patches") && (($EXT_LOAD_MODE == "register") || ($EXT_LOAD_MODE == "remove")) && (!$dry_run) && ($test)) { + if ((EXT_GET_CURR_NAME() == 'sql_patches') && (($EXT_LOAD_MODE == 'register') || ($EXT_LOAD_MODE == 'remove')) && (!$dry_run) && ($test)) { //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": LOAD!"); if ($logout === true) { // Then redirect to logout @@ -364,7 +365,7 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) { // Load extension in detected mode //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]=".EXT_GET_CURR_NAME().""); - LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, "", false); + LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, '', false); // Init these SQLs INIT_SQLS(); @@ -376,7 +377,7 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) { runFilterChain('run_sqls'); // Removal mode? - if ($load_mode == "remove") { + if ($load_mode == 'remove') { // Delete this extension (remember to remove it from your server *before* you click on welcome! SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", array(EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__); @@ -384,14 +385,14 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) { } // END - if // Remove cache file(s) if extension is active - if (((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($load_mode == "activate") || ($load_mode == "deactivate"))) { + if (((EXT_IS_ACTIVE('cache')) || (GET_EXT_VERSION('cache') != "")) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($load_mode == 'activate') || ($load_mode == 'deactivate'))) { // Run filters runFilterChain('post_extension_run_sql', EXT_GET_CURR_NAME()); } // END - if // Is this the sql_patches? //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": id=".$ext_id.",currName=".EXT_GET_CURR_NAME().",loadMode=".$load_mode); - if ((EXT_GET_CURR_NAME() == "sql_patches") && (($load_mode == "register") || ($load_mode == "remove"))) { + if ((EXT_GET_CURR_NAME() == 'sql_patches') && (($load_mode == 'register') || ($load_mode == 'remove'))) { // Then redirect to logout //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": LOAD!"); LOAD_URL("modules.php?module=admin&logout=1&".$load_mode."=sql_patches"); @@ -417,7 +418,7 @@ function EXT_IS_ACTIVE ($ext_name) { } elseif (isset($GLOBALS['ext_loaded'][$ext_name])) { // @TODO Extension is loaded, what next? app_die(__FUNCTION__, __LINE__, "LOADED:$ext_name"); - } elseif (($ext_name == "cache") || (GET_EXT_VERSION("cache") == "")) { + } elseif (($ext_name == 'cache') || (GET_EXT_VERSION('cache') == "")) { //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "DB! ext_name={$ext_name}"); // Load from database $result = SQL_QUERY_ESC("SELECT ext_active FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", @@ -445,7 +446,7 @@ function EXT_IS_ACTIVE ($ext_name) { //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, " ext_name={$ext_name},active={$active}"); // Is this extension activated? (For admins we always have active extensions...) - return ($active == "Y"); + return ($active == 'Y'); } // Get version from extensions function GET_EXT_VERSION ($ext_name) { @@ -508,7 +509,7 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { INIT_INC_POOL(); // Load extension in test mode - LOAD_EXTENSION($ext_name, "test", $ext_ver, $dry_run); + LOAD_EXTENSION($ext_name, 'test', $ext_ver, $dry_run); // Save version history $history = EXT_GET_VER_HISTORY(); @@ -527,7 +528,7 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()] = $history[$idx]; // Load again... - LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run); + LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'update', $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run); if (EXT_GET_UPDATE_DEPENDS() != "") { // Is the extension there? @@ -593,10 +594,10 @@ function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = "", $dashed = "", // Init variables $SW = 2; $i = 1; - $OUT = ""; + $OUT = ''; // Do we have queries? - if ((IS_SQLS_VALID()) && (GET_EXT_VERSION("sql_patches") >= "0.0.7") && (getConfig('verbose_sql') == "Y")) { + if ((IS_SQLS_VALID()) && (GET_EXT_VERSION('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) { foreach (GET_SQLS() as $idx => $sql) { // Trim out spaces $sql = trim($sql); @@ -629,9 +630,9 @@ function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = "", $dashed = "", // Load main template $OUT = LOAD_TEMPLATE("admin_ext_sql_table", true, $content); - } elseif ((GET_EXT_VERSION("sql_patches") >= "0.0.7") && (getConfig('verbose_sql') == "Y")) { + } elseif ((GET_EXT_VERSION('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) { // No addional SQL commands to run - $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('ADMIN_NO_ADDITIONAL_SQLS')); + $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_ADDITIONAL_SQLS')); } // END - if // Return output @@ -641,7 +642,7 @@ function EXTENSION_VERBOSE_TABLE ($queries = array(), $title = "", $dashed = "", // Get extension name from id function GET_EXT_NAME ($ext_id) { // Init extension name - $ret = ""; + $ret = ''; // Is cache there? if (isset($GLOBALS['cache_array']['extensions']['ext_name'][$ext_id])) { @@ -650,7 +651,7 @@ function GET_EXT_NAME ($ext_id) { // Count cache hits incrementConfigEntry('cache_hits'); - } elseif (!EXT_IS_ACTIVE("cache")) { + } elseif (!EXT_IS_ACTIVE('cache')) { // Load from database $result = SQL_QUERY_ESC("SELECT ext_name FROM `{!_MYSQL_PREFIX!}_extensions` WHERE id=%s LIMIT 1", array(bigintval($ext_id)), __FUNCTION__, __LINE__); @@ -670,7 +671,7 @@ function GET_EXT_ID ($ext_name) { // Count cache hits incrementConfigEntry('cache_hits'); - } elseif (!EXT_IS_ACTIVE("cache")) { + } elseif (!EXT_IS_ACTIVE('cache')) { // Load from database $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name='%s' LIMIT 1", array($ext_name), __FUNCTION__, __LINE__); @@ -691,7 +692,7 @@ function ACTIVATE_EXTENSION ($ext_name) { // Extension has been activated? if (SQL_AFFECTEDROWS() == 1) { // Then run all queries - EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), "activate"); + EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), 'activate'); } // END - if } @@ -704,7 +705,7 @@ function DEACTIVATE_EXTENSION($ext_name) { // Extension has been activated? if (SQL_AFFECTEDROWS() == 1) { // Then run all queries - EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), "deactivate"); + EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), 'deactivate'); // Create new task CREATE_EXTENSION_DEACTIVATION_TASK($ext_name); @@ -724,8 +725,8 @@ function EXT_VERSION_IS_OLDER ($ext_name, $ext_ver) { $currVersion = GET_EXT_VERSION($ext_name); // Remove all dots from both versions - $currVersion = str_replace(".", "", $currVersion); - $ext_ver = str_replace(".", "", $ext_ver); + $currVersion = str_replace(".", '', $currVersion); + $ext_ver = str_replace(".", '', $ext_ver); // Now compare both and return the result return ($currVersion < $ext_ver); @@ -805,22 +806,22 @@ function MODULE_HAS_MENU ($mod, $forceDb = false) { // All is false by default $ret = false; - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "mod={$mod},cache=".GET_EXT_VERSION("cache")); - if (GET_EXT_VERSION("cache") >= "0.1.2") { + //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "mod={$mod},cache=".GET_EXT_VERSION('cache')); + if (GET_EXT_VERSION('cache') >= '0.1.2') { // Cache version is okay, so let's check the cache! if (isset($GLOBALS['cache_array']['modules']['has_menu'][$mod])) { // Check module cache and count hit - $ret = ($GLOBALS['cache_array']['modules']['has_menu'][$mod] == "Y"); + $ret = ($GLOBALS['cache_array']['modules']['has_menu'][$mod] == 'Y'); incrementConfigEntry('cache_hits'); } elseif (isset($GLOBALS['cache_array']['extensions']['ext_menu'][$mod])) { // Check cache and count hit - $ret = ($GLOBALS['cache_array']['extensions']['ext_menu'][$mod] == "Y"); + $ret = ($GLOBALS['cache_array']['extensions']['ext_menu'][$mod] == 'Y'); incrementConfigEntry('cache_hits'); - } elseif ((IS_ADMIN()) && ($mod == "admin")) { + } elseif ((IS_ADMIN()) && ($mod == 'admin')) { // Admin module has always a menu! $ret = true; } - } elseif ((GET_EXT_VERSION("sql_patches") >= "0.3.6") && ((!EXT_IS_ACTIVE("cache")) || ($forceDb === true))) { + } elseif ((GET_EXT_VERSION('sql_patches') >= '0.3.6') && ((!EXT_IS_ACTIVE('cache')) || ($forceDb === true))) { // Check database for entry $result = SQL_QUERY_ESC("SELECT has_menu FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1", array($mod), __FUNCTION__, __LINE__); @@ -834,14 +835,14 @@ function MODULE_HAS_MENU ($mod, $forceDb = false) { $GLOBALS['cache_array']['extensions']['ext_menu'][$mod] = $has_menu; // Does it have a menu? - $ret = ($has_menu == "Y"); + $ret = ($has_menu == 'Y'); } // END - if // Free memory SQL_FREERESULT($result); - } elseif (GET_EXT_VERSION("sql_patches") == "") { + } elseif (GET_EXT_VERSION('sql_patches') == "") { // No sql_patches installed, so maybe in admin area or no admin registered? - $ret = (((IS_ADMIN()) || (!isAdminRegistered())) && ($mod == "admin")); // Then there is a menu! + $ret = (((IS_ADMIN()) || (!isAdminRegistered())) && ($mod == 'admin')); // Then there is a menu! } // Return status @@ -896,13 +897,13 @@ function DETERMINE_TASK_ID_BY_SUBJECT ($subject) { // Add updates notes for given version function ADD_EXTENSION_NOTES ($ver) { // Init notes/content - $out = ""; $content = array(); + $out = ''; $content = array(); // Is do we have verbose output enabled? - if ((getConfig('verbose_sql') == "Y") || (!EXT_IS_ACTIVE("sql_patches"))) { + if ((getConfig('verbose_sql') == 'Y') || (!EXT_IS_ACTIVE('sql_patches'))) { // Update notes found? - if (EXT_GET_UPDATE_NOTES() != "") { + if (EXT_GET_UPDATE_NOTES() != '') { // Update notes found $content = array( 'ver' => $ver, @@ -911,7 +912,7 @@ function ADD_EXTENSION_NOTES ($ver) { // Reset them EXT_SET_UPDATE_NOTES(""); - } elseif (($ver == "0.0") || ($ver == "0.0.0")) { + } elseif (($ver == '0.0') || ($ver == '0.0.0')) { // Initial release $content = array( 'ver' => $ver, @@ -926,7 +927,7 @@ function ADD_EXTENSION_NOTES ($ver) { } // Load template - $out = LOAD_TEMPLATE("admin_ext_notes", true, $content); + $out = LOAD_TEMPLATE('admin_ext_notes', true, $content); } // END - if // Add the notes @@ -978,7 +979,7 @@ function EXT_GET_ALWAYS_ACTIVE () { // Setter for EXT_VERSION flag function EXT_SET_VERSION ($version) { - $GLOBALS['ext_version'][EXT_GET_CURR_NAME()] = (float) $version; + $GLOBALS['ext_version'][EXT_GET_CURR_NAME()] = (string) $version; } // Getter for EXT_VERSION flag @@ -1145,7 +1146,7 @@ function EXT_GET_UPDATE_NOTES () { // Init extension notice function EXT_INIT_NOTES () { - $GLOBALS['ext_notes'] = ""; + $GLOBALS['ext_notes'] = ''; } // Append extension notice diff --git a/inc/extensions/ext- b/inc/extensions/ext- index c0117b452c..89fef58f48 100644 --- a/inc/extensions/ext- +++ b/inc/extensions/ext- @@ -43,33 +43,33 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 $SQLs[] = ""; // Update notes (these will be set as task text!) @@ -78,10 +78,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index cd70f5108a..0b1f195e77 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -43,19 +43,19 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.9"); +EXT_SET_VERSION('0.0.9'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active'"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active'"); @@ -64,40 +64,40 @@ case "remove": // Do stuff when removing extension UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8)"); @@ -105,24 +105,24 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschränkbar."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - case "0.0.9": // SQL queries for v0.0.9 - // Make update depending on "online" - EXT_ADD_UPDATE_DEPENDS("online"); + case '0.0.9': // SQL queries for v0.0.9 + // Make update depending on 'online' + EXT_ADD_UPDATE_DEPENDS('online'); // Register filter REGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, $dry_run); @@ -133,10 +133,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 7e9265b9c0..19c8387927 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -43,21 +43,21 @@ if (!defined('__SECURITY')) { } // Version of this extension -EXT_SET_VERSION("0.7.2"); +EXT_SET_VERSION('0.7.2'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.2", "0.3", "0.3.1", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1", "0.7.2")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.','1')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account ändern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name ändern.','1')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins'"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`"); @@ -68,27 +68,27 @@ case "remove": // Do stuff when removing extension UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.2": // SQL queries for v0.2 + case '0.2.0': // SQL queries for v0.2 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fügt den Menüpunkt "Admin kontaktieren" hinzu."); break; - case "0.3": // SQL queries for v0.3 + case '0.3.0': // SQL queries for v0.3 // Add admin menu ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen für jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zugänglich zu machen oder zu sperren.','4')"); @@ -115,11 +115,11 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Sogn. ACLs werden hinzugefügt: Access Control Lines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT"); break; - case "0.4.0": // SQL queries for v0.4.0 + case '0.4.0': // SQL queries for v0.4.0 ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_mails` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -134,160 +134,160 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet."); break; - case "0.4.1": // SQL queries for v0.4.1 + case '0.4.1': // SQL queries for v0.4.1 ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template LIKE '% %'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Admins-Mails-Tabelle geleert."); - case "0.4.4": // SQL queries for v0.4.4 + case '0.4.4': // SQL queries for v0.4.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("&admin= in &amp;admin= umgewandelt."); break; - case "0.4.5": // SQL queries for v0.4.5 + case '0.4.5': // SQL queries for v0.4.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitet auf Cache-System"); break; - case "0.4.6": // SQL queries for v0.4.6 + case '0.4.6': // SQL queries for v0.4.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit cache-Erweiterung gefixt. Der Admin-Bereich war permanent gesperrt."); break; - case "0.4.7": // SQL queries for v0.4.7 + case '0.4.7': // SQL queries for v0.4.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei admins.cache mit berücksichtigt."); break; - case "0.4.8": // SQL queries for v0.4.8 + case '0.4.8': // SQL queries for v0.4.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.4.9": // SQL queries for v0.4.9 + case '0.4.9': // SQL queries for v0.4.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.5.0": // SQL queries for v0.5.0 + case '0.5.0': // SQL queries for v0.5.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.5.1": // SQL queries for v0.5.1 + case '0.5.1': // SQL queries for v0.5.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Cache wird endlich gelöscht, wenn Admin entfernt wird."); break; - case "0.5.2": // SQL queries for v0.5.2 + case '0.5.2': // SQL queries for v0.5.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Löschen von Admin-Accounts repariert und HTML-Code ausgelagert in Templates."); break; - case "0.5.3": // SQL queries for v0.5.3 + case '0.5.3': // SQL queries for v0.5.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.5.4": // SQL queries for v0.5.4 + case '0.5.4': // SQL queries for v0.5.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; - case "0.5.5": // SQL queries for v0.5.5 + case '0.5.5': // SQL queries for v0.5.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkt Admin-Mails korregiert: SQL-Anweisung war fehlerhaft; und HTML-Code in Templates ausgelagert."); break; - case "0.5.6": // SQL queries for v0.5.6 + case '0.5.6': // SQL queries for v0.5.6 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."); break; - case "0.5.7": // SQL queries for v0.5.7 + case '0.5.7': // SQL queries for v0.5.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Links wegen what=admins_contct geändert."); break; - case "0.5.8": // SQL queries for v0.5.8 + case '0.5.8': // SQL queries for v0.5.8 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update."); break; - case "0.5.9": // SQL queries for v0.5.9 + case '0.5.9': // SQL queries for v0.5.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; - case "0.6.0": // SQL queries for v0.6.0 + case '0.6.0': // SQL queries for v0.6.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link in "ACL Einstellen" zum Admin-Kontaktformular korregiert."); break; - case "0.6.1": // SQL queries for v0.6.1 + case '0.6.1': // SQL queries for v0.6.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Speichern von Admin-Accounts klappt wieder."); break; - case "0.6.2": // SQL queries for v0.6.2 + case '0.6.2': // SQL queries for v0.6.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die admins-Templates (Ordner: {!PATH!}/templates/de/emails/) in den neuen Order admins!"); break; - case "0.6.3": // SQL queries for v0.6.3 + case '0.6.3': // SQL queries for v0.6.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.6.4": // SQL queries for v0.6.4 + case '0.6.4': // SQL queries for v0.6.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit der Rechtevererbung beseitigt: Geben Sie nun ein Hauptmenü frei (Allow), dann kann der Admin auch die Untermenüs erreichen. Zudem können Sie gezielte Untermenüs im freigegeben Hauptmenü dennoch sperren."); break; - case "0.6.5": // SQL queries for v0.6.5 + case '0.6.5': // SQL queries for v0.6.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.6.6": // SQL queries for v0.5.6 + case '0.6.6': // SQL queries for v0.5.6 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact."); break; - case "0.6.7": // SQL queries for v0.6.7 + case '0.6.7': // SQL queries for v0.6.7 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen admins und (kommender) contact. Beseitigung eines Fehlers HTTP_POSR_VARS beim Ändern von Administratoren."); break; - case "0.6.8": // SQL queries for v0.6.8 + case '0.6.8': // SQL queries for v0.6.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("set_session() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); break; - case "0.6.9": // SQL queries for v0.6.9 + case '0.6.9': // SQL queries for v0.6.9 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Verwaltung nach Management umbenannt."); break; - case "0.7.0": // SQL queries for v0.7.0 + case '0.7.0': // SQL queries for v0.7.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Veraltetes Update."); break; - case "0.7.1": // SQL queries for v0.7.1 + case '0.7.1': // SQL queries for v0.7.1 // Update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Add filters REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run); @@ -296,7 +296,7 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von sql_patches abhängig."); break; - case "0.7.2": // SQL queries for v0.7.2 + case '0.7.2': // SQL queries for v0.7.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP login_failtures"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP last_failture"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); @@ -308,10 +308,10 @@ PRIMARY KEY (id) } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php index fa42a67858..b2f1b5ec16 100644 --- a/inc/extensions/ext-admintheme1.php +++ b/inc/extensions/ext-admintheme1.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Remove all other themes ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'"); @@ -58,35 +58,35 @@ case "register": // Do stuff when installation is running (modules.php?module=ad ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL(""); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.1 + case '0.0.1': // SQL queries for v0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES(""); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php index aec488f5f9..087b949d71 100644 --- a/inc/extensions/ext-admintheme_default.php +++ b/inc/extensions/ext-admintheme_default.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Remove all other menu themes ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1"); @@ -58,35 +58,35 @@ case "register": // Do stuff when installation is running (modules.php?module=ad ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL(""); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES(""); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index 87286979fd..1fc7d6f3d3 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -43,47 +43,45 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.4.0"); +EXT_SET_VERSION('0.4.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'"); - if (EXT_IS_ACTIVE("bonus")) - { + if (EXT_IS_ACTIVE('bonus')) { ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'"); } break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'"); - if (EXT_IS_ACTIVE("bonus")) - { + if (EXT_IS_ACTIVE('bonus')) { ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'"); } ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP ap_notified"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.1": // SQL queries for v0.1 + case '0.1.0': // SQL queries for v0.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'"); @@ -97,38 +95,38 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Automatisches Löschen von als zu löschen markierte Tasks hinzugefügt."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227
behoben."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anstelle von ref_depth wurde level programmiert."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'"); @@ -136,7 +134,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).

Bitte aktualisieren Sie auch die Admin-Templates!"); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); @@ -145,67 +143,67 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Mail wird bei Löschung von Aufgaben ausgesendet.

Bitte aktualisieren Sie auch die Admin-Templates!"); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Diverse angebundene Erweiterungen gefixt."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Betreffzeile für gelöschte Aufgaben korregiert."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Auto-Löschung von Bestätigungslinks kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)"); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Jackpot beseitigt ({!POINTS!} wurden nicht gutgeschrieben.)"); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mailbetreffs korregiert."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Template admin_config_autopurge_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'"); @@ -214,47 +212,47 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Von bereits gelöschten Mitgliedern die Mails löschen integriert."); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler mit timestamp_send (Zeile 308) beseitigt."); break; - case "0.3.5": // SQL queries for v0.3.5 + case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler mit ap_del_emails (Einstellungen im Admin-Bereich) beseitigt."); break; - case "0.3.6": // SQL queries for v0.3.6 + case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Die Accounts der Standart-Referal-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gelöscht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf."); break; - case "0.3.7": // SQL queries for v0.3.7 + case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.3.8": // SQL queries for v0.3.8 + case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.3.9": // SQL queries for v0.3.9 + case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt. Unter Auto-Löschung finden Sie nun auch die Einstellungen zu Mailbestätigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt."); break; - case "0.4.0": // SQL queries for v0.4.0 + case '0.4.0': // SQL queries for v0.4.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index c606372984..f4d3764187 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` ( @@ -154,7 +154,7 @@ UNIQUE (account_id, tan) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`"); @@ -164,20 +164,20 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -186,10 +186,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index 4373ea38f6..b097f6a853 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.2.6"); +EXT_SET_VERSION('0.2.6'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Vergütung usw. können Sie hier einstellen.', 10)"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')"); @@ -70,7 +70,7 @@ PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg'"); @@ -78,80 +78,80 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE `module`='beg' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='beg' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='beg' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})"); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Überlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert ("Unbekannte Spalte beg_points_ma")."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Im Mitgliedsmenü wurde die Beschreibung aus dem Gastmenü verwendet."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template admin_config_beg.tpl (und pro!) nicht vergessen, zu aktualisieren."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Zeitsperre gegen die selbe IP-Nummer hinzugefügt."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die beg-Templates (Ordner: {!PATH!}/templates/".GET_LANGUAGE()."/html/) in den neuen Order beg!"); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.1.2": + case '0.1.2': // SQL queries for v0.1.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); @@ -160,7 +160,7 @@ case "update": // Update an extension ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000"); $VIS = "N"; $LOCKED = "Y"; - if (EXT_IS_ACTIVE("beg")) { $VIS = "Y"; $LOCKED = "N"; } + if (EXT_IS_ACTIVE('beg')) { $VIS = "Y"; $LOCKED = "N"; } ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_beg','Bettel-Rallye','Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.','12')"); @@ -169,29 +169,29 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Optionale Bettel-Rallye möglich. Und die erbettelten {!POINTS!} können entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden können."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erbettelte {!POINTS!} werden nach Deaktivierung der Bettel-Rallye gelöscht."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen (member_list_beg.tpl); Template member_beg_404.tpl fehlte!"); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Vergütung und auch die Bettel-Rallye können Sie hier einstellen.' WHERE `what`='config_beg' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlendes Template im Admin-Bereich hinzugefügt. Im Admin-Bereich Hinweis hinzugefügt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php löschen!"); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Es wurden immer dem ersten bettelndem Mitglied die {!POINTS!} gutgeschrieben."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); @@ -205,39 +205,39 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter Einstellungen --> Bettel-Link/-rallye seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler im täglichen Reset beseitigt."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler unknown column 'uid' beseitigt."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Eigene User-ID von Bettel-Rallye ausschliessbar."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abfrage des Account-Status eingebaut. Es können nur bestätigte Accounts betteln."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1"); @@ -245,12 +245,12 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;"); @@ -260,10 +260,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded @@ -273,7 +273,7 @@ default: // Do stuff when extension is loaded $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE timeout < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__); // Check for beg rallye is active and send mails out - if ((getConfig('beg_rallye') == "Y") && (getConfig('beg_new_mem_notify') == "Y")) { + if ((getConfig('beg_rallye') == 'Y') && (getConfig('beg_new_mem_notify') == 'Y')) { // Include file for sending out mails ADD_INC_TO_POOL(sprintf("%sinc/mails/beg_mails.php", constant('PATH'))); } // END - if diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index dd9596dc89..7721f41919 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -43,44 +43,44 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.3.9"); +EXT_SET_VERSION('0.3.9'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.2", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.1": // SQL queries for v0.1 + case '0.1.0': // SQL queries for v0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wenn täglicher Reset war, wird eine benötigte Include-Datei nicht mehr von daily-reset.php eingebunden, sondern von der Erweiterungsdatei selber."); break; - case "0.2": // SQL queries for v0.2 + case '0.2.0': // SQL queries for v0.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_birthday` ( @@ -97,72 +97,72 @@ PRIMARY KEY(id) EXT_SET_UPDATE_NOTES("Es kann nun eine Gutschrift an die Geburtstagmail angehängt werden. Diese wird erst beim Klick auf einen Bestätigungslink gutgeschrieben."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abstand zwischen ausgesendeter Geburtstagsmails auf 364 Tage erhöht."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Laden der birthday_mails.php "intelligenter" per Datenfeld und Lade-Schleife in load_extensions.php realisiert."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script birtday_confirm.php durchgeführt."); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vergessenes _OB_CACHING gesetzt."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wort Punkte dynamisiert."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die birthday-Templates (Ordner: {!PATH!}/templates/".GET_LANGUAGE()."/html/) in den neuen Order birthday!"); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.3.5": // SQL queries for v0.3.5 + case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.3.6": // SQL queries for v0.3.6 + case '0.3.6': // SQL queries for v0.3.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); @@ -170,17 +170,17 @@ PRIMARY KEY(id) EXT_SET_UPDATE_NOTES("Vergütungsmodus des Geburtstagsbonus einstellbar."); break; - case "0.3.7": // SQL queries for v0.3.7 + case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Im Script inc/birthday_mails.php hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen Parser Error verursachte, aber wie eine gewöhnliche Leerstelle aussah."); break; - case "0.3.8": // SQL queries for v0.3.8 + case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); break; - case "0.3.9": // SQL queries for v0.3.9 + case '0.3.9': // SQL queries for v0.3.9 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01', CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01', CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT 1970"); @@ -191,10 +191,10 @@ CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index c57a708353..5cd5fa82a4 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version of this extension -EXT_SET_VERSION("0.8.8"); +EXT_SET_VERSION('0.8.8'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1.6", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.8", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6", "0.8.7", "0.8.8")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)"); @@ -77,10 +77,10 @@ PRIMARY KEY (id) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD INDEX (bonus_id)"); // Run this SQL when html or html_mail extension is installed - if (EXT_IS_ACTIVE("html_mail")) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); + if (EXT_IS_ACTIVE('html_mail')) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus'"); @@ -93,36 +93,36 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE `module`='show_bonus' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='show_bonus' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='show_bonus' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Paid-Links wurden verschoben in die Erweiterung paidlinks."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einfügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter Updates prüfen herunter."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000"); @@ -139,7 +139,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -159,7 +159,7 @@ KEY userid (userid) EXT_SET_UPDATE_NOTES("Turbo-Bonus wird in Tabelle gezählt für Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)"); @@ -167,12 +167,12 @@ KEY userid (userid) EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Vergütung hinzugefügt."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`"); @@ -180,17 +180,17 @@ KEY userid (userid) EXT_SET_UPDATE_NOTES("Tabellen {!MYSQL_PREFIX!}_bonus_urls und {!MYSQL_PREFIX!}_bonus_customer entfernt, da dies bald von der Erweiterung paidlinks erledigt wird."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Turbo-Bonus klappt wieder (dies sind {!POINTS!} die an die schnellsten Klicker vergütet werden!)"); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET timestamp='0' WHERE timestamp='0000000000'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); @@ -202,39 +202,39 @@ KEY userid (userid) EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert"); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script show_bonus.php durchgeführt."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link Aktiv-Rallye-Teilnehmer hinzugefügt, inklusive manuelle Vorbereitung der Vergütung."); break; - case "0.3.5": // SQL queries for v0.3.5 + case '0.3.5': // SQL queries for v0.3.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); @@ -242,27 +242,27 @@ KEY userid (userid) EXT_SET_UPDATE_NOTES("Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden."); break; - case "0.3.6": // SQL queries for v0.3.6 + case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("In der Admin-Liste werden nur aktive Mitglieder gelistet und zudem die späteste Zeitmarke für die Auswertung angezeigt."); break; - case "0.3.7": // SQL queries for v0.3.7 + case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitglieder-Account auwählbar, von dem die {!POINTS!} für den Aktiv- und Login-Bonus abgebucht werden."); break; - case "0.3.8": // SQL queries for v0.3.8 + case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."); break; - case "0.3.9": // SQL queries for v0.3.9 + case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt."); break; - case "0.4.0": // SQL queries for v0.4.0 + case '0.4.0': // SQL queries for v0.4.0 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); @@ -270,22 +270,22 @@ KEY userid (userid) EXT_SET_UPDATE_NOTES("Automatisches Löschen von Turbo-Bonus-Zeilen ({!MYSQL_PREFIX!}_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."); break; - case "0.4.1": // SQL queries for v0.4.1 + case '0.4.1': // SQL queries for v0.4.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vergütung des Aktiv-Bonus repariert."); break; - case "0.4.2": // SQL queries for v0.4.2 + case '0.4.2': // SQL queries for v0.4.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template admin_list_bonus.tpl korregiert."); break; - case "0.4.3": // SQL queries for v0.4.3 + case '0.4.3': // SQL queries for v0.4.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Verbesserung des Versandes von HTML-Bonus-Mails."); break; - case "0.4.4": // SQL queries for v0.4.4 + case '0.4.4': // SQL queries for v0.4.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"); @@ -298,64 +298,64 @@ KEY userid (userid) EXT_SET_UPDATE_NOTES("Bonus-{!POINTS!} für: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.
Template admin_config_bonus_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!
Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben."); break; - case "0.4.5": // SQL queries for v0.4.5 + case '0.4.5': // SQL queries for v0.4.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abzug vom Bonus-Account integriert."); break; - case "0.4.6": // SQL queries for v0.4.6 + case '0.4.6': // SQL queries for v0.4.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Rank 2 bekommt nun auch seine {!POINTS!} gutgeschrieben."); break; - case "0.4.7": // SQL queries for v0.4.7 + case '0.4.7': // SQL queries for v0.4.7 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden."); break; - case "0.4.8": // SQL queries for v0.4.8 + case '0.4.8': // SQL queries for v0.4.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("In inc/monthly_bonus.php fehlte ein Punkt; Fehler besseitigt."); break; - case "0.4.9": // SQL queries for v0.4.9 + case '0.4.9': // SQL queries for v0.4.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Login-Bonus wird mit angezeigt."); break; - case "0.5.0": // SQL queries for v0.5.0 + case '0.5.0': // SQL queries for v0.5.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit is_hundred beim täglichen Reset beseitigt."); break; - case "0.5.1": // SQL queries for v0.5.1 + case '0.5.1': // SQL queries for v0.5.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit bonus_stats / Zeile 31 beim täglichen Reset beseitigt."); break; - case "0.5.2": // SQL queries for v0.5.2 + case '0.5.2': // SQL queries for v0.5.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.5.3": // SQL queries for v0.5.3 + case '0.5.3': // SQL queries for v0.5.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Speichern der Aktiv-{!POINTS!} für Platz 2 bis x korregiert."); break; - case "0.5.4": // SQL queries for v0.5.4 + case '0.5.4': // SQL queries for v0.5.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Variablenfehler in inc/monthly_bonus.php behoben."); break; - case "0.5.5": // SQL queries for v0.5.5 + case '0.5.5': // SQL queries for v0.5.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Weitere Variablenfehler in inc/monthly_bonus.php haben dafür gesorgt, dass die monatliche Aktiv-Rallye nicht ausgeschüttet wurde. Mit diesem Update wurde die Ausschüttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt vergütet."); break; - case "0.5.6": // SQL queries for v0.5.6 + case '0.5.6': // SQL queries for v0.5.6 // Get current month $curr = date("m", time()); if (strlen($curr) == 1) $curr = "0".$curr; @@ -373,64 +373,64 @@ WHERE last_online < ".$mark." ORDER BY userid"); EXT_SET_UPDATE_NOTES("Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit "nach oben gerutsch"."); break; - case "0.5.7": // SQL queries for v0.5.7 + case '0.5.7': // SQL queries for v0.5.7 break; - case "0.5.8": // SQL queries for v0.5.8 + case '0.5.8': // SQL queries for v0.5.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit is_hundred beim täglichen Reset endlich beseitigt."); break; - case "0.5.9": // SQL queries for v0.5.9 + case '0.5.9': // SQL queries for v0.5.9 EXT_SET_UPDATE_NOTES("Fehlermeldung /home/verzeichnis/html/inc/stats_bonus.php (42):You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE userid='59' LIMIT 1' at line 1 beseitigt."); break; - case "0.6.0": // SQL queries for v0.6.0 + case '0.6.0': // SQL queries for v0.6.0 EXT_SET_UPDATE_NOTES("SQL-Fehlermeldung in inc/monthly_bonus.php beseitigt."); break; - case "0.6.1": // SQL queries for v0.6.1 + case '0.6.1': // SQL queries for v0.6.1 EXT_SET_UPDATE_NOTES("Versand von Bonus-Mails repariert."); break; - case "0.6.2": // SQL queries for v0.6.2 + case '0.6.2': // SQL queries for v0.6.2 EXT_SET_UPDATE_NOTES("Löschen von bereits gelöschten Mails wird nun abgelehnt."); break; - case "0.6.3": // SQL queries for v0.6.3 + case '0.6.3': // SQL queries for v0.6.3 EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.6.4": // SQL queries for v0.6.4 + case '0.6.4': // SQL queries for v0.6.4 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Der Menüpunkt "Bonus-{!POINTS!}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden."); break; - case "0.6.5": // SQL queries for v0.6.5 + case '0.6.5': // SQL queries for v0.6.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler mit bonus_stats beseitigt."); break; - case "0.6.6": // SQL queries for v0.6.6 + case '0.6.6': // SQL queries for v0.6.6 EXT_SET_UPDATE_NOTES("Template-Fehler beseitigt im Admin-Bereich."); break; - case "0.6.7": // SQL queries for v0.6.7 + case '0.6.7': // SQL queries for v0.6.7 EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.6.8": // SQL queries for v0.6.8 + case '0.6.8': // SQL queries for v0.6.8 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empfänderauswahl nicht berücksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitberücksichtigt."); break; - case "0.6.9": // SQL queries for v0.6.9 + case '0.6.9': // SQL queries for v0.6.9 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); @@ -441,35 +441,35 @@ WHERE last_online < ".$mark." ORDER BY userid"); EXT_SET_UPDATE_NOTES("Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referal und Statistik-Bonus (100% Klickrate erreicht)."); break; - case "0.7.0": // SQL queries for v0.7.0 + case '0.7.0': // SQL queries for v0.7.0 EXT_SET_UPDATE_NOTES("Zuschaltung von weiteren Bonis wird jetzt auch bei der Auflistung der mitmachenden Mitglieder im Mitgliedsbereich beachtet."); break; - case "0.7.1": // SQL queries for v0.7.1 + case '0.7.1': // SQL queries for v0.7.1 EXT_SET_UPDATE_NOTES("Im Adminbereich wird nun ebenfalls die Zuschaltung von weiteren Bonis berücksichtigt. Zudem wird der Gesamtbonus an alle Mitglieder errechnet und auch angezeigt."); break; - case "0.7.2": // SQL queries for v0.7.2 + case '0.7.2': // SQL queries for v0.7.2 EXT_SET_UPDATE_NOTES("Die Vergütung der erreichten 100%-Klickrate war noch wegen Programmierungen am Script auskommentiert. Sorry!"); break; - case "0.7.3": // SQL queries for v0.7.3 + case '0.7.3': // SQL queries for v0.7.3 EXT_SET_UPDATE_NOTES("Gutgeschriebene Bonus-{!POINTS!} werden nach Deaktivierung der Aktiv-Rallye gelöscht."); break; - case "0.7.4": // SQL queries for v0.7.4 + case '0.7.4': // SQL queries for v0.7.4 EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (member_bonus.tpl)"); break; - case "0.7.5": // SQL queries for v0.7.5 + case '0.7.5': // SQL queries for v0.7.5 EXT_SET_UPDATE_NOTES("Im Admin-Bereich Hinweis hinzugefügt, wenn Aktiv-Rallye inaktiv ist. Bitte Script inc/monthly_bonus.php löschen!"); break; - case "0.7.6": // SQL queries for v0.7.6 + case '0.7.6': // SQL queries for v0.7.6 EXT_SET_UPDATE_NOTES("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der User-IDs nicht berücksichtig."); break; - case "0.7.7": // SQL queries for v0.7.7 + case '0.7.7': // SQL queries for v0.7.7 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); @@ -483,24 +483,24 @@ WHERE last_online < ".$mark." ORDER BY userid"); EXT_SET_UPDATE_NOTES("Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."); break; - case "0.7.8": // SQL queries for v0.7.8 + case '0.7.8': // SQL queries for v0.7.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler im täglichen Reset beseitigt."); break; - case "0.7.9": // SQL queries for v0.7.9 + case '0.7.9': // SQL queries for v0.7.9 EXT_SET_UPDATE_NOTES("Dollarzeichen fehlte in inc/reset/reset_bonus.php, Zeile 39"); break; - case "0.8.0": // SQL queries for v0.8.0 + case '0.8.0': // SQL queries for v0.8.0 EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; - case "0.8.1": // SQL queries for v0.8.1 + case '0.8.1': // SQL queries for v0.8.1 EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert."); break; - case "0.8.2": // SQL queries for v0.8.2 + case '0.8.2': // SQL queries for v0.8.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'"); @@ -508,33 +508,33 @@ WHERE last_online < ".$mark." ORDER BY userid"); EXT_SET_UPDATE_NOTES("Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen."); break; - case "0.8.3": // SQL queries for v0.8.3 + case '0.8.3': // SQL queries for v0.8.3 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.8.4": // SQL queries for v0.8.4 + case '0.8.4': // SQL queries for v0.8.4 EXT_SET_UPDATE_NOTES("Ladeproblem bei nicht installierter Erweiterung cache gefixt."); break; - case "0.8.5": // SQL queries for v0.8.5 + case '0.8.5': // SQL queries for v0.8.5 EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates."); break; - case "0.8.6": // SQL queries for v0.8.6 + case '0.8.6': // SQL queries for v0.8.6 EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - case "0.8.7": // SQL queries for v0.8.7 + case '0.8.7': // SQL queries for v0.8.7 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)"); // Update notes EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."); break; - case "0.8.8": // SQL queries for v0.8.8 + case '0.8.8': // SQL queries for v0.8.8 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes @@ -543,16 +543,16 @@ WHERE last_online < ".$mark." ORDER BY userid"); } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { // Daily reset was run so let's check if active rallye is activated - if (getConfig('bonus_active') == "Y") { + if (getConfig('bonus_active') == 'Y') { // Run active rallye if (getConfig('bonus_stats') > 0) ADD_INC_TO_POOL(sprintf("%sinc/stats_bonus.php", constant('PATH'))); ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_bonus.php", constant('PATH'))); @@ -563,7 +563,7 @@ default: // Do stuff when extension is loaded } // Check for bonus rallye is active and send mails out - if ((getConfig('bonus_active') == "Y") && (getConfig('bonus_new_mem_notify') == "Y")) { + if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) { // Include file for sending out mails ADD_INC_TO_POOL(sprintf("%sinc/mails/bonus_mails.php", constant('PATH'))); } diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 3a3038cfdc..e2b29f7516 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Configuration entries ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3).""); @@ -75,29 +75,26 @@ PRIMARY KEY(`id`) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN ('config_booking','list_booking')"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='booking'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1"); break; -case "modify": // When the extension got modified - break; - -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -105,7 +102,10 @@ case "update": // Update an extension break; } -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'modify': // When the extension got modified + break; + +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index a75cccdd8b..18a8814f71 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -44,14 +44,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.2.2"); +EXT_SET_VERSION('0.2.2'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'"); @@ -59,7 +59,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_cache','cache_stats')"); @@ -76,37 +76,37 @@ case "remove": // Do stuff when removing extension UNREGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei extensions.cache mit berücksichtigt. Dies hatte die Folge, dass wenn bei einem Gast die Datei aktualisiert wurde, nur aktivierte und nicht die deaktivierten mit geladen wurden. Folglich fiehlen einfach ein paar Erweiterungen aus."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Cache-Update repariert."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Is the cache extension itself there? - if (EXT_IS_ACTIVE("cache")) { + if (EXT_IS_ACTIVE('cache')) { // Check for cache when extension is already installed if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile(); } // END - if @@ -115,17 +115,17 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Registrierung der Cache-Erweiterung repariert"); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Validierung der Cache-Datei admins.cache integriert."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)"); @@ -134,32 +134,32 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gezählt."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Das Umschreiben der Cache-Daten hat eine Fehlermeldung Falsches Passwort! im Admin-Bereich verursacht."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit fehlender admins-Erweiterung beseitigt."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler Division durch 0 repariert in den DB-Cache Statistiken."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Die Tabelen {!_MYSQL_PREFIX!}_config, {!_MYSQL_PREFIX!}_refsystem, {!_MYSQL_PREFIX!}_refdepths und {!_MYSQL_PREFIX!}_mod_reg werden nun auch ausgelagert."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'"); @@ -172,49 +172,49 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so können Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufhält."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler Division durch 0 repariert in inc/load_cache.php."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Weitere Fehler im System beseitigt."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Probleme während des Installationsvorganges beseitigt."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Daten von installierten Themes werden nun gecacht."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Administratormenü experimentell gecacht."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // This update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Die Erweiterung hängt nun von der sql_patches ab."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Register the new filter REGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run); REGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run); @@ -229,7 +229,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Filter für Erweiterungsmanagement hinzugefügt."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Register the new filter REGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run); REGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run); @@ -240,10 +240,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 2fc6bc23dd..447916f77b 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.4"); +EXT_SET_VERSION('0.0.4'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` ( @@ -71,51 +71,51 @@ PRIMARY KEY(id) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)"); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 85c7ee3b77..0fa72bdff8 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Table for debug log entries ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log` ( @@ -135,7 +135,7 @@ PRIMARY KEY (`id`) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`"); @@ -145,20 +145,20 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -167,10 +167,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php index bab0551a39..9d97f22181 100644 --- a/inc/extensions/ext-demo.php +++ b/inc/extensions/ext-demo.php @@ -43,47 +43,47 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.1"); +EXT_SET_VERSION('0.0.1'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL(""); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 9b7e64b0a8..5c2bc7b653 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.6"); +EXT_SET_VERSION('0.1.6'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Doubler table ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_doubler` ( @@ -117,7 +117,7 @@ PRIMARY KEY(id) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler'"); @@ -125,29 +125,29 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE `module`='doubler' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='doubler' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='doubler' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit User-ID behoben!"); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Total used points ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); @@ -155,12 +155,12 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Gebühr wird vom Verdoppler-Pott abgezogen."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Drei SQL-Fehler beseitigt."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Shall I use the doubler's account to take points from? (Y/N, default=Y) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'"); @@ -168,12 +168,12 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES(POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Counter-Stand und noch zum Verdoppeln übrige {!POINTS!} in Templates eingebunden. Auflistung in Admin-Bereich komplettiert."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'"); @@ -182,64 +182,64 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.
Template admin_config_doubler_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar.

Minus-Guthaben des Verdoppler-Accounts repariert und Mitgliedsmail erweitert mit Transaktionsummer und IP-Nummer."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die doubler-Templates (Ordner: {!PATH!}/templates/".GET_LANGUAGE()."/html/) in den neuen Order doubler!"); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Zwei SQL-Fehler in inc/doubler_send.php beseitigt."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-events.php b/inc/extensions/ext-events.php index 47b64ed21f..756ad1cded 100644 --- a/inc/extensions/ext-events.php +++ b/inc/extensions/ext-events.php @@ -44,33 +44,33 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -79,10 +79,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 10fb21a642..262c1d2824 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.2.1"); +EXT_SET_VERSION('0.2.1'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Create database ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_holidays` ( @@ -79,7 +79,7 @@ PRIMARY KEY(id) ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1"); @@ -88,75 +88,75 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern der Urlaubsanfrage korregiert."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'"); @@ -165,69 +165,69 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf Urlaub geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Tabellenspalte hinzugefügt."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')"); // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index a4c285c7a8..876c0bddd3 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.6"); +EXT_SET_VERSION('0.1.6'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.51", "0.0.52", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', "0.0.51", "0.0.52", '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); @@ -58,7 +58,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg"); @@ -66,76 +66,76 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Der erstellte HTML-Code wird noch kompiliert (eigene HTML-Codes umgewandelt)."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - case "0.1.6": + case '0.1.6': // Dependency is needed for ext-registration!! (want to alter a non existent Table) - EXT_ADD_UPDATE_DEPENDS("bonus"); + EXT_ADD_UPDATE_DEPENDS('bonus'); EXT_SET_UPDATE_NOTES("Abhänigkeit von der Erweiterung bonus hinzugefügt."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-iso3166.php b/inc/extensions/ext-iso3166.php index 084e967448..a751908268 100644 --- a/inc/extensions/ext-iso3166.php +++ b/inc/extensions/ext-iso3166.php @@ -44,38 +44,38 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.1"); +EXT_SET_VERSION('0.0.1'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE FROM `{!_MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` DROP `provider`;"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.2 + case '0.0.1': // SQL queries for v0.0.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (`code`,`descr`,`provider`) VALUES ('AD', 'Andorra', 'ext-iso3166'), @@ -323,7 +323,7 @@ VALUES ('AD', 'Andorra', 'ext-iso3166'), ('ZW', 'Zimbabwe', 'ext-iso3166');"); // This extension depends on the country extension - EXT_ADD_UPDATE_DEPENDS("country"); + EXT_ADD_UPDATE_DEPENDS('country'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erste Liste von 243 Ländercodes nach ISO 3166. (Quelle: Selfhtml)
Alle Länder sind zuerst deaktiviert. Achtung DE könnte doppelt vorkommen.
Ein Aktivieren/Deaktivieren lässt alle Länder beim Registrieren anzeigen oder nicht Anzeigen."); @@ -332,10 +332,10 @@ VALUES ('AD', 'Andorra', 'ext-iso3166'), } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-logs.php b/inc/extensions/ext-logs.php index 96878b1c3e..75f1e7ec8a 100644 --- a/inc/extensions/ext-logs.php +++ b/inc/extensions/ext-logs.php @@ -43,36 +43,36 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','logs','Aufruflogbücher','Verwalten Sie Ihre Aufruflogbücher mit diesem Admin-Bereich! (Derzeit nur Download!)',8)"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -81,10 +81,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index c546b5ab9d..f1262fa5ea 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -43,202 +43,202 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.3.3"); +EXT_SET_VERSION('0.3.3'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL(""); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE `module`='mailid' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='mailid' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='mailid' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Veraltetes Update."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Turbo-Bonus interegiert, nur wenn bonus-Erweiterung v0.2.2 oder höher ist."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Absicherung der Variablen uid, mailid und bonusid durch die eigene Funktion bigintval() in den beiden Dateien mailid.php und mailid_top.php."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Weisse Seite im Mozilla bzw. Seite nicht gefunden unter dem IE behoben."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("register_globals-Problem behoben"); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mailbestätigung klappt wieder."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert"); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Probe-Fix wegen falschen Bestätigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template mailid_confirm_buttom.tpl, damit die Bestätigung ohne Code auch klappt!"); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate an den Scripten mailid.php und mailid_top.php durchgeführt."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sende-Pool wird nicht mehr benötigt, um die Bestätigung durchzuführen."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Template mailid_frameset.tpl nach mailid_frames.tpl umbenannt."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach inc/footer.php verlagert."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Gesamt-{!POINTS!} werden nun nach Bestätigung angezeigt. Bitte aktualisieren Sie die Templates mailid_points_done.tpl, mailid_points_done2.tpl und mailid_frames.tpl !"); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Variablen abgesichert (Diverse Warnhinweise des Webservers sind damit unterbunden)."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Parser-Fehler beseitigt."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler wegen fehlende Datenfeldelementen behoben."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Modul mailid war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und führten somit zu Fehlern."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Den Punkte in der Gesamt-{!POINTS!}-Anzahl in ein Komma umgewandelt."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wenn die {!POINTS!} dem noch auf Auszahlung wartendem Guthaben aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates mailid_points_locked und mailid_points_locked2 sind hinzugekommen!)"); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bonus- und Standart-Referal-ID ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Code wiederholen nach Code eingeben hin geändert."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Templates hinzugefügt."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("mailid.php und mailid_top.php können erst bei aktivierter Erweiterung mailid benutzt werden. Solange gibt es fatale Fehlermeldungen."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bitte das Template {!PATH!}/templates/de/html/mailid/mailid_points_lcoked2.tpl löschen. Noices fixed."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal geändert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index 21861a1344..68450d6dea 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -43,73 +43,73 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.6"); +EXT_SET_VERSION('0.0.6'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index 10f60565a4..8856c68211 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -43,54 +43,54 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.9"); +EXT_SET_VERSION('0.0.9'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata'"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Berechnung der Gesamt-{!POINTS!} korregiert."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Daten des Scriptes mit eingebunden."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` ( @@ -103,17 +103,17 @@ PRIMARY KEY(media_key) EXT_SET_UPDATE_NOTES("Teile der Mediendaten werden in seperater Tabelle gesichert. Bitte beachten Sie, dass dieses Update nur Daten des aktuellen Zustandes berücksichtigen kann und nicht bereits gelöschter Mitglieder."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mediendaten mussten komplett regeneriert werden."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)"); @@ -123,12 +123,12 @@ PRIMARY KEY(media_key) Bitte stellen Sie diesen derzeit manuell unter Einstellungen-Medidata selber einstellen."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')"); // Update notes (these will be set as task text!) @@ -137,10 +137,10 @@ Bitte stellen Sie diesen derzeit manuell unter Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) @@ -114,10 +114,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-mydata.php b/inc/extensions/ext-mydata.php index 04730bb21a..3d59ac095d 100644 --- a/inc/extensions/ext-mydata.php +++ b/inc/extensions/ext-mydata.php @@ -43,132 +43,132 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.8"); +EXT_SET_VERSION('0.1.8'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL(""); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sperrung des Mitgliederprofiles nach Änderung kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)"); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.

Wichtig: Laden Sie noch die Template member_mydata_overview und member_mydata_edit (beide zu finden unter templates/".GET_LANGUAGE()."/html/member/ !) mit hoch!"); // Depends on 'country'! - EXT_ADD_UPDATE_DEPENDS("country"); + EXT_ADD_UPDATE_DEPENDS('country'); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Die Einstellungen können nun auch ohne der Erweiterung country abgespeichert werden."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 7032e51e57..38ea95a18b 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -43,33 +43,33 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -78,10 +78,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index 97c88b39ed..2158cf0216 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -43,38 +43,38 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.2"); +EXT_SET_VERSION('0.1.2'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter'"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Gebühr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)"); @@ -89,68 +89,68 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Vor der eigentlichen Freigabe dieser Erweiterungen habe ich sie versehendlich im Archiv mit auf den Server hochgeladen. Diese Version fügt die bereits angekündigte Funktionalitäten, wie zum Beispiel das Einstellen der Abschaltgebühr."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("URL im Versendeformular und Option Immer aktiv für diese Erweiterung deaktiviert."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bitte Script inc/monthly_newsletter.php löschen!"); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Script inc/monthly/monthly_newsletter.php wird nicht mehr ausgeführt, wenn die Erweiterung nicht aktiviert ist."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung html_mail können Sie auch HTML-Mails versenden."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung html_mail können Sie auch HTML-Mails versenden."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Währung auf die Erweiterung ext-other.zip verlagert. Bitte auch diese aktualisieren."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php index a2e1a5c3a8..57ce9a8b39 100644 --- a/inc/extensions/ext-nickname.php +++ b/inc/extensions/ext-nickname.php @@ -43,66 +43,66 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.9"); +EXT_SET_VERSION('0.1.9'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname'"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname')"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='nickname' AND ext_has_css='N' LIMIT 1"); // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'"); @@ -112,71 +112,71 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Minimale Länge, sowie erlaubte Zeichen sind per Adminbereich änderbar. Setzen Sie als erlaubte Zeichen nur URL-konforme Zeichen ein!"); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP nick_uid"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Auswahlfür Mitglied ob mit Nickname oder User-ID einloggen entfernt."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID ODER die angemeldete EMail-Adresse eingegeben werden."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)"); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitglieder ohne Nickname sollten kein *failed* mehr sehen."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_nickname_history` ( @@ -196,10 +196,10 @@ PRIMARY KEY(id) } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index d6a6b30dfe..95cb2ac4db 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.5"); +EXT_SET_VERSION('0.0.5'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_online` ( @@ -73,7 +73,7 @@ KEY `admin_member` (`is_admin`,`is_member`) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online'"); @@ -83,40 +83,40 @@ case "remove": // Do stuff when removing extension UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler Unknown column 'visibled' in 'field list' behoben."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erstellung der Datenbanktabelle `{!_MYSQL_PREFIX!}_online` in diese Erweiterung ausgelagert."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N')"); // Register filter @@ -128,10 +128,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-optimize.php b/inc/extensions/ext-optimize.php index ca46cd679c..0f59cda0a3 100644 --- a/inc/extensions/ext-optimize.php +++ b/inc/extensions/ext-optimize.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.6"); +EXT_SET_VERSION('0.0.6'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_optimize_gain`( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -60,61 +60,61 @@ case "register": // Do stuff when installation is running (modules.php?module=ad ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Daten aus der Datenbank entfernt werden.','5')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index b78a825731..30b12b27f3 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -43,39 +43,39 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.5.0"); +EXT_SET_VERSION('0.5.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='Y' WHERE `module`='order' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE `module`='order' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.1": // SQL queries for v0.1 + case '0.1.0': // SQL queries for v0.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"); @@ -83,7 +83,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); @@ -92,74 +92,74 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber)."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen repariert (werden nun hochgezählt und bei täglichem Reset auf 0 gesetzt)."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Dummy-Datenfeld wird wieder gelöscht, um Probleme zu vermeiden. Fehlende Spalte mail_order korregiert auf mail_orders."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Templates member_frameset-back.tpl und member_frameset-send.tpl nach member_order_back.tpl und member_order_send.tpl umbenannt."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger"); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Speicherung der Einstellungen klappt."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {!POINTS!} die maximale Anzahl von Usern in der Kategorie gewählt und nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {!POINTS!} auf dem Konto. Ein Rechenbeispiel: @@ -174,27 +174,27 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us "); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler mit __MIN_VALUE behoben."); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Konstantenproblem beseitigt."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit nicht funktionierenden Mailbuchungen beseitigt."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Basis-Modul order.php abgesichert, wenn Erweiterung nicht aktiviert ist."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'"); @@ -202,77 +202,77 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Unter Einstellungen - Mailbuchungsseite war immer die Tabellenspalte Mitgliedsnummer ausgewählt."); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."); break; - case "0.3.5": // SQL queries for v0.3.5 + case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war max_mails, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde."); break; - case "0.3.6": // SQL queries for v0.3.6 + case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Im Modul order (inc/modules/order.php) wurde fehlerhafterweise die Erweiterung beg getestet."); break; - case "0.3.7": // SQL queries for v0.3.7 + case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); break; - case "0.3.8": // SQL queries for v0.3.8 + case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mailbuchungsseite korregiert."); break; - case "0.3.9": // SQL queries for v0.3.9 + case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erneuten Fehler in Mailbuchungsseite behoben."); break; - case "0.4.0": // SQL queries for v0.4.0 + case '0.4.0': // SQL queries for v0.4.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES(POINTS."-Abzug klappt wieder. Danke an Andreman!"); break; - case "0.4.1": // SQL queries for v0.4.1 + case '0.4.1': // SQL queries for v0.4.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.4.2": // SQL queries for v0.4.2 + case '0.4.2': // SQL queries for v0.4.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.4.3": // SQL queries for v0.4.3 + case '0.4.3': // SQL queries for v0.4.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Neue Urlaubsschaltung mit integriert."); break; - case "0.4.4": // SQL queries for v0.4.4 + case '0.4.4': // SQL queries for v0.4.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ein WHERE ext_active='Y' tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt."); break; - case "0.4.5": // SQL queries for v0.4.5 + case '0.4.5': // SQL queries for v0.4.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); break; - case "0.4.6": // SQL queries for v0.4.6 + case '0.4.6': // SQL queries for v0.4.6 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1"); @@ -281,26 +281,26 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.4.7": // SQL queries for v0.4.7 + case '0.4.7': // SQL queries for v0.4.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - case "0.4.8": // SQL queries for v0.4.8 + case '0.4.8': // SQL queries for v0.4.8 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben."); break; - case "0.4.9": // SQL queries for v0.4.9 + case '0.4.9': // SQL queries for v0.4.9 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {!POINTS!} wieder gutgeschrieben werden sollen oder in den Jackpot landen."); break; - case "0.5.0": // SQL queries for v0.5.0 + case '0.5.0': // SQL queries for v0.5.0 ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_url_blacklist`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_url_blacklist` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -317,15 +317,15 @@ INDEX (`pool_id`) } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded // Do daily reset only when installed and extension version is at least 0.1.1 - if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION("order") >= "0.1.1")) { + if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION('order') >= '0.1.1')) { // Reset mail order values $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__); } // END - if diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 6c394b8983..7f8f2aee83 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -43,84 +43,84 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.2.1"); +EXT_SET_VERSION('0.2.1'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227
behoben."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen endlich beseitigt."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ausgabemodus der CSS-Dateien hinzugefügt. Bitte auch das Admin-Template aktualisieren!"); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern der Einstellungen repariert."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Folgende Einstellungen können auf 0 gesetzt werden:
    @@ -132,65 +132,65 @@ case "update": // Update an extension
"); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich voneinander getrentt ein- und auschalten."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wort "Baustelle" vom Auto-Versand entfernt, da dieser nun klappt."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{!URL!}'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung other auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16"); // Update notes (these will be set as task text!) @@ -199,10 +199,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index 058241cbba..696fae67fa 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version of this extension -EXT_SET_VERSION("0.3.8"); +EXT_SET_VERSION('0.3.8'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_payouts` ( @@ -79,7 +79,7 @@ PRIMARY KEY(id) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`"); @@ -87,25 +87,25 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1"); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''"); @@ -114,136 +114,136 @@ case "update": // Update an extension ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'"); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''"); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGTEXT NOT NULL"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGTEXT NOT NULL"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'"); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'"); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Auflistung der Auszahlungen ausgelagert in Template member_payout.tpl."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Buttons aus Aufgabenauflisten ausgelagert"); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ausgabe der Auszahlungsmöglichkeiten im Mitgliedsbereich repariert."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Work-Arount-Lösung zu temporären Problemen mit der Task-ID eingebaut."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anzahl zu überweisende {!POINTS!} müssen immer grösser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab."); break; - case "0.3.5": // SQL queries for v0.3.5 + case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.3.6": // SQL queries for v0.3.6 + case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); break; - case "0.3.7": // SQL queries for v0.3.7 + case '0.3.7': // SQL queries for v0.3.7 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Verwaltung nach Management umgestellt."); break; - case "0.3.8": // SQL queries for v0.3.8 + case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php index fbc58eb4d9..55e6502c22 100644 --- a/inc/extensions/ext-primera.php +++ b/inc/extensions/ext-primera.php @@ -38,14 +38,14 @@ if (!defined('__SECURITY')) { } // Version of this extension -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_primera` ( @@ -80,37 +80,37 @@ PRIMARY KEY(id) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES(""); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php index 18c70c3f34..b4e84d842f 100644 --- a/inc/extensions/ext-profile.php +++ b/inc/extensions/ext-profile.php @@ -43,87 +43,87 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.9"); +EXT_SET_VERSION('0.0.9'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL(""); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Benachrichtungsmails werden nur beim tägichen Reset ausgesendet"); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert"); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmm..."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Profilaktualisierungsmails werden nur dann ausgesendet, wenn profile_update und prof_reupdate > 0 sind."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Namenskonflikt gelösst mit Erweiterung update (kommt noch raus!)"); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index 0a954d354a..436c1c3308 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.3.5"); +EXT_SET_VERSION('0.3.5'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`"); @@ -102,7 +102,7 @@ PRIMARY KEY(id) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // Drop tables ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`"); @@ -117,108 +117,108 @@ case "remove": // Do stuff when removing extension UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Aktueller {!POINTS!}-Stand wird beachtet."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler Unknown column 'd.useid' in 'on clause' behoben."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler Template nicht gefunden behoben und Admin-Formulare ausgelagert"); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler Template nicht gefunden ist endlich beseitigt."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anzeigefehler im Gast-/Mitgliedsbereich behoben."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Admin-Mails korregiert."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)"); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Weitere Templates vom Admin-Bereich ausgelagert und Referal-Anazahl in der Mail zur Rallye-Ankündigung repariert."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Funktion ADMIN_USER_PROFILE_LINK() mit Verlinkung auf Referal-Liste implementiert."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'"); @@ -235,82 +235,82 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".GET_LANG "); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Links wegen what=admins_contct geändert."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkt "Rallyes verwalten" repariert."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Automatisches Starten von Referal-Rallyes repariert."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fatalen Fehler beseitigt."); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung für automatisch generierte Admin-Kontaktlinks geändert."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung autopurge installiert und aktiviert ist."); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - case "0.3.5": // SQL queries for 0.3.5 + case '0.3.5': // SQL queries for 0.3.5 // This update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Register filter REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run); @@ -321,21 +321,21 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".GET_LANG } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded // Do stuff only when not in CSS mode if (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1") && ($GLOBALS['cache_mode'] != "init")) { // Get total member count - $total = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); + $total = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true); // Add more data on higher versions - $ADD1 = ""; $ADD2 = ""; $OR = ""; - if (GET_EXT_VERSION("rallye") >= "0.2.0") { + $ADD1 = ''; $ADD2 = ''; $OR = ''; + if (GET_EXT_VERSION('rallye') >= '0.2.0') { $ADD1 = ", min_users, min_prices"; $ADD2 = ", d.min_users, d.min_prices"; $OR = " OR (d.min_users <= ".$total." AND d.min_users > 0)"; @@ -359,7 +359,7 @@ LIMIT 1", __FILE__, __LINE__); FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d WHERE d.is_active='Y' AND d.notified='Y' AND d.expired='N' AND (d.end_time <= UNIX_TIMESTAMP()".$OR.") LIMIT 1", __FILE__, __LINE__); - if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE("autopurge"))) { + if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('autopurge'))) { // End rallye here... RALLYE_EXPIRE_RALLYES($result); } // END - if diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index d79f2e8d1b..d919dec1b5 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.1"); +EXT_SET_VERSION('0.0.1'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0","0.0.1")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0','0.0.1')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_refs` ( @@ -68,7 +68,7 @@ KEY (`refid`) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback'"); @@ -76,20 +76,20 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100"); @@ -102,10 +102,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded @@ -114,7 +114,7 @@ default: // Do stuff when extension is loaded } // Shall we include special files? -if ($EXT_LOAD_MODE == "register") { +if ($EXT_LOAD_MODE == 'register') { // Execute this special file on this update ADD_INC_TO_POOL(sprintf("%sinc/gen_refback.php", constant('PATH') diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index cedbb19a1a..9b03e5f241 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -43,37 +43,37 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.5.2"); +EXT_SET_VERSION('0.5.2'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.1": // SQL queries for v0.1 + case '0.1.0': // SQL queries for v0.1 ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_must_register`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_must_register` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -97,170 +97,170 @@ PRIMARY KEY(id) EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugefügt."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='register' AND ext_has_css='N' LIMIT 1"); // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Konfiguration der Pflichtangaben ausgelagert in Template"); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)"); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sämtliche Sperren bei eingeloggten Admin deaktiviert."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Cookie refid aus Anmeldeformular entfernt."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Referal-ID wird endlich korrekt gesetzt."); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Parse error in what-register.php beseitigt."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.

Wichtig: Laden Sie noch das Template guest_register.tpl mit hoch, welches unter templates/".GET_LANGUAGE()."/html/guest/ zu finden ist!"); // Depends on 'country' - EXT_ADD_UPDATE_DEPENDS("country"); + EXT_ADD_UPDATE_DEPENDS('country'); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Auf Grund der Integration der neue Erweiterung country in die Anmeldephase klappte die Anmeldung nicht. Die dazu nütige Verknüpfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!"); break; - case "0.3.5": // SQL queries for v0.3.5 + case '0.3.5': // SQL queries for v0.3.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design wird nach Anmeldung auch endlich im Mitgliedsmenü übernommen."); break; - case "0.3.6": // SQL queries for v0.3.6 + case '0.3.6': // SQL queries for v0.3.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlermeldung Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190 beseitigt."); break; - case "0.3.7": // SQL queries for v0.3.7 + case '0.3.7': // SQL queries for v0.3.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlermeldung Fatal error: Call to undefined function: get_curr_themee() in /../../guest/what-register.php on line 190 beseitigt."); break; - case "0.3.8": // SQL queries for v0.3.8 + case '0.3.8': // SQL queries for v0.3.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Weitere SQL-Befehle abgesichert."); break; - case "0.3.9": // SQL queries for v0.3.9 + case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.4.0": // SQL queries for v0.4.0 + case '0.4.0': // SQL queries for v0.4.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.4.1": // SQL queries for v0.4.1 + case '0.4.1': // SQL queries for v0.4.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4."); break; - case "0.4.2": // SQL queries for v0.4.2 + case '0.4.2': // SQL queries for v0.4.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1"); @@ -268,62 +268,62 @@ PRIMARY KEY(id) EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl ist nicht mehr nötig."); break; - case "0.4.3": // SQL queries for v0.4.3 + case '0.4.3': // SQL queries for v0.4.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Parser-Error in inc/modules/guest/what-register.php beseitigt."); break; - case "0.4.4": // SQL queries for v0.4.4 + case '0.4.4': // SQL queries for v0.4.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt."); break; - case "0.4.5": // SQL queries for v0.4.5 + case '0.4.5': // SQL queries for v0.4.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt."); break; - case "0.4.6": // SQL queries for v0.4.6 + case '0.4.6': // SQL queries for v0.4.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Einstellung nach {!POINTS!}-Einstellungen verlagert."); break; - case "0.4.7": // SQL queries for v0.4.7 + case '0.4.7': // SQL queries for v0.4.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("set_session() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); break; - case "0.4.8": // SQL queries for v0.4.8 + case '0.4.8': // SQL queries for v0.4.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); break; - case "0.4.9": // SQL queries for v0.4.9 + case '0.4.9': // SQL queries for v0.4.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt."); break; - case "0.5.0": // SQL queries for v0.5.0 + case '0.5.0': // SQL queries for v0.5.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlermeldung Fatal error: Call to undefined function REGISTER_ADD_CATEGORY_TABLE() in {!PATH!}/inc/modules/guest/what-register.php on line 434 beseitigt."); break; - case "0.5.1": // SQL queries for v0.5.1 + case '0.5.1': // SQL queries for v0.5.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mail-Template register-member.tpl gefixt. Danke an wliepe für die Fehlerfindung!"); break; - case "0.5.2": // SQL queries for v0.5.2 + case '0.5.2': // SQL queries for v0.5.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index 283a521ddd..44e548f90a 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.1"); +EXT_SET_VERSION('0.0.1'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); @@ -64,7 +64,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip'"); @@ -72,20 +72,20 @@ case "remove": // Do stuff when removing extension UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Add filters REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run); @@ -96,10 +96,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-repair.php b/inc/extensions/ext-repair.php index 20e2ef1d5c..baf881cac3 100644 --- a/inc/extensions/ext-repair.php +++ b/inc/extensions/ext-repair.php @@ -43,38 +43,38 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.5"); +EXT_SET_VERSION('0.1.5'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.1": // SQL queries for v0.1 + case '0.1.0': // SQL queries for v0.1 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amenu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmenu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmenu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')"); @@ -83,37 +83,37 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Fügt ein Menüpunkt zur Reperatur der Gewichtung des Admin-Menüs hinzu."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmmm...."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ungütiges Update nach neuster Konvention (Erweiterung menu ist ung&uum;ltig)."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index 3af6cb2f37..d24d4daf29 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.3"); +EXT_SET_VERSION('0.1.3'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // Check if mod_rewrite is loadeded if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){ EXT_SET_REPORTS_FAILURE(true); @@ -61,12 +61,12 @@ case "register": // Do stuff when installation is running (modules.php?module=ad ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // Check if mod_rewrite is loadeded if (!IF_APACHE_MODULE_LOADED('mod_rewrite')) { SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", __FILE__, __LINE__); @@ -78,53 +78,53 @@ case "activate": // Do stuff when admin activates this extension ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: bid, mid, url, page, offset"); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: type, do=search"); - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("URLs zu MXChange.org (".SERVER_URL.") sind nun auch wieder gültig."); + EXT_SET_UPDATE_NOTES("URLs zu MXChange.org ({!SERVER_URL!}) sind nun auch wieder gültig."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetausch: sub, home"); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Links im Admin- und Mitgliedsbereich werden nicht mehr umgeschrieben. Entsprechend fällt die neue .htaccess-Datei kleiner aus. Bitte anpassen!"); - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Links im Frametester-Modul werden nicht mehr umgeschrieben."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module übersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)"); @@ -132,21 +132,21 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Zu überspringende Module können per Admin-Bereich eingestellt werden."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.3": + case '0.1.3': // Check if mod_rewrite is loadeded if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){ EXT_SET_REPORTS_FAILURE(true); @@ -157,10 +157,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php index 0ae1498f85..7b090f1948 100644 --- a/inc/extensions/ext-safe.php +++ b/inc/extensions/ext-safe.php @@ -44,33 +44,33 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -79,10 +79,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index 7ff4c6dd33..d6d925a6b5 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -42,19 +42,19 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // // SQL commands to run // // Try to make it depend on repair - EXT_ADD_UPDATE_DEPENDS("repair"); + EXT_ADD_UPDATE_DEPENDS('repair'); // // Sponsor data @@ -369,7 +369,7 @@ PRIMARY KEY(id) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`"); @@ -388,7 +388,7 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1"); @@ -396,7 +396,7 @@ case "activate": // Do stuff when admin activates this extension ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1"); @@ -404,10 +404,10 @@ case "deactivate": // Do stuff when admin deactivates this extension ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -416,10 +416,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index adfdd0f164..06798822b1 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -43,19 +43,19 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.6.2"); +EXT_SET_VERSION('0.6.2'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // Drop tables ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`"); @@ -120,20 +120,20 @@ case "remove": // Do stuff when removing extension */ break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ext_autopurge ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)"); @@ -141,28 +141,28 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Es kann nun bestimmt werden, ob vom Server gelöschte ext-xxx.php erkannt werden sollen und die verknüpften Daten auch aus der Datenbank entfernt werden sollen."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14).""); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("In der Tabelle {!_MYSQL_PREFIX!}_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)"); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose oder € schreiben."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anzahl Mails pro Seite in EMail-Details ansehen und EMail-Archiv hinzugefügt."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5)"); @@ -170,42 +170,42 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Die what-welcome.php ist derzeit die "Home"-Seite (Eingangsseite). Dies kann nun per Datenbank geändert werden."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD ext_has_css ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Es können nun SQL-Updates von einander abhängig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' · '"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nette Mouse-Hover-Effekte eingebaut (Anleitung MENUE_HOVER.txt zum Patchen der general.css bitte lesen!)"); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Soll der einmalige Ref-Bonus über das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?"); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT 0"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365).""); @@ -214,7 +214,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); @@ -222,26 +222,26 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ungültiges Update (nach ext-theme.php verschoben!)."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Spalte ext_has_admin aus der Tabelle {!_MYSQL_PREFIX!}_extensions entfernt, da sie keinen Sinn mehr macht."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'"); @@ -254,22 +254,22 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der what-Dateien kann hinzugefügt werden."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("mad_count und last_mad werden nun aus der Datenbank geladen"); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_jackpot` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); @@ -279,19 +279,19 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert"); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'"); @@ -300,7 +300,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 $auto_type = "png"; // PNG image is the default if ((INCLUDE_READABLE("theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) { // Switch to JPEG format @@ -312,19 +312,19 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion imagecreatefromjpeg() und das JPEG-Bild vorhanden sind oder nicht."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Spalten max_mails und receive_mails auf BIGINT(20) gesetzt."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abzug von {!POINTS!} nun möglich."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"); @@ -335,12 +335,12 @@ case "update": // Update an extension "); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"); @@ -349,7 +349,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailvergütungen...' WHERE `what`='payments' LIMIT 1"); @@ -357,7 +357,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Zwei Menüpunkte umbenannt."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD UNIQUE KEY (ext_name)"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD UNIQUE KEY (login)"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` ADD INDEX (visible)"); @@ -389,7 +389,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Connection table between the menu system and the "logical area" system ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las` ( @@ -425,7 +425,7 @@ PRIMARY KEY(id) EXT_SET_UPDATE_NOTES("Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure... ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'"); @@ -444,12 +444,12 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Admin-abhängig werden nun Klicks im Admin-Menü gezählt, die zur automatischen Anpassung des Menüs in den logischen Bereichen diennen. Dieses "intelligente Unbauen" können Sie auch ganz abschalten."); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Veraltetes Update (what=list_user&mode=noref)"); break; - case "0.3.5": // SQL queries for v0.3.5 + case '0.3.5': // SQL queries for v0.3.5 // List accounts with no referal ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')"); @@ -463,7 +463,7 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); break; - case "0.3.6": // SQL queries for v0.3.6 + case '0.3.6': // SQL queries for v0.3.6 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''"); @@ -478,11 +478,11 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"); break; - case "0.3.7": // SQL queries for v0.3.7 + case '0.3.7': // SQL queries for v0.3.7 EXT_SET_UPDATE_NOTES("Problem während des Installationsvorganges behoben."); break; - case "0.3.8": // SQL queries for v0.3.8 + case '0.3.8': // SQL queries for v0.3.8 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE descr descr MEDIUMTEXT NULL"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` CHANGE `text` `text` LONGTEXT NOT NULL"); @@ -490,7 +490,7 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."); break; - case "0.3.9": // SQL queries for v0.3.9 + case '0.3.9': // SQL queries for v0.3.9 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"); @@ -500,26 +500,26 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes."); break; - case "0.4.0": // SQL queries for v0.4.0 + case '0.4.0': // SQL queries for v0.4.0 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Email-Verwaltung nach Email-Management umbenannt."); break; - case "0.4.1": // SQL queries for v0.4.1 + case '0.4.1': // SQL queries for v0.4.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet."); break; - case "0.4.2": // SQL queries for v0.4.2 + case '0.4.2': // SQL queries for v0.4.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); break; - case "0.4.3": // SQL queries for v0.4.3 + case '0.4.3': // SQL queries for v0.4.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''"); @@ -530,7 +530,7 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugefügt."); break; - case "0.4.4": // SQL queries for v0.4.4 + case '0.4.4': // SQL queries for v0.4.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL"); @@ -549,7 +549,7 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert."); break; - case "0.4.5": // SQL queries for v0.4.5 + case '0.4.5': // SQL queries for v0.4.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'"); @@ -557,29 +557,29 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Täglichen/wöchentlichen/monatlichen Reset verbessert."); break; - case "0.4.6": // SQL queries for v0.4.6 + case '0.4.6': // SQL queries for v0.4.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); break; - case "0.4.7": // SQL queries for v0.4.7 + case '0.4.7': // SQL queries for v0.4.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Veraltetes Update."); break; - case "0.4.8": // SQL queries for v0.4.8 + case '0.4.8': // SQL queries for v0.4.8 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Index für Betreff eingefügt."); break; - case "0.4.9": // SQL queries for v0.4.9 + case '0.4.9': // SQL queries for v0.4.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); break; - case "0.5.0": // SQL queries for v0.5.0 + case '0.5.0': // SQL queries for v0.5.0 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid`"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)"); @@ -588,21 +588,21 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr."); break; - case "0.5.1": // SQL queries for v0.5.1 + case '0.5.1': // SQL queries for v0.5.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP `descr`"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird."); break; - case "0.5.2": // SQL queries for v0.5.2 + case '0.5.2': // SQL queries for v0.5.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein."); break; - case "0.5.3": // SQL queries for v0.5.3 + case '0.5.3': // SQL queries for v0.5.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)"); @@ -610,43 +610,43 @@ PRIMARY KEY (id) EXT_SET_UPDATE_NOTES("Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig."); break; - case "0.5.4": // SQL queries for v0.5.4 + case '0.5.4': // SQL queries for v0.5.4 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')"); // Depends on refback extension - EXT_ADD_UPDATE_DEPENDS("refback"); + EXT_ADD_UPDATE_DEPENDS('refback'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ref-Übersicht eingebaut. Diese hängt von der Erweiterung refback ab."); break; - case "0.5.5": // SQL queries for v0.5.5 + case '0.5.5': // SQL queries for v0.5.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anzeige der {!POINTS!} unter den unbestätigten Mails kann nun optional abgeschaltet werden."); break; - case "0.5.6": // SQL queries for v0.5.6 + case '0.5.6': // SQL queries for v0.5.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); break; - case "0.5.7": // SQL queries for v0.5.7 + case '0.5.7': // SQL queries for v0.5.7 ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben."); break; - case "0.5.8": // SQL queries for v0.5.8 + case '0.5.8': // SQL queries for v0.5.8 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sprachdateinamen werden nicht mehr in der Datenbank behalten."); break; - case "0.5.9": // SQL queries for v0.5.9 + case '0.5.9': // SQL queries for v0.5.9 ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_filters` ( `filter_id` BIGINT(20) UNSIGNED AUTO_INCREMENT, @@ -662,21 +662,21 @@ PRIMARY KEY (`filter_id`) EXT_SET_UPDATE_NOTES("Tabellen für Filter-System hinzugefügt."); break; - case "0.6.0": // SQL queries for v0.6.0 + case '0.6.0': // SQL queries for v0.6.0 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte ausschliesslich zu Debugging-Zwecken eingesetzt werden."); break; - case "0.6.1": // SQL queries for v0.6.1 + case '0.6.1': // SQL queries for v0.6.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); break; - case "0.6.2": // SQL queries for v0.6.2 + case '0.6.2': // SQL queries for v0.6.2 // Depends on refback extension - EXT_ADD_UPDATE_DEPENDS("user"); + EXT_ADD_UPDATE_DEPENDS('user'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abhängigkeit von ext-user gesetzt."); @@ -684,17 +684,17 @@ PRIMARY KEY (`filter_id`) } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded // When the sql_patches is not installed we cannot load it's configuration... *sigh* - if (GET_EXT_VERSION("sql_patches") != '') { + if (GET_EXT_VERSION('sql_patches') != '') { // Init key - setConfigEntry('secret_key', ""); + setConfigEntry('secret_key', ''); // Read key from secret file if ((getConfig('file_hash') == "") || (getConfig('master_salt') == "") || (getConfig('pass_scramble') == "")) { @@ -703,7 +703,7 @@ default: // Do stuff when extension is loaded LOAD_INC_ONCE("inc/gen_sql_patches.php"); // @TODO Rewrite this to a filter! - if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isCacheInstanceValid())) { + if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) { // Remove extensions and mod_reg cache file LOAD_INC_ONCE("inc/libs/cache_functions.php"); require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH'))); @@ -721,7 +721,7 @@ default: // Do stuff when extension is loaded setConfigEntry('secret_key', READ_FILE($hashFile)); } else { // Remove it from database - UPDATE_CONFIG("file_hash", ""); + UPDATE_CONFIG("file_hash", ''); // Cannot read secret file! app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload"); diff --git a/inc/extensions/ext-support.php b/inc/extensions/ext-support.php index 093c2cfc21..3788b0fe10 100644 --- a/inc/extensions/ext-support.php +++ b/inc/extensions/ext-support.php @@ -43,97 +43,97 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.2"); +EXT_SET_VERSION('0.1.2'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL(""); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL(""); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate vom 27.08.2005."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern der Support-Anfrage repariert und Mail wird an Mitglied wieder versendet."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index d9a4535db4..25da0e013f 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run (surfbar URLs) ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_urls` ( @@ -193,7 +193,7 @@ UNIQUE KEY `status_action` (`status`,`action`) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`"); @@ -204,21 +204,21 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='Y' WHERE `module`='surfbar' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='surfbar' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='surfbar' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -227,10 +227,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index 72eff41124..8581cf6a53 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -43,114 +43,114 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.3.2"); +EXT_SET_VERSION('0.3.2'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='task' AND ext_has_css='N' LIMIT 1"); // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); break; - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Unnötige Script-Teile aus what-list_tasks.php herausgelöscht; beim Anzeigen einer Extension-Update, oder -Register Aufgabe werden bei eingeschaltetem Verbose-Modus alle SQL-Anweisungen aufgelistet."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227
behoben."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("&admin= in &amp;admin= umgewandelt."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erstellung der Extra-Übersichten verbessert."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler bei Abfrage der payout-Erweiterung beseitigt."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Task-Liste ausgelagert als Template"); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Links wegen what=admins_contct geändert."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:
    @@ -162,84 +162,84 @@ case "update": // Update an extension
"); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Direkt Links zum Sponsorenbereich vorbereitend eingebaut."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)"); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit überlanger Textbreite beseitigt."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum Freischalten von Sponoren-Accounts korregiert."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Nur mit bonus v0.6.9 oder höher: Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Teilnehmer der Bettel-Rallye werden angezeigt."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert."); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt. Update-Aufgaben werden nach "Bearbeitung" nicht mehr als Erledigt gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben müssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Export-Accounts werden in Task-Übersicht aufgelistet."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt)."); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // This update depends on user update - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Hängt nun von ext-user ab."); @@ -247,10 +247,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index 21c0b0c08c..9ba001ca64 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -43,18 +43,18 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0.8"); +EXT_SET_VERSION('0.0.8'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // Drop theme table ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`"); @@ -68,55 +68,55 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code für ein Zeilen-Template ausgelagert."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Im Menüpunkt "Prüfen" wurden die bereits installierten und auch aktuellen Themes nicht ausgeblendet."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("set_session() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal geändert."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ungültiges Update."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Theme table ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_themes` ( @@ -154,10 +154,10 @@ INDEX (`theme_active`) } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index c64c944dd8..5874c1e8e5 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -43,105 +43,105 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.1.2"); +EXT_SET_VERSION('0.1.2'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10'"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler Column: 'userid' in group statement is ambiguous im Gastbereich beseitigt."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Im Gastbereich konnte als Nicht-Admin die Seite nicht geöffnet werden."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Rechtschreibefehler beseitigt."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index c0dacf5590..0633931c08 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.2.9"); +EXT_SET_VERSION('0.2.9'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running +case 'register': // Do stuff when installation is running // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`"); @@ -103,7 +103,7 @@ PRIMARY KEY(id) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`"); @@ -112,180 +112,180 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227
behoben."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); break; - case "0.0.5": // SQL queries for v0.0.5 + case '0.0.5': // SQL queries for v0.0.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link Auflisten im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!"); break; - case "0.0.6": // SQL queries for v0.0.6 + case '0.0.6': // SQL queries for v0.0.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); break; - case "0.0.7": // SQL queries for v0.0.7 + case '0.0.7': // SQL queries for v0.0.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.0.8": // SQL queries for v0.0.8 + case '0.0.8': // SQL queries for v0.0.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit E in Transaktionsnummer beseitigt."); break; - case "0.0.9": // SQL queries for v0.0.9 + case '0.0.9': // SQL queries for v0.0.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); break; - case "0.1.0": // SQL queries for v0.2.1 + case '0.1.0': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Template admin_config_transfer_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wort Punkte dynamisiert."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Parser-Error im Mitgliedsbereich beseitigt."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Durchführung des Transfers korregiert."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')"); // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Touring-Code wiederholen nach Touring-Code eingeben hin geändert."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett geändert."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Die {!POINTS!} können nun wieder wie gewohnt transferiert werden. Der Grund für {--TRANSFER_INVALID_PASSWORD--} war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/"); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlermeldung Notice: Undefined index: to_uid in {!PATH!}/inc/modules/member/what-transfer.php on line 301 gefixt. Danke an Piter01."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded - if ((isResetModeEnabled()) && (getConfig('ap_transfer') == "Y")) { + if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) { // Automatically remove outdated or not displayed transactions TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age')); } diff --git a/inc/extensions/ext-usage.php b/inc/extensions/ext-usage.php index d65a3f2029..6867111ea5 100644 --- a/inc/extensions/ext-usage.php +++ b/inc/extensions/ext-usage.php @@ -8,7 +8,7 @@ * -------------------------------------------------------------------- * * Short description : Helper extension for usage directory * * -------------------------------------------------------------------- * - * Kurzbeschreibung : Helfer-Erweiterung fuer das "usage" Verzeichnis * + * Kurzbeschreibung : Helfer-Erweiterung fuer das 'usage' Verzeichnis * * -------------------------------------------------------------------- * * $Revision:: $ * * $Date:: $ * @@ -43,36 +43,36 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -81,10 +81,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index ba552a6596..f2d8ab6f60 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -43,14 +43,14 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.3.5"); +EXT_SET_VERSION('0.3.5'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_cats` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, @@ -170,7 +170,7 @@ INDEX (`stats_type`) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_cats','Kategorien anzeigen','Listet die ausgewählten Kategorien eines Mitgliedes auf.',9)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`"); @@ -182,84 +182,84 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL(""); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.1": // SQL queries for v0.1 + case '0.1.0': // SQL queries for v0.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seitenweises Anzeigen der User-Liste ist nun möglich."); break; - case "0.1.1": // SQL queries for v0.1.1 + case '0.1.1': // SQL queries for v0.1.1 // This update depends on sql_patches update! - EXT_ADD_UPDATE_DEPENDS("sql_patches"); + EXT_ADD_UPDATE_DEPENDS('sql_patches'); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Ungültiges Update."); break; - case "0.1.2": // SQL queries for v0.1.2 + case '0.1.2': // SQL queries for v0.1.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Dem Mitglied wird nun angezeigt, wie viele Mails er bestätigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr berücksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit."); break; - case "0.1.3": // SQL queries for v0.1.3 + case '0.1.3': // SQL queries for v0.1.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Den Pfad Sie sind hier im Menüpunkt Online-Liste erweitert."); break; - case "0.1.4": // SQL queries for v0.1.4 + case '0.1.4': // SQL queries for v0.1.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anzahl empfangener Mails wird angezeigt. Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!"); break; - case "0.1.5": // SQL queries for v0.1.5 + case '0.1.5': // SQL queries for v0.1.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.6": // SQL queries for v0.1.6 + case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); break; - case "0.1.7": // SQL queries for v0.1.7 + case '0.1.7': // SQL queries for v0.1.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv."); break; - case "0.1.8": // SQL queries for v0.1.8 + case '0.1.8': // SQL queries for v0.1.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); break; - case "0.1.9": // SQL queries for v0.1.9 + case '0.1.9': // SQL queries for v0.1.9 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); break; - case "0.2.0": // SQL queries for v0.2.0 + case '0.2.0': // SQL queries for v0.2.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt."); break; - case "0.2.1": // SQL queries for v0.2.1 + case '0.2.1': // SQL queries for v0.2.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)"); @@ -267,73 +267,73 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt."); break; - case "0.2.2": // SQL queries for v0.2.2 + case '0.2.2': // SQL queries for v0.2.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt."); break; - case "0.2.3": // SQL queries for v0.2.3 + case '0.2.3': // SQL queries for v0.2.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich."); break; - case "0.2.4": // SQL queries for v0.2.4 + case '0.2.4': // SQL queries for v0.2.4 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); break; - case "0.2.5": // SQL queries for v0.2.5 + case '0.2.5': // SQL queries for v0.2.5 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("SQL-Anweisungen abgesichert."); break; - case "0.2.6": // SQL queries for v0.2.6 + case '0.2.6': // SQL queries for v0.2.6 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); break; - case "0.2.7": // SQL queries for v0.2.7 + case '0.2.7': // SQL queries for v0.2.7 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); break; - case "0.2.8": // SQL queries for v0.2.8 + case '0.2.8': // SQL queries for v0.2.8 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt."); break; - case "0.2.9": // SQL queries for v0.2.9 + case '0.2.9': // SQL queries for v0.2.9 ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Admin-Kontaktformular hinzugefügt."); break; - case "0.3.0": // SQL queries for v0.3.0 + case '0.3.0': // SQL queries for v0.3.0 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt.
Diverse Fixes für 0.2.1-Beta1 Release."); break; - case "0.3.1": // SQL queries for v0.3.1 + case '0.3.1': // SQL queries for v0.3.1 ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt"); break; - case "0.3.2": // SQL queries for v0.3.2 + case '0.3.2': // SQL queries for v0.3.2 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von 0.00000 unbestätigten Mails gefixt."); break; - case "0.3.3": // SQL queries for v0.3.3 + case '0.3.3': // SQL queries for v0.3.3 // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und bestätigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung task!)"); break; - case "0.3.4": // SQL queries for v0.3.4 + case '0.3.4': // SQL queries for v0.3.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); @@ -342,7 +342,7 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Mitglieder werden per Zufall als Referal-ID ausgewählt, die eine Mindestanzahl an bestätigten Mails haben, wenn die Ref-Id 0 ist."); break; - case "0.3.5": // SQL queries for v0.3.5 + case '0.3.5': // SQL queries for v0.3.5 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""); @@ -368,10 +368,10 @@ PRIMARY KEY(`id`) } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index a87848c046..7fdd4b9ce8 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -38,14 +38,14 @@ if (!defined('__SECURITY')) { } // Version of this extension -EXT_SET_VERSION("0.0.4"); +EXT_SET_VERSION('0.0.4'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`"); ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` ( @@ -83,7 +83,7 @@ PRIMARY KEY(id) ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`"); ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'"); @@ -91,22 +91,22 @@ case "remove": // Do stuff when removing extension ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1"); break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1"); ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1"); break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); @@ -120,21 +120,21 @@ case "update": // Update an extension EXT_SET_UPDATE_NOTES("Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}->Wernis versehen. Prozentualer Abzug als "Betreibergebühr hinzugefügt, was z.B. für Wechselstuben interessant ist."); break; - case "0.0.2": // SQL queries for v0.0.2 + case '0.0.2': // SQL queries for v0.0.2 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden."); break; - case "0.0.3": // SQL queries for v0.0.3 + case '0.0.3': // SQL queries for v0.0.3 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'"); // Update notes (these will be set as task text!) EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert."); break; - case "0.0.4": // SQL queries for v0.0.4 + case '0.0.4': // SQL queries for v0.0.4 ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'"); // Update notes (these will be set as task text!) @@ -143,10 +143,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index 3dccf5fae5..e2f6d71616 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -44,17 +44,17 @@ if (!defined('__SECURITY')) { } // Version number -EXT_SET_VERSION("0.0"); +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0")); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); // This extension is deprecated! // Only since 'network' is ready! EXT_SET_DEPRECATED("Y"); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) +case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); @@ -84,24 +84,24 @@ UNIQUE `y_type` (`type`,`y_id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Reload lock reminder for Yoo!Media campaigns'"); break; -case "remove": // Do stuff when removing extension +case 'remove': // Do stuff when removing extension // SQL commands to run ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')"); ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`"); break; -case "activate": // Do stuff when admin activates this extension +case 'activate': // Do stuff when admin activates this extension // SQL commands to run break; -case "deactivate": // Do stuff when admin deactivates this extension +case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run break; -case "update": // Update an extension +case 'update': // Update an extension switch ($EXT_VER) { - case "0.0.1": // SQL queries for v0.0.1 + case '0.0.1': // SQL queries for v0.0.1 ADD_EXT_SQL(""); // Update notes (these will be set as task text!) @@ -110,10 +110,10 @@ case "update": // Update an extension } break; -case "modify": // When the extension got modified +case 'modify': // When the extension got modified break; -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. +case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; default: // Do stuff when extension is loaded diff --git a/inc/fatal_errors.php b/inc/fatal_errors.php index f1f1ee7001..88f5c509a5 100644 --- a/inc/fatal_errors.php +++ b/inc/fatal_errors.php @@ -47,10 +47,10 @@ if (getTotalFatalErrors() > 0) { LOAD_TEMPLATE("fatal_header"); // Set unset variable - if (empty($check)) $check = ""; + if (empty($check)) $check = ''; if ((isInstalling()) || (!isInstalled())) { // While we are installing ouput other header than while it is installed... :-) - $OUT = ""; + $OUT = ''; foreach (getFatalArray() as $key => $value) { // Prepare content for the template $content = array( @@ -66,7 +66,7 @@ if (getTotalFatalErrors() > 0) { LOAD_TEMPLATE("install_fatal_table", false, $OUT); } elseif (isInstalled()) { // Display all runtime fatal errors - $OUT = ""; + $OUT = ''; foreach (getFatalArray() as $key => $value) { // Prepare content for the template $content = array( diff --git a/inc/filters.php b/inc/filters.php index 80e45043c3..b98a265a72 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -66,10 +66,10 @@ function INIT_FILTER_SYSTEM () { $GLOBALS['filters']['counter'] = array(); // Load all saved filers if sql_patches is updated - if (GET_EXT_VERSION("sql_patches") >= "0.5.9") { + if (GET_EXT_VERSION('sql_patches') >= '0.5.9') { // Init add - $add = ""; - if (GET_EXT_VERSION("sql_patches") >= "0.6.0") $add = ", `filter_counter`"; + $add = ''; + if (GET_EXT_VERSION('sql_patches') >= '0.6.0') $add = ", `filter_counter`"; // Load all active filers $result = SQL_QUERY("SELECT `filter_name`,`filter_function`,`filter_active`".$add." @@ -213,7 +213,7 @@ function runFilterChain ($filterName, $data = null, $silentAbort = true) { //* DEBUG: */ echo __FUNCTION__."(".__LINE__."): name={$filterName},func={$filterFunction},active={$active}
\n"; // Is the filter active? - if ($active == "Y") { + if ($active == 'Y') { // Is this filter there? if (!function_exists($filterFunction)) { // Unregister it @@ -258,7 +258,7 @@ function FILTER_FLUSH_FILTERS () { } // END - if // Is the extension sql_patches updated? - if (EXT_VERSION_IS_OLDER("sql_patches", "0.5.9")) { + if (EXT_VERSION_IS_OLDER('sql_patches', '0.5.9')) { // Abort silently here return false; } // END - if @@ -306,7 +306,7 @@ function FILTER_FLUSH_FILTERS () { } // END - if // Shall we update usage counters (ONLY FOR DEBUGGING!) - if (getConfig('update_filter_usage') == "Y") { + if (getConfig('update_filter_usage') == 'Y') { // Update all counters foreach ($GLOBALS['filters']['counter'] as $filterName => $filterArray) { // Walk through all filters @@ -332,7 +332,7 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) { // Handle failed logins here if not in guest //* DEBUG: */ print __FUNCTION__."(".__LINE__."):type={$data['type']},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$data['access_level']}
\n"; - if ((($data['type'] == "what") || ($data['type'] == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != "guest") && ((GET_EXT_VERSION("sql_patches") >= "0.4.7") || (GET_EXT_VERSION("admins") >= "0.7.0"))) { + if ((($data['type'] == "what") || ($data['type'] == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) { // Handle failure $content['content'] .= HANDLE_LOGIN_FAILTURES($data['access_level']); } // END - if @@ -359,7 +359,7 @@ function FILTER_REDIRECT_TO_LOGOUT_SQL_PATCHES () { // Filter for auto-activation of a extension function FILTER_AUTO_ACTIVATE_EXTENSION ($data) { // Is this extension always activated? - if (EXT_GET_ALWAYS_ACTIVE() == "Y") { + if (EXT_GET_ALWAYS_ACTIVE() == 'Y') { // Then activate the extension //* DEBUG: */ echo __FUNCTION__."(".__LINE__."): ext_name={$data['ext_name']}
\n"; ACTIVATE_EXTENSION($data['ext_name']); @@ -502,12 +502,12 @@ function FILTER_CHECK_ADMIN_ACL () { $ret = true; // Ok, Cookie-Update done - if (GET_EXT_VERSION("admins") >= "0.3") { + if (GET_EXT_VERSION('admins') >= '0.3.0') { // Check if action GET variable was set $action = SQL_ESCAPE($GLOBALS['action']); if (!empty($GLOBALS['what'])) { // Get action value by what-value - $action = GET_ACTION("admin", $GLOBALS['what']); + $action = GET_ACTION('admin', $GLOBALS['what']); } // END - if // Check for access control line of current menu entry diff --git a/inc/footer.php b/inc/footer.php index 3e945565b5..1fbee0b05f 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -65,7 +65,7 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != "1") && } // END - if // Shall we display the parsing time and number of queries? - if ((GET_EXT_VERSION("sql_patches") >= "0.4.1") && (getConfig('show_timings') == "Y") && (!REQUEST_ISSET_GET(('frame'))) && ($GLOBALS['header_sent'] == "2")) { + if ((GET_EXT_VERSION('sql_patches') >= '0.4.1') && (getConfig('show_timings') == 'Y') && (!REQUEST_ISSET_GET(('frame'))) && ($GLOBALS['header_sent'] == "2")) { // Then display it here DISPLAY_PARSING_TIME_FOOTER(); } // END - if diff --git a/inc/functions.php b/inc/functions.php index 178dfb30eb..e5a3be66f8 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -70,7 +70,7 @@ function OUTPUT_HTML ($HTML, $newLine = true) { case "direct": // If we are switching from render to direct output rendered code - if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != "on")) { OUTPUT_RAW($OUTPUT); $OUTPUT = ""; } + if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != "on")) { OUTPUT_RAW($OUTPUT); $OUTPUT = ''; } // The same as above... ^ OUTPUT_RAW($HTML); @@ -114,15 +114,15 @@ function OUTPUT_HTML ($HTML, $newLine = true) { header("Pragma: no-cache"); // HTTP/1.0 header("Connection: Close"); - // Extension "rewrite" installed? - if ((EXT_IS_ACTIVE("rewrite")) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) { + // Extension 'rewrite' installed? + if ((EXT_IS_ACTIVE('rewrite')) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) { $OUTPUT = REWRITE_LINKS($OUTPUT); } // END - if // Compile and run finished rendered HTML code while (strpos($OUTPUT, '{!') > 0) { // Prepare the content and eval() it... - $newContent = ""; + $newContent = ''; $eval = "\$newContent = \"".COMPILE_CODE(smartAddSlashes($OUTPUT))."\";"; eval($eval); @@ -138,7 +138,7 @@ function OUTPUT_HTML ($HTML, $newLine = true) { OUTPUT_RAW($OUTPUT); } elseif ((constant('OUTPUT_MODE') == "render") && (!empty($OUTPUT))) { // Rewrite links when rewrite extension is active - if ((EXT_IS_ACTIVE("rewrite")) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) { + if ((EXT_IS_ACTIVE('rewrite')) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) { $OUTPUT = REWRITE_LINKS($OUTPUT); } // END - if @@ -176,7 +176,7 @@ function getFatalArray () { } // Add a fatal error message to the queue array -function addFatalMessage ($F, $L, $message, $extra="") { +function addFatalMessage ($F, $L, $message, $extra='') { debug_report_bug($message); if (is_array($extra)) { // Multiple extras for a message with masks @@ -228,7 +228,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { $HTTP_USER_AGENT = GET_USER_AGENT(); // Init some data - $ret = ""; + $ret = ''; if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0; // @DEPRECATED Try to rewrite the if() condition @@ -264,7 +264,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { // Base directory $BASE = sprintf("%stemplates/%s/html/", constant('PATH'), GET_LANGUAGE()); - $MODE = ""; + $MODE = ''; // Check for admin/guest/member templates if (strpos($template, "admin_") > -1) { @@ -330,7 +330,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { while (strpos($tmpl_file, "'") !== false) { $tmpl_file = str_replace("'", '{QUOT}', $tmpl_file); } // Do we have to compile the code? - $ret = ""; + $ret = ''; if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) { // Okay, compile it! $tmpl_file = "\$ret=\"".COMPILE_CODE(smartAddSlashes($tmpl_file))."\";"; @@ -449,13 +449,13 @@ To : ".$toEmail." Subject : ".$subject." Message : ".$message." \n"); - } elseif (($HTML == "Y") && (EXT_IS_ACTIVE("html_mail"))) { + } elseif (($HTML == 'Y') && (EXT_IS_ACTIVE('html_mail'))) { // Send mail as HTML away SEND_HTML_EMAIL($toEmail, $subject, $message, $mailHeader); } elseif (!empty($toEmail)) { // Send Mail away SEND_RAW_EMAIL($toEmail, $subject, $message, $mailHeader); - } elseif ($HTML == "N") { + } elseif ($HTML == 'N') { // Problem found! SEND_RAW_EMAIL(constant('WEBMASTER'), "[PROBLEM:]".$subject, $message, $mailHeader); } @@ -495,7 +495,7 @@ function SEND_RAW_EMAIL ($toEmail, $subject, $msg, $from) { } $mail->FromName = constant('MAIN_TITLE'); $mail->Subject = $subject; - if ((EXT_IS_ACTIVE("html_mail")) && (strip_tags($msg) != $msg)) { + if ((EXT_IS_ACTIVE('html_mail')) && (strip_tags($msg) != $msg)) { $mail->Body = $msg; $mail->AltBody = "Your mail program required HTML support to read this mail!"; $mail->WordWrap = 70; @@ -503,7 +503,7 @@ function SEND_RAW_EMAIL ($toEmail, $subject, $msg, $from) { } else { $mail->Body = decodeEntities($msg); } - $mail->AddAddress($toEmail, ""); + $mail->AddAddress($toEmail, ''); $mail->AddReplyTo(constant('WEBMASTER'), constant('MAIN_TITLE')); $mail->AddCustomHeader("Errors-To:".constant('WEBMASTER')); $mail->AddCustomHeader("X-Loop:".constant('WEBMASTER')); @@ -524,7 +524,7 @@ function GEN_PASS ($LEN = 0) { $ABC = explode(",", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/"); // Start creating password - $PASS = ""; + $PASS = ''; for ($i = 0; $i < $LEN; $i++) { $PASS .= $ABC[mt_rand(0, count($ABC) -1)]; } // END - for @@ -701,7 +701,7 @@ function GET_LANGUAGE() { $ret = constant('DEFAULT_LANG'); // Init variable - $lang = ""; + $lang = ''; // Is the variable set if (REQUEST_ISSET_GET(('mx_lang'))) { @@ -745,7 +745,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") { // Make sure all template names are lowercase! $template = strtolower($template); - // Default "nickname" if extension is not installed + // Default 'nickname' if extension is not installed $nick = "---"; // Prepare IP number and User Agent @@ -786,7 +786,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") { //* DEBUG: */ print __FUNCTION__."(".__LINE__."):UID={$UID},template={$template},content[]=".gettype($content)."
\n"; if (($UID > 0) && (is_array($content))) { // If nickname extension is installed, fetch nickname as well - if (EXT_IS_ACTIVE("nickname")) { + if (EXT_IS_ACTIVE('nickname')) { //* DEBUG: */ print __FUNCTION__."(".__LINE__."):NICKNAME!
\n"; // Load nickname $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", @@ -848,7 +848,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") { } // END - if // Now does the final template exists? - $newContent = ""; + $newContent = ''; if (FILE_READABLE($FQFN)) { // The local file does exists so we load it. :) $tmpl_file = READ_FILE($FQFN); @@ -938,9 +938,9 @@ function LOAD_URL ($URL, $addUrlData=true) { header ("Location: ".str_replace("&", "&", $URL)); } else { // Output error message - LOAD_INC("inc/header.php"); + LOAD_INC('inc/header.php'); LOAD_TEMPLATE("redirect_url", false, str_replace("&", "&", $URL)); - LOAD_INC("inc/footer.php"); + LOAD_INC('inc/footer.php'); } // Shut the mailer down here @@ -1099,7 +1099,7 @@ function array_pk_sort (&$array, $a_sort, $primary_key = 0, $order = -1, $nums = // function ADD_SELECTION ($type, $DEFAULT, $prefix="", $id="0") { - $OUT = ""; + $OUT = ''; if ($type == "yn") { // This is a yes/no selection only! @@ -1135,7 +1135,7 @@ function ADD_SELECTION ($type, $DEFAULT, $prefix="", $id="0") { $YEAR = date('Y', time()); // Use configured min age or fixed? - if (GET_EXT_VERSION("other") >= "0.2.1") { + if (GET_EXT_VERSION('other') >= '0.2.1') { // Configured $startYear = $YEAR - getConfig('min_age'); } else { @@ -1163,7 +1163,7 @@ function ADD_SELECTION ($type, $DEFAULT, $prefix="", $id="0") { // Get current year and subtract the configured minimum age $OUT .= "\n"; // Calculate earliest year depending on extension version - if (GET_EXT_VERSION("other") >= "0.2.1") { + if (GET_EXT_VERSION('other') >= '0.2.1') { // Use configured minimum age $YEAR = date('Y', time()) - getConfig('min_age'); } else { @@ -1201,9 +1201,9 @@ function ADD_SELECTION ($type, $DEFAULT, $prefix="", $id="0") { case "yn": $OUT .= "\n"; } diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index b96b4d2f9c..e52aa4941a 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -74,14 +74,14 @@ ORDER BY type", array($points), __FUNCTION__, __LINE__); OUTPUT_HTML(""); } else { // No payout types setup so far - LOAD_TEMPLATE("admin_settings_saved", false, "
{--PAYOUT_NO_PAYOUT_TYPES--}{--PAYOUT_NO_PAYOUT_TYPES--}{--PAYOUT_NO_POINTS_ENTERED--}{--PAYOUT_NO_POINTS_ENTERED--}data = $postReturn; if ($postReturn["status"] == self::PI_GET_PRIMERA_DONE) { - $primera = $postReturn["primera"]; + $primera = $postReturn['primera']; } return $primera; } @@ -244,7 +244,7 @@ function PRIMERA_TEST_API () { // Execute the withdraw of a sponsor only! function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) { // Is the sponsor extension installed? - if (!EXT_IS_ACTIVE("sponsor")) { + if (!EXT_IS_ACTIVE('sponsor')) { // No, abort here return false; } elseif (!IS_SPONSOR()) { diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index 5f83e14adb..9b466ebb96 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -112,7 +112,7 @@ VALUES ('%s','%s','%s','%s')", $DATA['refs'] = $cnt; // Shall I notify this member? - if (($notify == "Y") && ($un)) { + if (($notify == 'Y') && ($un)) { // Load email template and send it to the user $msg = LOAD_EMAIL_TEMPLATE("member_rallye_notify", array('prices' => $prices), $content['userid']); SEND_EMAIL($content['userid'], sprintf(getMessage('RALLYE_MEMBER_NOTIFY'), $title), $msg); @@ -121,7 +121,7 @@ VALUES ('%s','%s','%s','%s')", // Choose the right admin template $templ = "admin_rallye_no_notify"; - if ($notify == "Y") $templ = "admin_rallye_notify"; + if ($notify == 'Y') $templ = "admin_rallye_notify"; // Send email to admin SEND_ADMIN_NOTIFICATION(sprintf(getMessage('RALLYE_ADMIN_NOTIFY'), $title), $templ, $prices, "0"); @@ -130,11 +130,11 @@ VALUES ('%s','%s','%s','%s')", SQL_FREERESULT($result_user); } // -function RALLYE_ADD_PRICES ($rallye, $mode="email") { +function RALLYE_ADD_PRICES ($rallye, $mode='email') { // Output mode switch($mode) { - case "email": $mode = "\n"; break; - case "html" : $mode = "
\n"; break; + case 'email': $mode = "\n"; break; + case 'html' : $mode = "
\n"; break; } // Load prices @@ -142,7 +142,7 @@ function RALLYE_ADD_PRICES ($rallye, $mode="email") { if (SQL_NUMROWS($result_prices) > 0) { // Load prices if ($mode == "\n") $prices = "{--RALLYE_MEMBER_PRICES_ADDED--}:".$mode."------------------------------".$mode; - $prices = ""; + $prices = ''; while ($content = SQL_FETCHARRAY($result_prices)) { $prices .= $content['price_level'].getMessage('RALLYE_PRICE').": "; if (!empty($content['info'])) { @@ -208,7 +208,7 @@ LIMIT 1", array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCT $_uid = "---"; // List only users with at least one ref! //* DEBUG: */ echo "*".$cnt."/".$content['userid']."/".$content['curr_points']."/".$refpoints."*
\n"; - if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $_uid = $content['userid']; } else { $cnt = ""; } + if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $_uid = $content['userid']; } else { $cnt = ''; } // Save values to array $DATA['uid'][] = $_uid; @@ -254,10 +254,10 @@ LIMIT 1", array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCT // Run this function only when a new member has confirmed his email address! function RALLYE_AUTOADD_USER ($uid) { global $DATA; - $add = ""; + $add = ''; // Updated extension? - if (GET_EXT_VERSION("rallye") >= "0.2.0") { + if (GET_EXT_VERSION('rallye') >= '0.2.0') { $add .= ", min_users, min_prices"; } // END - if @@ -267,7 +267,7 @@ function RALLYE_AUTOADD_USER ($uid) { // Init variables $min_users = 0; $min_prices = 0; // Load data - if (GET_EXT_VERSION("rallye") >= "0.2.0") { + if (GET_EXT_VERSION('rallye') >= '0.2.0') { list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result); } else { list($id, $title, $start, $end, $notify) = SQL_FETCHROW($result); @@ -291,7 +291,7 @@ VALUES ('%s','%s','0')", SQL_FREERESULT($result); } - if ($notify == "Y") { + if ($notify == 'Y') { // Transfer all neccessary data to the global $DATA array $DATA['start'] = MAKE_DATETIME($start, "2"); $DATA['end'] = MAKE_DATETIME($end , "2"); @@ -299,7 +299,7 @@ VALUES ('%s','%s','0')", $DATA['title'] = $title; $DATA['id'] = $id; // ID for the rallye details link $DATA['ref'] = 0; - $DATA['refs'] = GET_TOTAL_DATA($uid, "user_data", "userid", "refid", true); + $DATA['refs'] = GET_TOTAL_DATA($uid, "user_data", 'userid', "refid", true); // Load prices $prices = RALLYE_ADD_PRICES($id); @@ -376,7 +376,7 @@ LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__); $DATA['ref'] = $prices['ref'][$key]; // Default is other - $winnerLevel = "other"; + $winnerLevel = 'other'; // Determine winner level if ($DATA['level'] == 1) { @@ -395,7 +395,7 @@ LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__); ADD_POINTS_REFSYSTEM("rallye_winner" . $winnerLevel, $uid, $DATA['points'], false, "0", false, "direct"); } // END - if - if ($notify == "Y") { + if ($notify == 'Y') { // Prepare infos for the mail template if (!empty($DATA['info'])) { // Take direct infos @@ -421,7 +421,7 @@ LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__); } // END - foreach // Select template depending on notfication is switch on / off - if ($notify == "Y") { + if ($notify == 'Y') { $templ = "admin_rallye_expired"; } elseif (is_array($users['uid'])) { $templ = "admin_rallye_expired_no"; @@ -445,7 +445,7 @@ function RALLYE_LOAD_USER_DATA ($uids_array) { $uid_string = implode(",", $uids_array['uid']); // Init result string - $ret = ""; + $ret = ''; // Load users $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid IN(%s) AND `status`='CONFIRMED' ORDER BY userid LIMIT %s", @@ -594,7 +594,7 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) { } // Add row - $add = ""; + $add = ''; $OUT .= "   ".($idx+1).". "; @@ -647,7 +647,7 @@ WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'", $DATA['now_t'] = MAKE_DATETIME(time(), "1"); // Send mail to admin - SEND_ADMIN_NOTIFICATION(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), "admin_rallye_purged", "", 0); + SEND_ADMIN_NOTIFICATION(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), "admin_rallye_purged", '', 0); // Purge whole rallye ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE id=%s LIMIT 1", @@ -675,7 +675,7 @@ VALUES ('NEW','RALLYE_PURGED','{--RALLYE_ADMIN_PURGED--}: %s','{--RALLYE_ADMIN_P // function RALLYE_TEMPLATE_SELECTION ($name="template", $default="") { // Check templates directory - $OUT = ""; $ral = array(); + $OUT = ''; $ral = array(); $BASE = sprintf("%stemplates/%s/html/rallye/", constant('PATH'), GET_LANGUAGE()); $dir = opendir($BASE); while ($read = readdir($dir)) { @@ -716,7 +716,7 @@ function RALLYE_TEMPLATE_SELECTION ($name="template", $default="") { // function RALLYE_GET_REFCOUNT ($uid, $old=0) { // Check current refs - if (GET_EXT_VERSION("cache") >= "0.1.2") { + if (GET_EXT_VERSION('cache') >= '0.1.2') { // Get refs from cache $cnt = 0; foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $uid) { diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 6aa46577df..28df7297a5 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -249,10 +249,10 @@ function UPDATE_REFBACK_TABLE ($uid) { } // END - if // When he has a referal... - if ((($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == $uid) || ($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == 0)) && (GET_EXT_VERSION("cache") >= "0.1.2") && (!isset($GLOBALS['cache_array']['back_cached']))) { + if ((($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == $uid) || ($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == 0)) && (GET_EXT_VERSION('cache') >= '0.1.2') && (!isset($GLOBALS['cache_array']['back_cached']))) { // Remove cache here //* DEBUG: */ print __FUNCTION__."(".__LINE__."):uid={$uid},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - CACHE!
\n"; - if ($GLOBALS['cache_instance']->loadCacheFile("refback")) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile('refback')) $GLOBALS['cache_instance']->destroyCacheFile(); $GLOBALS['cache_array']['back_cached'] = 1; } // END - if @@ -270,11 +270,11 @@ function UPDATE_REFBACK_TABLE ($uid) { function GET_USER_REFS ($uid, $level) { //* DEBUG: */ print "----------------------- ".__FUNCTION__." - ENTRY ------------------------
  • \n"; // Default is no refs and no nickname - $add = ""; + $add = ''; $refs = array(); // Do we have nickname extension installed? - if (EXT_IS_ACTIVE("nickname")) { + if (EXT_IS_ACTIVE('nickname')) { $add = ", d.nickname"; } // END - if diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index aa0ea1baf5..7630933ab7 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -48,8 +48,8 @@ function REGISTER_FILL_MUST_CONSTANTS () { __FUNCTION__, __LINE__); while ($content = SQL_FETCHARRAY($result)) { - $value = ""; - if ($content['field_required'] == "Y") $value = "
     (*)
    "; + $value = ''; + if ($content['field_required'] == 'Y') $value = "
     (*)
    "; // @TODO Rewrite these constants $eval = "define('MUST_".strtoupper($content['field_name'])."', \"".$value."\");"; eval($eval); @@ -78,8 +78,8 @@ function REGISTER_CHECK_REQUIRED_FIELDS (&$array) { // Check if extension country is not found (you have to enter the 2-chars long country code) or // if extensions is present check if country code was selected // 01 2 21 12 3 32 234 5 54 4 43 34 4 4 5 5432 2 3 3210 - $country = ((!EXT_IS_ACTIVE("country")) || ((EXT_IS_ACTIVE("country")) && (((empty($value)) && ($key == "cntry")) || (($key == "country_code") && (!empty($value)))) && (!empty($array['country_code'])))); - if ((empty($value)) && ($chk == "Y") && (!$country)) + $country = ((!EXT_IS_ACTIVE('country')) || ((EXT_IS_ACTIVE('country')) && (((empty($value)) && ($key == "cntry")) || (($key == "country_code") && (!empty($value)))) && (!empty($array['country_code'])))); + if ((empty($value)) && ($chk == 'Y') && (!$country)) { // Required field not set $array[$key] = "!"; @@ -97,9 +97,9 @@ function REGISTER_CHECK_REQUIRED_FIELDS (&$array) { function REGISTER_OUTPUT_REQUIRE_CHECK (&$array) { $result = SQL_QUERY("SELECT field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`", __FUNCTION__, __LINE__); while ($content = SQL_FETCHARRAY($result)) { - if (($array[$content['field_name']] == "!") && ($content['field_required'] == "Y")) { + if (($array[$content['field_name']] == "!") && ($content['field_required'] == 'Y')) { // Empty entry found - $array[$content['field_name']] = ""; + $array[$content['field_name']] = ''; $OUT = constant('REGISTER_'.strtoupper($content['field_name']).'_REQUIRED'); OUTPUT_HTML("
    ".$OUT."
    "); } // END - if @@ -111,14 +111,14 @@ function REGISTER_OUTPUT_REQUIRE_CHECK (&$array) { // function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) { - $OUT = ""; + $OUT = ''; // Guests are mostly not interested in how many members has // choosen an individual category $AND = "WHERE `visible`='Y' "; // Admins are allowed to see every category... - if (IS_ADMIN()) $AND = ""; + if (IS_ADMIN()) $AND = ''; // Look for categories $result = SQL_QUERY("SELECT id, cat, visible FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort`", @@ -132,7 +132,7 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) { // Is the array element not set? if (!REQUEST_ISSET_POST('cat', $content['id'])) { // Then set it - REQUEST_SET_POST(array('cat', $content['id']), ""); + REQUEST_SET_POST(array('cat', $content['id']), ''); } // END - if // Prepare array for the template @@ -144,10 +144,10 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) { 'id' => $content['id'], ); - if ((REQUEST_POST('cat', $content['id']) == "Y") || ((getConfig('register_default') == "Y") && (!REQUEST_ISSET_POST('cat', $content['id'])))) { - $content['def_y'] = " checked=\"checked\""; + if ((REQUEST_POST('cat', $content['id']) == 'Y') || ((getConfig('register_default') == 'Y') && (!REQUEST_ISSET_POST('cat', $content['id'])))) { + $content['def_y'] = ' chkecked="checked"'; } else { - $content['def_n'] = " checked=\"checked\""; + $content['def_n'] = ' chkecked="checked"'; } // Load template and switch color @@ -160,7 +160,7 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) { SQL_FREERESULT($result); } else { // No categories setted up so far... - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('NO_CATEGORIES_VISIBLE')); + $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('NO_CATEGORIES_VISIBLE')); } if ($return === true) { diff --git a/inc/libs/removeip_functions.php b/inc/libs/removeip_functions.php index 8818252404..ab59b19cf9 100644 --- a/inc/libs/removeip_functions.php +++ b/inc/libs/removeip_functions.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { // "Getter" for anonymous remote IP number function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { // Is config enabled? - if (getConfig('removeip_anon_ip') == "Y") { + if (getConfig('removeip_anon_ip') == 'Y') { // Switch way do we like? switch (getConfig('anonymous_ip')) { case "127.0.0.1": // mod_removeip style @@ -65,7 +65,7 @@ function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) { // "Getter" for anonymous remote hostname function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) { // Is config enabled? - if (getConfig('removeip_anon_host') == "Y") { + if (getConfig('removeip_anon_host') == 'Y') { // Set anon hostname $remoteHost = "localhost.localnet"; } // END - if @@ -76,7 +76,7 @@ function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) { // "Getter" for anonymous user agent function GET_ANONYMOUS_USER_AGENT ($userAgent) { // Is config enabled? - if (getConfig('removeip_anon_ua') == "Y") { + if (getConfig('removeip_anon_ua') == 'Y') { // Set anon user agent $userAgent = "-"; } // END - if @@ -87,7 +87,7 @@ function GET_ANONYMOUS_USER_AGENT ($userAgent) { // "Getter" for anonymous referer function GET_ANONYMOUS_REFERER ($referer) { // Is config enabled? - if (getConfig('removeip_anon_ref') == "Y") { + if (getConfig('removeip_anon_ref') == 'Y') { // Set anon user agent $referer = "-"; } // END - if @@ -101,10 +101,10 @@ function REMOVEIP_ADD_INFOS () { $anonymity = 0; // Is some data anonymized? - if (getConfig('removeip_anon_ip') == "Y") $anonymity++; - if (getConfig('removeip_anon_host') == "Y") $anonymity++; - if (getConfig('removeip_anon_ua') == "Y") $anonymity++; - if (getConfig('removeip_anon_ref') == "Y") $anonymity++; + if (getConfig('removeip_anon_ip') == 'Y') $anonymity++; + if (getConfig('removeip_anon_host') == 'Y') $anonymity++; + if (getConfig('removeip_anon_ua') == 'Y') $anonymity++; + if (getConfig('removeip_anon_ref') == 'Y') $anonymity++; // Calculate anonymity level $level = round($anonymity / 4 * 3); @@ -151,7 +151,7 @@ function FILTER_ADD_ANONYMITY_NOTICE ($data) { $content = $data; // Extension removeip activated? - if ((EXT_IS_ACTIVE("removeip")) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == "Y")) { + if ((EXT_IS_ACTIVE('removeip')) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == 'Y')) { // Add anoymity/privacy infos $content['content'] .= REMOVEIP_ADD_INFOS()."
    \n"; } // END - if diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php index 4b6cd6d46c..aad7abbded 100644 --- a/inc/libs/security_functions.php +++ b/inc/libs/security_functions.php @@ -90,7 +90,7 @@ if (!isset($_POST)) { // Generate arrays which holds the relevante chars to replace $GLOBALS['security_chars'] = array( // The chars we are looking for... - 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", '{--', '--}', "%", ";", "[", "]", ":", "--"), + 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", '{--', '--}', "%", ';', "[", "]", ":", "--"), // ... and we will replace to. 'to' => array( "{OPEN_ANCHOR2}", @@ -142,7 +142,7 @@ if (is_array($_GET)) { } } -if (basename($_SERVER['PHP_SELF']) != "install.php") { +if (basename($_SERVER['PHP_SELF']) != 'install.php') { // And POST data foreach ($_POST as $seckey => $secvalue) { if (!is_array($secvalue)) { diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index d29e209338..3b639ad765 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -67,7 +67,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() // Check only posted input entries not the submit button switch ($k) { - case "email": + case 'email': $ALREADY = false; if (!VALIDATE_EMAIL($v)) { // Email address is not valid @@ -95,7 +95,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() break; case "pass1": - $k = ""; $v = ""; + $k = ''; $v = ''; break; case "pass2": @@ -125,7 +125,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0; // SQL and message string is empty by default - $sql = ""; $message = ""; + $sql = ''; $message = ''; // Update? if ($UPDATE) { @@ -172,7 +172,7 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() $ret = "added"; } elseif ((!$NO_UPDATE) && (IS_ADMIN())) { // Add all data as hidden data - $OUT = ""; + $OUT = ''; foreach ($POST as $k => $v) { // Do not add 'force' ! if ($k != "force") { @@ -198,12 +198,12 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array() // Output message if ((!$NO_UPDATE) && (IS_ADMIN())) { - LOAD_TEMPLATE("admin_settings_saved", false, $message); + LOAD_TEMPLATE('admin_settings_saved', false, $message); } } else { // Error found! $message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), "failed", $messageArray); - LOAD_TEMPLATE("admin_settings_saved", false, $message); + LOAD_TEMPLATE('admin_settings_saved', false, $message); } // Shall we return the status? @@ -228,7 +228,7 @@ function SPONSOR_TRANSLATE_STATUS ($status) { // Search for an email address in the database function SPONSOR_FOUND_EMAIL_DB ($email) { // Do we already have the provided email address in our DB? - $ret = (GET_TOTAL_DATA($email, "sponsor_data", "id", "email", true) == 1); + $ret = (GET_TOTAL_DATA($email, "sponsor_data", "id", 'email', true) == 1); // Return result return $ret; @@ -272,9 +272,9 @@ WHERE id='%s' AND password='%s' AND `status`='CONFIRMED' LIMIT 1", // function GENERATE_SPONSOR_MENU($current) { - $OUT = ""; + $OUT = ''; $WHERE = " AND active='Y'"; - if (IS_ADMIN()) $WHERE = ""; + if (IS_ADMIN()) $WHERE = ''; // Load main menu entries $result_main = SQL_QUERY("SELECT action AS main_action, title AS main_title FROM `{!_MYSQL_PREFIX!}_sponsor_menu` @@ -290,7 +290,7 @@ ORDER BY `sort`", array($content['main_action']), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result_sub) > 0) { // Load sub menus - $SUB = ""; + $SUB = ''; while ($content2 = SQL_FETCHARRAY($result_sub)) { // Merge both arrays $content = merge_array($content, $content2); @@ -318,7 +318,7 @@ ORDER BY `sort`", $OUT .= LOAD_TEMPLATE("sponsor_action", true, $content); } else { // No sub menus active - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_SUB_MENUS_ACTIVE')); + $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_SUB_MENUS_ACTIVE')); } // Free memory @@ -326,7 +326,7 @@ ORDER BY `sort`", } } else { // No main menus active - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_MAIN_MENUS_ACTIVE')); + $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_MAIN_MENUS_ACTIVE')); } // Free memory @@ -338,14 +338,14 @@ ORDER BY `sort`", // function GENERATE_SPONSOR_CONTENT ($what) { - $OUT = ""; + $OUT = ''; $INC = sprintf("inc/modules/sponsor/%s.php", $what); if (INCLUDE_READABLE($INC)) { // Every sponsor action will output nothing directly. It will be written into $OUT! LOAD_INC_ONCE($INC); } else { // File not found! - $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what)); + $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what)); } // Return content @@ -467,7 +467,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) { default: // Unknown sponsor what value! DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what'])); $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), $GLOBALS['what']); - $templ = ""; $subj = ""; + $templ = ''; $subj = ''; break; } @@ -490,7 +490,7 @@ function SPONSOR_SAVE_DATA ($POST, $content) { SEND_ADMIN_NOTIFICATION($subj, $templ, $content); // Shall we send mail to the sponsor's new email address? - if ($content['receive_warnings'] == "Y") { + if ($content['receive_warnings'] == 'Y') { // Okay send email with confirmation link to new address and with no confirmation link // to the old address diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 6babc26648..cf7bf861f8 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -358,15 +358,15 @@ function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) { // Include fields only for action 'edit' if ($action == "edit") { // Default is not limited - $urlData['limited_yes'] = ""; - $urlData['limited_no'] = " checked=\"checked\""; + $urlData['limited_yes'] = ''; + $urlData['limited_no'] = ' chkecked="checked"'; $urlData['limited'] = "false"; // Is this URL limited? if ($urlData['views_max'] > 0) { // Then rewrite form data - $urlData['limited_yes'] = " checked=\"checked\""; - $urlData['limited_no'] = ""; + $urlData['limited_yes'] = ' chkecked="checked"'; + $urlData['limited_no'] = ''; $urlData['limited'] = "true"; } // END - if } // END - if @@ -383,7 +383,7 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) { $executed = false; // Is limitation "no" and "limit" is > 0? - if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] == "N") && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) { + if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] == 'N') && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) { // Set it to unlimited $urlData[$action]['limit'] = 0; } // END - if @@ -523,13 +523,13 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="AS $GLOBALS['last_url_data'] = array(); // Is the column an id number? - if (($column == "id") || ($column == "userid")) { + if (($column == "id") || ($column == 'userid')) { // Extra secure input $searchTerm = bigintval($searchTerm); } // END - if // If the column is "id" there can be only one entry - $limit = ""; + $limit = ''; if ($column == "id") { $limit = "LIMIT 1"; } // END - if @@ -594,7 +594,7 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $e $content['limit'] = SURFBAR_TRANSLATE_LIMIT($content['limit']); // If in reg-mode we notify admin - if (($addMode == "reg") || (getConfig('surfbar_notify_admin_unlock') == "Y")) { + if (($addMode == "reg") || (getConfig('surfbar_notify_admin_unlock') == 'Y')) { // Notify admin even when he as unlocked an email SURFBAR_NOTIFY_ADMIN("url_{$addMode}", $content); } // END - if @@ -862,7 +862,7 @@ WHERE userid NOT IN (".implode(",", $UIDs['uid']).") AND `status`='%s'", // Check wether the user is allowed to book more URLs function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) { // Is this admin and userid is zero or does the user has some URLs left to book? - return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, "", array("REJECTED")) < getConfig('surfbar_max_order'))); + return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, '', array("REJECTED")) < getConfig('surfbar_max_order'))); } // Get total amount of URLs of given status for current user function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="",$exclude="") { @@ -876,7 +876,7 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="",$exclude="") { } // Default is all URLs - $add = ""; + $add = ''; // Is the status set? if (is_array($status)) { @@ -922,7 +922,7 @@ function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt="") { if ($length == 0) $length = 10; // Generate a code until the length matches - $valCode = ""; + $valCode = ''; while (strlen($valCode) != $length) { // Is the salt set? if (empty($salt)) { @@ -990,7 +990,7 @@ function SURFBAR_PAY_POINTS () { // Updates the statistics of current URL/userid function SURFBAR_UPDATE_INSERT_STATS_RECORD () { // Init add - $add = ""; + $add = ''; // Get allowed views $allowed = SURFBAR_GET_VIEWS_ALLOWED(); @@ -1242,7 +1242,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () { $percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1)); // Get total users - $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); + $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true); // Get online users $onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE(); @@ -1278,7 +1278,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () { $percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1)); // Get total users - $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); + $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true); // Calculate addon $addon += abs($max * $percent * $totalUsers); @@ -1459,7 +1459,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) { $USE = SURFBAR_GET_LOCK_IDS(); // Shall we add some URL ids to ignore? - $add = ""; + $add = ''; if (count($USE) > 0) { // Ignore some! $add = " AND sbu.id NOT IN ("; @@ -1527,7 +1527,7 @@ LIMIT 1", if (is_null($GLOBALS['cache_array']['surfbar']['last_salt'])) { // Then repair it wit the static! //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "last_salt - FIXED!", false); - $GLOBALS['cache_array']['surfbar']['last_salt'] = ""; + $GLOBALS['cache_array']['surfbar']['last_salt'] = ''; } // END - if // Fix missing last_surfed diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index 8df89bcda1..c4dd1f21b7 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -53,8 +53,8 @@ if (!defined('__SECURITY')) { // @TODO Move all extension-dependent queries into filters function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // Init variables/arrays - $EXTRAS = ""; - $OUT = ""; + $EXTRAS = ''; + $OUT = ''; $WHATs = array(); $DESCRs = array(); $TITLEs = array(); @@ -82,7 +82,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // First check for all account status seperately // // Confirmed accounts - $value = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); + $value = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true); if ($value > 0) { define('__CONFIRMED_VALUE', "".$value.""); @@ -91,7 +91,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { } // Unconfirmed accounts - $value = GET_TOTAL_DATA("UNCONFIRMED", "user_data", "userid", "status", true); + $value = GET_TOTAL_DATA("UNCONFIRMED", "user_data", 'userid', "status", true); if ($value > 0) { define('__UNCONFIRMED_VALUE', "".$value.""); @@ -100,7 +100,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { } // And locked accounts - $value = GET_TOTAL_DATA("LOCKED", "user_data", "userid", "status", true); + $value = GET_TOTAL_DATA("LOCKED", "user_data", 'userid', "status", true); if ($value > 0) { define('__LOCKED_VALUE', "".$value.""); @@ -199,7 +199,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // // Autopurged mails // - if (EXT_IS_ACTIVE("autopurge")) { + if (EXT_IS_ACTIVE('autopurge')) { // Get auto-purged mails $value = GET_TOTAL_DATA("DELETED", "pool", "id", "data_type", true); @@ -212,17 +212,17 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // // Autopurged bonus mails // - if (GET_EXT_VERSION("bonus") >= "0.1.8") { + if (GET_EXT_VERSION('bonus') >= '0.1.8') { // Get auto-purged bonus mails - $value = GET_TOTAL_DATA("DELETED", "bonus", "id", "data_type", true); + $value = GET_TOTAL_DATA("DELETED", 'bonus', "id", "data_type", true); if ($value > 0) { define('__MAIL_BONUS_AP_VALUE', "".$value.""); } else { define('__MAIL_BONUS_AP_VALUE', "0"); } - } elseif (EXT_IS_ACTIVE("bonus")) { - define('__MAIL_BONUS_AP_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', "0.1.8"))); + } elseif (EXT_IS_ACTIVE('bonus')) { + define('__MAIL_BONUS_AP_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8'))); } else { define('__MAIL_BONUS_AP_VALUE', "{--ADMIN_EXT_BONUS_404--}"); } @@ -234,35 +234,35 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // // Sent bonus mails // - if (GET_EXT_VERSION("bonus") >= "0.1.8") { + if (GET_EXT_VERSION('bonus') >= '0.1.8') { // Get sent bonus mails (but not notifications) - $value = GET_TOTAL_DATA("SEND", "bonus", "id", "data_type", true, " AND is_notify='N'"); + $value = GET_TOTAL_DATA("SEND", 'bonus', "id", "data_type", true, " AND is_notify='N'"); if ($value > 0) { define('__MAIL_BONUS_SEND_VALUE', "".$value.""); } else { define('__MAIL_BONUS_SEND_VALUE', "0"); } - } elseif (EXT_IS_ACTIVE("bonus")) { - define('__MAIL_BONUS_SEND_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', "0.1.8"))); + } elseif (EXT_IS_ACTIVE('bonus')) { + define('__MAIL_BONUS_SEND_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8'))); } else { define('__MAIL_BONUS_SEND_VALUE', getMessage('ADMIN_EXT_BONUS_404')); } - if (EXT_IS_ACTIVE("autopurge")) { + if (EXT_IS_ACTIVE('autopurge')) { // Start finding them... $since = getConfig('ap_inactive_since'); - $EXCLUDE_LIST = ""; + $EXCLUDE_LIST = ''; if (getConfig('def_refid') > 0) { $EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid').""; } // END - if // Check for more extensions // @TODO These can be rewritten to filter - if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid').""; - if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid').""; - if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid').""; - if (GET_EXT_VERSION("holiday") >= "0.1.3") $EXCLUDE_LIST .= " AND d.holiday_active='N'"; + if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid').""; + if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid').""; + if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid').""; + if (GET_EXT_VERSION('holiday') >= '0.1.3') $EXCLUDE_LIST .= " AND d.holiday_active='N'"; // Check for all accounts ADD_SQL("SELECT DISTINCT d.userid, d.email, d.last_online @@ -275,7 +275,7 @@ ORDER BY d.userid"); $TITLEs[] = getMessage('ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE'); } - if (GET_EXT_VERSION("sql_patches") >= "0.3.4") { + if (GET_EXT_VERSION('sql_patches') >= '0.3.4') { // Check for accounts without referal ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid='0' ORDER BY userid"); $DESCRs[] = getMessage('ADMIN_TASK_LIST_ACCOUNT_NOREF'); @@ -283,7 +283,7 @@ ORDER BY d.userid"); $WHATs[] = "list_user&mode=norefs"; } - if (EXT_IS_ACTIVE("payout")) { + if (EXT_IS_ACTIVE('payout')) { // List new payout requests ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `status`='NEW' ORDER BY userid"); $WHATs[] = "list_payouts"; @@ -295,7 +295,7 @@ ORDER BY d.userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE'); } - if (EXT_IS_ACTIVE("wernis")) { + if (EXT_IS_ACTIVE('wernis')) { // List new wernis requests ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_wernis` ORDER BY userid"); $WHATs[] = "list_wernis"; @@ -303,7 +303,7 @@ ORDER BY d.userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_WERNIS_ALL_TITLE'); } - if (EXT_IS_ACTIVE("primera")) { + if (EXT_IS_ACTIVE('primera')) { // List new primera requests ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_primera` ORDER BY userid"); $WHATs[] = "list_primera"; @@ -311,7 +311,7 @@ ORDER BY d.userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_PRIMERA_ALL_TITLE'); } - if (EXT_IS_ACTIVE("holiday")) { + if (EXT_IS_ACTIVE('holiday')) { // List holiday requests ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_holidays` ORDER BY userid"); $WHATs[] = "list_holiday"; @@ -319,7 +319,7 @@ ORDER BY d.userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_HOLIDAYS_TITLE'); } - if (GET_EXT_VERSION("bonus") >= "0.8.7") { + if (GET_EXT_VERSION('bonus') >= '0.8.7') { // List all notifications ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE is_notify='Y' ORDER BY timestamp DESC"); $WHATs[] = "list_notifications"; @@ -327,16 +327,16 @@ ORDER BY d.userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_NOTIFICATIONS_TITLE'); } // END - if - if (GET_EXT_VERSION("bonus") >= "0.2.3") { + if (GET_EXT_VERSION('bonus') >= '0.2.3') { // Active rallye - if (GET_EXT_VERSION("bonus") >= "0.6.9") { + if (GET_EXT_VERSION('bonus') >= '0.6.9') { // Add more bonus points here $USE = "(0"; - if (getConfig('bonus_click_yn') == "Y") $USE .= " + turbo_bonus"; - if (getConfig('bonus_login_yn') == "Y") $USE .= " + login_bonus"; - if (getConfig('bonus_order_yn') == "Y") $USE .= " + bonus_order"; - if (getConfig('bonus_stats_yn') == "Y") $USE .= " + bonus_stats"; - if (getConfig('bonus_ref_yn') == "Y") $USE .= " + bonus_ref"; + if (getConfig('bonus_click_yn') == 'Y') $USE .= " + turbo_bonus"; + if (getConfig('bonus_login_yn') == 'Y') $USE .= " + login_bonus"; + if (getConfig('bonus_order_yn') == 'Y') $USE .= " + bonus_order"; + if (getConfig('bonus_stats_yn') == 'Y') $USE .= " + bonus_stats"; + if (getConfig('bonus_ref_yn') == 'Y') $USE .= " + bonus_ref"; $USE .= ")"; } else { // Old version ??? @@ -344,8 +344,8 @@ ORDER BY d.userid"); } // Autopurge installed? - $lastOnline = ""; - if ((EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) { + $lastOnline = ''; + if ((EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) { // Use last online timestamp to keep inactive members away from here $lastOnline = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since')); } @@ -359,12 +359,12 @@ ORDER BY points DESC, userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_BONUS_TITLE'); } - if (GET_EXT_VERSION("beg") >= "0.1.2") { + if (GET_EXT_VERSION('beg') >= '0.1.2') { // Begging rallye // Autopurge installed? - $lastOnline = ""; - if ((EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) { + $lastOnline = ''; + if ((EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) { // Use last online timestamp to keep inactive members away from here $lastOnline = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since')); } @@ -377,7 +377,7 @@ ORDER BY beg_points DESC, userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_BEG_TITLE'); } - if (EXT_IS_ACTIVE("doubler")) { + if (EXT_IS_ACTIVE('doubler')) { // List waiting payouts ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' ORDER BY `id`"); $WHATs[] = "list_doubler&mode=waiting&select=all"; @@ -447,7 +447,7 @@ ORDER BY beg_points DESC, userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_URLS_TITLE'); } - if (EXT_IS_ACTIVE("sponsor")) { + if (EXT_IS_ACTIVE('sponsor')) { // List all sponsors ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_data` ORDER BY `id`"); $WHATs[] = "list_sponsor"; @@ -485,7 +485,7 @@ ORDER BY beg_points DESC, userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE'); } - if (EXT_IS_ACTIVE("country")) { + if (EXT_IS_ACTIVE('country')) { // List country codes ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY `id`"); $WHATs[] = "list_country"; @@ -493,7 +493,7 @@ ORDER BY beg_points DESC, userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_COUNTRY_TITLE'); } - if (EXT_IS_ACTIVE("theme")) { + if (EXT_IS_ACTIVE('theme')) { // List all themes ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY `id`"); $WHATs[] = "theme_edit"; @@ -507,7 +507,7 @@ ORDER BY beg_points DESC, userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_THEME_ACTIVE_TITLE'); } - if (EXT_IS_ACTIVE("admins")) { + if (EXT_IS_ACTIVE('admins')) { // List all administrator logins ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`"); $WHATs[] = "admins_edit"; @@ -515,7 +515,7 @@ ORDER BY beg_points DESC, userid"); $TITLEs[] = getMessage('ADMIN_TASK_LIST_ADMINS_ALL_TITLE'); } - if (EXT_IS_ACTIVE("surfbar")) { + if (EXT_IS_ACTIVE('surfbar')) { // List all URLs in surfbar ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_surfbar_urls` ORDER BY `id`"); $WHATs[] = "list_surfbar_urls"; @@ -545,7 +545,7 @@ ORDER BY beg_points DESC, userid"); // function TASK_CREATE_EXTRA_ROWS ($WHATs, $DESCRs, $TITLEs) { // Init variables - $OUT = ""; $SW = 2; + $OUT = ''; $SW = 2; // Sadly this cannot be rewritten to a filter... :( foreach (GET_SQLS() as $key => $sql) { diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index 640dd0b1f3..3a7c791673 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -71,7 +71,7 @@ function THEME_SELECTION_BOX ($mod, $act, $wht, $result) { array_pk_sort($themesArray, array("theme_name")); // Construct selection form for the box template - $OUT = ""; + $OUT = ''; foreach ($themesArray['theme_unix'] as $key => $theme) { $OUT .= "
"); } else { - // Nothing to load, then we have no directory "usage" - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base'))); + // Nothing to load, then we have no directory 'usage' + LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base'))); } // diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 8be804d5c2..14c018a7c1 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -43,10 +43,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { } // Add description as navigation point -ADD_DESCR("admin", __FILE__); +ADD_DESCR('admin', __FILE__); // Is a user id given? -if ((REQUEST_ISSET_GET(('uid'))) && (bigintval(REQUEST_GET('uid')) > 0)) { +if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) { // Load user data and display it $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); @@ -67,14 +67,14 @@ if ((REQUEST_ISSET_GET(('uid'))) && (bigintval(REQUEST_GET('uid')) > 0)) { // Send contact form out $msg = LOAD_EMAIL_TEMPLATE("member_contct", $content); SEND_EMAIL($content['email'], getMessage('ADMIN_CONTACT_USER_SUBJECT'), $msg); - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_USER_CONTACTED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_USER_CONTACTED')); } else { // Load contact form template LOAD_TEMPLATE("admin_contct_user_form", false, $content); } } else { // Not found? - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(USER_ACCOUNT_404, bigintval(REQUEST_GET('uid')))); + LOAD_TEMPLATE('admin_settings_saved', false, sprintf(USER_ACCOUNT_404, bigintval(REQUEST_GET('uid')))); } // Free result diff --git a/inc/modules/admin/what-usr_online.php b/inc/modules/admin/what-usr_online.php index 49cfbc878b..c6b71d0673 100644 --- a/inc/modules/admin/what-usr_online.php +++ b/inc/modules/admin/what-usr_online.php @@ -43,16 +43,16 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { } // Add description as navigation point -ADD_DESCR("admin", __FILE__); +ADD_DESCR('admin', __FILE__); // Online stats are only working if extension ext-online is installed -if (EXT_IS_ACTIVE("online")) { +if (EXT_IS_ACTIVE('online')) { // Count guests, members and admins // @TODO Rewrite these constants // @TODO Add a filter for sponsor - define('_GUESTS_ONLINE' , GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='N'")); - define('_ADMINS_ONLINE' , GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='Y'")); - define('_MEMBERS_ONLINE', GET_TOTAL_DATA("N", "online", "id", "is_admin", true)); + define('_GUESTS_ONLINE' , GET_TOTAL_DATA("N", 'online', "id", "is_admin", true, " AND is_member='N'")); + define('_ADMINS_ONLINE' , GET_TOTAL_DATA("N", 'online', "id", "is_admin", true, " AND is_member='Y'")); + define('_MEMBERS_ONLINE', GET_TOTAL_DATA("N", 'online', "id", "is_admin", true)); // Load template LOAD_TEMPLATE("admin_mini_online"); @@ -71,10 +71,10 @@ if (EXT_IS_ACTIVE("online")) { if (empty($content['action'])) $content['action'] = "---"; if (empty($content['what'])) $content['what'] = "---"; - if ($content['is_admin'] == "Y") { + if ($content['is_admin'] == 'Y') { // Is an administrator $content['userid'] = getMessage('_IS_ADMIN'); - } elseif (($content['is_member'] == "N") && ($content['is_admin'] == "N")) { + } elseif (($content['is_member'] == 'N') && ($content['is_admin'] == 'N')) { // Is a guest $content['userid'] = getMessage('_IS_GUEST'); } elseif ($content['userid'] > 0) { @@ -112,7 +112,7 @@ if (EXT_IS_ACTIVE("online")) { } // END - if } else { // Online statistics deactivated! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ONLINE_STATISTICS_DEACTIVATED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ONLINE_STATISTICS_DEACTIVATED')); } // diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index 3dc6676042..8d46fd5d7d 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -48,8 +48,8 @@ $message = "{--VALIDATING_LOGIN--}"; if (isUserIdSet() && (isSessionVariableSet('u_hash'))) { // Login failures are supported since 0.4.7 // Do we have 0.4.7 of sql_patches or later? - $add = ""; - if (GET_EXT_VERSION("sql_patches") >= "0.6.1") { + $add = ''; + if (GET_EXT_VERSION('sql_patches') >= '0.6.1') { // Load them here $add = ", login_failures, UNIX_TIMESTAMP(last_failure) AS last_failure"; } // END - if @@ -68,7 +68,7 @@ if (isUserIdSet() && (isSessionVariableSet('u_hash'))) { set_session('mxchange_theme', $data['curr_theme']); // Remmeber login failures if available - if (GET_EXT_VERSION("sql_patches") >= "0.6.1") { + if (GET_EXT_VERSION('sql_patches') >= '0.6.1') { // Reset login failures SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_failures=0, last_failure='0000-00-00 00:00:00' @@ -83,7 +83,7 @@ LIMIT 1", // Bonus is not given by default ;-) $bonus = false; - if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && (getConfig('bonus_login_yn') == "Y")) { + if ((GET_EXT_VERSION('sql_patches') >= '0.2.8') && (GET_EXT_VERSION('bonus') >= '0.2.1') && (getConfig('bonus_login_yn') == 'Y')) { // Update last login if far enougth away SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET last_login=UNIX_TIMESTAMP() @@ -97,12 +97,12 @@ LIMIT 1", if (SQL_AFFECTEDROWS() == 1) $bonus = true; } // END - if - if (($bonus) && (REQUEST_GET('mode') == "bonus") && (EXT_IS_ACTIVE("bonus"))) { + if (($bonus) && (REQUEST_GET('mode') == 'bonus') && (EXT_IS_ACTIVE('bonus'))) { // Output message with added points $message .= "
".sprintf(getMessage('BONUS_LOGIN_BONUS_ADDED'), TRANSLATE_COMMA(getConfig('login_bonus')))."
"; - } elseif (EXT_IS_ACTIVE("bonus")) { + } elseif (EXT_IS_ACTIVE('bonus')) { // No login bonus added! $message .= "
{--BONUS_LOGIN_BONUS_NOT_ADDED--}
"; } @@ -115,7 +115,7 @@ LIMIT 1", } // Output final message -LOAD_TEMPLATE("admin_settings_saved", false, $message); +LOAD_TEMPLATE('admin_settings_saved', false, $message); // ?> diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 83e71cab9c..0aaff8376e 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -42,7 +42,7 @@ if (!defined('__SECURITY')) { require($INC); } -$MODE = "guest"; +$MODE = 'guest'; if (REQUEST_ISSET_GET(('order'))) { // Order number placed, is he also logged in? @@ -60,7 +60,7 @@ if (REQUEST_ISSET_GET(('order'))) { REQUEST_SET_POST('url', $url); // Mode is member - $MODE = "member"; + $MODE = 'member'; } else { // Matching line not found! LOAD_URL("modules.php?module=index&what=login"); @@ -85,21 +85,21 @@ if ((REQUEST_ISSET_POST(('url'))) || (REQUEST_ISSET_GET(('url'))) || (REQUEST_IS if (REQUEST_ISSET_POST(('url'))) $url = REQUEST_POST('url'); // Add missing element - $frame = ""; + $frame = ''; if (REQUEST_ISSET_GET(('frame'))) $frame = REQUEST_GET(('frame')); switch ($frame) { case "": switch ($MODE) { - case "member": + case 'member': // Build frameset define('__ORDER_VALUE', bigintval(REQUEST_GET('order'))); define('__URL_VALUE' , DEREFERER($url)); LOAD_TEMPLATE("member_order_frametester"); break; - case "guest": + case 'guest': define('__URL_VALUE' , DEREFERER($url)); LOAD_TEMPLATE("guest_frametester"); break; @@ -107,7 +107,7 @@ if ((REQUEST_ISSET_POST(('url'))) || (REQUEST_ISSET_GET(('url'))) || (REQUEST_IS break; case "test_top": - LOAD_TEMPLATE("admin_settings_saved", false, "
{--GUEST_FRAMETESTER_TOP--}"); + LOAD_TEMPLATE('admin_settings_saved', false, "
{--GUEST_FRAMETESTER_TOP--}"); break; case "back": // Back buttom diff --git a/inc/modules/guest/action- b/inc/modules/guest/action- index 522ae20067..6b2b663a99 100644 --- a/inc/modules/guest/action- +++ b/inc/modules/guest/action- @@ -49,7 +49,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Load the include file $INC = sprintf("inc/modules/guest/what-%s.php", $GLOBALS['what']); diff --git a/inc/modules/guest/action-main.php b/inc/modules/guest/action-main.php index a04f127f23..7e10580e9a 100644 --- a/inc/modules/guest/action-main.php +++ b/inc/modules/guest/action-main.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Load the include file $INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/guest/action-members.php b/inc/modules/guest/action-members.php index 9737e3d9ba..6a3562f94f 100644 --- a/inc/modules/guest/action-members.php +++ b/inc/modules/guest/action-members.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Load the include file $INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index b398f9f035..c9eae3ed2e 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -40,13 +40,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("online")) && (!IS_ADMIN())) { +} elseif ((!EXT_IS_ACTIVE('online')) && (!IS_ADMIN())) { // Just skip this extension return; } // Total visitors online -$total = GET_TOTAL_DATA("", "online", "id", "userid", true); +$total = GET_TOTAL_DATA("", 'online', "id", 'userid', true); if (getConfig('mad_count') < $total) { // Update counter @@ -55,9 +55,9 @@ if (getConfig('mad_count') < $total) { // Prepare content $content = array( - 'guests' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='N'")), - 'members' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='Y'")), - 'admins' => TRANSLATE_COMMA(GET_TOTAL_DATA("Y", "online", "id", "is_admin", true)), + 'guests' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", 'online', "id", "is_admin", true, " AND is_member='N'")), + 'members' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", 'online', "id", "is_admin", true, " AND is_member='Y'")), + 'admins' => TRANSLATE_COMMA(GET_TOTAL_DATA("Y", 'online', "id", "is_admin", true)), 'total' => TRANSLATE_COMMA($total) ); diff --git a/inc/modules/guest/action-sponsor.php b/inc/modules/guest/action-sponsor.php index 09855e1943..fd6cec7c5a 100644 --- a/inc/modules/guest/action-sponsor.php +++ b/inc/modules/guest/action-sponsor.php @@ -39,8 +39,8 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor"); +} elseif ((!EXT_IS_ACTIVE('sponsor')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'); return; } elseif ($GLOBALS['block_mode']) { // Block mode detected @@ -48,7 +48,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Load the include file $INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/guest/action-themes.php b/inc/modules/guest/action-themes.php index 21bb26bd16..3c9a09c573 100644 --- a/inc/modules/guest/action-themes.php +++ b/inc/modules/guest/action-themes.php @@ -40,29 +40,29 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme"); +} elseif ((!EXT_IS_ACTIVE('theme')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'theme'); return; } // Load all active designs (or all if admin) -$whereStatement = ""; $OUT = ""; +$whereStatement = ''; $OUT = ''; if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'"; $result_themes = SQL_QUERY("SELECT theme_path FROM `{!_MYSQL_PREFIX!}_themes`".$whereStatement, __FILE__, __LINE__); $num_themes = SQL_NUMROWS($result_themes); if ($num_themes > 1) { // If more than 1 is installed output selection box - $act = ""; + $act = ''; if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']); - $OUT = THEME_SELECTION_BOX("index", $act, $GLOBALS['what'], $result_themes); + $OUT = THEME_SELECTION_BOX('index', $act, $GLOBALS['what'], $result_themes); } elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) { // If there's only one just print it's name define('__THEME_NAME', GET_CURR_THEME_NAME()); $OUT = LOAD_TEMPLATE("theme_one", true); } elseif (IS_ADMIN()) { // If there is no theme installed and there's an admin notify him! - $OUT = LOAD_TEMPLATE("admin_settings_saved", true, "
{--ADMIN_NO_THEME_INSTALLED_WARNING--}
"); + $OUT = LOAD_TEMPLATE('admin_settings_saved', true, "
{--ADMIN_NO_THEME_INSTALLED_WARNING--}
"); } // Free memory diff --git a/inc/modules/guest/what- b/inc/modules/guest/what- index 6419247938..2a65f88922 100644 --- a/inc/modules/guest/what- +++ b/inc/modules/guest/what- @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Load default template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/guest/what-active.php b/inc/modules/guest/what-active.php index 4aff32af45..10d5537eb3 100644 --- a/inc/modules/guest/what-active.php +++ b/inc/modules/guest/what-active.php @@ -40,19 +40,19 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("active")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "active"); +} elseif ((!EXT_IS_ACTIVE('active')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'active'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Extra field to include is by default uid -$add = "userid"; +$add = 'userid'; // If nickname is installed the extra field is the nickname of the user -if (EXT_IS_ACTIVE("nickname")) $add = "nickname"; +if (EXT_IS_ACTIVE('nickname')) $add = 'nickname'; // Check for members who were active only this day $result = SQL_QUERY_ESC("SELECT userid, ".$add.", last_online @@ -64,7 +64,7 @@ ORDER BY last_online DESC LIMIT %s", // Entries found? if (SQL_NUMROWS($result) > 0) { // At least one member was online so let's load them all - $OUT = ""; $SW = 2; + $OUT = ''; $SW = 2; while (list($uid, $nick, $last) = SQL_FETCHROW($result)) { $nick2 = "---"; if (($nick != $uid) && (!empty($nick))) $nick2 = $nick; diff --git a/inc/modules/guest/what-agb.php b/inc/modules/guest/what-agb.php index 618f29678f..c37d63b9bd 100644 --- a/inc/modules/guest/what-agb.php +++ b/inc/modules/guest/what-agb.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR ("guest", basename(__FILE__)); +ADD_DESCR ('guest', basename(__FILE__)); // Load default template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/guest/what-beg.php b/inc/modules/guest/what-beg.php index fca40096cf..413f024009 100644 --- a/inc/modules/guest/what-beg.php +++ b/inc/modules/guest/what-beg.php @@ -40,13 +40,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg"); +} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'beg'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Prepare constants define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points'))); diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 5ef60b9c4e..052eea42e1 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); if (REQUEST_ISSET_GET(('hash'))) { // Initialize the user ID @@ -87,7 +87,7 @@ if (REQUEST_ISSET_GET(('hash'))) { } // If version matches add ref bonus to refid's account - if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) { + if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) { // Add points (directly only!) SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1", array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__); @@ -102,7 +102,7 @@ if (REQUEST_ISSET_GET(('hash'))) { } // END - if } // END - if - if (EXT_IS_ACTIVE("rallye")) { + if (EXT_IS_ACTIVE('rallye')) { // Add user to rallye (or not?) RALLYE_AUTOADD_USER(bigintval($uid)); } // END - if diff --git a/inc/modules/guest/what-doubler.php b/inc/modules/guest/what-doubler.php index cdad4cf365..1df171d1cc 100644 --- a/inc/modules/guest/what-doubler.php +++ b/inc/modules/guest/what-doubler.php @@ -40,13 +40,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler"); +} elseif ((!EXT_IS_ACTIVE('doubler')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'doubler'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Percent values etc. define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('doubler_charge') * 100)); diff --git a/inc/modules/guest/what-impressum.php b/inc/modules/guest/what-impressum.php index 02c8b5f26a..d6ef1a3318 100644 --- a/inc/modules/guest/what-impressum.php +++ b/inc/modules/guest/what-impressum.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Load template template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/guest/what-infos.php b/inc/modules/guest/what-infos.php index 519117de97..1ecf6fbd2a 100644 --- a/inc/modules/guest/what-infos.php +++ b/inc/modules/guest/what-infos.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Load default template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index bcea77ddb7..822a6f6f5a 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -41,13 +41,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("user")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user"); +} elseif ((!EXT_IS_ACTIVE('user')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'user'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); global $DATA; @@ -55,9 +55,9 @@ global $DATA; $errorCode = 0; $probe_nickname = false; $uid = false; -$hash = ""; -$URL = ""; -$add = ""; +$hash = ''; +$URL = ''; +$add = ''; // Already logged in? if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { @@ -65,7 +65,7 @@ if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { $uid = getUserId(); } elseif ((REQUEST_ISSET_POST(('id'))) && (REQUEST_ISSET_POST(('password'))) && (IS_FORM_SENT())) { // Set userid and crypt password when login data was submitted - if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) { + if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) { // Nickname entered $uid = SQL_ESCAPE(REQUEST_POST('id')); } else { @@ -78,12 +78,12 @@ if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { if (REQUEST_ISSET_POST(('id'))) $uid = REQUEST_POST('id'); } else { // Not logged in - $uid = 0; $hash = ""; + $uid = 0; $hash = ''; } // Set unset variables -if (!REQUEST_ISSET_POST(('new_pass'))) REQUEST_SET_POST('new_pass', ""); -if (!REQUEST_ISSET_GET(('login'))) REQUEST_SET_GET('login' , ""); +if (!REQUEST_ISSET_POST(('new_pass'))) REQUEST_SET_POST('new_pass', ''); +if (!REQUEST_ISSET_GET(('login'))) REQUEST_SET_GET('login' , ''); if (IS_MEMBER()) { // Login immidiately... @@ -136,7 +136,7 @@ if (!empty($errorCode)) { case getCode('EXTENSION_PROBLEM'): if (IS_ADMIN()) { - $message .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "nickname"); + $message .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'nickname'); } else { $message .= getMessage('LOGIN_WRONG_ID'); } @@ -154,11 +154,11 @@ if (!empty($errorCode)) { define('LOGIN_FAILURE_MSG', $message); } else { // No problems, no output - define('LOGIN_FAILURE_MSG', ""); + define('LOGIN_FAILURE_MSG', ''); } // Display login form with resend-password form -if (EXT_IS_ACTIVE("nickname")) { +if (EXT_IS_ACTIVE('nickname')) { LOAD_TEMPLATE("guest_nickname_login"); } else { LOAD_TEMPLATE("guest_login"); diff --git a/inc/modules/guest/what-mediadata.php b/inc/modules/guest/what-mediadata.php index a78e3af01d..821d2b507c 100644 --- a/inc/modules/guest/what-mediadata.php +++ b/inc/modules/guest/what-mediadata.php @@ -38,13 +38,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("mediadata")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mediadata"); +} elseif ((!EXT_IS_ACTIVE('mediadata')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'mediadata'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // @TODO Rewrite all constants define('value', "value"); @@ -52,9 +52,9 @@ define('lang', "lang"); define('rows', "rows"); // Get total confirmed user IDs... -define('user_confirmed' , round(GET_TOTAL_DATA("CONFIRMED" , "user_data", "userid", "status", true))); -define('user_unconfirmed', round(GET_TOTAL_DATA("UNCONFIRMED", "user_data", "userid", "status", true))); -define('user_locked' , round(GET_TOTAL_DATA("LOCKED" , "user_data", "userid", "status", true))); +define('user_confirmed' , round(GET_TOTAL_DATA("CONFIRMED" , "user_data", 'userid', "status", true))); +define('user_unconfirmed', round(GET_TOTAL_DATA("UNCONFIRMED", "user_data", 'userid', "status", true))); +define('user_locked' , round(GET_TOTAL_DATA("LOCKED" , "user_data", 'userid', "status", true))); define('user_count' , (constant('user_confirmed') + constant('user_unconfirmed') + constant('user_locked'))); // Start of this exchange @@ -111,7 +111,7 @@ if (empty($sent)) $sent = 0; if (empty($clicks)) $clicks = 0; // Bonus mails -if (EXT_IS_ACTIVE("bonus")) { +if (EXT_IS_ACTIVE('bonus')) { $bmails = MEDIA_GET_ENTRY("bonus_orders"); if (empty($bmails)) $bmails = 0; @@ -147,7 +147,7 @@ list($ref, $logins) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Get total points -$points = MEDIA_GET_ENTRY("total_points"); +$points = MEDIA_GET_ENTRY('total_points'); if (empty($points)) $points = 0; if (empty($ref)) $ref = 0; @@ -178,13 +178,13 @@ define('__REF_CLICKS', $clicks); // // Initialize Variables -$OUT_EXTRA = ""; $ROWS_EXTRA = 2; -$OUT_POINTS = ""; $ROWS_POINTS = 2; -$OUT_USER = ""; $ROWS_USER = 6; -$OUT_SPECIAL = ""; // We don't need row count here +$OUT_EXTRA = ''; $ROWS_EXTRA = 2; +$OUT_POINTS = ''; $ROWS_POINTS = 2; +$OUT_USER = ''; $ROWS_USER = 6; +$OUT_SPECIAL = ''; // We don't need row count here // @TODO Rewrite these all if-blocks to filters -if (EXT_IS_ACTIVE("beg")) { +if (EXT_IS_ACTIVE('beg')) { // Clicks on beg links $result = SQL_QUERY("SELECT SUM(beg_clicks) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE beg_clicks>0", __FILE__, __LINE__); list($extra) = SQL_FETCHROW($result); @@ -198,7 +198,7 @@ if (EXT_IS_ACTIVE("beg")) { $ROWS_EXTRA++; } -if (EXT_IS_ACTIVE("doubler")) { +if (EXT_IS_ACTIVE('doubler')) { // Total payed points $result = SQL_QUERY("SELECT COUNT(id), SUM(points) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND points > 0", __FILE__, __LINE__); list($count1, $points1) = SQL_FETCHROW($result); @@ -240,7 +240,7 @@ if (EXT_IS_ACTIVE("doubler")) { $OUT_SPECIAL .= LOAD_TEMPLATE("mediadata_extra_row", true, $content); } -if (EXT_IS_ACTIVE("holiday")) { +if (EXT_IS_ACTIVE('holiday')) { // Total holiday requests $result = SQL_QUERY("SELECT DISTINCT COUNT(h.userid) FROM `{!_MYSQL_PREFIX!}_user_holidays` AS h @@ -258,7 +258,7 @@ WHERE d.holiday_active='Y'", $ROWS_USER++; } -if (EXT_IS_ACTIVE("transfer")) { +if (EXT_IS_ACTIVE('transfer')) { // Statistics for points transfers $result = SQL_QUERY("SELECT DISTINCT COUNT(t.id), SUM(t.points) FROM `{!_MYSQL_PREFIX!}_user_transfers_in` AS t @@ -316,7 +316,7 @@ define('__PATCH_LEVEL', getConfig('patch_level')); define('__PATCH_CTIME', MAKE_DATETIME(getConfig('patch_ctime'), "2")); // Load template -LOAD_TEMPLATE("mediadata"); +LOAD_TEMPLATE('mediadata'); // ?> diff --git a/inc/modules/guest/what-rallyes.php b/inc/modules/guest/what-rallyes.php index 7d26188eef..ea92de1ef1 100644 --- a/inc/modules/guest/what-rallyes.php +++ b/inc/modules/guest/what-rallyes.php @@ -40,19 +40,19 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye"); +} elseif ((!EXT_IS_ACTIVE('rallye')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'rallye'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); OUTPUT_HTML("
"); // Check for possible running rallyes $ADMIN = " AND d.is_active='Y'"; -if (IS_ADMIN()) $ADMIN = ""; +if (IS_ADMIN()) $ADMIN = ''; $result = SQL_QUERY("SELECT DISTINCT d.id, d.admin_id, a.login, d.title, d.descr, d.template, d.start_time, d.end_time, d.min_users, d.min_prices FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d, `{!_MYSQL_PREFIX!}_admins` AS a @@ -115,7 +115,7 @@ if (SQL_NUMROWS($result) == 1) define('__RALLYE_TOP_USERS', "
".__RALLYE_EXTRAS."
"); define('__RALLYE_CAN_WIN_THIS', RALLYE_OUR_WINNERS_ARE); } else { - define('__RALLYE_PRICES', RALLYE_ADD_PRICES($id, "html")); + define('__RALLYE_PRICES', RALLYE_ADD_PRICES($id, 'html')); define('__RALLYE_TOP_USERS', RALLYE_ADD_TOPUSERS($id, getUserId())); define('__RALLYE_CAN_WIN_THIS', RALLYE_YOU_CAN_WIN); } diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index ac19ef31fa..d6f386ba95 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -40,13 +40,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("register"))) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "register"); +} elseif ((!EXT_IS_ACTIVE('register'))) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'register'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); global $DATA; @@ -55,20 +55,20 @@ $FAILED = false; $SHORT_PASS = false; $cats = 0; $IP_TIMEOUT = false; if (!IS_FORM_SENT()) REQUEST_UNSET_POST('ok'); -if (!REQUEST_ISSET_POST(('agree'))) REQUEST_SET_POST('agree' , ""); -if (!REQUEST_ISSET_POST(('addy'))) REQUEST_SET_POST('addy' , ""); -if (!REQUEST_ISSET_POST(('surname'))) REQUEST_SET_POST('surname' , ""); -if (!REQUEST_ISSET_POST(('family'))) REQUEST_SET_POST('family' , ""); -if (!REQUEST_ISSET_POST(('pass1'))) REQUEST_SET_POST('pass1' , ""); -if (!REQUEST_ISSET_POST(('pass2'))) REQUEST_SET_POST('pass2' , ""); -if (!REQUEST_ISSET_POST(('day'))) REQUEST_SET_POST('day' , ""); -if (!REQUEST_ISSET_POST(('month'))) REQUEST_SET_POST('month' , ""); -if (!REQUEST_ISSET_POST(('year'))) REQUEST_SET_POST('year' , ""); -if (!REQUEST_ISSET_POST(('max_mails'))) REQUEST_SET_POST('max_mails' , ""); -if (!REQUEST_ISSET_POST(('street_nr'))) REQUEST_SET_POST('street_nr' , ""); -if (!REQUEST_ISSET_POST(('zip'))) REQUEST_SET_POST('zip' , ""); -if (!REQUEST_ISSET_POST(('city'))) REQUEST_SET_POST('city' , ""); -if (!REQUEST_ISSET_POST(('cntry'))) REQUEST_SET_POST('cntry' , ""); +if (!REQUEST_ISSET_POST(('agree'))) REQUEST_SET_POST('agree' , ''); +if (!REQUEST_ISSET_POST(('addy'))) REQUEST_SET_POST('addy' , ''); +if (!REQUEST_ISSET_POST(('surname'))) REQUEST_SET_POST('surname' , ''); +if (!REQUEST_ISSET_POST(('family'))) REQUEST_SET_POST('family' , ''); +if (!REQUEST_ISSET_POST(('pass1'))) REQUEST_SET_POST('pass1' , ''); +if (!REQUEST_ISSET_POST(('pass2'))) REQUEST_SET_POST('pass2' , ''); +if (!REQUEST_ISSET_POST(('day'))) REQUEST_SET_POST('day' , ''); +if (!REQUEST_ISSET_POST(('month'))) REQUEST_SET_POST('month' , ''); +if (!REQUEST_ISSET_POST(('year'))) REQUEST_SET_POST('year' , ''); +if (!REQUEST_ISSET_POST(('max_mails'))) REQUEST_SET_POST('max_mails' , ''); +if (!REQUEST_ISSET_POST(('street_nr'))) REQUEST_SET_POST('street_nr' , ''); +if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip' , ''); +if (!REQUEST_ISSET_POST(('city'))) REQUEST_SET_POST('city' , ''); +if (!REQUEST_ISSET_POST(('cntry'))) REQUEST_SET_POST('cntry' , ''); if (!REQUEST_ISSET_POST(('country_code'))) REQUEST_SET_POST('country_code', "1"); // Default refid is zero @@ -125,8 +125,8 @@ if (IS_FORM_SENT()) { REQUEST_SET_POST('pass1', "!"); REQUEST_SET_POST('pass2', "!"); } else { - if (!REQUEST_ISSET_POST(('pass1'))) { REQUEST_SET_POST('pass1', "!"); } else { REQUEST_SET_POST('pass1', ""); } - if (!REQUEST_ISSET_POST(('pass2'))) { REQUEST_SET_POST('pass2', "!"); } else { REQUEST_SET_POST('pass2', ""); } + if (!REQUEST_ISSET_POST(('pass1'))) { REQUEST_SET_POST('pass1', "!"); } else { REQUEST_SET_POST('pass1', ''); } + if (!REQUEST_ISSET_POST(('pass2'))) { REQUEST_SET_POST('pass2', "!"); } else { REQUEST_SET_POST('pass2', ''); } } $FAILED = true; } // END - if @@ -141,7 +141,7 @@ if (IS_FORM_SENT()) { if (!IS_ADMIN()) { // Do this check only when no admin is logged in foreach (REQUEST_POST('cat') as $id => $answer) { - if ($answer == "Y") $cats++; + if ($answer == 'Y') $cats++; } // END - foreach if ($cats < getConfig('least_cats')) { @@ -150,7 +150,7 @@ if (IS_FORM_SENT()) { } // END - if } // END - if - if ((REQUEST_POST('addy') != "!") && (getConfig('check_double_email') == "Y")) { + if ((REQUEST_POST('addy') != "!") && (getConfig('check_double_email') == 'Y')) { // Does the email address already exists in our database? $CHK = SEARCH_EMAIL_USERTAB(REQUEST_POST('addy')); if ($CHK) { REQUEST_SET_POST('addy', "?"); $FAILED = true; } @@ -180,18 +180,18 @@ if ((IS_FORM_SENT()) && ((!$FAILED) || (IS_ADMIN()))) { // Get total ... // ... confirmed, ... - $confirmedUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true); + $confirmedUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true); // ... unconfirmed ... - $unconfirmedUsers = GET_TOTAL_DATA("UNCONFIRMED", "user_data", "userid", "status", true); + $unconfirmedUsers = GET_TOTAL_DATA("UNCONFIRMED", "user_data", 'userid', "status", true); // ... and locked users! - $lockedUsers = GET_TOTAL_DATA("LOCKED", "user_data", "userid", "status", true); + $lockedUsers = GET_TOTAL_DATA("LOCKED", "user_data", 'userid', "status", true); // Generate hash which will be inserted into confirmation mail $hash = generateHash(sha1($confirmedUsers.":".$unconfirmedUsers.":".$lockedUsers.":".REQUEST_POST('month')."-".REQUEST_POST('day')."-".REQUEST_POST('year').":".getenv('SERVER_NAME').":".GET_REMOTE_ADDR().":".GET_USER_AGENT()."/".constant('SITE_KEY')."/".constant('DATE_KEY')."/".constant('RAND_NUMBER'))); // Add design when extension sql_patches is v0.2.7 or greater - $ADD1 = ""; $ADD2 = ""; - if (GET_EXT_VERSION("sql_patches") >= "0.2.7") { + $ADD1 = ''; $ADD2 = ''; + if (GET_EXT_VERSION('sql_patches') >= '0.2.7') { // Okay, add design here $ADD1 = ", curr_theme"; $ADD2 = ", '".GET_CURR_THEME()."'"; @@ -201,7 +201,7 @@ if ((IS_FORM_SENT()) && ((!$FAILED) || (IS_ADMIN()))) { // @TODO Rewrite this to a single filter // // First comes first: begging rallye - if (GET_EXT_VERSION("beg") >= "0.1.7") { + if (GET_EXT_VERSION('beg') >= '0.1.7') { // Okay, shall I disable now? if (getConfig('beg_new_mem_notify') != "Y") { $ADD1 .= ", beg_ral_notify, beg_ral_en_notify"; @@ -210,7 +210,7 @@ if ((IS_FORM_SENT()) && ((!$FAILED) || (IS_ADMIN()))) { } // END - if // Second: active rallye - if (GET_EXT_VERSION("bonus") >= "0.7.7") { + if (GET_EXT_VERSION('bonus') >= '0.7.7') { // Okay, shall I disable now? if (getConfig('bonus_new_mem_notify') != "Y") { $ADD1 .= ", bonus_ral_notify, bonus_ral_en_notify"; @@ -219,13 +219,13 @@ if ((IS_FORM_SENT()) && ((!$FAILED) || (IS_ADMIN()))) { } // END - if // Write user data to table - if (EXT_IS_ACTIVE("country")) { + if (EXT_IS_ACTIVE('country')) { // Save with new selectable country code $countryRow = "country_code"; $countryData = bigintval(REQUEST_POST('country_code')); } else { // Old way with enterable two-char-code - $countryRow = "country"; + $countryRow = 'country'; $countryData = substr(REQUEST_POST('cntry'), 0, 2); } @@ -262,19 +262,20 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF // Did this work? if ($userid == 0) { // Something bad happened! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('USER_NOT_REGISTERED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('USER_NOT_REGISTERED')); return; } // END - if // Is the refback extension there? - if (EXT_IS_ACTIVE("refback")) { + // @TODO Rewrite this to a filter + if (EXT_IS_ACTIVE('refback')) { // Update refback table UPDATE_REFBACK_TABLE($userid); } // END - if // Write his welcome-points $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_user_points` WHERE userid=%s AND ref_depth=0 LIMIT 1", - array(bigintval($userid)), __FILE__, __LINE__); + array(bigintval($userid)), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 0) { // Add only when the line was not found (maybe some more secure?) $locked = "points"; @@ -283,16 +284,16 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__); // Update mediadata as well - if ((GET_EXT_VERSION("mediadata") >= "0.0.4") && ($locked == "points")) { + if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($locked == "points")) { // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "add", getConfig('points_register')); + MEDIA_UPDATE_ENTRY(array('total_points'), 'add', getConfig('points_register')); } // END - if } // END - if // Write catgories if ((is_array(REQUEST_POST('cat'))) && (count(REQUEST_POST('cat')))) { foreach (REQUEST_POST('cat') as $cat => $joined) { - if ($joined == "Y") { + if ($joined == 'Y') { // Insert category entry SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_cats` (userid, cat_id) VALUES (%s, %s)", array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__); @@ -307,7 +308,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF if (REQUEST_POST('refid') == "0") REQUEST_SET_POST('refid', constant('MAIN_TITLE')); // Is ZIP code set? - if (REQUEST_ISSET_POST(('zip'))) { + if (REQUEST_ISSET_POST('zip')) { // Prepare data array for the email template // Start with the gender... $DATA = array( @@ -366,7 +367,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF SEND_ADMIN_NOTIFICATION(getMessage('ADMIN_NEW_ACCOUNT'), "register-admin", $DATA, $userid); // Output success registration - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('REGISTRATION_DONE')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('REGISTRATION_DONE')); } else { if (REQUEST_POST('agree') == "!") { OUTPUT_HTML("
{--HAVE_TO_AGREE--}
"); @@ -374,20 +375,20 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF if (REQUEST_POST('addy') == "!") { OUTPUT_HTML("
{--ENTER_EMAIL--}
"); - REQUEST_SET_POST('addy', ""); + REQUEST_SET_POST('addy', ''); } elseif (REQUEST_POST('addy') == "?") { OUTPUT_HTML("
{--EMAIL_ALREADY_DB--}
"); - REQUEST_SET_POST('addy', ""); + REQUEST_SET_POST('addy', ''); } if (REQUEST_POST('surname') == "!") { OUTPUT_HTML("
{--ENTER_SURNAME--}
"); - REQUEST_SET_POST('surname', ""); + REQUEST_SET_POST('surname', ''); } // END - if if (REQUEST_POST('family') == "!") { OUTPUT_HTML("
{--ENTER_FAMILY--}
"); - REQUEST_SET_POST('family', ""); + REQUEST_SET_POST('family', ''); } // END - if if ((REQUEST_POST('pass1') == "!") && (REQUEST_POST('pass2') == "!")) { @@ -423,13 +424,13 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF } // Adds a table for the guests with all visible categories - define('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE("guest", true)); + define('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE('guest', true)); // Adds maximum receiveable mails list... :) - define('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST("guest", "", true)); + define('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST('guest', '', true)); // Shall I display the refid or shall I make it editable? - if (getConfig('display_refid') == "Y") { + if (getConfig('display_refid') == 'Y') { // Load "hide" form template define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid'])); } else { @@ -448,20 +449,20 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF define('__FAMILY', SQL_ESCAPE(REQUEST_POST('family'))); define('__STREET', SQL_ESCAPE(REQUEST_POST('street_nr'))); define('__COUNTRY', SQL_ESCAPE(REQUEST_POST('cntry'))); - if (REQUEST_ISSET_POST(('zip'))) { + if (REQUEST_ISSET_POST('zip')) { define('__ZIP', bigintval(REQUEST_POST('zip'))); } else { - define('__ZIP', ""); + define('__ZIP', ''); } define('__CITY', SQL_ESCAPE(REQUEST_POST('city'))); define('__ADDY', SQL_ESCAPE(REQUEST_POST('addy'))); // Shall I add a counrty selection box or the old input box? - if (EXT_IS_ACTIVE("country")) { + if (EXT_IS_ACTIVE('country')) { // New variant, good! $OUT = ""; define('__COUNTRY_CONTENT', $OUT); @@ -471,7 +472,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF } // Set MUST_??? constants - if ((EXT_IS_ACTIVE("register")) && (GET_EXT_VERSION("register") > "0.0")) REGISTER_FILL_MUST_CONSTANTS(); + if ((EXT_IS_ACTIVE('register')) && (GET_EXT_VERSION('register') > '0.0')) REGISTER_FILL_MUST_CONSTANTS(); // Display registration form LOAD_TEMPLATE("guest_register"); diff --git a/inc/modules/guest/what-sponsor_agb.php b/inc/modules/guest/what-sponsor_agb.php index d4edd318fa..4d2868a623 100644 --- a/inc/modules/guest/what-sponsor_agb.php +++ b/inc/modules/guest/what-sponsor_agb.php @@ -39,13 +39,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("sponsor"))) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor"); +} elseif ((!EXT_IS_ACTIVE('sponsor'))) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // ?> diff --git a/inc/modules/guest/what-sponsor_infos.php b/inc/modules/guest/what-sponsor_infos.php index a651cee891..1cc9636916 100644 --- a/inc/modules/guest/what-sponsor_infos.php +++ b/inc/modules/guest/what-sponsor_infos.php @@ -39,13 +39,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("sponsor"))) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor"); +} elseif ((!EXT_IS_ACTIVE('sponsor'))) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Init both results (see footer of this file) $result_act = false; @@ -61,7 +61,7 @@ ORDER BY m.sort ASC", __FILE__, __LINE__); if (SQL_NUMROWS($result_act) > 0) { // Load all actions - $OUT_ACT = ""; $SW = 2; + $OUT_ACT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_act)) { // Prepare data for the row template // @TODO Rewritings: conv->conv_rate,name->conv_name in template @@ -81,7 +81,7 @@ if (SQL_NUMROWS($result_act) > 0) { $result_pay = SQL_QUERY("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` ORDER BY pay_name", __FILE__, __LINE__); if (SQL_NUMROWS($result_pay) > 0) { // Load all pay types - $OUT_PAY = ""; $SW = 2; + $OUT_PAY = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_pay)) { // Prepare data for the row template // @TODO Rewritings: name->pay_name,min->pay_min_count,min->pay_min_count,curr->pay_currency @@ -100,12 +100,12 @@ if (SQL_NUMROWS($result_act) > 0) { } } else { // No pay types setuped so far! - $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); } } else { // No actions activated so far! - $OUT_ACT = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); - $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_ACT = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); + $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED'))); } // Free memory diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index f2b1e9e984..2090b96c34 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -39,20 +39,20 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("sponsor"))) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor"); +} elseif ((!EXT_IS_ACTIVE('sponsor'))) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); -$MODE = ""; +$MODE = ''; if (REQUEST_ISSET_GET(('mode'))) { // A "special" mode of the login system was requested switch (REQUEST_GET('mode')) { - case "activate" : $MODE = "activate"; break; // Activation link requested + case 'activate' : $MODE = 'activate'; break; // Activation link requested case "lost_pass": $MODE = "lost_pass"; break; // Request new password } } // END - if @@ -93,10 +93,10 @@ WHERE id='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1", SEND_ADMIN_NOTIFICATION(getMessage('ADMIN_NEW_SPONSOR'), "admin_sponsor_pending", $SPONSOR); // Sponsor account set to pending - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_IS_PENDING')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_PENDING')); } else { // Could not unlock account! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_PENDING_FAILED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_PENDING_FAILED')); } } elseif ($SPONSOR['status'] == "EMAIL") { // Changed email adress need to be confirmed @@ -107,23 +107,23 @@ WHERE id='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", // Check on success if (SQL_AFFECTEDROWS() == 1) { // Sponsor account is unlocked again - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN')); } else { // Could not unlock account! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_EMAIL_FAILED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_EMAIL_FAILED')); } } else { /// ??? Other status? - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_STATUS_FAILED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_STATUS_FAILED')); } } else { // No sponsor found - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_NOT_FOUND')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_NOT_FOUND')); } // Free memory SQL_FREERESULT($result); -} elseif ($MODE == "activate") { +} elseif ($MODE == 'activate') { // Send activation link again if (IS_FORM_SENT()) { // Check submitted data @@ -157,10 +157,10 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", SEND_EMAIL(REQUEST_POST('email'), SPONSOR_ACTIVATION_LINK_SUBJ, $msg_sponsor); // Output message - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACTIVATION_LINK_SENT')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_SENT')); } else { // No account found or not UNCONFIRMED - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACTIVATION_LINK_404')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_404')); } // Free memory @@ -204,10 +204,10 @@ WHERE id='%s' LIMIT 1", array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__); // Output message - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOST_PASSWORD_SENT')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_SENT')); } else { // No account found or not UNCONFIRMED - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOST_PASSWORD_404')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_404')); } // Free memory @@ -235,7 +235,7 @@ WHERE id='%s' AND password='%s' LIMIT 1", LOAD_URL("modules.php?module=sponsor"); } else { // Cookie setup failed! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSPOR_COOKIE_SETUP_FAILED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSPOR_COOKIE_SETUP_FAILED')); // Login formular and other links LOAD_TEMPLATE("guest_sponsor_login"); @@ -243,14 +243,14 @@ WHERE id='%s' AND password='%s' LIMIT 1", } else { // Status is not fine $content = constant('SPONSOR_LOGIN_FAILED_'.strtoupper($status).''); - LOAD_TEMPLATE("admin_settings_saved", false, $content); + LOAD_TEMPLATE('admin_settings_saved', false, $content); // Login formular and other links LOAD_TEMPLATE("guest_sponsor_login"); } } else { // Account missing or wrong pass! We shall not find this out for the "hacker folks"... - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOGIN_FAILED_404_WRONG_PASS')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOGIN_FAILED_404_WRONG_PASS')); // Login formular and other links LOAD_TEMPLATE("guest_sponsor_login"); diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index a6d0924daa..69920c8735 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -39,13 +39,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("sponsor"))) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor"); +} elseif ((!EXT_IS_ACTIVE('sponsor'))) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Create array for form errors (= missing data) $FORM_ERRORS = array(); @@ -106,13 +106,13 @@ if (IS_FORM_SENT()) { } // 3. ZIP code - if (!REQUEST_ISSET_POST(('zip'))) { + if (!REQUEST_ISSET_POST('zip')) { // ZIP code is empty $FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_EMPTY'); } elseif (bigintval(REQUEST_POST('zip')) != REQUEST_POST('zip')) { // ZIP is invalid $FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_INVALID'); - REQUEST_SET_POST('zip', ""); + REQUEST_SET_POST('zip', ''); } // 4. City @@ -134,7 +134,7 @@ if (IS_FORM_SENT()) { } elseif (!VALIDATE_URL(REQUEST_POST('url'))) { // Homepage URL is invalid $FORM_ERRORS[] = getMessage('SPONSOR_URL_IS_INVALID'); - REQUEST_SET_POST('url', ""); + REQUEST_SET_POST('url', ''); } // 7. Light validation of email address @@ -144,7 +144,7 @@ if (IS_FORM_SENT()) { } elseif (SPONSOR_FOUND_EMAIL_DB(REQUEST_POST('email'))) { // Email already found in database! $FORM_ERRORS[] = getMessage('SPONSOR_EMAIL_IS_ALREADY_REGISTERED'); - REQUEST_SET_POST('email', ""); + REQUEST_SET_POST('email', ''); } // 8. Pay type selected? @@ -273,7 +273,7 @@ WHERE id='%s' LIMIT 1", array(REQUEST_POST('pay_type')), __FILE__, __LINE__); } // Display message - LOAD_TEMPLATE("admin_settings_saved", false, $message); + LOAD_TEMPLATE('admin_settings_saved', false, $message); } else { // Check for payment types $result = SQL_QUERY("SELECT id, pay_name, pay_rate, pay_currency, pay_min_count @@ -323,19 +323,19 @@ ORDER BY pay_name", __FILE__, __LINE__); { case "M": // Male define('__GENDER_M' , " selected=\"selected\""); - define('__GENDER_F' , ""); - define('__GENDER_C' , ""); + define('__GENDER_F' , ''); + define('__GENDER_C' , ''); break; case "F": // Female - define('__GENDER_M' , ""); + define('__GENDER_M' , ''); define('__GENDER_F' , " selected=\"selected\""); - define('__GENDER_C' , ""); + define('__GENDER_C' , ''); break; case "C": // Company - define('__GENDER_M' , ""); - define('__GENDER_F' , ""); + define('__GENDER_M' , ''); + define('__GENDER_F' , ''); define('__GENDER_C' , " selected=\"selected\""); break; } @@ -343,13 +343,13 @@ ORDER BY pay_name", __FILE__, __LINE__); // Check for receive_warnings switch (REQUEST_POST('receive_warnings')) { - case "Y": + case 'Y': define('__REC_Y' , " selected=\"selected\""); - define('__REC_N' , ""); + define('__REC_N' , ''); break; - case "N": - define('__REC_Y' , ""); + case 'N': + define('__REC_Y' , ''); define('__REC_N' , " selected=\"selected\""); break; } @@ -368,29 +368,29 @@ ORDER BY pay_name", __FILE__, __LINE__); define('__SPONSOR_REFID', REQUEST_POST('refid')); } else { // None found, first call - define('__COMPANY' , ""); - define('__POSITION' , ""); - define('__TAX_IDENT', ""); - define('__GENDER_M' , ""); - define('__GENDER_F' , ""); - define('__GENDER_C' , ""); - define('__SURNAME' , ""); - define('__FAMILY' , ""); - define('__STREET1' , ""); - define('__STREET2' , ""); - define('__COUNTRY' , ""); - define('__ZIP' , ""); - define('__CITY' , ""); - define('__PHONE' , ""); - define('__FAX' , ""); - define('__CELL' , ""); - define('__EMAIL' , ""); - define('__URL' , ""); - define('__REC_Y' , ""); - define('__REC_N' , ""); + define('__COMPANY' , ''); + define('__POSITION' , ''); + define('__TAX_IDENT', ''); + define('__GENDER_M' , ''); + define('__GENDER_F' , ''); + define('__GENDER_C' , ''); + define('__SURNAME' , ''); + define('__FAMILY' , ''); + define('__STREET1' , ''); + define('__STREET2' , ''); + define('__COUNTRY' , ''); + define('__ZIP' , ''); + define('__CITY' , ''); + define('__PHONE' , ''); + define('__FAX' , ''); + define('__CELL' , ''); + define('__EMAIL' , ''); + define('__URL' , ''); + define('__REC_Y' , ''); + define('__REC_N' , ''); // No errors found so far - define('__SPONSOR_FORM_ERRORS', ""); + define('__SPONSOR_FORM_ERRORS', ''); } // Prepare referal things @@ -406,7 +406,7 @@ ORDER BY pay_name", __FILE__, __LINE__); LOAD_TEMPLATE("guest_sponsor_reg"); } else { // Nothing added so far - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_PAYMENT_LIST_IS_EMPTY')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_PAYMENT_LIST_IS_EMPTY')); } // Free memory diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index 8724592dd6..a272673a96 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Derterminate which stats we want and set mode and title for the link below stats block if (!REQUEST_ISSET_GET(('mode'))) REQUEST_SET_GET('mode', strtolower(getConfig('guest_stats'))); @@ -80,8 +80,8 @@ case "MEMBERS": // Statistics about your members $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".constant('START_TDAY'), __FILE__, __LINE__)); // Only males / females - $male = GET_TOTAL_DATA("M", "user_data", "userid", "gender", true, " AND `status`='CONFIRMED'"); - $female = GET_TOTAL_DATA("F", "user_data", "userid", "gender", true, " AND `status`='CONFIRMED'"); + $male = GET_TOTAL_DATA("M", "user_data", 'userid', "gender", true, " AND `status`='CONFIRMED'"); + $female = GET_TOTAL_DATA("F", "user_data", 'userid', "gender", true, " AND `status`='CONFIRMED'"); // Unconfirmed accounts $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE status != 'CONFIRMED'", __FILE__, __LINE__)); @@ -99,7 +99,7 @@ case "MEMBERS": // Statistics about your members if ($idx < 10) $month = "0".$idx; // Count months - $months[$month] = GET_TOTAL_DATA(bigintval($month), "user_data", "userid", "birth_month", true, " AND `status`='CONFIRMED'"); + $months[$month] = GET_TOTAL_DATA(bigintval($month), "user_data", 'userid', "birth_month", true, " AND `status`='CONFIRMED'"); } // Members in categories @@ -133,7 +133,7 @@ case "MEMBERS": // Statistics about your members define('__LINK_TITLE' , $ltitle); // Generate monthly stats - $SW = 2; $r2 = " right2"; $l = "ll"; $r = "lr"; $OUT = ""; + $SW = 2; $r2 = " right2"; $l = "ll"; $r = "lr"; $OUT = ''; foreach ($months as $month => $cnt) { if ($SW == 2) $OUT .= "\n"; @@ -150,7 +150,7 @@ case "MEMBERS": // Statistics about your members $OUT .= LOAD_TEMPLATE("guest_stats_month_row", true, $content); if ($SW == 2) { - $r2 = ""; + $r2 = ''; $l = "rl"; $r = "rr"; } else { $OUT .= "\n"; @@ -162,7 +162,7 @@ case "MEMBERS": // Statistics about your members define('__MONTH_STATS_ROWS', $OUT); // Generate category stats - $OUT = ""; $SW = 2; + $OUT = ''; $SW = 2; foreach ($cat_cnt as $id => $cnt) { // Prepare data for the template $content = array( @@ -182,11 +182,11 @@ case "MEMBERS": // Statistics about your members break; case "MODULES": // TOP10 module clicks - $AND = ""; + $AND = ''; if (!IS_ADMIN()) $AND = " AND `locked`='N' AND `visible`='Y'"; $guest_t10 = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__); $mem_t10 = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__); - $OUT = ""; + $OUT = ''; if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) { // Output header // @TODO Rewrite this to one template and $OUT .= .... @@ -238,7 +238,7 @@ case "MODULES": // TOP10 module clicks break; case "INACTIVE": // Deactivated stats - LOAD_TEMPLATE("admin_settings_saved", false, "{--GUEST_STATS_DEACTIVATED--}"); + LOAD_TEMPLATE('admin_settings_saved', false, "{--GUEST_STATS_DEACTIVATED--}"); break; } diff --git a/inc/modules/guest/what-top10.php b/inc/modules/guest/what-top10.php index f3ead088a1..896a8781ca 100644 --- a/inc/modules/guest/what-top10.php +++ b/inc/modules/guest/what-top10.php @@ -40,13 +40,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("top10")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "top10"); +} elseif ((!EXT_IS_ACTIVE('top10')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'top10'); return; } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); //// TOP logins $result = SQL_QUERY_ESC(" @@ -62,13 +62,13 @@ ORDER BY LIMIT %s", array(getConfig('top10_max')), __FILE__, __LINE__); -$OUT = ""; $SW = 2; $cnt = 1; +$OUT = ''; $SW = 2; $cnt = 1; while ($content = SQL_FETCHARRAY($result)) { // Init nickname $content['nickname'] = "---"; // Get nickname - if (EXT_IS_ACTIVE("nickname")) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); + if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); // Prepare data for template // @TODO Rewritings: uid->userid,nick->nickname,logins->total_logins in template @@ -133,13 +133,13 @@ ORDER BY LIMIT %s", array(getConfig('top10_max')), __FILE__, __LINE__); -$OUT = ""; $SW = 2; $cnt = 1; +$OUT = ''; $SW = 2; $cnt = 1; while ($content = SQL_FETCHARRAY($result)) { // Init nickname $content['nickname'] = "---"; // Get nickname - if (EXT_IS_ACTIVE("nickname")) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); + if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); // Prepare data for template // @TODO Rewritings: nick->nickname,uid->userid in template @@ -203,13 +203,13 @@ ORDER BY LIMIT %s", array(getConfig('top10_max')), __FILE__, __LINE__); -$OUT = ""; $SW = 2; $cnt = 1; +$OUT = ''; $SW = 2; $cnt = 1; while ($content = SQL_FETCHARRAY($result)) { // Init nickname $content['nickname'] = "---"; // Get nickname - if (EXT_IS_ACTIVE("nickname")) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); + if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']); // Prepare data for template // @TODO Rewritings: nick->nickname,uid->userid in template diff --git a/inc/modules/guest/what-welcome.php b/inc/modules/guest/what-welcome.php index 9d9203a88d..4414b0a0a1 100644 --- a/inc/modules/guest/what-welcome.php +++ b/inc/modules/guest/what-welcome.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); // Count referal levels $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level>0", __FILE__, __LINE__); diff --git a/inc/modules/guest/what-wernis_portal.php b/inc/modules/guest/what-wernis_portal.php index 6f7cbeeafd..f684914b1b 100644 --- a/inc/modules/guest/what-wernis_portal.php +++ b/inc/modules/guest/what-wernis_portal.php @@ -40,8 +40,8 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis"); +} elseif ((!EXT_IS_ACTIVE('wernis')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'wernis'); return; } @@ -49,7 +49,7 @@ if (!defined('__SECURITY')) { LOAD_INC_ONCE("inc/rdf.class.php"); // Add description as navigation point -ADD_DESCR("guest", __FILE__); +ADD_DESCR('guest', __FILE__); OUTPUT_HTML("
"); $rdf = new fase4_rdf(); diff --git a/inc/modules/index.php b/inc/modules/index.php index c4d19f2d72..d189048056 100644 --- a/inc/modules/index.php +++ b/inc/modules/index.php @@ -40,8 +40,8 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!EXT_IS_ACTIVE("sql_patches")) { - // The extension "sql_patches" *MUST* be activated or you have lot's of problems! +} elseif (!EXT_IS_ACTIVE('sql_patches')) { + // The extension 'sql_patches' *MUST* be activated or you have lot's of problems! LOAD_URL("admin.php"); } @@ -63,13 +63,13 @@ if (empty($GLOBALS['what'])) $GLOBALS['what'] = getConfig('index_home'); // Adding the main content module here if (empty($GLOBALS['action'])) { // Get action value from what value - $GLOBALS['action'] = GET_ACTION("guest", $GLOBALS['what']); + $GLOBALS['action'] = GET_ACTION('guest', $GLOBALS['what']); } // END - if // Add the guest's menu here... -if ((getConfig('guest_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) { +if ((getConfig('guest_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) { // Show only when guest menu is active - ADD_MENU("guest", $GLOBALS['action'], $GLOBALS['what']); + ADD_MENU('guest', $GLOBALS['action'], $GLOBALS['what']); } // END - if // TDs between menu and content @@ -82,15 +82,15 @@ $GLOBALS['block_mode'] = false; $INC = sprintf("inc/modules/guest/action-%s.php", $GLOBALS['action']); // Is the file there? -if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("guest", $GLOBALS['action'], $GLOBALS['what']))) { +if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION('guest', $GLOBALS['action'], $GLOBALS['what']))) { // Requested module is available so we load it LOAD_INC_ONCE($INC); } else { // Invalid module specified or not found... - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } -if ((getConfig('guest_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) { +if ((getConfig('guest_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) { // Right side of content (hint: a good place for 120x600 skyscraper banner!) LOAD_TEMPLATE("guest_content_footer"); diff --git a/inc/modules/login.php b/inc/modules/login.php index f06e6bac8f..9dd41b7776 100644 --- a/inc/modules/login.php +++ b/inc/modules/login.php @@ -41,27 +41,27 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - $URL = "modules.php?module=index"; - if ($check == "mem_only") $URL .= "&msg=".getCode('MODULE_MEM_ONLY')."&mod=".$GLOBALS['module']; + $URL = 'modules.php?module=index'; + if ($check == 'mem_only') $URL .= '&msg='.getCode('MODULE_MEM_ONLY').'&mod='.$GLOBALS['module']; LOAD_URL($URL); } -if ($status != "CONFIRMED") { +if ($status != 'CONFIRMED') { // If the status is different than confirmed move the user away from here $errorCode = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status); // Load URL - LOAD_URL("modules.php?module=index&what=login&login=".$errorCode); + LOAD_URL('modules.php?module=index&what=login&login='.$errorCode); } // END - if // Load adverstising template -define('__MEMBER_ADVERT', LOAD_TEMPLATE("member_banner", true)); +define('__MEMBER_ADVERT', LOAD_TEMPLATE('member_banner', true)); // Disable block mode by default $GLOBALS['block_mode'] = false; // Generate a tableset for the menu title and content -LOAD_TEMPLATE("member_header"); +LOAD_TEMPLATE('member_header'); // Begin menu block here OUTPUT_HTML(" @@ -69,14 +69,14 @@ OUTPUT_HTML(" // Adding the main content module here if (empty($GLOBALS['action'])) { - if (empty($GLOBALS['what'])) $GLOBALS['what'] = "welcome"; + if (empty($GLOBALS['what'])) $GLOBALS['what'] = 'welcome'; } else { $act = SQL_ESCAPE($GLOBALS['action']); } // Add the member's menu here... -if ((getConfig('member_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) { - ADD_MENU("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what']); +if ((getConfig('member_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) { + ADD_MENU('member', GET_ACTION('member', $GLOBALS['what']), $GLOBALS['what']); } // END - if // Menu -> content @@ -84,30 +84,30 @@ OUTPUT_HTML(" "); $INC = sprintf("inc/modules/member/action-%s.php", $act); -if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("member", $GLOBALS['action'], $GLOBALS['what']))) { +if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION('member', $GLOBALS['action'], $GLOBALS['what']))) { // Requested module is available so we load it LOAD_INC($INC); } else { // Invalid module specified or not found... - LOAD_URL("modules.php?module=login"); + LOAD_URL('modules.php?module=login'); } -if ((getConfig('member_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) { +if ((getConfig('member_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) { // Right side of content (hint: a good place for 120x600 skyscraper banner!) - LOAD_TEMPLATE("member_content_right"); + LOAD_TEMPLATE('member_content_right'); // Some advertising stuff? - LOAD_TEMPLATE("member_advert"); + LOAD_TEMPLATE('member_advert'); } OUTPUT_HTML(" "); -// Load same template for "Goto TOP" -LOAD_TEMPLATE("member_goto_top"); +// Load same template for 'Goto TOP' +LOAD_TEMPLATE('member_goto_top'); // Footer template (Thanx to Mr. Glaus!) -LOAD_TEMPLATE("member_footer"); +LOAD_TEMPLATE('member_footer'); // ?> diff --git a/inc/modules/member/action- b/inc/modules/member/action- index a6f03ff3ac..bae936ef5d 100644 --- a/inc/modules/member/action- +++ b/inc/modules/member/action- @@ -51,7 +51,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-account.php b/inc/modules/member/action-account.php index b909cb4d81..c70be39ccd 100644 --- a/inc/modules/member/action-account.php +++ b/inc/modules/member/action-account.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } elseif ($GLOBALS['block_mode']) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index d073fde05f..81acd1b57c 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -41,9 +41,9 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank'); return; } elseif ($GLOBALS['block_mode']) { // Block mode detected @@ -51,7 +51,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-extras.php b/inc/modules/member/action-extras.php index 5e30dea779..b9ce98cb40 100644 --- a/inc/modules/member/action-extras.php +++ b/inc/modules/member/action-extras.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } elseif ($GLOBALS['block_mode']) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-logout.php b/inc/modules/member/action-logout.php index 043b58fd6f..6e94ec7b7b 100644 --- a/inc/modules/member/action-logout.php +++ b/inc/modules/member/action-logout.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } elseif ($GLOBALS['block_mode']) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-main.php b/inc/modules/member/action-main.php index 8ff8d0c29c..60066467ec 100644 --- a/inc/modules/member/action-main.php +++ b/inc/modules/member/action-main.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } elseif ($GLOBALS['block_mode']) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index 636cd8f5b1..a8c14f3958 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -41,9 +41,9 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'order'); return; } elseif ($GLOBALS['block_mode']) { // Block mode detected @@ -51,7 +51,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-rals.php b/inc/modules/member/action-rals.php index a74e63a72c..c1e015b50d 100644 --- a/inc/modules/member/action-rals.php +++ b/inc/modules/member/action-rals.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } elseif ($GLOBALS['block_mode']) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-stats.php b/inc/modules/member/action-stats.php index 0b791f7d11..32b8363c63 100644 --- a/inc/modules/member/action-stats.php +++ b/inc/modules/member/action-stats.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } elseif ($GLOBALS['block_mode']) { // Block mode detected return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-surfbar.php b/inc/modules/member/action-surfbar.php index e9349e4c9a..2e03a12323 100644 --- a/inc/modules/member/action-surfbar.php +++ b/inc/modules/member/action-surfbar.php @@ -41,9 +41,9 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'surfbar'); return; } elseif ($GLOBALS['block_mode']) { // Block mode detected @@ -51,7 +51,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load the include file $INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what'])); diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index bc7ab3ee4d..b471e2c425 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -41,21 +41,21 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('theme')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'theme'); return; } // Load all active designs (or all if admin) -$whereStatement = ""; $OUT = ""; +$whereStatement = ''; $OUT = ''; if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'"; $result_themes = SQL_QUERY("SELECT theme_path FROM `{!_MYSQL_PREFIX!}_themes`".$whereStatement, __FILE__, __LINE__); $num_themes = SQL_NUMROWS($result_themes); if ($num_themes > 1) { // If more than 1 is installed output selection box - $act = ""; $wht = ""; + $act = ''; $wht = ''; if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']); if (!empty($GLOBALS['what'])) $wht = SQL_ESCAPE($GLOBALS['what']); $OUT = THEME_SELECTION_BOX("login", $act, $wht, $result_themes); @@ -65,7 +65,7 @@ if ($num_themes > 1) { $OUT = LOAD_TEMPLATE("theme_one", true); } elseif (IS_ADMIN()) { // If there is no theme installed and there's an admin notify him! - $OUT = LOAD_TEMPLATE("admin_settings_saved", true, "
{--ADMIN_NO_THEME_INSTALLED_WARNING--}
"); + $OUT = LOAD_TEMPLATE('admin_settings_saved', true, "
{--ADMIN_NO_THEME_INSTALLED_WARNING--}
"); } // Free memory diff --git a/inc/modules/member/what- b/inc/modules/member/what- index 04d2111314..0a0ccb74a5 100644 --- a/inc/modules/member/what- +++ b/inc/modules/member/what- @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Loads the name-matching template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index 2747efd548..6b24d28276 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -40,15 +40,15 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank"); +} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank'); return; } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Loads the name-matching template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index 516c33ffa2..589e8babce 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Loads the name-matching template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index 23d2edf357..34ec453bba 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Loads the name-matching template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index 23d2edf357..34ec453bba 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Loads the name-matching template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index 23d2edf357..34ec453bba 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Loads the name-matching template LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4)); diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index 581ab6155a..c19db75ba3 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -41,25 +41,25 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'beg'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); $uid = getUserId(); -if (EXT_IS_ACTIVE("nickname")) +if (EXT_IS_ACTIVE('nickname')) { // Load nickname - $data = "nickname"; + $data = 'nickname'; } else { // Load userid - $data = "userid"; + $data = 'userid'; } // Run SQL command diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index b5c9fc92dc..037c7dcd86 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -42,17 +42,17 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); -} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg"); +} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'beg'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Autopurge installed? -$lastOnline = "%s"; $ONLINE = ""; -if (EXT_IS_ACTIVE("autopurge")) { +$lastOnline = "%s"; $ONLINE = ''; +if (EXT_IS_ACTIVE('autopurge')) { // Use last online timestamp to keep inactive members away from here $lastOnline = " AND last_online >= (UNIX_TIMESTAMP() - %s)"; $ONLINE = getConfig('ap_inactive_since'); @@ -65,7 +65,7 @@ ORDER BY beg_points DESC, last_online DESC, userid LIMIT %s", array($ONLINE, getConfig('beg_ranks')), __FILE__, __LINE__); // Reset temporary variable and check for users -$OUT = ""; +$OUT = ''; if (SQL_NUMROWS($result) > 0) { // Load our winners... $SW = 2; $cnt = 1; diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index 4934cb9f48..e562705c82 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -42,23 +42,23 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); -} elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus"); +} elseif ((!EXT_IS_ACTIVE('bonus')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bonus'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); -if (GET_EXT_VERSION("bonus") >= "0.6.9") { +if (GET_EXT_VERSION('bonus') >= '0.6.9') { // Add more bonus points here // @TODO Rewrite this to a filter $USE = "(0"; - if (getConfig('bonus_click_yn') == "Y") $USE .= " + turbo_bonus"; - if (getConfig('bonus_login_yn') == "Y") $USE .= " + login_bonus"; - if (getConfig('bonus_order_yn') == "Y") $USE .= " + bonus_order"; - if (getConfig('bonus_stats_yn') == "Y") $USE .= " + bonus_stats"; - if (getConfig('bonus_ref_yn') == "Y") $USE .= " + bonus_ref"; + if (getConfig('bonus_click_yn') == 'Y') $USE .= " + turbo_bonus"; + if (getConfig('bonus_login_yn') == 'Y') $USE .= " + login_bonus"; + if (getConfig('bonus_order_yn') == 'Y') $USE .= " + bonus_order"; + if (getConfig('bonus_stats_yn') == 'Y') $USE .= " + bonus_stats"; + if (getConfig('bonus_ref_yn') == 'Y') $USE .= " + bonus_ref"; $USE .= ")"; } else { // Old version ??? @@ -66,8 +66,8 @@ if (GET_EXT_VERSION("bonus") >= "0.6.9") { } // Autopurge installed? -$lastOnline = "%s"; $ONLINE = ""; -if (EXT_IS_ACTIVE("autopurge")) { +$lastOnline = "%s"; $ONLINE = ''; +if (EXT_IS_ACTIVE('autopurge')) { // Use last online timestamp to keep inactive members away from here $lastOnline = " AND last_online >= (UNIX_TIMESTAMP() - %s)"; $ONLINE = getConfig('ap_inactive_since'); @@ -81,7 +81,7 @@ LIMIT %s", array($ONLINE, getConfig('bonus_ranks')), __FILE__, __LINE__); // Reset temporary variable and check for users -$OUT = ""; +$OUT = ''; if (SQL_NUMROWS($result) > 0) { // Load our winners... $SW = 2; $cnt = 1; diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 9eee48ca05..1fb64f1e65 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -45,11 +45,11 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); $UID = getUserId(); $whereStatement = " WHERE `visible`='Y'"; -if (IS_ADMIN()) $whereStatement = ""; +if (IS_ADMIN()) $whereStatement = ''; $result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY `sort`", __FILE__, __LINE__); $cats = SQL_NUMROWS($result); @@ -59,7 +59,7 @@ if ($cats > 0) { if (IS_FORM_SENT()) { $cnt = 0; foreach (REQUEST_POST('cat') as $cat => $joined) { - if ($joined == "N") $cnt++; + if ($joined == 'N') $cnt++; } if (($cats - $cnt) < getConfig('least_cats')) { @@ -71,8 +71,8 @@ if ($cats > 0) { if (IS_FORM_SENT()) { foreach (REQUEST_POST('cat') as $cat => $joined) { switch ($joined) { - case "Y": - $sql = ""; + case 'Y': + $sql = ''; $result_user = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1", array($UID, bigintval($cat)), __FILE__, __LINE__); @@ -84,7 +84,7 @@ if ($cats > 0) { } break; - case "N": + case 'N': $sql = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1"; break; } @@ -96,11 +96,11 @@ if ($cats > 0) { } // Categories saved... - LOAD_TEMPLATE("admin_settings_saved", true, getMessage('MEMBER_CATS_SAVED')); + LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_CATS_SAVED')); } else { if ($LEAST) { // Also here we have to secure it... :( - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('CATS_LEAST'), getConfig('least_cats'))); + LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('CATS_LEAST'), getConfig('least_cats'))); } // Put some data into constants for the template define('__ROWS', ($cats*2+4)); @@ -110,24 +110,24 @@ if ($cats > 0) { // Start switching colors and load all visible categories // @TODO Rewrite this to use $OUT .= ... - $OUT = ""; $SW = 2; + $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Default he has not joined - $content['jn'] = " checked=\"checked\""; - $content['jy'] = ""; + $content['jn'] = ' chkecked="checked"'; + $content['jy'] = ''; // When we found an entry don't read it, just change the jx elements if (REQUEST_ISSET_POST(('cat'))) { // Form sent? if (REQUEST_POST('cat', $content['id']) =='Y') { - $content['jy'] = " checked=\"checked\""; - $content['jn'] = ""; + $content['jy'] = ' chkecked="checked"'; + $content['jn'] = ''; } } else { // Check if he has an entry - if (GET_TOTAL_DATA($UID, "user_cats", "id", "userid", true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) { - $content['jn'] = ""; - $content['jy'] = " checked=\"checked\""; + if (GET_TOTAL_DATA($UID, "user_cats", "id", 'userid', true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) { + $content['jn'] = ''; + $content['jy'] = ' chkecked="checked"'; } } @@ -144,7 +144,7 @@ if ($cats > 0) { } } else { // No cateogries are defined yet - LOAD_TEMPLATE("admin_settings_saved", true, getMessage('MEMBER_NO_CATS')); + LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_CATS')); } // Free result diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index f67a2d4643..fe209d5cd3 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -42,13 +42,13 @@ if (!defined('__SECURITY')) { require($INC); } elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); -} elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler"); +} elseif ((!EXT_IS_ACTIVE('doubler')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'doubler'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Percent values etc. define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('doubler_charge') * 100)); @@ -58,7 +58,7 @@ define('__MIN_VALUE' , TRANSLATE_COMMA(getConfig('doubler_min'))); define('__MAX_VALUE' , TRANSLATE_COMMA(getConfig('doubler_max'))); // Transfer referal ID -if (EXT_IS_ACTIVE("nickname")) { +if (EXT_IS_ACTIVE('nickname')) { // Load nickname from DB $nick = NICKNAME_GET_NICK(getUserId()); diff --git a/inc/modules/member/what-guest.php b/inc/modules/member/what-guest.php index ab4f138e93..97fe132352 100644 --- a/inc/modules/member/what-guest.php +++ b/inc/modules/member/what-guest.php @@ -41,13 +41,13 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Simply redirect... -LOAD_URL("modules.php?module=index"); +LOAD_URL('modules.php?module=index'); // ?> diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index d156309ff5..e33a813917 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "holiday"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('holiday')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'holiday'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Check for running mail orders in pool $result1 = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool` @@ -79,7 +79,7 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { } // Display message and exit here - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), MAKE_DATETIME($stamp, "1"))); + LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), MAKE_DATETIME($stamp, "1"))); return; } } @@ -130,7 +130,7 @@ WHERE userid=%s LIMIT 1", array(getUserId(), $msg), __FILE__, __LINE__); // Display message - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_IS_ACTIVATED_NOW')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_IS_ACTIVATED_NOW')); } } @@ -143,7 +143,7 @@ WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); list($active, $locked) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if (($active == "Y") && (($locked + getConfig('holiday_lock')) < time())) + if (($active == 'Y') && (($locked + getConfig('holiday_lock')) < time())) { // Load data $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!_MYSQL_PREFIX!}_user_holidays` @@ -171,14 +171,14 @@ WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); SEND_ADMIN_NOTIFICATION(getMessage('HOLIDAY_ADMIN_DEAC_SUBJ'), "admin_holiday_deactivated", array(), getUserId()); // Display message to user - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_DEACTIVATED_NOW')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_DEACTIVATED_NOW')); } else { // Display message to user - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_CANNOT_DEACTIVATE')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_CANNOT_DEACTIVATE')); } - } elseif ($active == "Y") { + } elseif ($active == 'Y') { // To fast! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_LOCKED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_LOCKED')); } } @@ -197,7 +197,7 @@ WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); // User can deactivate his holiday request switch ($active) { - case "Y": // Display deactivation form + case 'Y': // Display deactivation form // Load starting and ending date $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!_MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); @@ -229,7 +229,7 @@ WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); } break; - case "N": // Display activation form + case 'N': // Display activation form // Starting day define('_START_DAY' , ADD_SELECTION("day" , date("d", (time() + getConfig('one_day'))), "start")); define('_START_MONTH', ADD_SELECTION("month", date("m", (time() + getConfig('one_day'))), "start")); @@ -254,7 +254,7 @@ WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); } } else { // To fast! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_LOCKED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_LOCKED')); } } // diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index af20a603e7..6117883143 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -41,21 +41,21 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("html_mail")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "html_mail"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('html_mail')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'html_mail'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Class was found and loaded if (IS_FORM_SENT()) { // Save settings SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET html='%s' WHERE userid=%s LIMIT 1", array(REQUEST_POST('html'), getUserId()), __FILE__, __LINE__); - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_SETTINGS_SAVED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SETTINGS_SAVED')); } else { // Load template for changing settings $result = SQL_QUERY_ESC("SELECT html FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", @@ -63,12 +63,12 @@ if (IS_FORM_SENT()) { list($mode) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if ($mode == "Y") { - define('HTML_Y', " checked=\"checked\""); - define('HTML_N', ""); + if ($mode == 'Y') { + define('HTML_Y', ' chkecked="checked"'); + define('HTML_N', ''); } else { - define('HTML_N', " checked=\"checked\""); - define('HTML_Y', ""); + define('HTML_N', ' chkecked="checked"'); + define('HTML_Y', ''); } LOAD_TEMPLATE("member_html_mail_settings"); } diff --git a/inc/modules/member/what-logout.php b/inc/modules/member/what-logout.php index 7571378573..c1b9dc97c6 100644 --- a/inc/modules/member/what-logout.php +++ b/inc/modules/member/what-logout.php @@ -41,7 +41,7 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); + LOAD_URL('modules.php?module=index'); } // Base URL for redirection (both cases) @@ -49,7 +49,7 @@ $URL = "modules.php?module=index&msg="; if (destroy_user_session()) { // Remove theme cookie as well - set_session("mxchange_theme", ""); + set_session("mxchange_theme", ''); // Logout completed $URL .= getCode('LOGOUT_DONE'); diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index e897ad539b..4c2f95a026 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -41,16 +41,16 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('mydata')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'mydata'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); -define('UID_VALUE', getUserId()); $URL = ""; +define('UID_VALUE', getUserId()); $URL = ''; // Detect what the member wants to do $MODE = "show"; // Show his data @@ -61,7 +61,7 @@ if (REQUEST_ISSET_POST(('notify'))) $MODE = "notify"; // Switch off notification switch ($MODE) { case "show": // Show his data - if (EXT_IS_ACTIVE("country", true)) { + if (EXT_IS_ACTIVE('country', true)) { // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13 $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(UID_VALUE), __FILE__, __LINE__); @@ -94,7 +94,7 @@ case "show": // Show his data default : define('DOB', $DATA[8]."-".$DATA[7]."-".$DATA[9]); break; } - if (EXT_IS_ACTIVE("country")) { + if (EXT_IS_ACTIVE('country')) { // Load country's description and code $DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]); } @@ -104,7 +104,7 @@ case "show": // Show his data break; case "edit": // Edit data - if (EXT_IS_ACTIVE("country", true)) { + if (EXT_IS_ACTIVE('country', true)) { // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13 $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", @@ -131,23 +131,23 @@ FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", { case "M": define('M_DEFAULT', " selected=\"selected\""); - define('F_DEFAULT', ""); - define('C_DEFAULT', ""); + define('F_DEFAULT', ''); + define('C_DEFAULT', ''); break; case "F": - define('M_DEFAULT', ""); + define('M_DEFAULT', ''); define('F_DEFAULT', " selected=\"selected\""); - define('C_DEFAULT', ""); + define('C_DEFAULT', ''); break; case "C": - define('M_DEFAULT', ""); - define('F_DEFAULT', ""); + define('M_DEFAULT', ''); + define('F_DEFAULT', ''); define('C_DEFAULT', " selected=\"selected\""); break; } - $DOB = ""; + $DOB = ''; switch (GET_LANGUAGE()) { case "de": // German date format @@ -166,13 +166,13 @@ FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", } define('DOB', $DOB); - define('MAX_REC_LIST', ADD_MAX_RECEIVE_LIST("member", $DATA[11], true)); + define('MAX_REC_LIST', ADD_MAX_RECEIVE_LIST('member', $DATA[11], true)); - if (EXT_IS_ACTIVE("country")) { + if (EXT_IS_ACTIVE('country')) { // Generate selection box $OUT = ""; define('__COUNTRY_CONTENT', $OUT); @@ -201,26 +201,26 @@ case "save": // Save entered data LOAD_TEMPLATE("member_mydata_locked"); } elseif (!VALIDATE_EMAIL(REQUEST_POST('addy'))) { // Invalid email address! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED')); } else { // Generate hash $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40)); if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) { // Only on simple changes normal mode is active = no email or password changed - $MODE = "normal"; $AND = ""; + $MODE = 'normal'; $AND = ''; // Did the user changed the password? - if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $MODE = "pass"; } + if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $MODE = 'pass'; } // Or did he changed his password? if (REQUEST_POST('addy') != $DATA[0]) { // Jupp - if ($MODE == "normal") { $MODE = "email"; } else { $MODE .= ";email"; } + if ($MODE == 'normal') { $MODE = 'email'; } else { $MODE .= ";email"; } REQUEST_SET_POST('old_addy', $DATA[0]); } // Update member's profile - if (EXT_IS_ACTIVE("country")) { + if (EXT_IS_ACTIVE('country')) { // New way SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET gender='%s', surname='%s', family='%s', @@ -281,13 +281,13 @@ array( } // Get all modes ... - $modes = explode(";", $MODE); + $modes = explode(';', $MODE); // ... and run them through - SEND_MODE_MAILS ("mydata", $modes); + SEND_MODE_MAILS ('mydata', $modes); } else { // Entered wrong pass for updating profile - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEBER_UPDATE_PWD_WRONG')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG')); } } break; @@ -295,7 +295,7 @@ array( case "notify": // Switch off notfication SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); - $URL = "modules.php?module=login&what=welcome&msg=".urlencode(getMessage('PROFILE_UPDATED')); + $URL = 'modules.php?module=login&what=welcome&msg=' . urlencode(getMessage('PROFILE_UPDATED')); break; } diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index ceac5aa82a..b4aa6697f3 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "newsletter"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('newsletter')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'newsletter'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); // Load status $result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", @@ -59,7 +59,7 @@ SQL_FREERESULT($result); // Remember charge value define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('nl_charge'))); -if ((IS_FORM_SENT()) && ($status == "Y") && ($span == "0")) { +if ((IS_FORM_SENT()) && ($status == 'Y') && ($span == "0")) { // Save request SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET nl_timespan='".(getConfig('one_day') * 30)."' WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__); @@ -79,10 +79,10 @@ VALUES ('0','NEW','NL_UNSUBSCRIBE','{--ADMIN_NL_SUBJECT--}','".$admin_msg."', UN SEND_ADMIN_NOTIFICATION(getMessage('NL_ADMIN_SUBJECT'), "admin_newsletter_request", array(), getUserId()); // Display message - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('NL_MEMBER_REQUEST_DONE')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('NL_MEMBER_REQUEST_DONE')); } elseif ($span > 0) { // Already ordered - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('NL_MEMBER_REQUEST_ALREADY')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('NL_MEMBER_REQUEST_ALREADY')); } else { // Load template for the note define('NL_MEMBER_NOTE', LOAD_TEMPLATE("member_newsletter_note", true)); @@ -90,13 +90,13 @@ VALUES ('0','NEW','NL_UNSUBSCRIBE','{--ADMIN_NL_SUBJECT--}','".$admin_msg."', UN // Set status message and submit button switch ($status) { - case "Y": // Receives the newsletter + case 'Y': // Receives the newsletter define('__STATUS_VALUE', getMessage('NL_MEMBER_ON')); - define('__UNTIL_VALUE' , ""); + define('__UNTIL_VALUE' , ''); define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_OFF')); break; - case "N": // Does not receive the newsletter + case 'N': // Does not receive the newsletter define('__STATUS_VALUE', getMessage('NL_MEMBER_OFF')); define('__UNTIL_VALUE' , MAKE_DATETIME($until, "2")); define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_ON')); diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index b3530da502..ebb4035923 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -41,14 +41,14 @@ if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("nickname")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "nickname"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('nickname')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'nickname'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); $isValid = false; if (IS_FORM_SENT()) { @@ -81,14 +81,14 @@ if ($isValid === true) { } // Load template - LOAD_TEMPLATE("admin_settings_saved", false, $content); + LOAD_TEMPLATE('admin_settings_saved', false, $content); } else { // Load current nickname define('__NICKNAME', NICKNAME_GET_NICK(getUserId())); // Do we have already submit the form? if (REQUEST_ISSET_POST(('nickname'))) { - LOAD_TEMPLATE("admin_settings_saved", false, "
{--NICKNAME_IS_INVALID--}{--NICKNAME_IS_INVALID--}= "0.1.3") { +$HOLIDAY = 'userid'; +if (GET_EXT_VERSION('holiday') >= '0.1.3') { // Fetch also holiday activation data $HOLIDAY = "holiday_active"; } // END - if @@ -84,14 +84,14 @@ SQL_FREERESULT($result_mmails); if ($HOLIDAY == $DMY) $HOLIDAY='N'; $ALLOWED = $MAXI - $ORDERS; -if (getConfig('order_max_full') == "MAX") $ALLOWED = $MAXI; +if (getConfig('order_max_full') == 'MAX') $ALLOWED = $MAXI; // Now check his points amount $total = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");; -if (($HOLIDAY == "Y") && (GET_EXT_VERSION("holiday") >= "0.1.3")) { +if (($HOLIDAY == 'Y') && (GET_EXT_VERSION('holiday') >= '0.1.3')) { // Holiday is active! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE')); } elseif ((REQUEST_ISSET_POST(('frametester'))) && ($ALLOWED > 0) && (REQUEST_POST('receiver') > 0)) { // Continue with the frametester, we first need to store the data temporary in the pool // @@ -113,36 +113,36 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", if ($type == "TEMP") { // No entry found, so we need to check out the stats table as well... :) // We have to add that suff here, now we continue WITHOUT checking and check the text and subject against some filters - $URL = ""; - if (getConfig('test_text') == "Y") { + $URL = ''; + if (getConfig('test_text') == 'Y') { // Test submitted text against some filters (length, URLs in text etc.) if ((strpos(strtolower(REQUEST_POST('text')), "https://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "www") > -1)) { // URL found! - $URL = "modules.php?module=login&what=order&msg=".getCode('URL_FOUND'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_FOUND'); } // END - if // Remove new-line and carriage-return characters - $TEST = str_replace("\n", "", str_replace("\r", "", REQUEST_POST('text'))); + $TEST = str_replace("\n", '', str_replace("\r", '', REQUEST_POST('text'))); // Text length within allowed length? if (strlen($TEST) > getConfig('max_tlength')) { // Text is too long! - $URL = "modules.php?module=login&what=order&msg=".getCode('OVERLENGTH'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('OVERLENGTH'); } // END - if } // END - if // Shall I test the subject line against URLs? - if (getConfig('test_subj') == "Y") { + if (getConfig('test_subj') == 'Y') { // Check the subject line for issues REQUEST_SET_POST('subject', str_replace("\\", "[nl]", substr(REQUEST_POST('subject'), 0, 200))); if ((strpos(strtolower(REQUEST_POST('subject')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('subject')), "www") > -1)) { // URL in subject found - $URL = "modules.php?module=login&what=order&msg=".getCode('SUBJ_URL'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('SUBJ_URL'); } // END - if } // END - if // And shall I check that his URL is not in the black list? - if (getConfig('url_blacklist') == "Y") { + if (getConfig('url_blacklist') == 'Y') { // Ok, I do that for you know... $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{!_MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1", array(REQUEST_POST('url')), __FILE__, __LINE__); @@ -152,7 +152,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", list($blist) = SQL_FETCHROW($result); // Create redirect-URL - $URL = "modules.php?module=login&what=order&msg=".getCode('BLIST_URL')."&blist=".$blist; + $URL = 'modules.php?module=login&what=order&msg=' . getCode('BLIST_URL')."&blist=".$blist; } // END - if // Free result @@ -162,24 +162,24 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", // Enougth receivers entered? if ((REQUEST_POST('receiver') < getConfig('order_min')) && (!IS_ADMIN())) { // Less than allowed receivers entered! - $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS3'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS3'); } // END - if // Validate URL if (!VALIDATE_URL(REQUEST_POST('url'))) { // URL is invalid! - $URL = "modules.php?module=login&what=order&msg=".getCode('INVALID_URL'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('INVALID_URL'); } // END - if // Probe for HTML extension - if (EXT_IS_ACTIVE("html_mail")) { + if (EXT_IS_ACTIVE('html_mail')) { // HTML or regular text mail? - if (REQUEST_POST('html') == "Y") { + if (REQUEST_POST('html') == 'Y') { // Chek for valid HTML tags REQUEST_SET_POST('text', HTML_CHECK_TAGS(REQUEST_POST('text'))); // Maybe invalid tags found? - if (!REQUEST_ISSET_POST(('text'))) $URL = "modules.php?module=login&what=order&msg=".getCode('INVALID_TAGS')."&id=".$id; + if (!REQUEST_ISSET_POST(('text'))) $URL = 'modules.php?module=login&what=order&msg=' . getCode('INVALID_TAGS')."&id=".$id; } else { // Remove any HTML code REQUEST_SET_POST('text', str_replace("<", "{OPEN_HTML}", str_replace(">", "{CLOSE_HTML}", REQUEST_POST('text')))); @@ -187,14 +187,14 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", } } elseif (!IS_ADMIN()) { // He has already sent a mail within a specific time - $URL = "modules.php?module=login&what=order&msg=".getCode('URL_TLOCK')."&id=".$id; + $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_TLOCK')."&id=".$id; } // Still no error? if (empty($URL)) { // Check if category and number of receivers is okay - $add = ""; - if ((getConfig('order_multi_page') == "Y") && (REQUEST_ISSET_POST(('zip')))) { + $add = ''; + if ((getConfig('order_multi_page') == 'Y') && (REQUEST_ISSET_POST('zip'))) { // Choose recipients by ZIP code $add = " AND d.zip LIKE '".bigintval(REQUEST_POST('zip'))."{PER}'"; } // END - if @@ -216,7 +216,7 @@ ORDER BY d.%s %s", if (SQL_NUMROWS($result) >= REQUEST_POST('receiver')) { // Check for holiday extensions $HOLIDAY = false; - if (GET_EXT_VERSION("holiday") >= "0.1.3") { + if (GET_EXT_VERSION('holiday') >= '0.1.3') { // Include checking for users in holiday $HOLIDAY = true; } // END - if @@ -246,14 +246,14 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME SQL_FREERESULT($result); // Implode array into string for the sending pool - $RECEIVER = implode($TEST, ";"); + $RECEIVER = implode($TEST, ';'); // Count array for maximum sent $MAX_SEND = count($TEST); // Update receiver list SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s", - array(str_replace(";", ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__); + array(str_replace(';', ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__); // Is calculated max receivers larger than wanted receivers then reset it if ($MAX_SEND > REQUEST_POST('receiver')) $MAX_SEND = REQUEST_POST('receiver'); @@ -262,7 +262,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME $USED = $MAX_SEND * GET_PAY_POINTS(bigintval(REQUEST_POST('type'))); // Fix empty zip code - if (!REQUEST_ISSET_POST(('zip'))) REQUEST_SET_POST('zip', "0"); + if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip', "0"); // Check if he has enougth points for this order and selected more than 0 receivers if (($USED > 0) && ($USED <= $total) && ($MAX_SEND > 0)) { @@ -271,7 +271,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME if (($id == "0") || ($type != "TEMP")) { // New order $id = 0; - if (EXT_IS_ACTIVE("html_mail")) { + if (EXT_IS_ACTIVE('html_mail')) { // HTML extension is active SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_pool` (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip, html_msg) VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s','%s')", @@ -307,7 +307,7 @@ array( } } else { // Change current order - if (EXT_IS_ACTIVE("html_mail")) { + if (EXT_IS_ACTIVE('html_mail')) { // HTML extension is active SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET subject='%s', @@ -379,22 +379,22 @@ array( $URL = "modules.php?module=frametester&order=".$id.""; } elseif ($MAX_SEND == 0) { // Not enougth receivers found which can receive mails - $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS2'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS2'); } else { // No enougth points left! - $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_POINTS'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_POINTS'); } } else { // Ordered more mails than he can send in this category - $URL = "modules.php?module=login&what=order&msg=".getCode('NO_RECS_LEFT'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('NO_RECS_LEFT'); } } } elseif (REQUEST_POST('receiver') == "0") { // Not enougth receivers selected - $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS1'); -} elseif (($ALLOWED == 0) && (getConfig('order_max_full') == "ORDER")) { + $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS1'); +} elseif (($ALLOWED == 0) && (getConfig('order_max_full') == 'ORDER')) { // No more mail orders allowed - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED')); } elseif (($links < getConfig('unconfirmed')) && ($mmails == "1")) { // Display order form $result_cats = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY `sort`", __FILE__, __LINE__); @@ -408,9 +408,9 @@ array( ); // Enable HTML checking - $HTML = ""; $HOLIDAY = false; $HOL_STRING = ""; - if ((EXT_IS_ACTIVE("html_mail")) && (REQUEST_POST('html') == "Y")) $HTML = " AND html='Y'"; - if (GET_EXT_VERSION("holiday") >= "0.1.3") { + $HTML = ''; $HOLIDAY = false; $HOL_STRING = ''; + if ((EXT_IS_ACTIVE('html_mail')) && (REQUEST_POST('html') == 'Y')) $HTML = " AND html='Y'"; + if (GET_EXT_VERSION('holiday') >= '0.1.3') { // Extension's version is fine $HOLIDAY = true; $HOL_STRING = " AND holiday_active='N'"; } // END - if @@ -450,7 +450,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $result_ver = SQL_QUERY_ESC("SELECT zip FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s".$HTML." AND receive_mails > 0 AND `status`='CONFIRMED' LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); - if ((SQL_NUMROWS($result_ver) == 1) && (REQUEST_ISSET_POST(('zip'))) && (getConfig('order_multi_page') == "Y")) { + if ((SQL_NUMROWS($result_ver) == 1) && (REQUEST_ISSET_POST('zip')) && (getConfig('order_multi_page') == 'Y')) { list($zip) = SQL_FETCHROW($result_ver); SQL_FREERESULT($result_ver); if (substr($zip, 0, strlen(REQUEST_POST('zip'))) == REQUEST_POST('zip')) { @@ -478,7 +478,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $typeS = array(); if (SQL_NUMROWS($result) > 0) { // Check for message ID in URL - $message = ""; + $message = ''; switch (REQUEST_GET('msg')) { case getCode('URL_TLOCK'): @@ -563,7 +563,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); if (!empty($message)) { // We got system message so we drop it out to the user - LOAD_TEMPLATE("admin_settings_saved", false, $message); + LOAD_TEMPLATE('admin_settings_saved', false, $message); } // END - if // Load all email types... @@ -580,11 +580,11 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); // Check how many mail orders he has placed today and how many he's allowed to send switch (getConfig('order_max_full')) { - case "MAX": // He is allowed to send as much as possible + case 'MAX': // He is allowed to send as much as possible define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOWED_MAX')); break; - case "ORDER": // He is allowed to send as much as he setup the receiving value + case 'ORDER': // He is allowed to send as much as he setup the receiving value define('ORDER_MAX_VALUE', sprintf(getMessage('ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI)); break; @@ -598,7 +598,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); LOAD_TEMPLATE("member_order_points", false, $total); // Reset variables - $OLD_ORDER = false; $subject = ""; $text = ""; $target = ""; + $OLD_ORDER = false; $subject = ''; $text = ''; $target = ''; // Check if we already have an order placed and make it editable $result = SQL_QUERY_ESC("SELECT subject, text, payment_id, timestamp, url, target_send, cat_id, zip FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s AND data_type='TEMP' LIMIT 1", @@ -622,9 +622,9 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); SQL_FREERESULT($result); // 01 2 21 12 2 23 443 3 3210 - if ((REQUEST_ISSET_POST(('data'))) || ((getConfig('order_multi_page') != "Y") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE("html_mail"))))) { + if ((REQUEST_ISSET_POST(('data'))) || ((getConfig('order_multi_page') != "Y") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE('html_mail'))))) { // Pre-output categories - $CAT = ""; + $CAT = ''; foreach ($CATS['id'] as $key => $value) { $CAT .= "