From: Roland Häder Date: Sun, 12 Apr 2009 14:55:20 +0000 (+0000) Subject: Old config.php is now automatically updated to new config-local.php format, several... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5071030af40e69ca4284642f44758964e18f5be8;p=mailer.git Old config.php is now automatically updated to new config-local.php format, several fixes/rewrites --- diff --git a/.gitattributes b/.gitattributes index e6403632b3..f13f3a504d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -176,6 +176,7 @@ inc/hooks.php -text inc/img/.htaccess -text inc/install-inc.php -text inc/js/.htaccess -text +inc/language-functions.php -text inc/language.php -text inc/language/.htaccess -text inc/language/_de.php -text diff --git a/beg.php b/beg.php index 669afcf88e..d69cd6b49e 100644 --- a/beg.php +++ b/beg.php @@ -73,7 +73,7 @@ if (isInstalled()) { 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__); + array(REQUEST_GET('uid')), __FILE__, __LINE__); } else { // Nickname entered but nickname is not active $msg = getCode('EXTENSION_PROBLEM'); @@ -82,7 +82,7 @@ if (isInstalled()) { } else { // Direct userid $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); + array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__); } // Check if locked in so don't pay points @@ -121,11 +121,11 @@ if (isInstalled()) { if (($uid > 0) && (getConfig('beg_uid') != $uid)) { // Update counter SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET beg_clicks=beg_clicks+1 WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1", - array($uid), __FILE__, __LINE__); + array($uid), __FILE__, __LINE__); // Check for last entry for userid w/o IP number $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_timeout').") OR (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_uid_timeout').") AND `userid`=%s)) AND (remote_ip='%s' OR sid='%s') LIMIT 1", - array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__); + array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__); // Entry not found, points set and not logged in? if (((SQL_NUMROWS($result) == 0) || (IS_ADMIN())) && ($points > 0) && (!IS_MEMBER()) && (getConfig('beg_pay_mode') == 'NONE')) { @@ -136,7 +136,7 @@ if (isInstalled()) { // but only when there is no admin begging. // Admins shall be able to test it! SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_beg_ips` (userid, remote_ip,sid, timeout) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())", - array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__); + array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__); // Was is successfull? $pay (SQL_AFFECTEDROWS() == 1); @@ -150,18 +150,18 @@ if (isInstalled()) { // Add points to user or begging rallye account if (BEG_ADD_POINTS($uid, $points)) { // Set 'done' message - $content['msg'] = LOAD_TEMPLATE('beg_done', true)); + $content['msg'] = LOAD_TEMPLATE('beg_done', true); } else { // Error! - $content['msg'] = LOAD_TEMPLATE('beg_failed', true)); + $content['msg'] = LOAD_TEMPLATE('beg_failed', true); } } else { // Error! - $content['msg'] = LOAD_TEMPLATE('beg_failed', true)); + $content['msg'] = LOAD_TEMPLATE('beg_failed', true); } } elseif (IS_MEMBER()) { // Logged in user found! - $content['msg'] = LOAD_TEMPLATE('beg_login', true)); + $content['msg'] = LOAD_TEMPLATE('beg_login', true); } elseif (getConfig('beg_pay_mode') != 'NONE') { // Other pay-mode active! // Prepare content for template $content = array( @@ -171,11 +171,11 @@ if (isInstalled()) { ); // Load message template depending on pay-mode - $content['msg'] = LOAD_TEMPLATE('beg_pay_mode_'.strtolower(getConfig('beg_pay_mode')), true, $content)); + $content['msg'] = LOAD_TEMPLATE('beg_pay_mode_'.strtolower(getConfig('beg_pay_mode')), true, $content); $pay = true; } else { // Clicked received while reload lock is active - $content['msg'] = LOAD_TEMPLATE('beg_failed', true)); + $content['msg'] = LOAD_TEMPLATE('beg_failed', true); } // Free memory @@ -198,7 +198,7 @@ if (isInstalled()) { LOAD_TEMPLATE('beg_pay_code_'.strtolower(getConfig('beg_pay_mode')), false, $content); } elseif ((!$pay) && (!isset($content['msg']))) { // Cannot pay! :-( - $content['msg'] = LOAD_TEMPLATE('beg_failed', true)); + $content['msg'] = LOAD_TEMPLATE('beg_failed', true); } // Include footer @@ -209,7 +209,7 @@ if (isInstalled()) { } elseif (($uid == '0') || ($status == 'failed')) { // Inalid or locked account, so let's find out $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", - array(REQUEST_GET('uid')), __FILE__, __LINE__); + array(REQUEST_GET('uid')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Locked account $msg = getCode('ACCOUNT_LOCKED'); diff --git a/birthday_confirm.php b/birthday_confirm.php index efbb4a55cb..7d4068456c 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -67,7 +67,7 @@ FROM `{!_MYSQL_PREFIX!}_user_birthday` AS b INNER JOIN `{!_MYSQL_PREFIX!}_user_data` AS d ON b.userid=d.userid WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", - array($uid, $chk), __FILE__, __LINE__); + array($uid, $chk), __FILE__, __LINE__); //* DEBUG: */ echo "uid=".$uid.",chk=".$chk." (".strlen($chk).'/'.strlen(REQUEST_GET('check')).'/'.SQL_NUMROWS($result).")
\n"; // Prepare content @@ -96,7 +96,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", // Remove entry from table SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1", - array($uid, $chk), __FILE__, __LINE__); + array($uid, $chk), __FILE__, __LINE__); // "Translate" some data $data['gender'] = translateGender($data['gender']); diff --git a/debug.php b/debug.php index aa7c764e1f..ef780e4740 100644 --- a/debug.php +++ b/debug.php @@ -64,8 +64,8 @@ if ((isInstalled()) && (getTotalFatalErrors() == 0)) { if (DEBUG_HANDLE_REQUEST(REQUEST_POST('request'))) { // Construct FQFN for the module $INC = sprintf("inc/debug/%s/request_%s", - getConfig('debug_mode'), - SQL_ESCAPE(REQUEST_POST('request')) + getConfig('debug_mode'), + SQL_ESCAPE(REQUEST_POST('request')) ); // Is the module there? Else we log it! diff --git a/doubler.php b/doubler.php index 6920cd1553..2492b995d6 100644 --- a/doubler.php +++ b/doubler.php @@ -66,14 +66,14 @@ if (isInstalled()) { $probe_nickname = ((EXT_IS_ACTIVE('nickname')) && ((''.round($GLOBALS['refid']).'') != $GLOBALS['refid'])); // Do we have nickname or userid set? - if ($probe_nickname) { + if ($probe_nickname === true) { // Nickname in URL, so load the ID $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1", - array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); + array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); } else { // Direct userid entered $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); + array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__); } // Load data @@ -105,11 +105,11 @@ if (isInstalled()) { 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", - array(REQUEST_POST('userid')), __FILE__, __LINE__); + array(REQUEST_POST('userid')), __FILE__, __LINE__); } else { // Direct userid entered $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval(REQUEST_POST('userid'))), __FILE__, __LINE__); + array(bigintval(REQUEST_POST('userid'))), __FILE__, __LINE__); } // Load data @@ -134,119 +134,118 @@ if (isInstalled()) { $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) - // Enough points are left so let's continue with the doubling process - // Create doubling "account" width *DOUBLED* points - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')", - array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__); - - // Subtract entered 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'); - updateConfiguration('doubler_points', $points, '+'); - incrementConfigEntry('doubler_points', $points); - - // Add second line for the referal but only when uid != refid - if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) { - // Okay add a refid line and apply refid percents - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')", - array( - bigintval($GLOBALS['refid']), - bigintval(REQUEST_POST('points') * 2 * getConfig('doubler_ref')) - ), __FILE__, __LINE__); - - // And that's why we don't want to you more than one referal level of doubler-points. ^^^ - } // END - if - - // Update usage counter - updateConfiguration('doubler_counter', 1, '+'); - - // Set constant - 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') { - // Account is unconfirmed! - define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS')); - } elseif ($status == 'UNCONFIRMED') { - // Account is unconfirmed! - define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED')); - } elseif ($status == 'LOCKED') { - // Account is locked by admin / holiday! - define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED')); - } elseif (REQUEST_POST('points') < getConfig('doubler_min')) { - // Not enougth points entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MIN')); - } elseif (REQUEST_POST('points') > getConfig('doubler_max')) { - // Too much points entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MAX')); - } elseif ($probe_nickname) { - // Cannot resolv nickname -> userid - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_NICKNAME')); + if (($points - getConfig('doubler_left') - REQUEST_POST('points') * getConfig('doubler_charge')) >= 0) + // Enough points are left so let's continue with the doubling process + // Create doubling "account" width *DOUBLED* points + SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')", + array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__); + + // Subtract entered 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'); + updateConfiguration('doubler_points', $points, '+'); + incrementConfigEntry('doubler_points', $points); + + // Add second line for the referal but only when uid != refid + if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) { + // Okay add a refid line and apply refid percents + SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')", + array( + bigintval($GLOBALS['refid']), + bigintval(REQUEST_POST('points') * 2 * getConfig('doubler_ref')) + ), __FILE__, __LINE__); + + // And that's why we don't want to you more than one referal level of doubler-points. ^^^ + } // END - if + + // Update usage counter + updateConfiguration('doubler_counter', 1, '+'); + + // Set constant + define('__DOUBLER_MSG', LOAD_TEMPLATE('doubler_reflink', true, REQUEST_POST('userid'))); } else { - // Wrong password or account not found - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_MEMBER')); + // Not enougth points left + define('__ERROR_MSG', getMessage('DOUBLER_FORM_NO_POINTS_LEFT')); } - } elseif (!REQUEST_ISSET_POST(('userid'))) { - // Login not entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_LOGIN')); - } elseif (!REQUEST_ISSET_POST(('pass'))) { - // Password not entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_PASSWORD')); - } elseif (!REQUEST_ISSET_POST(('points'))) { - // points not entered - define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_POINTS')); + } elseif ($status == 'CONFIRMED') { + // Account is unconfirmed! + define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS')); + } elseif ($status == 'UNCONFIRMED') { + // Account is unconfirmed! + define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED')); + } elseif ($status == 'LOCKED') { + // Account is locked by admin / holiday! + define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED')); + } elseif (REQUEST_POST('points') < getConfig('doubler_min')) { + // Not enougth points entered + define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MIN')); + } elseif (REQUEST_POST('points') > getConfig('doubler_max')) { + // Too much points entered + define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MAX')); + } elseif ($probe_nickname) { + // Cannot resolv nickname -> userid + define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_NICKNAME')); + } else { + // Wrong password or account not found + define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_MEMBER')); } + } elseif (!REQUEST_ISSET_POST(('userid'))) { + // Login not entered + define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_LOGIN')); + } elseif (!REQUEST_ISSET_POST(('pass'))) { + // Password not entered + define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_PASSWORD')); + } elseif (!REQUEST_ISSET_POST(('points'))) { + // points not entered + define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_POINTS')); } +} - // Set messages to nothing - if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', ''); - if (!defined('__ERROR_MSG')) define('__ERROR_MSG' , ''); +// Set messages to nothing +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') loadInclude('inc/doubler_send.php'); +// Shall I check for points immediately? +if (getConfig('doubler_send_mode') == 'DIRECT') loadInclude('inc/doubler_send.php'); - // Output header - loadIncludeOnce('inc/header.php'); +// Output header +loadIncludeOnce('inc/header.php'); - // Banner in text - define('__DOUBLER_BANNER', LOAD_TEMPLATE('doubler_banner', true)); +// Banner in text +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)); +// Load header/footer templates +define('__DOUBLER_HEADER', LOAD_TEMPLATE('doubler_header', true)); +define('__DOUBLER_FOOTER', LOAD_TEMPLATE('doubler_footer', true)); - if (!empty($uid)) { - // Transfer userid/nickname to constant - define('__REFID', $uid); - } else { - // Transfer userid/nickname to constant - define('__REFID', $GLOBALS['refid']); - } +if (!empty($uid)) { + // Transfer userid/nickname to constant + define('__REFID', $uid); +} else { + // Transfer userid/nickname to constant + define('__REFID', $GLOBALS['refid']); +} - // Percent values etc. - define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100)); - define('__REF_VALUE' , translateComma(getConfig('doubler_ref') * 100)); - define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points'))); - define('__MIN_VALUE' , translateComma(getConfig('doubler_min'))); - define('__MAX_VALUE' , translateComma(getConfig('doubler_max'))); - - // Text "Enter login" - if (EXT_IS_ACTIVE('nickname')) { - // Choose login/nickname - define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME')); - } else { - // Simple login ID - define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN')); - } +// Percent values etc. +define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100)); +define('__REF_VALUE' , translateComma(getConfig('doubler_ref') * 100)); +define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points'))); +define('__MIN_VALUE' , translateComma(getConfig('doubler_min'))); +define('__MAX_VALUE' , translateComma(getConfig('doubler_max'))); + +// Text "Enter login" +if (EXT_IS_ACTIVE('nickname')) { + // Choose login/nickname + define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME')); +} else { + // Simple login ID + define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN')); +} - // Which mail-send-mode did the admin setup? - switch (getConfig('doubler_send_mode')) - { +// Which mail-send-mode did the admin setup? +switch (getConfig('doubler_send_mode')) { case 'DIRECT': define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT')); break; @@ -254,25 +253,25 @@ if (isInstalled()) { 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')); +// Generate table with already payed out doubles +define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC')); - // Generate timemark - define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout'))); +// Generate timemark +define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout'))); - // Usage counter - define('__DOUBLER_COUNTER', getConfig('doubler_counter')); +// Usage counter +define('__DOUBLER_COUNTER', getConfig('doubler_counter')); - // Points left to doubler - define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT())); +// Points left to doubler +define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT())); - // Output neccessary form for this - LOAD_TEMPLATE('doubler_index'); +// Output neccessary form for this +LOAD_TEMPLATE('doubler_index'); - // Output footer - loadIncludeOnce('inc/footer.php'); +// Output footer +loadIncludeOnce('inc/footer.php'); } else { // You have to install first! redirectToUrl('install.php'); diff --git a/img.php b/img.php index f1099706ea..db6512ae51 100644 --- a/img.php +++ b/img.php @@ -62,7 +62,7 @@ if (isInstalled()) { } elseif (REQUEST_ISSET_GET('tag')) { // Tag set so create the IFN (Include-FileName) $INC = sprintf("inc/img/tag-%s.php", - REQUEST_GET('tag') + REQUEST_GET('tag') ); // Include is readable? diff --git a/inc/autopurge/purge-general.php b/inc/autopurge/purge-general.php index 0e4d9ee522..b880ee8b53 100644 --- a/inc/autopurge/purge-general.php +++ b/inc/autopurge/purge-general.php @@ -65,14 +65,14 @@ FROM `{!_MYSQL_PREFIX!}_user_stats` AS s LEFT JOIN `{!_MYSQL_PREFIX!}_payments` AS t ON s.payment_id=t.id WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", - array(bigintval($PURGE)), __FILE__, __LINE__); + array(bigintval($PURGE)), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Start deleting procedure $uid = 0; $points = 0; while ($content = SQL_FETCHARRAY($result)) { // Check if confirmation links are purged or not $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s LIMIT 1", - array(bigintval($content['id'])), __FILE__, __LINE__); + array(bigintval($content['id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_links) == 1) { // Free memory SQL_FREERESULT($result_links); @@ -89,11 +89,11 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", // Remove confirmation links from queue ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s", - array(bigintval($content['id'])), __FILE__, __LINE__, false)); + array(bigintval($content['id'])), __FILE__, __LINE__, false)); // Update status of order ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='DELETED' WHERE `id`=%s LIMIT 1", - array(bigintval($content['pool_id'])), __FILE__, __LINE__, false)); + array(bigintval($content['pool_id'])), __FILE__, __LINE__, false)); } // END - if } // END - while @@ -108,14 +108,14 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", 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__); + array(bigintval($PURGE)), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Start deleting procedure $points = 0; while ($content = SQL_FETCHARRAY($result)) { // Check if confirmation links are purged or not $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s", - array(bigintval($content['id'])), __FILE__, __LINE__); + array(bigintval($content['id'])), __FILE__, __LINE__); if (SQL_NUMROWS($result_links) > 0) { // At least one link was found, enougth to pay back the points $points += $content['points'] * SQL_NUMROWS($result_links); @@ -125,11 +125,11 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid", // Remove confirmation links from queue ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s", - array(bigintval($content['id'])), __FILE__, __LINE__, false)); + array(bigintval($content['id'])), __FILE__, __LINE__, false)); // Update status of order ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='DELETED' WHERE `id`=%s LIMIT 1", - array(bigintval($content['id'])), __FILE__, __LINE__, false)); + array(bigintval($content['id'])), __FILE__, __LINE__, false)); } // END - if } // END - while diff --git a/inc/autopurge/purge-inact.php b/inc/autopurge/purge-inact.php index 285a3abc78..fc75e5f62b 100644 --- a/inc/autopurge/purge-inact.php +++ b/inc/autopurge/purge-inact.php @@ -100,7 +100,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__); // Update this account ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1", - array(bigintval($content['userid'])), __FILE__, __LINE__, false)); + array(bigintval($content['userid'])), __FILE__, __LINE__, false)); } // END - while // Remove last comma @@ -121,7 +121,7 @@ FROM `{!_MYSQL_PREFIX!}_user_data` AS d WHERE `status`='CONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) AND `last_online` < (UNIX_TIMESTAMP() - %s) AND ap_notified < (UNIX_TIMESTAMP() - %s) ".$EXCLUDE_LIST." ORDER BY `userid` ASC", - array($since, $since, $time), __FILE__, __LINE__); + array($since, $since, $time), __FILE__, __LINE__); if (SQL_NUMROWS($result_inactive) > 0) { // Prepare variable... $UIDs = ''; diff --git a/inc/autopurge/purge-mails.php b/inc/autopurge/purge-mails.php index 8599f88107..49d13c9a63 100644 --- a/inc/autopurge/purge-mails.php +++ b/inc/autopurge/purge-mails.php @@ -56,7 +56,7 @@ if (getConfig('ap_del_mails') == 'Y') { FROM `{!_MYSQL_PREFIX!}_pool` WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s) ORDER BY sender ASC", - array($since), __FILE__, __LINE__); + array($since), __FILE__, __LINE__); // Reset counter... $DELETED = 0; @@ -67,11 +67,11 @@ ORDER BY sender ASC", while ($content = SQL_FETCHARRAY($result_mails)) { // Check now... $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval($content['sender'])), __FILE__, __LINE__)); + array(bigintval($content['sender'])), __FILE__, __LINE__)); if ($found == 0) { // Okay we found some mails! SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s", - array(bigintval($content['sender'])), __FILE__, __LINE__); + array(bigintval($content['sender'])), __FILE__, __LINE__); $DELETED += SQL_AFFECTEDROWS(); // Reset query (to prevent possible errors) ... @@ -80,7 +80,7 @@ ORDER BY sender ASC", FROM `{!_MYSQL_PREFIX!}_pool` WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s) ORDER BY sender ASC", - array($since), __FILE__, __LINE__); + array($since), __FILE__, __LINE__); } } } @@ -94,7 +94,7 @@ ORDER BY sender ASC", FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s) ORDER BY sender ASC", - array($since), __FILE__, __LINE__); + array($since), __FILE__, __LINE__); // Do we have "purged" mails? if (SQL_NUMROWS($result_mails) > 0) { @@ -113,7 +113,7 @@ ORDER BY sender ASC", FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s) ORDER BY sender ASC", - array($since), __FILE__, __LINE__); + array($since), __FILE__, __LINE__); } } } diff --git a/inc/autopurge/purge-tsks.php b/inc/autopurge/purge-tsks.php index 68ba60ff67..f596a8673a 100644 --- a/inc/autopurge/purge-tsks.php +++ b/inc/autopurge/purge-tsks.php @@ -57,7 +57,7 @@ if ((GET_EXT_VERSION('task') > '0.0') && (getConfig('ap_tasks') == 'Y')) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `status`='DELETED' AND task_created <= (UNIX_TIMESTAMP() - %s)", - array($since), __FILE__, __LINE__); + array($since), __FILE__, __LINE__); // Get deleted rows $DELETED = SQL_AFFECTEDROWS(); diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php index 0ad79fdabf..a31d7b6ef6 100644 --- a/inc/autopurge/purge-unconfirmed.php +++ b/inc/autopurge/purge-unconfirmed.php @@ -56,7 +56,7 @@ if (getConfig('autopurge_unconfirmed') == 'Y') { FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) ORDER BY userid ASC", - array($time), __FILE__, __LINE__); + array($time), __FILE__, __LINE__); if (SQL_NUMROWS($result_uncon) > 0) { // Prepare variable... $UIDs = ''; diff --git a/inc/code-functions.php b/inc/code-functions.php index 95f1ea7a87..fd952f382a 100644 --- a/inc/code-functions.php +++ b/inc/code-functions.php @@ -53,9 +53,9 @@ function getCode ($key) { if (!isCodeSet($key)) { // Abort here trigger_error(sprintf("%s[%s:] Code %s is not set.", - __FUNCTION__, - __LINE__, - $key + __FUNCTION__, + __LINE__, + $key )); } // END - if diff --git a/inc/config-functions.php b/inc/config-functions.php index 506db1b908..c15828ad8f 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { // Merges $_CONFIG with data in given array function mergeConfig ($newConfig) { global $_CONFIG; - $_CONFIG = merge_array($_CONFIG, $newConfig); + $_CONFIG = merge_array(getConfigArray(), $newConfig); } // Getter for $_CONFIG entries @@ -78,6 +78,12 @@ function setConfigEntry ($configEntry, $value) { $configEntry = smartAddSlashes($configEntry); } + // If config array isn't set, set it + if (!isConfigLoaded()) { + // Init configuration array + initConfig(); + } // END - if + // And set it $_CONFIG[$configEntry] = $value; } @@ -111,7 +117,6 @@ function isConfigLoaded () { // Init the config array function initConfig () { global $_CONFIG; - debug_report_bug('Reached!'); // Set a minimum dummy configuration $_CONFIG = array( @@ -171,5 +176,147 @@ function getConfigArray () { return $return; } +// Updates an old inc/config.php to a inc/cache/config-local.php file +function updateOldConfigFile () { + // Watch out for these lines and execute them as single command + // @TODO Make this all better... :-/ + $watchLines = array( + "define('SITE_KEY'," => 'SITE_KEY', + "define('DEFAULT_LANG'," => 'DEFAULT_LANG', + "define('warn_no_pass'," => 'WARN_NO_PASS', + "define('WRITE_FOOTER'," => 'WRITE_FOOTER', + "define('OUTPUT_MODE'," => 'OUTPUT_MODE', + "define('MAIN_TITLE'," => 'MAIN_TITLE', + "define('SLOGAN'," => 'SLOGAN', + "define('WEBMASTER'," => 'WEBMASTER', + "define('mxchange_installed'," => 'MXCHANGE_INSTALLED', + "define('admin_registered'," => 'ADMIN_REGISTERED', + "define('_MYSQL_PREFIX'," => '_MYSQL_PREFIX', + "define('_TABLE_TYPE'," => '_TABLE_TYPE', + "define('_DB_TYPE'," => '_DB_TYPE', + "define('SMTP_HOSTNAME'," => 'SMTP_HOSTNAME', + "define('SMTP_USER'" => 'SMTP_USER', + "define('SMTP_PASSWORD'," => 'SMTP_PASSWORD', + "define('ENABLE_BACKLINK'," => 'ENABLE_BACKLINK', + ); + + // Make these lower-case! (damn stupid code...) + $lowerCase = array('WARN_NO_PASS', 'MXCHANGE_INSTALLED', 'ADMIN_REGISTERED'); + + // These are still constants... + // @TODO Rewrite these all to config entries, if somehow possible + $constants = array('MAIN_TITLE', 'SLOGAN', 'WEBMASTER'); + + // Special comments... + $comments = array( + 'WARN_NO_PASS' => 'NULLPASS-WARNING', + 'MXCHANGE_INSTALLED' => 'INSTALLED', + 'ADMIN_REGISTERED' => 'ADMIN-SETUP', + '_MYSQL_PREFIX' => 'MYSQL-PREFIX', + '_TABLE_TYPE' => 'TABLE-TYPE', + '_DB_TYPE' => 'DATABASE-TYPE', + 'ENABLE_BACKLINK' => 'BACKLINK', + 'host' => 'MYSQL-HOST', + 'dbase' => 'MYSQL-DBASE', + 'login' => 'MYSQL-LOGIN', + 'password' => 'MYSQL-PASSWORD' + ); + + // Copy template to new file destionation + copyFileVerified(constant('PATH') . 'inc/config-local.php.dist', constant('PATH') . 'inc/cache/config-local.php', 0644); + + // First of all, load the old one! + $oldConfig = explode("\n", readFromFile(constant('PATH') . 'inc/config.php')); + + // Now, analyze every entry + $done = array(); + foreach ($oldConfig as $line) { + // Check all watch lines + foreach ($watchLines as $old => $new) { + // Is the line found? + if ((substr($line, 0, strlen($old)) == $old) && (!isset($done[$old]))) { + // Entry found! + //* DEBUG: */ print htmlentities($line) . " - FOUND!
\n"; + + // Eval the line... + eval($line); + + // Setting config entry is new default behaviour! + $function = 'setConfigEntry'; + + // Still some old constants left? + if (in_array($new, $constants)) { + // Then switch over... + $function = 'define'; + } // END - if + + // Default comment + $comment = str_replace('_', '-', $new); + + // Do we have a special comment? + if (isset($comments[$new])) { + // Then use it + $comment = $comments[$new]; + } // END - if + + // Do we need to make $new lowercase? + $oldNew = $new; + if (in_array($new, $lowerCase)) { + // Then do so... :) + $new = strtolower($new); + } // END - if + + /// ... and write it to the new config + //* DEBUG: */ print 'function=' . $function . ',new=' . $new . ',comment=' . $comment . "
\n"; + changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', $comment, $function . "('" . $oldNew . "', \"", "\");", constant($new), 0); + //* DEBUG: */ print "CHANGED!
\n"; + + // Mark it as done + $done[$old] = 1; + } // END - if + } // END - foreach + } // END - foreach + + // By default the old array $MySQL was not found + $found = false; + + // Analyze every entry again for the MySQL configuration + foreach ($oldConfig as $line) { + // Trim spaces + $line = trim($line); + + // Is the $MySQL found? + if (substr($line, 0, 6) == "\$MySQL") { + // Okay found! + $found = true; + } elseif ($found === true) { + // Now check this row + if (substr($line, 0, 2) == ');') { + // MySQL array is closed so stop looking for it + break; + } elseif (substr($line, 0, 2) == '//') { + // Skip this line + continue; + } + + // Debug output only + //* DEBUG: */ print htmlentities($line) . " - MySQL!
\n"; + + // Split parts so we can check them and prepare them + $parts = explode('=>', $line); + $key = substr(trim($parts[0]), 1, -1); $value = substr(trim($parts[1]), 1, -2); + + // We can now save the right part in new config file + changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', $comments[$key], " '".$key."' => \"", "\",", $value, 0); + } + } // END - foreach + + // Finally remove old config file + removeFile(constant('PATH') . 'inc/config.php'); + + // Redirect to same URL to reload our new config + redirectToUrl($_SERVER['REQUEST_URI']); +} + // [EOF] ?> diff --git a/inc/config-local.php.dist b/inc/config-local.php.dist index 08e6779d5f..d1c0b94857 100644 --- a/inc/config-local.php.dist +++ b/inc/config-local.php.dist @@ -70,7 +70,7 @@ setConfigEntry('MXCHANGE_INSTALLED', "N"); // CFG: ADMIN-SETUP setConfigEntry('ADMIN_REGISTERED', "N"); -// CFG: MYSQL-PREIFX +// CFG: MYSQL-PREFIX setConfigEntry('_MYSQL_PREFIX', "mxchange"); // CFG: TABLE-TYPE diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 823e5d02f9..8f57bf199e 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -62,7 +62,7 @@ function SQL_QUERY ($sql_string, $F, $L) { // Run SQL command //* DEBUG: */ echo $sql_string."
\n"; $result = mysql_query($sql_string, SQL_GET_LINK()) - or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error()."
+ or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error()."
Query string:
".$sql_string); @@ -87,10 +87,10 @@ Query string:
$fp = fopen(constant('PATH') . 'inc/cache/mysql.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write mysql.log!"); if (!isset($GLOBALS['sql_first_entry'])) { // Write first entry - fwrite($fp, "Module=".$GLOBALS['module']."\n"); + 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 @@ -159,7 +159,7 @@ function SQL_FETCHARRAY($res, $nr=0, $remove_numerical=true) { if (is_array($row)) { // Shall we remove numerical data here automatically? if ($remove_numerical) { - // So let's remove all numerical elements to save memory! + // So let's remove all numerical elements to save memory! $max = count($row); for ($idx = 0; $idx < ($max / 2); $idx++) { // Remove entry @@ -338,11 +338,11 @@ function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) { // Return the result return SQL_QUERY_ESC($sql, - array( - bigintval($id), - $table, - $idRow - ), $F, $L); + array( + bigintval($id), + $table, + $idRow + ), $F, $L); } // ALTER TABLE wrapper function @@ -352,13 +352,13 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { // Determine index/fulltext/unique word $noIndex = ( - ( - strpos($sql, 'INDEX') === false - ) && ( - strpos($sql, 'FULLTEXT') === false - ) && ( - strpos($sql, 'UNIQUE') === false - ) + ( + strpos($sql, 'INDEX') === false + ) && ( + strpos($sql, 'FULLTEXT') === false + ) && ( + strpos($sql, 'UNIQUE') === false + ) ); // Extract table name @@ -372,7 +372,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { // Get column information $result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'", - array($tableName, $columnName), __FILE__, __LINE__); + array($tableName, $columnName), __FILE__, __LINE__); // Do we have no entry on ADD or an entry on DROP? // 123 4 4 3 3 4 4 32 23 4 4 3 3 4 4 321 @@ -408,7 +408,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { // Show indexes $result = SQL_QUERY_ESC("SHOW INDEX FROM `%s`", - array($tableName), __FILE__, __LINE__); + array($tableName), __FILE__, __LINE__); // Walk through all $skip = false; diff --git a/inc/doubler_send.php b/inc/doubler_send.php index 6017dfb65e..cc34bddfed 100644 --- a/inc/doubler_send.php +++ b/inc/doubler_send.php @@ -95,7 +95,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) // Referal points found so add them and set line(s) to completed='Y' $content['points'] += $ref; SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE refid=%s AND completed='N' AND is_ref='Y'", - array(bigintval($content['userid'])), __FILE__, __LINE__); + array(bigintval($content['userid'])), __FILE__, __LINE__); } else { // No referal points found $ref = 0; @@ -109,7 +109,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) // Set entry as "payed" SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE `id`=%s LIMIT 1", - array(bigintval($content['id'])), __FILE__, __LINE__); + array(bigintval($content['id'])), __FILE__, __LINE__); $okay = false; // Check for jackpot inclusion in doubling process @@ -143,13 +143,13 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) // Prepare array $content = array( - // Doubler transmission ID + // Doubler transmission ID 'id' => $content['id'], - // Doubled points + // Doubled points 'points' => translateComma($content['points']), - // Timemark + // Timemark 'when' => generateDateTime($content['timemark'], '2'), - // IP number when the member submitted the doubling form + // IP number when the member submitted the doubling form 'ip' => $content['remote_ip'], ); diff --git a/inc/extensions.php b/inc/extensions.php index 58f22fd028..09fbc8c9c0 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -106,7 +106,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run EXT_SET_ALWAYS_ACTIVE('N'); // Extension update notes - EXT_SET_UPDATE_NOTES(""); + EXT_SET_UPDATE_NOTES(''); // Include the extension file //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Extension loaded."); @@ -164,8 +164,8 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr if (($task_id == 0) && (!$dry_run)) { // Then request a bug report debug_report_bug(sprintf("%s: task_id is still zero after DETERMINE_EXTENSION_TASK_ID(%s)", - __FUNCTION__, - EXT_GET_CURR_NAME() + __FUNCTION__, + EXT_GET_CURR_NAME() )); } // END - if } // END - if @@ -277,7 +277,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr // 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__); + array(EXT_GET_CURR_NAME(), EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FUNCTION__, __LINE__); // Remove cache file(s) if extension is active runFilterChain('post_extension_installed', array('ext_name' => EXT_GET_CURR_NAME(), 'task_id' => $task_id)); @@ -316,7 +316,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr //* DEBUG: */ print __FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME()."
\n"; // Remove task from system when id and extension's name is valid SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s AND `status`='NEW' LIMIT 1", - array(bigintval($task_id)), __FUNCTION__, __LINE__); + array(bigintval($task_id)), __FUNCTION__, __LINE__); } // Is this the sql_patches? @@ -380,7 +380,7 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) { 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__); + array(EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__); } // END - if } // END - if @@ -422,7 +422,7 @@ function EXT_IS_ACTIVE ($ext_name) { //* 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", - array($ext_name), __FUNCTION__, __LINE__); + array($ext_name), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -474,7 +474,7 @@ function GET_EXT_VERSION ($ext_name) { } elseif (!isCacheInstanceValid()) { // Load from database $result = SQL_QUERY_ESC("SELECT ext_version FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1", - array($ext_name), __FUNCTION__, __LINE__); + array($ext_name), __FUNCTION__, __LINE__); //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": DB - ".SQL_NUMROWS($result).""); // Is the extension there? @@ -566,7 +566,7 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) { // Update extension's version SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_version='%s' WHERE `ext_name`='%s' LIMIT 1", - array($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__); + array($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__); // Remove arrays UNSET_SQLS(); @@ -654,7 +654,7 @@ function GET_EXT_NAME ($ext_id) { } 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__); + array(bigintval($ext_id)), __FUNCTION__, __LINE__); list($ret) = SQL_FETCHROW($result); SQL_FREERESULT($result); } @@ -674,7 +674,7 @@ function GET_EXT_ID ($ext_name) { } 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__); + array($ext_name), __FUNCTION__, __LINE__); list($ret) = SQL_FETCHROW($result); SQL_FREERESULT($result); } @@ -687,7 +687,7 @@ function GET_EXT_ID ($ext_name) { function ACTIVATE_EXTENSION ($ext_name) { // Activate the extension SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='Y' WHERE `ext_name`='%s' LIMIT 1", - array($ext_name), __FUNCTION__, __LINE__); + array($ext_name), __FUNCTION__, __LINE__); // Extension has been activated? if (SQL_AFFECTEDROWS() == 1) { @@ -700,7 +700,7 @@ function ACTIVATE_EXTENSION ($ext_name) { function DEACTIVATE_EXTENSION($ext_name) { // Activate the extension SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='%s' LIMIT 1", - array($ext_name), __FUNCTION__, __LINE__); + array($ext_name), __FUNCTION__, __LINE__); // Extension has been activated? if (SQL_AFFECTEDROWS() == 1) { @@ -712,9 +712,9 @@ function DEACTIVATE_EXTENSION($ext_name) { // Notify the admin sendAdminNotification( - getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'), + getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'), 'admin_ext_deactivated', - array('ext_name' => $ext_name) + array('ext_name' => $ext_name) ); } // END - if } @@ -743,7 +743,7 @@ function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $ext_name, $ext_ver, $notes) { if (DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) { // Task not created so it's a brand-new extension which we need to register and create a task for! SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','EXTENSION_UPDATE','%s','%s', UNIX_TIMESTAMP())", - array($admin_id, $subject, $notes), __FUNCTION__, __LINE__); + array($admin_id, $subject, $notes), __FUNCTION__, __LINE__); } // END - if } // END - if } @@ -754,9 +754,9 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) { if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) == '')) { // Template file $tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl", - constant('PATH'), - getLanguage(), - $ext + constant('PATH'), + getLanguage(), + $ext ); // Set default message if ext-foo is missing @@ -774,11 +774,11 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) { // Task not created so it's a brand-new extension which we need to register and create a task for! SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES (%s, 0, 'NEW', 'EXTENSION', '%s', '%s', UNIX_TIMESTAMP())", - array( - $admin_id, - $subject, - smartAddSlashes($msg), - ), __FUNCTION__, __LINE__, true, false, false + array( + $admin_id, + $subject, + smartAddSlashes($msg), + ), __FUNCTION__, __LINE__, true, false, false ); } // END - if } @@ -793,10 +793,10 @@ function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) { // Task not created so add it SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES (0, 0, 'NEW', 'EXTENSION_DEACTIVATION', '%s', '%s', UNIX_TIMESTAMP())", - array( - $subject, - SQL_ESCAPE(LOAD_TEMPLATE('task_ext_deactivated', true, $ext)), - ), __FUNCTION__, __LINE__, true, false + array( + $subject, + SQL_ESCAPE(LOAD_TEMPLATE('task_ext_deactivated', true, $ext)), + ), __FUNCTION__, __LINE__, true, false ); } // END - if } @@ -824,7 +824,7 @@ function MODULE_HAS_MENU ($mod, $forceDb = false) { } 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__); + array($mod), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -857,7 +857,7 @@ function DETERMINE_EXTENSION_TASK_ID ($ext_name) { // Search for extension task's id $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE task_type='EXTENSION' AND subject='[%s:]' LIMIT 1", - array($ext_name), __FUNCTION__, __LINE__); + array($ext_name), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -879,7 +879,7 @@ function DETERMINE_TASK_ID_BY_SUBJECT ($subject) { // Search for task id $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE subject LIKE '%s%%' LIMIT 1", - array($subject), __FUNCTION__, __LINE__); + array($subject), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -911,7 +911,7 @@ function ADD_EXTENSION_NOTES ($ver) { ); // Reset them - EXT_SET_UPDATE_NOTES(""); + EXT_SET_UPDATE_NOTES(''); } elseif (($ver == '0.0') || ($ver == '0.0.0')) { // Initial release $content = array( @@ -1193,7 +1193,7 @@ function GET_EXT_SQLS () { if (!isset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()])) { // Not found, should not happen debug_report_bug(sprintf("ext_sqls is empty, current extension: %s", - EXT_GET_CURR_NAME() + EXT_GET_CURR_NAME() )); } // END - if diff --git a/inc/extensions/ext- b/inc/extensions/ext- index 57c6d5a5fe..64cd843a24 100644 --- a/inc/extensions/ext- +++ b/inc/extensions/ext- @@ -70,10 +70,10 @@ case 'update': // Update an extension switch ($EXT_VER) { case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + ADD_EXT_SQL(''); // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + EXT_SET_UPDATE_NOTES(''); break; } break; diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 4b79072c79..79d213b6e6 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -50,97 +50,97 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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'"); - - // Unregister filter - UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run); - break; - -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 - // 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 - switch ($EXT_VER) - { - 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."); + 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 '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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); - break; + 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'"); - 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)"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschränkbar."); - break; - - 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."); + // Unregister filter + UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run); break; - 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."); + 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 '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."); + 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 '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); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter für den "Wer ist Online" Block hinzugefügt und ist von online abhängig."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + 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)"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschränkbar."); + break; + + 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 + // 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 + // 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'); + + // Register filter + REGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, $dry_run); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Filter für den "Wer ist Online" Block hinzugefügt und ist von online abhängig."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 5702053bc2..c698c25af7 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -50,58 +50,58 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0 switch ($EXT_LOAD_MODE) { -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 - // 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`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl"); - - // Remove filters - UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run); - break; - -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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 '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')"); + 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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl"); - // Which is the default setting when you create a new admin login? - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); + // Remove filters + UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run); + break; - // Default is deny everything - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); + break; - // But allow current admin everything (THIS SHALL BE YOU!) - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".getSession('admin_login')."' LIMIT 1"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_acls` ( + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); + break; + + case 'update': // Update an extension + switch ($EXT_VER) + { + 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.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')"); + + // Which is the default setting when you create a new admin login? + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); + + // Default is deny everything + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); + + // But allow current admin everything (THIS SHALL BE YOU!) + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".getSession('admin_login')."' LIMIT 1"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_acls` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, action_menu VARCHAR(255) NOT NULL DEFAULT '', @@ -111,211 +111,211 @@ KEY (admin_id), PRIMARY KEY (id) ) TYPE={!_TABLE_TYPE!}"); - // Update notes (these will be set as task text!) - 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; + // Update notes (these will be set as task text!) + 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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT"); - break; + 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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_mails` ( + 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, admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, mail_template VARCHAR(255) NOT NULL, KEY (admin_id), PRIMARY KEY (id) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')"); - - // Update notes (these will be set as task text!) - 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 - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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 - // 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 - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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; + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')"); + + // Update notes (these will be set as task text!) + 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 + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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 + 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("setSession() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); + break; + + 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 + // 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 + // Update depends on sql_patches + EXT_ADD_UPDATE_DEPENDS('sql_patches'); + + // Add filters + REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run); + + // Update notes (these will be set as task text!) + 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 + 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"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); - 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."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Schreibweise korregiert."); + break; + } break; - 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 - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("setSession() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); - break; - - 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 - // 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 - // Update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS('sql_patches'); - - // Add filters - REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run); - - // Update notes (these will be set as task text!) - 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 - 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"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Schreibweise korregiert."); - break; - } - break; - -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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-admintheme1.php b/inc/extensions/ext-admintheme1.php index c6a2b932ca..0888bd6f4b 100644 --- a/inc/extensions/ext-admintheme1.php +++ b/inc/extensions/ext-admintheme1.php @@ -50,47 +50,47 @@ 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) - // 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'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'"); - break; + 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'"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'"); + break; -case 'remove': // Do stuff when removing extension - // SQL commands to run - ADD_EXT_SQL(""); - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + ADD_EXT_SQL(''); + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; + 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.1 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.1 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-admintheme_default.php b/inc/extensions/ext-admintheme_default.php index 1bf7756e8f..67320b1707 100644 --- a/inc/extensions/ext-admintheme_default.php +++ b/inc/extensions/ext-admintheme_default.php @@ -50,47 +50,47 @@ 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) - // 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"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1"); - break; + 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"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1"); + break; -case 'remove': // Do stuff when removing extension - // SQL commands to run - ADD_EXT_SQL(""); - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + ADD_EXT_SQL(''); + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; + 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index 439280c270..b6ce1be192 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -50,218 +50,218 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0 switch ($EXT_LOAD_MODE) { -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')) { - 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 - // 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')) { - 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt."); + 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')) { + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'"); + } break; - 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."); + 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')) { + 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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)."'"); + + // Update notes (these will be set as task text!) + 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 + 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'"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); + break; + + 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 generateUserProfileLink() ausgelagert."); + break; + + 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 + // 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 + // 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 + // 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 + 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'"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 '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 - 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)."'"); - - // Update notes (these will be set as task text!) - 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 'modify': // When the extension got modified + break; - 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'"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); - break; - - 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 generateUserProfileLink() ausgelagert."); - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - 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 - // 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 - // 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 - // 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 - 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'"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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 - // Do we have a daily-reset-run? - if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { - // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts - ADD_INC_TO_POOL(sprintf("%sinc/autopurge.php", constant('PATH'))); - } - break; + default: // Do stuff when extension is loaded + // Do we have a daily-reset-run? + if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { + // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts + ADD_INC_TO_POOL(sprintf("%sinc/autopurge.php", constant('PATH'))); + } + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index e9914bc2bb..c8af77f863 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -50,10 +50,10 @@ 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) - // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` ( + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -79,8 +79,8 @@ INDEX (account_created), INDEX (account_locked), INDEX (last_tan_stamp) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_transfers` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_transfers` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -92,8 +92,8 @@ PRIMARY KEY (id), INDEX (to_account_id, from_account_id), INDEX (day_bookkeeping, day_available) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_packages` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_packages` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL DEFAULT '', description TINYTEXT, @@ -112,12 +112,12 @@ free_account_stuff TINYTEXT null, tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) ) TYPE={!_TABLE_TYPE!}"); - // free_account_stuff will be a list of columns of the table _bank_packages - // what the member shall get for the specified income. output_system_mode - // must be extended with the mode you get for free: output_system_mode:LOGIN - // should be fine. More than one entry and not DISABLED ;) are not supported. - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` ( + // free_account_stuff will be a list of columns of the table _bank_packages + // what the member shall get for the specified income. output_system_mode + // must be extended with the mode you get for free: output_system_mode:LOGIN + // should be fine. More than one entry and not DISABLED ;) are not supported. + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, idx TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -127,73 +127,73 @@ PRIMARY KEY (id), UNIQUE (account_id, tan) ) TYPE={!_TABLE_TYPE!}"); - // Admin menu queries - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket ändern','Nach Auswahl eines Angebotspaketes können Sie dieses hier verändern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur temporären Überarbeitung zuvor heraus, dann können Sie in Ruhe drüber nachdenken und Berechnungen anstellen. Freigabe ist hier auch möglich.', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket löschen','Nach Auswahl eines Angebotspaketes können Sie mit abschliessender Bestätigung Angebotspakete ganz löschen. Bitte beachten Sie, dass dies nur möglich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten für die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines auswählbaren Mitglieds.', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto ändern','Ändern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht änderbar! Bestätigungsmails sind optional versendbar.', 8)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier möglich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto löschen','Löschen von Konten mit Bestätigungsmail. Wenn Sie ein Mitglieder-Account löschen, so müssen Sie derzeit seine angelegten Konten auch löschen!', 10)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste benötigen, anschliessend kann die Liste dann ausgesendet werden.', 11)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen können auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','Überweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (benötgt JavaScript!) können Sie seitenweise die Überweisungen durchschauen.', 13)"); + // Admin menu queries + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket ändern','Nach Auswahl eines Angebotspaketes können Sie dieses hier verändern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur temporären Überarbeitung zuvor heraus, dann können Sie in Ruhe drüber nachdenken und Berechnungen anstellen. Freigabe ist hier auch möglich.', 4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket löschen','Nach Auswahl eines Angebotspaketes können Sie mit abschliessender Bestätigung Angebotspakete ganz löschen. Bitte beachten Sie, dass dies nur möglich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten für die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines auswählbaren Mitglieds.', 7)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto ändern','Ändern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht änderbar! Bestätigungsmails sind optional versendbar.', 8)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier möglich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto löschen','Löschen von Konten mit Bestätigungsmail. Wenn Sie ein Mitglieder-Account löschen, so müssen Sie derzeit seine angelegten Konten auch löschen!', 10)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste benötigen, anschliessend kann die Liste dann ausgesendet werden.', 11)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen können auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','Überweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (benötgt JavaScript!) können Sie seitenweise die Überweisungen durchschauen.', 13)"); - // Member menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"); - 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; + // Member menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"); + 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 - // 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`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'"); - break; + 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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'"); + break; -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 '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 - // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8"); - break; + 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 - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index 1fe6c89720..80920bf554 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -50,17 +50,17 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_beg_ips` ( + 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')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_beg_ips` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', @@ -68,216 +68,216 @@ timeout VARCHAR(10) NOT NULL DEFAULT '', KEY (userid), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - break; - -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'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2'"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`"); - break; - -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"); - break; - -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 - switch ($EXT_VER) - { - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); + 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'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2'"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`"); break; - 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 - // 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 - // 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 - 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 - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die beg-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order beg!"); - break; - - 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 - // 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': - // 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"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'"); - 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'; } - - 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')"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - 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!"); + 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"); break; - 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."); + 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 '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'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - - // Update notes (these will be set as task text!) - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + 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 + // 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 + // 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 + 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 + 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die beg-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order beg!"); + break; + + 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 + // 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': + // 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"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'"); + 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'; } + + 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')"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + 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 + // 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 + 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'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + 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"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + break; + + 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 + 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 ;"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("IP-Lock mit Session-ID erweitert. Tracker-Script eingefügt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll."); + break; + } break; - 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 - // 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 'modify': // When the extension got modified + break; - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler unknown column 'uid' beseitigt."); - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - 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'"); + default: // Do stuff when extension is loaded + // Remove old entries + $OLD = getConfig('beg_timeout'); + if (getConfig('beg_uid_timeout') > $OLD) $OLD = getConfig('beg_uid_timeout'); + $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE timeout < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__); - // 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 - // 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 - 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"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); - break; - - 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 - 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 ;"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Lock mit Session-ID erweitert. Tracker-Script eingefügt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll."); - break; - } - break; - -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 - // Remove old entries - $OLD = getConfig('beg_timeout'); - if (getConfig('beg_uid_timeout') > $OLD) $OLD = getConfig('beg_uid_timeout'); - $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')) { - // Include file for sending out mails - ADD_INC_TO_POOL(sprintf("%sinc/mails/beg_mails.php", constant('PATH'))); - } // END - if - break; + // Check for beg rallye is active and send mails out + 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 + break; } // diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index fe6cebbd3a..843548f1a7 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -50,160 +50,160 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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 '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"); + 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("CREATE TABLE `{!_MYSQL_PREFIX!}_user_birthday` ( -id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -chk_value VARCHAR(255) NOT NULL DEFAULT '', -KEY(userid), -PRIMARY KEY(id) -) Type={!_TABLE_TYPE!}"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'"); break; - 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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die birthday-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order birthday!"); - break; + case 'update': // Update an extension + switch ($EXT_VER) + { + 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.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 - // 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 - 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'"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Vergütungsmodus des Geburtstagsbonus einstellbar."); - break; + 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` ( +id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, +userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +chk_value VARCHAR(255) NOT NULL DEFAULT '', +KEY(userid), +PRIMARY KEY(id) +) Type={!_TABLE_TYPE!}"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die birthday-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order birthday!"); + break; + + 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 + // 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 + 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'"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Vergütungsmodus des Geburtstagsbonus einstellbar."); + break; + + 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 + // 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 + 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"); - 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."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL."); + break; + } break; - 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 'modify': // When the extension got modified + break; - 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"); + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL."); - break; - } - break; - -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 - if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) { - // Daily reset was run and we shall pay points so we start checking for members who - // has a birthday for today - ADD_INC_TO_POOL(sprintf("%sinc/mails/birthday_mails.php", constant('PATH'))); - } - break; + default: // Do stuff when extension is loaded + if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) { + // Daily reset was run and we shall pay points so we start checking for members who + // has a birthday for today + ADD_INC_TO_POOL(sprintf("%sinc/mails/birthday_mails.php", constant('PATH'))); + } + break; } // diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 11316d0360..7c8453f51a 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -50,12 +50,12 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0 switch ($EXT_LOAD_MODE) { -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)"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus` ( + 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)"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, subject VARCHAR(255) NOT NULL DEFAULT '', @@ -72,76 +72,76 @@ mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, KEY(cat_id), PRIMARY KEY (id) )TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - 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'"); - break; - -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'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`"); - break; - -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"); - break; - -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 - switch ($EXT_VER) - { - 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 - 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 - 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"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - // Use actual month for this update - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert."); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + 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'"); + break; + + 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'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`"); break; - 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` ( + 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"); + break; + + 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 + switch ($EXT_VER) + { + 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 + 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 + 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"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + // Use actual month for this update + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert."); + break; + + 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, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -155,419 +155,419 @@ KEY bonus_id (bonus_id), KEY userid (userid) ) TYPE={!_TABLE_TYPE!}"); - // Update notes (these will be set as task text!) - 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 - 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)"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Vergütung hinzugefügt."); - break; - - 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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - 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"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,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.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 - // 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 - // 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 - // 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 - // 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 - 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 - 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"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - // 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 - // 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 - 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"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - // 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 - 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'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // Get current month - $curr = date('m', time()); - if (strlen($curr) == 1) $curr = '0'.$curr; - if ($curr == "00") $curr = "12"; - - // Generate timemark... - $mark = mktime(0, 0, 0, $curr, 1, date('Y', time())); - - // Update accounts which are not active last months - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` + // Update notes (these will be set as task text!) + 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 + 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)"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Vergütung hinzugefügt."); + break; + + 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 + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + 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"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,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.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 + // 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 + // 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 + // 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 + // 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 + 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 + 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"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + 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"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + 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'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Get current month + $curr = date('m', time()); + if (strlen($curr) == 1) $curr = '0'.$curr; + if ($curr == "00") $curr = "12"; + + // Generate timemark... + $mark = mktime(0, 0, 0, $curr, 1, date('Y', time())); + + // Update accounts which are not active last months + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `turbo_bonus`=0, `login_bonus`=0, `bonus_order`=0, `bonus_stats`=0, `bonus_ref`=0 WHERE `last_online` < ".$mark." ORDER BY `userid` ASC"); - // Update notes (these will be set as task text!) - 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; + // Update notes (these will be set as task text!) + 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 - break; - - 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.7': // SQL queries for v0.5.7 + break; + + 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 + 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 + EXT_SET_UPDATE_NOTES("SQL-Fehlermeldung in inc/monthly_bonus.php beseitigt."); + break; + + 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 + 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 + EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + break; + + 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 + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'"); - 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; + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Fehler mit bonus_stats beseitigt."); + break; - 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.6': // SQL queries for v0.6.6 + EXT_SET_UPDATE_NOTES("Template-Fehler beseitigt im Admin-Bereich."); + break; - case '0.6.1': // SQL queries for v0.6.1 - EXT_SET_UPDATE_NOTES("Versand von Bonus-Mails repariert."); - break; + 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.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.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.3': // SQL queries for v0.6.3 - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); - break; + 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'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - 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 - 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 - EXT_SET_UPDATE_NOTES("Template-Fehler beseitigt im Admin-Bereich."); - break; - - 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 - 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 - 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'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - - // Update notes (these will be set as task text!) - 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 - 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 - 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 - 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 - 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 - EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (member_bonus.tpl)"); - break; - - 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 - 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 - 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'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - - // Update notes (these will be set as task text!) - 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 - // 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 - 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 - 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 - 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 - 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'"); - - // Update notes (these will be set as task text!) - 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 - 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 - EXT_SET_UPDATE_NOTES("Ladeproblem bei nicht installierter Erweiterung cache gefixt."); - break; - - 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 - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); - break; - - 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."); + // Update notes (these will be set as task text!) + 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 + 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 + 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 + 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 + 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 + EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (member_bonus.tpl)"); + break; + + 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 + 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 + 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'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + + // Update notes (these will be set as task text!) + 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 + // 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 + 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 + 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 + 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 + 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'"); + + // Update notes (these will be set as task text!) + 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 + 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 + EXT_SET_UPDATE_NOTES("Ladeproblem bei nicht installierter Erweiterung cache gefixt."); + break; + + 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 + EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + + 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 + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); + + // Update notes + EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."); + break; + } break; - 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 - EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt."); - break; - } - break; - -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 - 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') { - // 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'))); - } else { - // Reset points - ADD_INC_TO_POOL(sprintf("%sinc/reset/reset_bonus.php", constant('PATH'))); - } - } - - // Check for bonus rallye is active and send mails out - 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'))); - } - break; + 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 + 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') { + // 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'))); + } else { + // Reset points + ADD_INC_TO_POOL(sprintf("%sinc/reset/reset_bonus.php", constant('PATH'))); + } + } + + // Check for bonus rallye is active and send mails out + 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'))); + } + break; } // diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index cba127ff70..308a402ca2 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -50,14 +50,14 @@ 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) - // 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).""); - - // Drop/create table for user bookings - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_book`( + 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).""); + + // Drop/create table for user bookings + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_book`( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(255) NOT NULL DEFAULT 'missing', @@ -67,49 +67,49 @@ INDEX (`userid`), PRIMARY KEY(`id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Member points booking table'"); - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)"); - - // Member menu - 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 - 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 - // 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 - // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1"); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)"); + + // Member menu + 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 + 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 + // SQL commands to run + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1"); break; - } -case 'modify': // When the extension got modified - break; + 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 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } + + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 5720fb4219..9391294cc5 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -51,212 +51,212 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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/'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0"); - 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 - // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_cache','cache_stats')"); - - // Unregister all filters - UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); - UNREGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); - UNREGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run); - UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); - UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run); - UNREGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); - UNREGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); - UNREGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); - UNREGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); - UNREGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run); - break; - -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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/'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0"); + 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 '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."); + 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')"); + + // Unregister all filters + UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); + UNREGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); + UNREGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run); + UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run); + UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run); + UNREGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); + UNREGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); + UNREGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); + UNREGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run); + UNREGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run); break; - 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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - case '0.0.4': // SQL queries for v0.0.4 - // Is the cache extension itself there? - 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 - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert."); - break; - - 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 - // 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 - 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)"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gezählt."); - break; - - 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 - // 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 - // 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 - // 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 - // 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 - 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'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - - // Update notes (these will be set as task text!) - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // Is the cache extension itself there? + 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 + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert."); + break; + + 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 + // 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 + 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)"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gezählt."); + break; + + 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 + // 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 + // 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 + // 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 + // 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 + 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'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + 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 + 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 + // This update depends on 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 + // 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); + REGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run); + REGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); + REGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); + REGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); + REGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); + REGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', false, true, $dry_run); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Filter für Erweiterungsmanagement hinzugefügt."); + break; + + 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); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Weitere Filter hinzugefügt."); + break; + } break; - 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 - // 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 - // 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 - 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 - 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 - // This update depends on 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 - // 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); - REGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run); - REGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); - REGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); - REGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); - REGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run); - REGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', false, true, $dry_run); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter für Erweiterungsmanagement hinzugefügt."); - break; - - 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); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weitere Filter hinzugefügt."); - break; - } - break; - -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 - // Create instance on class - if ($GLOBALS['cache_mode'] != 'init') { - // Initialize cache system only when it's needed - $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), "inc/".getConfig('cache_path'), getConfig('cache_tested')); - if ($GLOBALS['cache_instance']->getStatus() != 'done') { - // Failed to initialize cache sustem - addFatalMessage(__FILE__, __LINE__, "(".__LINE__."): ".getMessage('CACHE_CANNOT_INITIALIZE')); - } // END - if - } // END - if - break; + 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 + // Create instance on class + if ($GLOBALS['cache_mode'] != 'init') { + // Initialize cache system only when it's needed + $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), "inc/".getConfig('cache_path'), getConfig('cache_tested')); + if ($GLOBALS['cache_instance']->getStatus() != 'done') { + // Failed to initialize cache sustem + addFatalMessage(__FILE__, __LINE__, "(".__LINE__."): ".getMessage('CACHE_CANNOT_INITIALIZE')); + } // END - if + } // END - if + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 58c2069238..e54e5e7b79 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -50,10 +50,10 @@ 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) - // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` ( + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, code CHAR(2) NOT NULL DEFAULT 'DE', descr VARCHAR(255) NOT NULL DEFAULT 'Deutschland', @@ -61,65 +61,65 @@ is_active ENUM('Y','N') NOT NULL DEFAULT 'N', KEY(code), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"); - - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden können.', 8)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)"); - - // Add entry to user table - 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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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!)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')"); + + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden können.', 8)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)"); + + // Add entry to user table + 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 + // 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 94c0a7808c..627030c786 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -50,10 +50,10 @@ 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) - // 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` ( + 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` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00', @@ -67,9 +67,9 @@ INDEX (`sender_id`), PRIMARY KEY (`id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Debug log data'"); - // Table against debug log abuse - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log_abuse` ( + // Table against debug log abuse + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log_abuse` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00', @@ -79,9 +79,9 @@ INDEX (`client_id`), PRIMARY KEY (`id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Debug log abuse'"); - // Table on relay/server for client exchanges - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client` ( + // Table on relay/server for client exchanges + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `key` VARCHAR(255) NOT NULL DEFAULT 'SELF', `url` VARCHAR(255) NOT NULL DEFAULT '', @@ -96,12 +96,12 @@ UNIQUE (`url`), PRIMARY KEY (`id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Debug clients'"); - // Add this exchange as first client - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')"); + // Add this exchange as first client + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')"); - // Table for debug log <-> client connection - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client_log` ( + // Table for debug log <-> client connection + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client_log` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1, `log_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -110,71 +110,71 @@ UNIQUE (`log_id`), PRIMARY KEY (`id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Debug client <-> log connection'"); - // Guest menus - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)"); - - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis inc/cache/ befindet.',10)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die debug.log wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team geprüft werden können.',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)"); - - // Config entries - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""); - 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 - // 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`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'"); - break; - -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 - // 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 - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Guest menus + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)"); + + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis inc/cache/ befindet.',10)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die debug.log wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team geprüft werden können.',2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)"); + + // Config entries + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'"); break; - } - break; -case 'modify': // When the extension got modified - break; + 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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'"); + break; + + 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 + // 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 + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } + break; + + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php index b86937030b..8b4c28d808 100644 --- a/inc/extensions/ext-demo.php +++ b/inc/extensions/ext-demo.php @@ -50,44 +50,44 @@ 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) - // SQL commands to run - ADD_EXT_SQL(""); - break; + 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + ADD_EXT_SQL(''); + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; + 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 26b47623fd..226560cf2a 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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` ( + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -67,187 +67,187 @@ KEY(userid), PRIMARY KEY(id) )TYPE=MYISAM"); - // - // --- SETTINGS --- - // - // Minimum points to double - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); - // Maximum points to double - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"); - // Points left on users account after doubling - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"); - // Charge for doubling points which goes to the webmaster (shreddered in fact!) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"); - // Referal percents - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000"); - // Shall I use the jackpot to take points from? (Y/N, default=Y) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - // A user account to take points from (default: 0->none) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - // Total payed out points from your doublers - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - // Sending mode of mails (immediately/daily reset) - // --> This also means who fast the doubled points will be payed out! - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"); - // Timeout for entries to be purged (default: one week) - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""); - // Number of newest entries to display - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - // Number of entries which will be payed out soon - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - // Number of entries which are already payed out - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - // Points used by every member - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - // Counter for usage of the doubler - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - - // - // --- MENU SYSTEMS --- - // - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)"); - - // Guest menu (informations / default doubler link) - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')"); - - // Member menu - 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 - // 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'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'"); - break; - -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"); - break; - -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 - switch ($EXT_VER) - { - 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 - // Total used points - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Gebühr wird vom Verdoppler-Pott abgezogen."); - break; - - 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 - // 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'"); - - // Update notes (these will be set as task text!) - 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 - // 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 - 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'"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die doubler-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order doubler!"); - break; - - 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 - // 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 - // 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 - // 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 - // 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 - 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 - // 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 - // 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 - 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 - if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) { - // So let's check for points - ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH'))); - } - break; + // + // --- SETTINGS --- + // + // Minimum points to double + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); + // Maximum points to double + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"); + // Points left on users account after doubling + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"); + // Charge for doubling points which goes to the webmaster (shreddered in fact!) + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"); + // Referal percents + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000"); + // Shall I use the jackpot to take points from? (Y/N, default=Y) + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + // A user account to take points from (default: 0->none) + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + // Total payed out points from your doublers + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + // Sending mode of mails (immediately/daily reset) + // --> This also means who fast the doubled points will be payed out! + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"); + // Timeout for entries to be purged (default: one week) + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""); + // Number of newest entries to display + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + // Number of entries which will be payed out soon + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + // Number of entries which are already payed out + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + // Points used by every member + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + // Counter for usage of the doubler + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + + // + // --- MENU SYSTEMS --- + // + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)"); + + // Guest menu (informations / default doubler link) + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')"); + + // Member menu + 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 + // 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'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'"); + break; + + 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"); + break; + + 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 + switch ($EXT_VER) + { + 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 + // Total used points + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Gebühr wird vom Verdoppler-Pott abgezogen."); + break; + + 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 + // 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'"); + + // Update notes (these will be set as task text!) + 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 + // 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 + 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'"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die doubler-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order doubler!"); + break; + + 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + // 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 + 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 + if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) { + // So let's check for points + ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH'))); + } + break; } // diff --git a/inc/extensions/ext-events.php b/inc/extensions/ext-events.php index bc7acadd86..1566f089f4 100644 --- a/inc/extensions/ext-events.php +++ b/inc/extensions/ext-events.php @@ -51,42 +51,42 @@ 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) - // SQL commands to run - break; + 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 - // SQL commands to run - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index a54950bc13..2421145e56 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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` ( + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, holiday_start VARCHAR(10) NOT NULL DEFAULT 0, @@ -63,175 +63,175 @@ KEY (userid), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - // Add default values to config - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); - - // Add member menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')"); - - // Add admin menus - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')"); - - // Remove 0 max mails per day - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); - break; - -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"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')"); - break; - -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 - // 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 - switch ($EXT_VER) - { - 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; + // Add default values to config + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); - 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; + // Add member menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')"); - 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 - // 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; + // Add admin menus + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')"); - 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."); + // Remove 0 max mails per day + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); break; - 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."); + 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"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')"); break; - 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 generateUserProfileLink() ausgelagert."); + 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 '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 '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 + switch ($EXT_VER) + { + 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 + // 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 - // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); + break; - 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.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 + // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern der Urlaubsanfrage korregiert."); - break; + 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.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)."'"); + 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 generateUserProfileLink() ausgelagert."); + break; - // Update notes (these will be set as task text!) - 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.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.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'"); + 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; - // 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.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.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'"); + 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; - // 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 + 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)."'"); - 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("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf Urlaub geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"); + break; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Tabellenspalte hinzugefügt."); - break; + 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'"); - 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; + // 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.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')"); + 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'"); - // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); + break; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert."); - break; + 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"); - 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("Fehlende Tabellenspalte hinzugefügt."); + break; - // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt."); + break; - 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"); + 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'); + + // 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 + 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; + // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index b32605ae41..88613c11eb 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -50,97 +50,97 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', "0 switch ($EXT_LOAD_MODE) { -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'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); - 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 - // 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"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg"); - 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 - // 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 - // 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 - switch ($EXT_VER) - { - 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)."); + 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'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'"); + 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 '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."); + 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"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'"); break; - 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."); + 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 '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."); + 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 '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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + + case '0.1.6': + // Dependency is needed for ext-registration!! (want to alter a non existent Table) + EXT_ADD_UPDATE_DEPENDS('bonus'); + EXT_SET_UPDATE_NOTES("Abhänigkeit von der Erweiterung bonus hinzugefügt."); + break; + } break; - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt."); - break; + case 'modify': // When the extension got modified + break; - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - case '0.1.6': - // Dependency is needed for ext-registration!! (want to alter a non existent Table) - 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 - 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 - // Valid HTML tags (only simple and no attributes!) - $GLOBALS['html_tags'] = array( + default: // Do stuff when extension is loaded + // Valid HTML tags (only simple and no attributes!) + $GLOBALS['html_tags'] = array( 'b', 'i', 'u', @@ -152,26 +152,26 @@ default: // Do stuff when extension is loaded 'left', 'right', 'br', - ); + ); - // URL ends which are used to indentify the end of an URL or email link - // Don't use these chars in links... ;-) - // - $GLOBALS['url_ends'] = array( + // URL ends which are used to indentify the end of an URL or email link + // Don't use these chars in links... ;-) + // + $GLOBALS['url_ends'] = array( ' ', "\n", "\r", ')', - ); + ); - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $GLOBALS['valid_email_chars'] = array( + // Valid email chars (without @, or do you want to have another @ inside your email addy?) + $GLOBALS['valid_email_chars'] = array( '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' - ); - break; + ); + break; } // diff --git a/inc/extensions/ext-iso3166.php b/inc/extensions/ext-iso3166.php index cc1f6b7abe..71fbd97aff 100644 --- a/inc/extensions/ext-iso3166.php +++ b/inc/extensions/ext-iso3166.php @@ -51,33 +51,33 @@ 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) - // SQL commands to run - ADD_EXT_SQL(""); - break; + 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 - // 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 '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 - // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';"); - break; + 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 - // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';"); - break; + 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 - switch ($EXT_VER) - { - 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`) + case 'update': // Update an extension + switch ($EXT_VER) + { + 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'), ('AE', 'Vereinigte Arabische Emirate', 'ext-iso3166'), ('AF', 'Afghanistan', 'ext-iso3166'), @@ -322,24 +322,24 @@ VALUES ('AD', 'Andorra', 'ext-iso3166'), ('ZM', 'Sambia', 'ext-iso3166'), ('ZW', 'Zimbabwe', 'ext-iso3166');"); - // This extension depends on the country extension - EXT_ADD_UPDATE_DEPENDS('country'); + // This extension depends on the country extension + 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."); - break; + // 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."); + break; - } - break; + } + break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // [EOF] diff --git a/inc/extensions/ext-lead.php b/inc/extensions/ext-lead.php index 1e8d7ea6a5..6f919dc489 100644 --- a/inc/extensions/ext-lead.php +++ b/inc/extensions/ext-lead.php @@ -50,42 +50,42 @@ 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) - // SQL commands to run - break; + 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 - // SQL commands to run - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-logs.php b/inc/extensions/ext-logs.php index 3f6678dad3..489701c2ee 100644 --- a/inc/extensions/ext-logs.php +++ b/inc/extensions/ext-logs.php @@ -50,45 +50,45 @@ 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) - // 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 '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 - // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'"); - break; + 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 - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index f6454f1425..bde901eed0 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -50,199 +50,199 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -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"); - break; - -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 - switch ($EXT_VER) - { - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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 - break; + 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 + // SQL commands to run + ADD_EXT_SQL(''); + break; + + 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"); + break; + + 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 + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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 + break; } // diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index 3e1c405d72..c1cf578c39 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -50,70 +50,70 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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 '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."); + 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + break; + } break; - 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 - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index d98c951260..ccb30ca84e 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -50,101 +50,101 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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 '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."); + 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - case '0.0.4': // SQL queries for v0.0.4 + case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` ( + ADD_EXT_SQL(''); + break; + + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // SQL commands to run + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` ( media_key VARCHAR(255) NOT NULL DEFAULT '', media_value VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY(media_key) ) TYPE={!_TABLE_TYPE!}"); - // Update notes (these will be set as task text!) - 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; + // Update notes (these will be set as task text!) + 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion empty() umgestellt."); - break; + 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mediendaten mussten komplett regeneriert werden."); - break; + 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 - 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)"); + 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)"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Start des {!MT_WORD2!} und Anzahl Anmeldungen aufgenommen. (Task #13)
+ // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Start des {!MT_WORD2!} und Anzahl Anmeldungen aufgenommen. (Task #13)
Bitte stellen Sie diesen derzeit manuell unter Einstellungen-Medidata selber einstellen."); - break; + break; - 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.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 - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')"); + 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!) - EXT_SET_UPDATE_NOTES("Menüpunkt wird durch diese Erweiterung generiert."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Menüpunkt wird durch diese Erweiterung generiert."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) { diff --git a/inc/extensions/ext-menu.php b/inc/extensions/ext-menu.php index dcd6490083..17072e1dbf 100644 --- a/inc/extensions/ext-menu.php +++ b/inc/extensions/ext-menu.php @@ -50,50 +50,50 @@ 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) - // SQL commands to run - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu',NULL,'Menü-System','Alle drei Menü-System bearbeiten (Admin-, Mitglied- und Gast-Menü)',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','adminedit','Vom Admin editieren','Das Administrationsmenü mit neuen Menüs erweitern, bestehende ändern oder löschen. Vorsicht! Löschen Sie nicht das Login-Menü!',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','admin_add','Admin-Menü hinzufügen','Weiteren Menüpunkt zum Admin-Bereich hinzufügen',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guest_add','Gäste-Menü hinzufügen','Fügen Sie weitere Menüpunkte dem Gäste-Menü hinzu.',5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','memedit','Mitgliedsmenü editieren','Mitgliedsmenü editieren oder löschen',6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guestedit','Gäste-Menü editieren','Gäste-Menü editieren, löschen',4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','mem_add','Mitgliedsmenü hinzufügen','Weiteren Menüpunkt zum Mitgliedsmenü hinzufügen',7)"); - break; + 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 ('menu',NULL,'Menü-System','Alle drei Menü-System bearbeiten (Admin-, Mitglied- und Gast-Menü)',1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','adminedit','Vom Admin editieren','Das Administrationsmenü mit neuen Menüs erweitern, bestehende ändern oder löschen. Vorsicht! Löschen Sie nicht das Login-Menü!',2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','admin_add','Admin-Menü hinzufügen','Weiteren Menüpunkt zum Admin-Bereich hinzufügen',3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guest_add','Gäste-Menü hinzufügen','Fügen Sie weitere Menüpunkte dem Gäste-Menü hinzu.',5)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','memedit','Mitgliedsmenü editieren','Mitgliedsmenü editieren oder löschen',6)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guestedit','Gäste-Menü editieren','Gäste-Menü editieren, löschen',4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','mem_add','Mitgliedsmenü hinzufügen','Weiteren Menüpunkt zum Mitgliedsmenü hinzufügen',7)"); + break; -case 'remove': // Do stuff when removing extension - // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='menu'"); - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='menu'"); + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-mods.php b/inc/extensions/ext-mods.php index 9912cf77bb..c91e18ae08 100644 --- a/inc/extensions/ext-mods.php +++ b/inc/extensions/ext-mods.php @@ -50,78 +50,78 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verknüpften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verknüpften Dateien und somit keine Extra-Statistik.', 2)"); - break; - -case 'remove': // Do stuff when removing extension - // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods'"); - break; - -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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 ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verknüpften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verknüpften Dateien und somit keine Extra-Statistik.', 2)"); break; - case '0.0.3': // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Dummy-Release im Internet???"); + case 'remove': // Do stuff when removing extension + // SQL commands to run + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods'"); break; - 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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Dummy-Release im Internet???"); + break; + + 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 + // 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 + // 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 + // 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 + 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!) + EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt."); + break; + } break; - 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 - 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!) - EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt."); - break; - } - break; - -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-mydata.php b/inc/extensions/ext-mydata.php index 3933871672..da3bc2b1e9 100644 --- a/inc/extensions/ext-mydata.php +++ b/inc/extensions/ext-mydata.php @@ -50,129 +50,129 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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.
+ 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 + // SQL commands to run + ADD_EXT_SQL(''); + break; + + 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 + // SQL commands to run + ADD_EXT_SQL(''); + break; + + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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/".getLanguage()."/html/member/ !) mit hoch!"); - // Depends on 'country'! - EXT_ADD_UPDATE_DEPENDS('country'); - break; + // Depends on 'country'! + EXT_ADD_UPDATE_DEPENDS('country'); + break; - 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.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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); - break; + 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 - // 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 + // 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 - // 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.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 - // 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.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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + 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; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 89e6a92ec0..d058094041 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -50,42 +50,42 @@ 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) - // SQL commands to run - break; + 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 - // SQL commands to run - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index 83f9bdd779..4c1b1de4c8 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -50,133 +50,133 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // 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 - // 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 - switch ($EXT_VER) - { - 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)"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0"); - - // Update notes (these will be set as task text!) - 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."); + 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 '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."); + 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 '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."); + 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 '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."); + 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 '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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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)"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + } break; - 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 - // 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 - // 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 - // 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 - // 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 - - // 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 'modify': // When the extension got modified + break; - 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 - break; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + 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 - // URL ends which are used to indentify the end of an URL or email link - // Don't use these chars in links... ;-) - // - $GLOBALS['url_ends'] = array( + default: // Do stuff when extension is loaded + // URL ends which are used to indentify the end of an URL or email link + // Don't use these chars in links... ;-) + // + $GLOBALS['url_ends'] = array( ' ', "\n", "\r", ')', - ); + ); - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $GLOBALS['valid_email_chars'] = array( + // Valid email chars (without @, or do you want to have another @ inside your email addy?) + $GLOBALS['valid_email_chars'] = array( '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' - ); + ); - if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { - // Daily reset was run so let's check out for expired newsletter orders - ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH'))); - } - break; + if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { + // Daily reset was run so let's check out for expired newsletter orders + ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH'))); + } + break; } // diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php index 53e42ef4e0..c524c0dd15 100644 --- a/inc/extensions/ext-nickname.php +++ b/inc/extensions/ext-nickname.php @@ -50,136 +50,136 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // 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 - // 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 - switch ($EXT_VER) - { - 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'); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden."); + 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 '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 - // 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 - // 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 - 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, _'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12)"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - // 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 - // 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 - 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 - // 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 - // 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 - // 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 - // 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 - 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."); + 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 '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."); + 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 '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."); + 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 '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` ( + + case 'update': // Update an extension + switch ($EXT_VER) + { + 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'); + + // 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 + // 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 + // 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 + // 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 + 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, _'"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12)"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + // 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 + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, nickname VARCHAR(255) NOT NULL DEFAULT '', @@ -190,20 +190,20 @@ INDEX (last_used DESC), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!} COMMENT='History of used nicknames'"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Historie eingegebener Nicknames hinzugefügt. Mitglied kann auf bereits verwendeter zurückgreifen und Liste selbst löschen."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Historie eingegebener Nicknames hinzugefügt. Mitglied kann auf bereits verwendeter zurückgreifen und Liste selbst löschen."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index ef07a9cefd..de64a56dc3 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -50,10 +50,10 @@ 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) - // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_online` ( + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sid VARCHAR(32) NOT NULL DEFAULT '', ip VARCHAR(15) NOT NULL DEFAULT '', @@ -70,72 +70,72 @@ KEY(userid), KEY(refid), KEY `admin_member` (`is_admin`,`is_member`) ) TYPE={!_TABLE_TYPE!}"); - 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 - // 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'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online'"); - - // Unregister filter - UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run); - break; - -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 - // 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 - switch ($EXT_VER) - { - 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."); + 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 '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 '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'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online'"); - 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."); + // Unregister filter + UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run); break; - 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."); + 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 '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 - REGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', false, true, $dry_run); + 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; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + 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 + REGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', false, true, $dry_run); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-optimize.php b/inc/extensions/ext-optimize.php index 6dc8c6eed0..908f2dde82 100644 --- a/inc/extensions/ext-optimize.php +++ b/inc/extensions/ext-optimize.php @@ -50,75 +50,75 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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`( + 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, gain decimal(10,3) NOT NULL DEFAULT '0.000', PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - 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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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 '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."); + 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates."); + break; + } break; - 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 - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 044217af8b..38eae38ced 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -50,118 +50,118 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // 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"); - break; - -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 - switch ($EXT_VER) - { - 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.')"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig."); - break; - - 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"); - - // Update notes (these will be set as task text!) - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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 - // 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 - // 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 - // 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 + 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 + // 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 + // 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"); + break; + + 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 + switch ($EXT_VER) + { + 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.')"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig."); + break; + + 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"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + // 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 + // 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:
  1. Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.
  2. @@ -172,137 +172,137 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
  3. Hatte es aber, wie hier im Beispiel 31 {!POINTS!}, konnte es nicht mehr buchen.
  4. Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.
"); - break; - - 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 - // 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 - // 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 - // 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 - 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'"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet."); - break; - - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); - break; - - 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 - 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 - 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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_url_blacklist`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_url_blacklist` ( + break; + + 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 + // 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 + // 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 + // 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 + 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'"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet."); + break; + + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + break; + + 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 + 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 + 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 + 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, `url` VARCHAR(255) NOT NULL DEFAULT '', `pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -311,25 +311,25 @@ PRIMARY KEY (`id`), INDEX (`pool_id`) ) TYPE=MYISAM COMMENT='URL blacklist'"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Tabelle für URL-Sperrliste angelegt."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Tabelle für URL-Sperrliste angelegt."); + break; + } break; - } - break; - -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 - // 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')) { - // 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 - break; + + 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 + // 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')) { + // 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 + break; } // diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 36d58b5a2f..3a10272a82 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -50,79 +50,79 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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 '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."); + 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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 'update': // Update an extension + switch ($EXT_VER) + { + 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.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.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.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.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.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.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'"); - 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; + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Folgende Einstellungen können auf 0 gesetzt werden: + 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:
  1. Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)
  2. Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)
  3. @@ -130,83 +130,83 @@ case 'update': // Update an extension
  4. Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(
  5. Erneute Aussendung der Mail (0 = Siehe oben)
"); - break; + break; - 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.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 - // 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.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 - // 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.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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); - break; + 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 - // 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 + // 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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{!URL!}'"); + 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; + // 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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'"); + 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; + // 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 - // 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.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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'"); + 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; + // 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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'"); + 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; + // 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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16"); + 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!) - EXT_SET_UPDATE_NOTES("Minimumalter ist nun konfigurierbar."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Minimumalter ist nun konfigurierbar."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index f050ce9489..eb609455a1 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0 switch ($EXT_LOAD_MODE) { -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` ( + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, payout_total FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', @@ -66,188 +66,188 @@ KEY(userid), KEY(payout_id), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_payout_types` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_payout_types` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, type VARCHAR(255) NOT NULL DEFAULT '', rate FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')"); - 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 - // 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`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'"); - break; - -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 - // 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 - switch ($EXT_VER) - { - 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 - 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 ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''"); - 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 - 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 - 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 - 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 - // 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 - // 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 - // 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 - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); - break; - - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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 - // 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 - 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 - break; + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')"); + 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 + // 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`"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'"); + break; + + 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 + // 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 + switch ($EXT_VER) + { + 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 + 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 ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''"); + 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 + 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 + 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 + 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 + // 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 + // 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 + // 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 + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); + break; + + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + 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 + break; } // diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php index 62dcb87e60..eeb837bc2a 100644 --- a/inc/extensions/ext-primera.php +++ b/inc/extensions/ext-primera.php @@ -45,10 +45,10 @@ 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) - // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_primera` ( + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, primera_account VARCHAR(255) NOT NULL DEFAULT '', @@ -61,60 +61,60 @@ KEY(userid), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - // Confiuration - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''"); - - // User data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''"); - - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)"); - - // Member menu - 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 - // 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 - // 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 - // 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 - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Confiuration + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''"); + + // User data + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''"); + + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)"); + + // Member menu + 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 + // 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 + // 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 + // 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 + switch ($EXT_VER) + { + 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; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php index e50fc40fc9..3a6a27d81e 100644 --- a/inc/extensions/ext-profile.php +++ b/inc/extensions/ext-profile.php @@ -50,89 +50,89 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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"); + 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 '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."); + case 'remove': // Do stuff when removing extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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"); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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..."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 '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 'modify': // When the extension got modified + break; - 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 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; - 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 - // 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 - 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 - // Do we have a daily-reset-run? - if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { - // So let's check for profiles which needs an update - ADD_INC_TO_POOL(sprintf("%sinc/profile-updte.php", constant('PATH'))); - } - break; + default: // Do stuff when extension is loaded + // Do we have a daily-reset-run? + if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) { + // So let's check for profiles which needs an update + ADD_INC_TO_POOL(sprintf("%sinc/profile-updte.php", constant('PATH'))); + } + break; } // diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index 90b7f0d1ec..ad8df4d644 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -50,12 +50,12 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_data` ( + 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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, title VARCHAR(255) NOT NULL DEFAULT '', @@ -70,7 +70,7 @@ notified ENUM('Y','N') NOT NULL DEFAULT 'N', KEY (admin_id), PRIMARY KEY (id) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_prices` ( + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_prices` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, price_level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -79,7 +79,7 @@ info LONGTEXT NOT NULL, KEY (rallye_id), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_users` ( + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_users` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -89,141 +89,141 @@ KEY (userid), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')"); - - // Guest menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')"); - - // Member menu - 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 - // Drop tables - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`"); - - // Remove menus - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'"); - - // Unregister filter - UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run); - break; - -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 - // 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 - switch ($EXT_VER) - { - 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 - 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); - break; + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')"); - 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 - // 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 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + // Guest menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert."); + // Member menu + 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 '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 '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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`"); - 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; + // Remove menus + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'"); - 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."); + // Unregister filter + UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run); + break; + + 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 '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 '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 + switch ($EXT_VER) + { + 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 + 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + // 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 + // 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 + // 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 + // 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.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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Funktion generateUserProfileLink() mit Verlinkung auf Referal-Liste implementiert."); - break; - - 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'"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template templates/de/emails/member/member_rallye_notify.tpl folgende zwei Zeilen ein:
+ 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Funktion generateUserProfileLink() mit Verlinkung auf Referal-Liste implementiert."); + break; + + 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'"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template templates/de/emails/member/member_rallye_notify.tpl folgende zwei Zeilen ein:
"); - break; - - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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 - // 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 - // 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 - // This update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS('sql_patches'); - - // Register filter - REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von sql_patches abhängig."); - break; - } - break; - -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 - // 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); - - // Add more data on higher versions - $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)"; - } // END - if - - // Check for new started but not notified rallyes - $result = SQL_QUERY("SELECT SQL_SMALL_RESULT id, title, start_time, end_time, send_notify".$ADD1." + break; + + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + // 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 + // This update depends on sql_patches + EXT_ADD_UPDATE_DEPENDS('sql_patches'); + + // Register filter + REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von sql_patches abhängig."); + break; + } + break; + + 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 + // 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); + + // Add more data on higher versions + $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)"; + } // END - if + + // Check for new started but not notified rallyes + $result = SQL_QUERY("SELECT SQL_SMALL_RESULT id, title, start_time, end_time, send_notify".$ADD1." FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE is_active='Y' AND notified='N' AND expired='N' AND start_time <= UNIX_TIMESTAMP() AND end_time > UNIX_TIMESTAMP() LIMIT 1", __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) { - // Start rallye - RALLYE_AUTOSTART_RALLYES($result); - } // END - if + if (SQL_NUMROWS($result) == 1) { + // Start rallye + RALLYE_AUTOSTART_RALLYES($result); + } // END - if - // Free memory - SQL_FREERESULT($result); + // Free memory + SQL_FREERESULT($result); - // Check for expired rallyes - $result = SQL_QUERY("SELECT SQL_SMALL_RESULT d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2." + // Check for expired rallyes + $result = SQL_QUERY("SELECT SQL_SMALL_RESULT d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2." 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'))) { - // End rallye here... - RALLYE_EXPIRE_RALLYES($result); - } // END - if - - // Free memory - SQL_FREERESULT($result); - } // END - if - break; + if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('autopurge'))) { + // End rallye here... + RALLYE_EXPIRE_RALLYES($result); + } // END - if + + // Free memory + SQL_FREERESULT($result); + } // END - if + break; } // diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index 7550159db4..487c83895d 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -50,10 +50,10 @@ 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) - // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_refs` ( + 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` ( `id` BIGINT(20) UNSIGNED NOT NULL auto_increment, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0, @@ -65,59 +65,59 @@ UNIQUE `user_refid` (`userid`,`level`,`refid`), KEY (`level`), KEY (`refid`) ) ENGINE={!_TABLE_TYPE!} COMMENT='User Referals With Refback'"); - 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; + 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 - // 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'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1"); - break; + 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'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback')"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1"); + break; -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 '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 - // SQL commands to run - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1"); - break; + 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 - switch ($EXT_VER) - { - 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"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)"); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 refback is not installed we cannot load it's configuration... *sigh* - break; + default: // Do stuff when extension is loaded + // When the refback is not installed we cannot load it's configuration... *sigh* + break; } // Shall we include special files? if ($EXT_LOAD_MODE == 'register') { // Execute this special file on this update ADD_INC_TO_POOL(sprintf("%sinc/gen_refback.php", - constant('PATH') + constant('PATH') )); } // END - if diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index b5d4a30837..ac4fb0305c 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -50,284 +50,284 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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, -field_name VARCHAR(255) NOT NULL DEFAULT '', -field_required ENUM('Y','N') NOT NULL DEFAULT 'Y', -PRIMARY KEY(id) -) TYPE={!_TABLE_TYPE!}"); - - // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!) - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')"); - - // Add admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter Profildaten ändern ein.', 12)"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugefügt."); - break; - - 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'); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); + 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 '0.1.3': // SQL queries for v0.1.3 - // This update depends on sql_patches update! - 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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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???)"); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 'update': // Update an extension + switch ($EXT_VER) + { + 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, +field_name VARCHAR(255) NOT NULL DEFAULT '', +field_required ENUM('Y','N') NOT NULL DEFAULT 'Y', +PRIMARY KEY(id) +) TYPE={!_TABLE_TYPE!}"); - 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.
+ // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!) + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')"); + + // Add admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter Profildaten ändern ein.', 12)"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugefügt."); + break; + + 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'); + + // 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 + // This update depends on sql_patches update! + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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/".getLanguage()."/html/guest/ zu finden ist!"); - // Depends on 'country' - EXT_ADD_UPDATE_DEPENDS('country'); - break; - - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates templates/".getLanguage()."/html/guest/guest_register.tpl ist nicht mehr nötig."); - break; - - 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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("setSession() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); - break; - - 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlermeldung Fatal error: Call to undefined function registerGenerateCategoryTable() in {!PATH!}/inc/modules/guest/what-register.php on line 434 beseitigt."); - break; - - 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 - // 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 - 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 - break; + // Depends on 'country' + EXT_ADD_UPDATE_DEPENDS('country'); + break; + + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates templates/".getLanguage()."/html/guest/guest_register.tpl ist nicht mehr nötig."); + break; + + 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("setSession() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); + break; + + 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Fehlermeldung Fatal error: Call to undefined function registerGenerateCategoryTable() in {!PATH!}/inc/modules/guest/what-register.php on line 434 beseitigt."); + break; + + 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 + // 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 + 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 + break; } // diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index 885139b7d4..0c3b40c165 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -50,60 +50,60 @@ 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) - // 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'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'"); - 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 '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'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'"); + 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 - // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip'"); + 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'"); - // Remove filters - UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run); - break; + // Remove filters + UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run); + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - // Update depends on sql_patches - EXT_ADD_UPDATE_DEPENDS('sql_patches'); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + // Update depends on sql_patches + EXT_ADD_UPDATE_DEPENDS('sql_patches'); - // Add filters - REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run); + // Add filters + REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von sql_patches abhängig."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von sql_patches abhängig."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-repair.php b/inc/extensions/ext-repair.php index ff2b5d590f..0b0fbf3821 100644 --- a/inc/extensions/ext-repair.php +++ b/inc/extensions/ext-repair.php @@ -50,83 +50,83 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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_amnu','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_gmnu','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_mmnu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fügt ein Menüpunkt zur Reperatur der Gewichtung des Admin-Menüs hinzu."); + 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 '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...."); + 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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)."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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_amnu','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_gmnu','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_mmnu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_amnu' WHERE `what`='repair_amenu' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_gmnu' WHERE `what`='repair_gmenu' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_mmnu' WHERE `what`='repair_mmenu' LIMIT 1"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Scripte umbenannt, damit diese nicht mit ext-menu konfliktieren"); + break; + } break; - 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; - - case '0.1.6': // SQL queries for v0.1.6 - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_amnu' WHERE `what`='repair_amenu' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_gmnu' WHERE `what`='repair_gmenu' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_mmnu' WHERE `what`='repair_mmenu' LIMIT 1"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Scripte umbenannt, damit diese nicht mit ext-menu konfliktieren"); - break; - } - break; - -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index 15f0bc6d73..911b226beb 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -50,127 +50,127 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) - // Check if mod_rewrite is loadeded - if (!isApacheModuleLoaded('mod_rewrite')){ - EXT_SET_REPORTS_FAILURE(true); - addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); - } // END - if - - // SQL commands to run - ADD_EXT_SQL(""); - break; - -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 - // Check if mod_rewrite is loadeded - if (!isApacheModuleLoaded('mod_rewrite')) { - SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); - EXT_SET_REPORTS_FAILURE(true); - addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); - } // END - if - - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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 - // 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 - // 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."); - break; - - 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Links im Frametester-Modul werden nicht mehr umgeschrieben."); - break; + case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) + // Check if mod_rewrite is loadeded + if (!isApacheModuleLoaded('mod_rewrite')){ + EXT_SET_REPORTS_FAILURE(true); + addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); + } // END - if - 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."); + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + 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 '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)"); + case 'activate': // Do stuff when admin activates this extension + // Check if mod_rewrite is loadeded + if (!isApacheModuleLoaded('mod_rewrite')) { + SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); + EXT_SET_REPORTS_FAILURE(true); + addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); + } // END - if - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Zu überspringende Module können per Admin-Bereich eingestellt werden."); - break; + // SQL commands to run + ADD_EXT_SQL(''); + break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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."); + break; + + 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 + // 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 + // 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 + // 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 + // 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 + 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)"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + break; + case '0.1.3': + // Check if mod_rewrite is loadeded + if (!isApacheModuleLoaded('mod_rewrite')){ + EXT_SET_REPORTS_FAILURE(true); + //addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); + } // END - if + EXT_SET_UPDATE_NOTES("Es wird beim Registrieren und aktivieren geprüft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen."); + break; + } break; - 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': - // Check if mod_rewrite is loadeded - if (!isApacheModuleLoaded('mod_rewrite')){ - EXT_SET_REPORTS_FAILURE(true); - //addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); - } // END - if - EXT_SET_UPDATE_NOTES("Es wird beim Registrieren und aktivieren geprüft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen."); - break; - } - break; - -case 'modify': // When the extension got modified - break; + 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; + 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 - // Check if mod_rewrite is loadeded - if (!isApacheModuleLoaded('mod_rewrite')){ - EXT_SET_REPORTS_FAILURE(true); - SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); - if (!IS_ADMIN()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); - } // END - if - break; + default: // Do stuff when extension is loaded + // Check if mod_rewrite is loadeded + if (!isApacheModuleLoaded('mod_rewrite')){ + EXT_SET_REPORTS_FAILURE(true); + SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); + if (!IS_ADMIN()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR')); + } // END - if + break; } // diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php index 7939e9adfc..b8a2c7f836 100644 --- a/inc/extensions/ext-safe.php +++ b/inc/extensions/ext-safe.php @@ -51,42 +51,42 @@ 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) - // SQL commands to run - break; + 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 - // SQL commands to run - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + break; -case 'activate': // Do stuff when admin activates this extension - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index 94a8dfacec..4e85c9666d 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -49,18 +49,18 @@ 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) - // - // SQL commands to run - // - // Try to make it depend on repair - EXT_ADD_UPDATE_DEPENDS('repair'); + 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'); - // - // Sponsor data - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_data` ( + // + // Sponsor data + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, company VARCHAR(255) NOT NULL DEFAULT '', position VARCHAR(255) NOT NULL DEFAULT '', @@ -97,11 +97,11 @@ KEY(refid), KEY(email), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Sponsor orders - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_orders` ( + // + // Sponsor orders + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_orders` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -117,11 +117,11 @@ KEY (aid), KEY (sponsorid), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Pay-types - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_paytypes` ( + // + // Pay-types + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_paytypes` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, pay_name VARCHAR(255) NOT NULL DEFAULT '', pay_rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, @@ -129,11 +129,11 @@ pay_min_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 1, pay_currency VARCHAR(255) NOT NULL DEFAULT '€', PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Points-to-action converting - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_action_convert` ( + // + // Points-to-action converting + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_action_convert` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor', conv_rate BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -141,11 +141,11 @@ conv_name VARCHAR(255) NOT NULL DEFAULT 'Mails', KEY (ext_name), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Sponsor menu system (default) - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_menu` ( + // + // Sponsor menu system (default) + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_menu` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, action VARCHAR(255) NOT NULL DEFAULT '', what VARCHAR(255) NULL DEFAULT NULL, @@ -156,11 +156,11 @@ KEY (action), UNIQUE KEY (what), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Registry for performable actions by your sponsors - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_registry` ( + // + // Registry for performable actions by your sponsors + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_registry` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor', @@ -170,11 +170,11 @@ KEY(ext_name), KEY(aid), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // URLs from the sponsors - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_urls` ( + // + // URLs from the sponsors + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_urls` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, url VARCHAR(255) NOT NULL DEFAULT 'http://', @@ -184,11 +184,11 @@ status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', KEY(sponsorid), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Banners of any size from the sponsors - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_banner` ( + // + // Banners of any size from the sponsors + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_banner` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, url VARCHAR(255) NOT NULL DEFAULT 'http://', @@ -200,11 +200,11 @@ status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING', KEY(sponsorid), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Campaigns - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaigns` ( + // + // Campaigns + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaigns` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -222,11 +222,11 @@ KEY(aid), KEY(sponsorid), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Campaigns + URLs + Banner - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns` ( + // + // Campaigns + URLs + Banner + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, campaignid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, urlid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -238,21 +238,21 @@ KEY(urlid), KEY(campaignid), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Allowed data to display (administrative) - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_admin_data` ( + // + // Allowed data to display (administrative) + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_admin_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, data_row VARCHAR(255) NOT NULL DEFAULT '', display ENUM('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Allowed data to display (sponsor-side) - // - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_display_data` ( + // + // Allowed data to display (sponsor-side) + // + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_display_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, data_row VARCHAR(255) NOT NULL DEFAULT '', @@ -260,170 +260,170 @@ display ENUM('Y','N') NOT NULL DEFAULT 'N', KEY(sponsorid), PRIMARY KEY(id) )TYPE={!_TABLE_TYPE!}"); - // - // Default allowed data to display - // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('id','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('position','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('family','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('url','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('password','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('status','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')"); - // - // Add default entries - // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".getCurrentAdminId().",UNIX_TIMESTAMP())"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '€')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '€')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '€')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')"); - // - // Admin menu - // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {!POINTS!}-Pakete kaufen. Hier können Sie diese verwalten.', 14)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)"); - // - // Menu system (still admin menu) - // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)"); - // - // Guest menu - // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)"); - // - // Member menu - // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)"); - // - // Add default menus to sponsor menu - // - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auffüllen','N', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)"); - // - // General configuration stuff - // - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000"); - break; + // + // Default allowed data to display + // + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('id','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('position','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('family','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('url','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('password','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('status','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')"); + // + // Add default entries + // + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".getCurrentAdminId().",UNIX_TIMESTAMP())"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '€')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '€')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '€')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')"); + // + // Admin menu + // + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {!POINTS!}-Pakete kaufen. Hier können Sie diese verwalten.', 14)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)"); + // + // Menu system (still admin menu) + // + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)"); + // + // Guest menu + // + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)"); + // + // Member menu + // + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)"); + // + // Add default menus to sponsor menu + // + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auffüllen','N', 7)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)"); + // + // General configuration stuff + // + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); + 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 - // 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`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'"); - break; + 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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'"); + break; -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"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'"); - break; + 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"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'"); + 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 - // 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"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'"); - break; + 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"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'"); + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 9946905523..4c7c818459 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -50,20 +50,20 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`"); - - // Delete admin menu entries - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE + 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 + // 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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`"); + + // Delete admin menu entries + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_extensions' OR `what`='config_home' OR `what`='list_unconfirmed' OR @@ -75,324 +75,324 @@ case 'remove': // Do stuff when removing extension `what`='config_session' OR `what`='list_filter'"); - // Delete/update member menu entries - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE + // Delete/update member menu entries + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='stats2' OR `what`='reflist' OR (`action`='stats' AND (`what`='' OR `what` IS NULL)) OR (`action`='extras' AND (`what`='' OR `what` IS NULL)) OR (`action`='rals' AND (`what`='' OR `what` IS NULL)) OR (`action`='account' AND (`what`='' OR `what` IS NULL))"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE `action`='stats' OR `action`='extras' OR `action`='rals' OR `action`='account'"); - // Drop indexes - /* @TODO SQL_ALTER_TABLE() should work now properly - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP UNIQUE KEY `ext_name`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP UNIQUE KEY `login`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` DROP INDEX `visible`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` DROP UNIQUE KEY `level`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP INDEX `data_type`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` DROP UNIQUE KEY `module`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `action`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_type`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `status`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_created`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP FULLTEXT `subject`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `subject`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP INDEX `ext_active`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `action`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `sort`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `visible`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `locked`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `sort`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `visible`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `locked`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `visible`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `sort`"); - */ - break; - -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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)"); - - // Update notes (these will be set as task text!) - 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 - 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 - 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."); + // Drop indexes + /* @TODO SQL_ALTER_TABLE() should work now properly + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP UNIQUE KEY `ext_name`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP UNIQUE KEY `login`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` DROP INDEX `visible`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` DROP UNIQUE KEY `level`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP INDEX `data_type`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` DROP UNIQUE KEY `module`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `action`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_type`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `status`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_created`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP FULLTEXT `subject`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `subject`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP INDEX `ext_active`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `action`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `sort`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `visible`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `locked`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `sort`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `visible`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `locked`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `visible`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `sort`"); + */ break; - 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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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)"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die what-welcome.php ist derzeit die "Home"-Seite (Eingangsseite). Dies kann nun per Datenbank geändert werden."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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'"); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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)"); - // 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; + // Update notes (these will be set as task text!) + 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.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'"); + 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("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt."); - break; + // 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.8': // SQL queries for v0.0.8 - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' · '"); + 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("Nette Mouse-Hover-Effekte eingebaut (Anleitung MENUE_HOVER.txt zum Patchen der general.css bitte lesen!)"); - break; + // 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.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)"); + 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("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden."); - break; + // 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.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'"); + 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)"); - // 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; + // Update notes (these will be set as task text!) + 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.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).""); + 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("Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."); - break; + // 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.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"); + 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("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); - break; + // 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.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'"); + 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("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"); - break; + // 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.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.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)"); - 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("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden."); + break; - // 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.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'"); - 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 '-'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)"); - - // Update notes (these will be set as task text!) - 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; + // 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.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.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).""); - 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; + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."); + break; - 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.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"); - 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"); + // 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; - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + 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("5 Nachkommastellen implementiert"); - break; + // 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.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'"); + 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 + 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("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden."); - break; + // 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.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 - 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'"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."); - break; - - case '0.2.4': // SQL queries for v0.2.4 - $auto_type = 'png'; // PNG image is the default - if ((isIncludeReadable('theme/'.getCurrentTheme().'/images/code_bg.jpg')) && function_exists('imagecreatefromjpeg')) { - // Switch to JPEG format - $auto_type = 'jpg'; - } - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'"); - - // Update notes (these will be set as task text!) - 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 - // 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 - 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 - 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"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("
    + 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 '-'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)"); + + // Update notes (these will be set as task text!) + 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 + // 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 + // 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 + // 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 + 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"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE price price FLOAT(20,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.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 + // 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 + 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'"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."); + break; + + case '0.2.4': // SQL queries for v0.2.4 + $auto_type = 'png'; // PNG image is the default + if ((isIncludeReadable('theme/'.getCurrentTheme().'/images/code_bg.jpg')) && function_exists('imagecreatefromjpeg')) { + // Switch to JPEG format + $auto_type = 'jpg'; + } + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'"); + + // Update notes (these will be set as task text!) + 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 + // 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 + 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 + 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"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("
    1. Das Mitglied kann das derzeitige Design in sein Profil abspeichern.
    2. Mitgliederstatistik mit Seitennavigation.
    "); - break; - - 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 - 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'"); - - // 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.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"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Zwei Menüpunkte umbenannt."); - break; - - 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)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (level)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD INDEX (level)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD INDEX (data_type)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (module)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (action)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (what)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_type)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (status)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_created)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD FULLTEXT (subject)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD INDEX (ext_active)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (action)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (what)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (sort)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (visible)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (locked)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (what)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (sort)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (visible)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (locked)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (visible)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (sort)"); - - // Update notes (these will be set as task text!) - 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 - // 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` ( + break; + + 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 + 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'"); + + // 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.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"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Zwei Menüpunkte umbenannt."); + break; + + 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)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (level)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD INDEX (level)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD INDEX (data_type)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (module)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (action)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (what)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_type)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (status)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_created)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD FULLTEXT (subject)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD INDEX (ext_active)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (action)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (what)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (sort)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (visible)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (locked)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (what)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (sort)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (visible)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (locked)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (visible)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (sort)"); + + // Update notes (these will be set as task text!) + 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 + // 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, la_id VARCHAR(255) NOT NULL DEFAULT '', la_action VARCHAR(255) NOT NULL DEFAULT '', @@ -402,9 +402,9 @@ INDEX (la_action), INDEX (la_what), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - // All "logical areas" together - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las_data` ( + // All "logical areas" together + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las_data` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, la_id VARCHAR(255) NOT NULL DEFAULT '', la_title VARCHAR(255) NOT NULL DEFAULT '', @@ -415,23 +415,23 @@ INDEX (la_posx), INDEX (la_posy), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - // Which menu do you like? - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"); + // Which menu do you like? + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"); - // Insert menus - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)"); + // Insert menus + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)"); - // Update notes (these will be set as task text!) - 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; + // Update notes (these will be set as task text!) + 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 - // 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'"); + 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'"); - // The statistics table - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_stats` ( + // The statistics table + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_stats` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, type ENUM('la','action','what') NOT NULL DEFAULT 'what', @@ -440,215 +440,215 @@ INDEX (aid), PRIMARY KEY (id) ) TYPE={!_TABLE_TYPE!}"); - // Update notes (these will be set as task text!) - 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 - // 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 - // 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')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); - break; - - 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 ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET has_menu='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"); - break; - - 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 - 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"); - - // Update notes (these will be set as task text!) - 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 - 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--%'"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"); - - // Update notes (these will be set as task text!) - 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 - 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 - 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 - // 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 - 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 ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugefügt."); - break; - - 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"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD UNIQUE (`what`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD UNIQUE (`what`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD UNIQUE (`what`)"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert."); - break; - - 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'"); + // Update notes (these will be set as task text!) + 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 + // 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 + // 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')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut."); + break; + + 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 ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET has_menu='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)"); + break; + + 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 + 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"); + + // Update notes (these will be set as task text!) + 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 + 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--%'"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'"); + + // Update notes (these will be set as task text!) + 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 + 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 + 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 + // 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 + 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 ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugefügt."); + break; + + 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"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD UNIQUE (`what`)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD UNIQUE (`what`)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD UNIQUE (`what`)"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert."); + break; + + 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'"); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Täglichen/wöchentlichen/monatlichen Reset verbessert."); + break; + + 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 + // 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 + 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 + // 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 + 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`)"); + + // Update notes (these will be set as task text!) + 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 + 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 + 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 + 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)"); + + // Update notes (these will be set as task text!) + 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 + 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'); + + // 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 + 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 + // 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 + 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; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Täglichen/wöchentlichen/monatlichen Reset verbessert."); - break; + case '0.5.8': // SQL queries for v0.5.8 + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`"); - 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Veraltetes Update."); - break; + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Sprachdateinamen werden nicht mehr in der Datenbank behalten."); + break; - 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 - // 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 - 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`)"); - - // Update notes (these will be set as task text!) - 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 - 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 - 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 - 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)"); - - // Update notes (these will be set as task text!) - 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 - 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'); - - // 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 - 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 - // 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 - 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 - 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 - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_filters` ( + 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, `filter_name` VARCHAR(255) NOT NULL DEFAULT '', `filter_function` VARCHAR(255) NOT NULL DEFAULT '', @@ -656,97 +656,97 @@ PRIMARY KEY (id) `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`filter_id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Filter system'"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und lässt diese de- bzw. wieder aktivieren.', 17)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und lässt diese de- bzw. wieder aktivieren.', 17)"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Tabellen für Filter-System hinzugefügt."); - break; + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Tabellen für Filter-System hinzugefügt."); + break; - 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'"); + 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; + // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update."); - break; + 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 - // Depends on refback extension - EXT_ADD_UPDATE_DEPENDS('user'); + case '0.6.2': // SQL queries for v0.6.2 + // Depends on refback extension + EXT_ADD_UPDATE_DEPENDS('user'); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abhängigkeit von ext-user gesetzt."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Abhängigkeit von ext-user gesetzt."); + break; + } break; - } - break; - -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 - // When the sql_patches is not installed we cannot load it's configuration... *sigh* - if (GET_EXT_VERSION('sql_patches') != '') { - // Init key - setConfigEntry('secret_key', ''); - - // Read key from secret file - if ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == '')) { - // Cache instance - // Maybe need setup of secret key! - loadIncludeOnce('inc/gen_sql_patches.php'); - - // @TODO Rewrite this to a filter! - if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) { - // Remove extensions and mod_reg cache file - loadIncludeOnce('inc/libs/cache_functions.php'); - require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH'))); - if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile(); - if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile(); - } // END - if - } // END - if - - // Test again - if ((getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) { - // File hash fas generated so we can also file the secret file... hopefully. - $hashFile = sprintf("%sinc/.secret/.%s", constant('PATH'), getConfig('file_hash')); - if (isFileReadable($hashFile)) { - // Read file - setConfigEntry('secret_key', readFromFile($hashFile)); - } else { - // Remove it from database - updateConfiguration('file_hash', ''); - - // Cannot read secret file! - app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload"); - } - } // END - if - - // Transfer words/numbers to constants - define('POINTS' , getConfig('points_word')); - define('MT_WORD' , getConfig('mt_word')); - define('MT_WORD2', getConfig('mt_word2')); - define('MT_WORD3', getConfig('mt_word3')); - define('_MAX' , getConfig('rand_no')); - } else { - // Set some lame ( ;-) ) default settings - setConfigEntry('def_refid' , 0); - setConfigEntry('enable_title_deco', 'N'); - setConfigEntry('title_mod_show' , 'Y'); - setConfigEntry('title_middle' , '-'); - // @TODO Can we remove this? setConfigEntry('verbose_sql' , 'N'); - define('MT_WORD' , getMessage('DEFAULT_MT_WORD')); - define('MT_WORD2', getMessage('DEFAULT_MT_WORD2')); - define('MT_WORD3', getMessage('DEFAULT_MT_WORD3')); - define('POINTS' , getMessage('DEFAULT_POINTS')); - } - break; + + 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 + // When the sql_patches is not installed we cannot load it's configuration... *sigh* + if (GET_EXT_VERSION('sql_patches') != '') { + // Init key + setConfigEntry('secret_key', ''); + + // Read key from secret file + if ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == '')) { + // Cache instance + // Maybe need setup of secret key! + loadIncludeOnce('inc/gen_sql_patches.php'); + + // @TODO Rewrite this to a filter! + if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) { + // Remove extensions and mod_reg cache file + loadIncludeOnce('inc/libs/cache_functions.php'); + require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH'))); + if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile(); + if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile(); + } // END - if + } // END - if + + // Test again + if ((getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) { + // File hash fas generated so we can also file the secret file... hopefully. + $hashFile = sprintf("%sinc/.secret/.%s", constant('PATH'), getConfig('file_hash')); + if (isFileReadable($hashFile)) { + // Read file + setConfigEntry('secret_key', readFromFile($hashFile)); + } else { + // Remove it from database + updateConfiguration('file_hash', ''); + + // Cannot read secret file! + app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload"); + } + } // END - if + + // Transfer words/numbers to constants + define('POINTS' , getConfig('points_word')); + define('MT_WORD' , getConfig('mt_word')); + define('MT_WORD2', getConfig('mt_word2')); + define('MT_WORD3', getConfig('mt_word3')); + define('_MAX' , getConfig('rand_no')); + } else { + // Set some lame ( ;-) ) default settings + setConfigEntry('def_refid' , 0); + setConfigEntry('enable_title_deco', 'N'); + setConfigEntry('title_mod_show' , 'Y'); + setConfigEntry('title_middle' , '-'); + // @TODO Can we remove this? setConfigEntry('verbose_sql' , 'N'); + define('MT_WORD' , getMessage('DEFAULT_MT_WORD')); + define('MT_WORD2', getMessage('DEFAULT_MT_WORD2')); + define('MT_WORD3', getMessage('DEFAULT_MT_WORD3')); + define('POINTS' , getMessage('DEFAULT_POINTS')); + } + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-support.php b/inc/extensions/ext-support.php index d962ccc810..b3f90a0e9e 100644 --- a/inc/extensions/ext-support.php +++ b/inc/extensions/ext-support.php @@ -50,94 +50,94 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + 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 '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."); + case 'remove': // Do stuff when removing extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + } break; - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index a272bb5b0a..72abee9559 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -50,10 +50,10 @@ 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) - // 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` ( + 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` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url` VARCHAR(255) NOT NULL DEFAULT '', @@ -72,9 +72,9 @@ UNIQUE KEY `userid_url` (`userid`,`url`), INDEX `status_userid` (`status`,`userid`) ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar URLs'"); - // Reload locks - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_locks` ( + // Reload locks + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_locks` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -84,9 +84,9 @@ UNIQUE KEY `userid_url` (`userid`,`url_id`), INDEX (`url_id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar reload locks'"); - // Surfbar salts - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_salts` ( + // Surfbar salts + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_salts` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -96,9 +96,9 @@ UNIQUE KEY `userid_url` (`userid`,`url_id`), INDEX (`url_id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar last used salts'"); - // Statistics - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_stats` ( + // Statistics + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_stats` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -109,9 +109,9 @@ UNIQUE KEY `userid_url` (`userid`,`url_id`), INDEX (`url_id`) ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Statistics'"); - // Member actions pending on status - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_actions` ( + // Member actions pending on status + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_actions` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL, `action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL, @@ -120,123 +120,123 @@ PRIMARY KEY (`id`), UNIQUE KEY `status_action` (`status`,`action`) ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Member Actions'"); - // Member actions - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')"); - - // Config entries - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"); - - // Extend user data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); - - // Member menus - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)"); - - // Admin menus - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzufügen','Fügen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. Vorsicht! Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgewählten URL anzeigen.',5)"); - 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 - // 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`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'"); - break; - -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"); - break; - -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 - switch ($EXT_VER) { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Member actions + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')"); + + // Config entries + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5).""); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6).""); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7).""); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3).""); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day').""); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"); + + // Extend user data + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); + + // Member menus + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)"); + + // Admin menus + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzufügen','Fügen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. Vorsicht! Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgewählten URL anzeigen.',5)"); + 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; - } - break; -case 'modify': // When the extension got modified - break; + 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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'"); + break; + + 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"); + break; + + 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 + switch ($EXT_VER) { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } + break; + + 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; + 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 - // @TODO Set some constants we need??? - define('edit', 'edit'); - break; + default: // Do stuff when extension is loaded + // @TODO Set some constants we need??? + define('edit', 'edit'); + break; } // diff --git a/inc/extensions/ext-task.php b/inc/extensions/ext-task.php index 92064c8615..3186a59eda 100644 --- a/inc/extensions/ext-task.php +++ b/inc/extensions/ext-task.php @@ -50,109 +50,109 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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'); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."); + 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 '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."); + 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 '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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); - break; - - 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:
    + case 'update': // Update an extension + switch ($EXT_VER) + { + 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'); + + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); + break; + + 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:
    • Ländercodes
    • Wartende Verdopplungen
    • @@ -160,101 +160,101 @@ case 'update': // Update an extension
    • Teilnehmer an der Aktiv-Rallye
    • Nett hinweisende Linktitel hinzugefügt. :-)
    "); + break; + + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // This update depends on user update + 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."); + break; + } break; - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // This update depends on user update - 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."); - break; - } - break; - -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index be1cc942d6..9a8e5313db 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -50,76 +50,76 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // Drop theme table - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`"); - - // Delete admin menu - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'"); - - // Delete guest menu entries - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'"); - - // Delete member menu entries - 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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) + // SQL commands to run break; - 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 'remove': // Do stuff when removing extension + // Drop theme table + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`"); - 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; + // Delete admin menu + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'"); - 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; + // Delete guest menu entries + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'"); - case '0.0.5': // SQL queries for v0.0.5 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("setSession() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); + // Delete member menu entries + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes'"); break; - 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."); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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` ( + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("setSession() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); + break; + + 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 + // 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 + // Theme table + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_themes` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, theme_path VARCHAR(255) NOT NULL DEFAULT '', theme_name VARCHAR(255) NOT NULL DEFAULT '', @@ -130,38 +130,38 @@ UNIQUE KEY (`theme_path`), INDEX (`theme_active`) ) TYPE={!_TABLE_TYPE!} COMMENT='Themes'"); - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)"); + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)"); - // Guest menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')"); + // Guest menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')"); - // Memember menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1"); - ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1"); + // Memember menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1"); + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1"); - // User data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"); + // User data + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Update von sql_patches übertragen. (Kann Fehlermeldungen verursacht haben!)"); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Update von sql_patches übertragen. (Kann Fehlermeldungen verursacht haben!)"); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index 6823e6bee5..10bba6821e 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -50,102 +50,102 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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 - // 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 - // 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 - // 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 - switch ($EXT_VER) - { - 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."); + 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 '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."); + 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 '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."); + 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 '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."); + 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 '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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + } break; - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index c9f433d9c3..658b82d40a 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -50,13 +50,13 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0 switch ($EXT_LOAD_MODE) { -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`"); + 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`"); - // Transfer from a member - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` ( + // Transfer from a member + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -69,8 +69,8 @@ KEY (from_uid), PRIMARY KEY(id) ) Type={!_TABLE_TYPE!}"); - // Transfers to a member - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` ( + // Transfers to a member + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -83,213 +83,213 @@ KEY (to_uid), PRIMARY KEY(id) ) Type={!_TABLE_TYPE!}"); - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)"); - - // Member menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)"); - - // Add config values - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"); - - // Add row(s) to user's data - 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 - // 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`"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`"); - break; - -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 - // 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 - switch ($EXT_VER) - { - 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 - // 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 - // 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 - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); - break; + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)"); - 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 generateUserProfileLink() ausgelagert."); - break; - - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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'); - - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Touring-Code wiederholen nach Touring-Code eingeben hin geändert."); - break; + // Member menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 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"); + // Add config values + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett geändert."); + // Add row(s) to user's data + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"); break; - 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."); + 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`"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`"); break; - 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... :-/"); + 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 '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."); + 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 '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."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // 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 + // 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 + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); + break; + + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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'); + + // 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 + // 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 + 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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')) { - // Automatically remove outdated or not displayed transactions - TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age')); - } - break; + default: // Do stuff when extension is loaded + if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) { + // Automatically remove outdated or not displayed transactions + TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age')); + } + break; } // diff --git a/inc/extensions/ext-usage.php b/inc/extensions/ext-usage.php index c9feacedb9..253ec886f6 100644 --- a/inc/extensions/ext-usage.php +++ b/inc/extensions/ext-usage.php @@ -50,45 +50,45 @@ 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) - // 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 '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 - // SQL commands to run - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'"); - break; + 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 - // SQL commands to run - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + break; -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 8b4a1c8b75..7fdd09ae57 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -50,9 +50,9 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.2', '0.1.3', '0 switch ($EXT_LOAD_MODE) { -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` ( + 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, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, @@ -61,8 +61,8 @@ INDEX (`userid`), INDEX (`cat_id`) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_data` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_data` ( `userid` BIGINT(22) NOT NULL AUTO_INCREMENT, `surname` VARCHAR(255) NOT NULL DEFAULT '', `family` VARCHAR(255) NOT NULL DEFAULT '', @@ -102,8 +102,8 @@ INDEX (`refid`), INDEX `status_mails` (`status`,`max_mails`) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_points` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_points` ( `id` BIGINT(22) NOT NULL AUTO_INCREMENT, `userid` BIGINT(22) NOT NULL DEFAULT 0, `ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, @@ -113,8 +113,8 @@ PRIMARY KEY (`id`), INDEX (`userid`) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_links` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_links` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -124,8 +124,8 @@ INDEX (`userid`), INDEX (`stats_id`) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -145,8 +145,8 @@ INDEX (`payment_id`), INDEX (`pool_id`) ) TYPE={!_TABLE_TYPE!}"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats_data` ( + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats_data` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown', @@ -157,198 +157,198 @@ INDEX (`userid`), INDEX (`stats_type`) ) TYPE={!_TABLE_TYPE!} COMMENT='Member statistics data'"); - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied löschen','Löschen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und löschen Sie nicht gleich.',1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen prüfen','Prüfen Sie hier neue Anmeldungen zu Ihrem System. Hier können Sie im Falle einer Fehler-Mail den Mitglied gleich wieder löschen!',2)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbestätigte Mails haben oder gegen Ihre AGBs verstossen haben über diesen Menüpunkt.',3)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie können dazu auch einen Kommentar mitsenden.',5)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes ändern.',6)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Menüpunkt können Sie die generierten Referals eines Mitgliedes auflisten.',7)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbestätigte Mails','Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.',8)"); - 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 - // 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`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`"); - break; - -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 - // SQL commands to run - ADD_EXT_SQL(""); - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - 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."); + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied löschen','Löschen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und löschen Sie nicht gleich.',1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen prüfen','Prüfen Sie hier neue Anmeldungen zu Ihrem System. Hier können Sie im Falle einer Fehler-Mail den Mitglied gleich wieder löschen!',2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbestätigte Mails haben oder gegen Ihre AGBs verstossen haben über diesen Menüpunkt.',3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie können dazu auch einen Kommentar mitsenden.',5)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes ändern.',6)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Menüpunkt können Sie die generierten Referals eines Mitgliedes auflisten.',7)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbestätigte Mails','Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.',8)"); + 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 '0.1.1': // SQL queries for v0.1.1 - // This update depends on sql_patches update! - 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 - 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 - // 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 - 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 - // 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 - // 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 - // 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 - // 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 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); - break; - - 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 - 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)"); - - // Update notes (these will be set as task text!) - 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 - 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 - // 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 - // 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 - // 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 - // 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 - // 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 - // 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 - 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 - // 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 - 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 - // 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."); + 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`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`"); break; - 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!)"); + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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"); - - // Update notes (these will be set as task text!) - 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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL(''); break; - 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).""); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)"); - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` ( + case 'update': // Update an extension + switch ($EXT_VER) + { + 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 + // This update depends on sql_patches update! + 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 + 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 + // 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 + 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 + // 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 + // 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 + // 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 + // 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 + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); + break; + + 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 + 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)"); + + // Update notes (these will be set as task text!) + 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 + 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 + // 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 + // 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 + // 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 + // 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 + // 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 + // 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 + 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 + // 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 + 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 + // 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 + // 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 + 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"); + + // Update notes (these will be set as task text!) + 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 + 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).""); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `email` VARCHAR(255) NOT NULL DEFAULT '', @@ -362,20 +362,20 @@ INDEX (`userid`), PRIMARY KEY(`id`) ) TYPE={!_TABLE_TYPE!} COMMENT='List of deleted users'"); - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet."); + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - break; + default: // Do stuff when extension is loaded + break; } // Keep this extension always active! diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index ce5edc68a3..9d03db33ff 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -45,10 +45,10 @@ 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) - // SQL commands to run - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` ( + 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` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, wernis_account VARCHAR(255) NOT NULL DEFAULT '', @@ -61,98 +61,98 @@ KEY(userid), PRIMARY KEY(id) ) TYPE={!_TABLE_TYPE!}"); - // Confiuration - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"); - - // User data - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"); - - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)"); - - // Member menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)"); - - // Guest menu - 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 - // 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'"); - ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis'"); - 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 - // 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 - // 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 - switch ($EXT_VER) - { - 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"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - - // Update notes (these will be set as task text!) - 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; + // Confiuration + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"); + + // User data + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"); + + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 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 ''"); + // Member menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)"); - // 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."); + // Guest menu + 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 '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'"); + 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'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'"); + break; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert."); + 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 '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'"); + 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; - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Ref-Id hinzugetan."); + case 'update': // Update an extension + switch ($EXT_VER) + { + 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"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + + // Update notes (these will be set as task text!) + 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 + 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 + 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 + 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!) + EXT_SET_UPDATE_NOTES("Fehlende Ref-Id hinzugetan."); + break; + } break; - } - break; -case 'modify': // When the extension got modified - break; + 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; + 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 - // Init array - $GLOBALS['wernis_data'] = array(); - break; + default: // Do stuff when extension is loaded + // Init array + $GLOBALS['wernis_data'] = array(); + break; } // diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index e03be7fc2c..8fe3925bf0 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -54,26 +54,26 @@ 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) - // 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"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); - ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); - - // Admin menu - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)"); - ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"); - - // Reload lock table - ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`"); - ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_yoomedia_reload` ( + 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"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); + ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); + + // Admin menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)"); + + // Reload lock table + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_yoomedia_reload` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT 'general', `y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -82,65 +82,65 @@ case 'register': // Do stuff when installation is running (modules.php?module=ad PRIMARY KEY (`id`), 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 - // 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 - // SQL commands to run - break; - -case 'deactivate': // Do stuff when admin deactivates this extension - // SQL commands to run - break; - -case 'update': // Update an extension - switch ($EXT_VER) - { - case '0.0.1': // SQL queries for v0.0.1 - ADD_EXT_SQL(""); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES(""); break; - } - break; -case 'modify': // When the extension got modified - break; + 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 + // SQL commands to run + break; + + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + break; + + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); + + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } + break; + + 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; + 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 - // The translation table - $GLOBALS['translation_tables']['yoomedia'] = array( - // Error messages + default: // Do stuff when extension is loaded + // The translation table + $GLOBALS['translation_tables']['yoomedia'] = array( + // Error messages 'error_codes' => array( - 1 => 'wrong_pass', - 2 => 'wrong_sid', - 3 => 'website_locked', - 4 => 'api_data_error', - 5 => 'requests_depleted', - 6 => 'zero_result', - 10 => 'incomplete_request' - ), - // For text mails + 1 => 'wrong_pass', + 2 => 'wrong_sid', + 3 => 'website_locked', + 4 => 'api_data_error', + 5 => 'requests_depleted', + 6 => 'zero_result', + 10 => 'incomplete_request' + ), + // For text mails 'textmail' => array( - 0 => 'id', - 1 => 'name', - 2 => 'reload', - 3 => 'wait', - 4 => 'remain', - 5 => 'pay', - 6 => 'text' - ) - ); - break; + 0 => 'id', + 1 => 'name', + 2 => 'reload', + 3 => 'wait', + 4 => 'remain', + 5 => 'pay', + 6 => 'text' + ) + ); + break; } // Keep this extension always active! diff --git a/inc/filters.php b/inc/filters.php index 098a2157f9..e5714e88b7 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -53,11 +53,11 @@ function INIT_FILTER_SYSTEM () { // Init the filter system (just some ideas) $GLOBALS['filters']['chains'] = array( - // Filters for pre-init phase + // Filters for pre-init phase 'preinit' => array(), - // Filters for post-init phase + // Filters for post-init phase 'postinit' => array(), - // Filters for shutdown phase + // Filters for shutdown phase 'shutdown' => array() ); @@ -100,7 +100,7 @@ ORDER BY `filter_id` ASC", __FUNCTION__, __LINE__); } // END - if } // END - while } // END - if - + // Free result SQL_FREERESULT($result); } // END - if @@ -313,9 +313,9 @@ function FILTER_FLUSH_FILTERS () { foreach ($filterArray as $filterFunction => $cnt) { // Construct and add the query ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1", - bigintval($cnt), - $filterName, - $filterFunction + bigintval($cnt), + $filterName, + $filterFunction )); } // END - foreach } // END - foreach @@ -462,7 +462,7 @@ function FILTER_UPDATE_LOGIN_DATA () { // Load last module and last online time $result = SQL_QUERY_ESC("SELECT last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(getUserId()), __FUNCTION__, __LINE__); + array(getUserId()), __FUNCTION__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -480,13 +480,13 @@ function FILTER_UPDATE_LOGIN_DATA () { // "what" not set? if (empty($GLOBALS['what'])) { // Fix it to default - $GLOBALS['what'] = "welcome"; - if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home'); + $GLOBALS['what'] = "welcome"; + if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home'); } // END - if // Update last module / online time SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_module`='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1", - array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__); + array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__); } else { // Destroy session, we cannot update! destroyUserSession(); diff --git a/inc/footer.php b/inc/footer.php index d822c4eb7f..49b2f4e831 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -49,18 +49,18 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') && // Output the generated HTML code or do nothing in direct-mode if (getTotalFatalErrors() > 0) { // Output fatal error messages - loadIncludeOnce("inc/fatal_errors.php"); + loadIncludeOnce('inc/fatal_errors.php'); } // END - if // Shall we display the copyright notice? - if ((!REQUEST_ISSET_GET(('frame'))) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && (getConfig('WRITE_FOOTER') == 'Y') && ($GLOBALS['header_sent'] == '2')) { + if ((!REQUEST_ISSET_GET(('frame'))) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && (getConfig('WRITE_FOOTER') == 'Y') && ($GLOBALS['header_sent'] == '2')) { // Backlink enabled? if ((getConfig('ENABLE_BACKLINK') == 'Y') || (isInstalling())) { // Copyright with backlink, thanks! :-) - LOAD_TEMPLATE("copyright_backlink"); + LOAD_TEMPLATE('copyright_backlink'); } else { // No backlink in Copyright note - LOAD_TEMPLATE("copyright"); + LOAD_TEMPLATE('copyright'); } } // END - if @@ -71,17 +71,17 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') && } // END - if // Load page footer - LOAD_TEMPLATE("page_footer"); + LOAD_TEMPLATE('page_footer'); // And the last closing HTML tag - OUTPUT_HTML(""); + OUTPUT_HTML(''); } // END - if // Footer has been reached $GLOBALS['footer_sent'] = 1; // Output HTML code -OUTPUT_HTML(""); +OUTPUT_HTML(''); // Shutdown shutdown(); diff --git a/inc/functions.php b/inc/functions.php index bc817b99d0..2276a0f42b 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -51,36 +51,36 @@ function OUTPUT_HTML ($HTML, $newLine = true) { // Yes, so we handle it as you have configured switch (getConfig('OUTPUT_MODE')) { - case 'render': - // That's why you don't need any \n at the end of your HTML code... :-) - if (constant('_OB_CACHING') == 'on') { - // Output into PHP's internal buffer - outputRawCode($HTML); - + case 'render': // That's why you don't need any \n at the end of your HTML code... :-) - if ($newLine) echo "\n"; - } else { - // Render mode for old or lame servers... - $OUTPUT .= $HTML; + if (constant('_OB_CACHING') == 'on') { + // Output into PHP's internal buffer + outputRawCode($HTML); - // That's why you don't need any \n at the end of your HTML code... :-) - if ($newLine) $OUTPUT .= "\n"; - } - break; + // That's why you don't need any \n at the end of your HTML code... :-) + if ($newLine) echo "\n"; + } else { + // Render mode for old or lame servers... + $OUTPUT .= $HTML; - case 'direct': - // If we are switching from render to direct output rendered code - if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != 'on')) { outputRawCode($OUTPUT); $OUTPUT = ''; } + // That's why you don't need any \n at the end of your HTML code... :-) + if ($newLine) $OUTPUT .= "\n"; + } + break; - // The same as above... ^ - outputRawCode($HTML); - if ($newLine) echo "\n"; - break; + case 'direct': + // If we are switching from render to direct output rendered code + if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != 'on')) { outputRawCode($OUTPUT); $OUTPUT = ''; } - default: - // Huh, something goes wrong or maybe you have edited config.php ??? - app_die(__FUNCTION__, __LINE__, "{--FATAL_ERROR--}: {--LANG_NO_RENDER_DIRECT--}"); - break; + // The same as above... ^ + outputRawCode($HTML); + if ($newLine) echo "\n"; + break; + + default: + // Huh, something goes wrong or maybe you have edited config.php ??? + app_die(__FUNCTION__, __LINE__, "{--FATAL_ERROR--}: {--LANG_NO_RENDER_DIRECT--}"); + break; } } elseif ((constant('_OB_CACHING') == 'on') && (isset($GLOBALS['footer_sent'])) && ($GLOBALS['footer_sent'] == 1)) { // Headers already sent? @@ -233,7 +233,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { if ($template == "member_support_form") { // Support request of a member $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(getUserId()), __FUNCTION__, __LINE__); + array(getUserId()), __FUNCTION__, __LINE__); // Is content an array? if (is_array($content)) { @@ -300,10 +300,10 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { if ((!empty($GLOBALS['what'])) && ((strpos($template, "_header") > 0) || (strpos($template, "_footer") > 0)) && (($mode == "guest/") || ($mode == "member/") || ($mode == "admin/"))) { // Select what depended header/footer template file for admin/guest/member area $file2 = sprintf("%s%s%s_%s.tpl", - $basePath, - $mode, - $template, - SQL_ESCAPE($GLOBALS['what']) + $basePath, + $mode, + $template, + SQL_ESCAPE($GLOBALS['what']) ); // Probe for it... @@ -548,28 +548,28 @@ function generateDateTime ($time, $mode = '0') { switch (getLanguage()) { - case 'de': // German date / time format - switch ($mode) { - case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break; - case '1': $ret = strtolower(date("d.m.Y - H:i", $time)); break; - case '2': $ret = date("d.m.Y|H:i", $time); break; - case '3': $ret = date("d.m.Y", $time); break; - default: - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); - break; - } - break; - - default: // Default is the US date / time format! - switch ($mode) { - case '0': $ret = date("r", $time); break; - case '1': $ret = date("Y-m-d - g:i A", $time); break; - case '2': $ret = date("y-m-d|H:i", $time); break; - case '3': $ret = date("y-m-d", $time); break; - default: - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); - break; - } + case 'de': // German date / time format + switch ($mode) { + case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break; + case '1': $ret = strtolower(date("d.m.Y - H:i", $time)); break; + case '2': $ret = date("d.m.Y|H:i", $time); break; + case '3': $ret = date("d.m.Y", $time); break; + default: + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); + break; + } + break; + + default: // Default is the US date / time format! + switch ($mode) { + case '0': $ret = date("r", $time); break; + case '1': $ret = date("Y-m-d - g:i A", $time); break; + case '2': $ret = date("y-m-d|H:i", $time); break; + case '3': $ret = date("y-m-d", $time); break; + default: + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode)); + break; + } } return $ret; } @@ -635,13 +635,13 @@ function translateComma ($dotted, $cut = true, $max = 0) { // Translate it now switch (getLanguage()) { - case 'de': - $dotted = number_format($dotted, $maxComma, ',', '.'); - break; + case 'de': + $dotted = number_format($dotted, $maxComma, ',', '.'); + break; - default: - $dotted = number_format($dotted, $maxComma, '.', ','); - break; + default: + $dotted = number_format($dotted, $maxComma, '.', ','); + break; } // Return translated value @@ -672,21 +672,21 @@ function translateGender ($gender) { function translateUserStatus ($status) { switch ($status) { - case 'UNCONFIRMED': - case 'CONFIRMED': - case 'LOCKED': - $ret = getMessage(sprintf("ACCOUNT_%s", $status)); - break; - - case '': - case null: - $ret = getMessage('ACCOUNT_DELETED'); - break; - - default: - DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); - $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status); - break; + case 'UNCONFIRMED': + case 'CONFIRMED': + case 'LOCKED': + $ret = getMessage(sprintf("ACCOUNT_%s", $status)); + break; + + case '': + case null: + $ret = getMessage('ACCOUNT_DELETED'); + break; + + default: + DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status)); + $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status); + break; } // Return it @@ -709,7 +709,7 @@ function DEREFERER ($URL) { function FRAMETESTER ($URL) { // Prepare frametester URL $frametesterUrl = sprintf("{!URL!}/modules.php?module=frametester&url=%s", - encodeString(compileUriCode($URL)) + encodeString(compileUriCode($URL)) ); return $frametesterUrl; } @@ -730,51 +730,6 @@ function generateCaptchaCode ($code, $type, $DATA, $uid) { return 'Code'; } -// "Getter" for language -function getLanguage () { - // Set default return value to default language from config - $ret = getConfig('DEFAULT_LANG'); - - // Init variable - $lang = ''; - - // Is the variable set - if (REQUEST_ISSET_GET('mx_lang')) { - // Accept only first 2 chars - $lang = substr(REQUEST_GET('mx_lang'), 0, 2); - } elseif (isset($GLOBALS['cache_array']['language'])) { - // Use cached - $ret = $GLOBALS['cache_array']['language']; - } elseif (!empty($lang)) { - // Check if main language file does exist - if (isFileReadable(constant('PATH') . 'inc/language/'.$lang.'.php')) { - // Okay found, so let's update cookies - setLanguage($lang); - } // END - if - } elseif (isSessionVariableSet('mx_lang')) { - // Return stored value from cookie - $ret = getSession('mx_lang'); - - // Fixes a warning before the session has the mx_lang constant - if (empty($ret)) $ret = getConfig('DEFAULT_LANG'); - } - - // Cache entry - $GLOBALS['cache_array']['language'] = $ret; - - // Return value - return $ret; -} - -// "Setter" for language -function setLanguage ($lang) { - // Accept only first 2 chars! - $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2); - - // Set cookie - setSession('mx_lang', $lang); -} - // Loads an email template and compiles it function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') { global $DATA, $_CONFIG; @@ -828,12 +783,12 @@ function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') { //* 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", - array(bigintval($UID)), __FUNCTION__, __LINE__); + array(bigintval($UID)), __FUNCTION__, __LINE__); } else { //* DEBUG: */ print __FUNCTION__."(".__LINE__."):NO-NICK!
    \n"; /// Load normal data $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", - array(bigintval($UID)), __FUNCTION__, __LINE__); + array(bigintval($UID)), __FUNCTION__, __LINE__); } // Fetch and merge data @@ -950,7 +905,7 @@ function redirectToUrl ($URL) { } // END - if // Three different debug ways... - //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL)); + /* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL)); //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, $URL); //* DEBUG: */ die($URL); @@ -1160,98 +1115,98 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') { } switch ($type) { - case "day": // Day - for ($idx = 1; $idx < 32; $idx++) { - $OUT .= "\n"; + } + } else { + // 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') { + // Use configured minimum age + $year = date('Y', time()) - getConfig('min_age'); + } else { + // Use fixed 16 years age + $year = date('Y', time()) - 16; + } - // Check if the default value is larger than minimum and bigger than actual year - if (($default > $minYear) && ($default >= $year)) { - for ($idx = $year; $idx < ($year + 11); $idx++) { + // Construct year selection list + for ($idx = $minYear; $idx <= $year; $idx++) { + $OUT .= "\n"; - } - } else { - // 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') { - // Use configured minimum age - $year = date('Y', time()) - getConfig('min_age'); - } else { - // Use fixed 16 years age - $year = date('Y', time()) - 16; - } + break; - // Construct year selection list - for ($idx = $minYear; $idx <= $year; $idx++) { + case "hour": + for ($idx = 0; $idx < 24; $idx++) { + if (strlen($idx) == 1) $idx = '0'.$idx; $OUT .= "