require($INC);
} // END - if
+// Init & set the include pool
+INIT_INC_POOL();
+SET_INC_POOL(GET_DIR_AS_ARRAY("inc/autopurge/", "purge-"));
+
// Run the filter
-runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/autopurge/", "purge-"));
+runFilterChain('load_includes');
// Run filters for extra autopurge
runFilterChain('extra_autopurge');
// Server-URL (DO NOT CHANGE THIS OR YOU CANNOT CHECK FOR UPDATES/EXTENSIONS!)
define('SERVER_URL', "http://www.mxchange.org");
-// Full version string: /([0-9]){1}\.([0-9]){1}\.([0-9]){1}(-(alpha|beta|pre|rc([1-3]))([0-9]+))?/
-// If you understand regular expressions ^^^ you may know how I versionize... ;-)
-define('FULL_VERSION', getActualVersion('Tag'));
-
// Replacement strings
$GLOBALS['replacer'] = array(
'userid' => "%uid%", // User-ID
define('START_YDAY', MAKE_TIME(0, 0, 0, time() - getConfig('one_day')));
define('START_TDAY', MAKE_TIME(0, 0, 0, time()));
-// Current SVN revision and date
-define('CURR_SVN_REVISION', getActualVersion('Revision'));
-define('CURR_SVN_DATE' , getActualVersion('Date'));
-
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
// Load the extension and maybe found language and function files.
function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = "", $EXT_VER = "", $dry_run = false) {
- global $INC_POOL;
-
// Init array
- $INC_POOL = array();
+ INIT_INC_POOL();
+
+ // Set current extension name
+ EXT_SET_CURR_NAME($ext_name);
+
+ // Init EXT_UPDATE_DEPENDS
+ EXT_INIT_UPDATE_DEPENDS();
+
+ // Init current extension name list
+ INIT_EXT_SQLS();
// Is the extension already loaded?
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Loading extension {$ext_name}, mode={$EXT_LOAD_MODE}, ver={$EXT_VER}.");
// Extensions are not always active by default
EXT_SET_ALWAYS_ACTIVE("N");
- // By default an extension update does not depend on other extensions
- EXT_SET_UPDATE_DEPENDS("");
-
// Extension update notes
EXT_SET_UPDATE_NOTES("");
}
// Registeres an extension and possible update depencies
-function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = true) {
- global $INC_POOL;
-
+function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = true) {
// This shall never do a non-admin user!
if (!IS_ADMIN()) return false;
// Is this extension already installed?
if (EXT_IS_ACTIVE($ext_name)) return false;
+ // Set current extension name
+ EXT_SET_CURR_NAME($ext_name);
+
+ // Init EXT_UPDATE_DEPENDS
+ EXT_INIT_UPDATE_DEPENDS();
+
// Is the task id zero? Then we need to auto-fix it here
if ($task_id == 0) {
// Try to find the task
- $task_id = DETERMINE_EXTENSION_TASK_ID($ext_name);
+ $task_id = DETERMINE_EXTENSION_TASK_ID(EXT_GET_CURR_NAME());
// Still zero and not in dry-run?
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_name
+ EXT_GET_CURR_NAME()
));
} // END - if
} // END - if
// Init queries and notes
- INIT_SQLS();
+ INIT_EXT_SQLS();
EXT_INIT_NOTES();
// Init variables
$ret = false;
- $INC_POOL = array();
+ $test = false;
+ INIT_INC_POOL();
// By default we have no failures
EXT_SET_REPORTS_FAILURE(false);
// Does this extension exists?
- if (LOAD_EXTENSION($ext_name, "register", "", $dry_run)) {
+ //* DEBUG: */ print __LINE__.":".EXT_GET_CURR_NAME()."<br />\n";
+ if (LOAD_EXTENSION(EXT_GET_CURR_NAME(), "register", "", $dry_run)) {
// And run possible updates
+ //* DEBUG: */ print __LINE__.":".EXT_GET_CURR_NAME()."<br />\n";
$history = EXT_GET_VER_HISTORY();
foreach ($history as $ver) {
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name={$ext_name}, ext_ver={$ver}");
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name={EXT_GET_CURR_NAME()}, ext_ver={$ver}");
// Load extension in update mode
- LOAD_EXTENSION($ext_name, "update", $ver, $dry_run);
+ LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $ver, $dry_run);
// Add update notes to our output
ADD_EXTENSION_NOTES($ver);
} // END - foreach
// Does this extension depends on an outstanding update of another update?
- if (EXT_GET_UPDATE_DEPENDS() != "") {
- // Backup SQL commands and clear current
- $SQLs2 = GET_SQLS();
- INIT_SQLS();
- $test = false;
- $ext_update = EXT_GET_UPDATE_DEPENDS();
+ for ($dmy = EXT_GET_UPDATE_ITERATOR(); EXT_GET_UPDATE_ITERATOR() < EXT_COUNT_UPDATE_DEPENDS();) {
+ // Get next update
+ $ext_update = EXT_GET_ITERATOR_UPDATE_DEPENDS();
+
+ // Increment here to avoid endless loop
+ EXT_INCREMENT_UPDATE_INTERATOR();
// Check for required file
if (LOAD_EXTENSION($ext_update, "register", "", $dry_run)) {
// Entry found?
if ($task > 0) {
// Try to register the extension
- $test = EXTENSION_REGISTER($ext_update, $task, $dry_run, false);
+ //* DEBUG: */ print __LINE__.sprintf(":ext_update=%s,task=%s<br />\n", $ext_update, $task);
+ $test = REGISTER_EXTENSION($ext_update, $task, $dry_run, false);
+ //* DEBUG: */ var_dump($test);
} // END - if
} elseif ($ext_ver != EXT_GET_VERSION()) {
// Ok, update this extension now
// But this is fine for the first time...
}
- // Finally restore previous SQLs
- SET_SQLS($SQLs2); unset($SQLs2);
- } else {
- // Does not depend on an other extension
+ // Restore the current extension name
+ EXT_SET_CURR_NAME($ext_name);
+ } // END - for
+
+ // Is there no update?
+ if (EXT_COUNT_UPDATE_DEPENDS(EXT_GET_CURR_NAME()) == 0) {
+ // Then test is passed!
$test = true;
- }
+ } // END - if
// Switch back to register mode
$EXT_LOAD_MODE = "register";
// Remains true if extension registration reports no failures
+ //* DEBUG: */ print __LINE__.":".EXT_GET_CURR_NAME();
+ //* DEBUG: */ var_dump($test);
$test = (($test === true) && (EXT_GET_REPORTS_FAILURE() === false));
+ //* DEBUG: */ var_dump($test);
// Does everthing before wents ok?
- if ($test) {
+ if ($test === true) {
// "Dry-run-mode" activated?
- if (!$dry_run) {
+ if ((!$dry_run) && (!EXT_IS_ON_REMOVAL_LIST())) {
+ //* DEBUG: */ print __LINE__.": ext_name=".EXT_GET_CURR_NAME()."<br />\n";
+ // Init SQLs and transfer ext->generic
+ INIT_SQLS();
+ SET_SQLS(GET_EXT_SQLS());
+
// Run installation pre-installation filters
runFilterChain('pre_extension_installed', array('dry_run' => $dry_run));
// Register extension
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_extensions` (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')",
- array($ext_name, EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FILE__, __LINE__);
+ array(EXT_GET_CURR_NAME(), EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FILE__, __LINE__);
// Remove cache file(s) if extension is active
- runFilterChain('post_extension_installed', array('ext_name' => $ext_name, 'task_id' => $task_id, 'inc_pool' => $INC_POOL));
+ runFilterChain('post_extension_installed', array('ext_name' => EXT_GET_CURR_NAME(), 'task_id' => $task_id));
// In normal mode return a true on success
$ret = true;
- } else {
- // Rewrite SQL command to keep { and } inside
+ } elseif ($dry_run) {
+ // Rewrite SQL command to keep { and } inside for dry-run
foreach (GET_SQLS() as $key => $sql) {
$sql = str_replace('{', "{", str_replace('}', "}", $sql));
SET_SQL_KEY($key, $sql);
// Remove all SQL commands
UNSET_SQLS();
+ } else {
+ // Extension has been removed for updates, so all is fine!
+ $ret = true;
}
} else {
// No, an error occurs while registering extension :-(
+ //* DEBUG: */ print __LINE__.":".EXT_GET_CURR_NAME()."<br />\n";
$ret = false;
}
- } elseif (($task_id > 0) && (!empty($ext_name))) {
+ } elseif (($task_id > 0) && (EXT_GET_CURR_NAME() != "")) {
// 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)), __FILE__, __LINE__);
}
// Is this the sql_patches?
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":{$ext_name}/{$EXT_LOAD_MODE}");
- if (($ext_name == "sql_patches") && (($EXT_LOAD_MODE == "register") || ($EXT_LOAD_MODE == "remove")) && (!$dry_run) && ($test)) {
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":{EXT_GET_CURR_NAME()}/{$EXT_LOAD_MODE}");
+ if ((EXT_GET_CURR_NAME() == "sql_patches") && (($EXT_LOAD_MODE == "register") || ($EXT_LOAD_MODE == "remove")) && (!$dry_run) && ($test)) {
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": LOAD!");
if ($logout === true) {
// Then redirect to logout
// This shall never do a non-admin user!
if (!IS_ADMIN()) return false;
+ // Get extension's name
+ $ext_name = GET_EXT_NAME($ext_id);
+
+ // If it is not set then maybe there is no extension for that ID number
+ if ($ext_name == "") return false;
+
+ // Set current SQL name
+ EXT_SET_CURR_NAME($ext_name);
+
// Init array
- INIT_SQLS();
+ INIT_EXT_SQLS();
// By default no SQL has been executed
$sqlRan = false;
- // Get extension's name
- $ext_name = GET_EXT_NAME($ext_id);
- // If it is not set then maybe there is no extension for that ID number
- if (empty($ext_name)) return false;
-
// Load extension in detected mode
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]={$ext_name}");
- LOAD_EXTENSION($ext_name, $load_mode, "", false);
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]={EXT_GET_CURR_NAME()}");
+ LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, "", false);
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":SQLs::count=".COUNT_SQLS()."");
if ((IS_SQLS_VALID() && (COUNT_SQLS() > 0))) {
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_name), __FILE__, __LINE__);
+ array(EXT_GET_CURR_NAME()), __FILE__, __LINE__);
} // END - if
} // END - if
// Remove cache file(s) if extension is active
if (((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($load_mode == "activate") || ($load_mode == "deactivate"))) {
// Run filters
- runFilterChain('post_extension_run_sql', $ext_name);
+ runFilterChain('post_extension_run_sql', EXT_GET_CURR_NAME());
} // END - if
// Is this the sql_patches?
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": {$ext_id}/{$ext_name}/{$load_mode}");
- if (($ext_name == "sql_patches") && (($load_mode == "register") || ($load_mode == "remove"))) {
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": {$ext_id}/{EXT_GET_CURR_NAME()}/{$load_mode}");
+ if ((EXT_GET_CURR_NAME() == "sql_patches") && (($load_mode == "register") || ($load_mode == "remove"))) {
// Then redirect to logout
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": LOAD!");
LOAD_URL("modules.php?module=admin&logout=1&".$load_mode."=sql_patches");
// Count cache hits
incrementConfigEntry('cache_hits');
} elseif (isset($GLOBALS['ext_loaded'][$ext_name])) {
- // Extension is loaded!
- die("LOADED:$ext_name");
+ // @TODO Extension is loaded, what next?
+ mxchange_die("LOADED:$ext_name");
} elseif (($ext_name == "cache") || (GET_EXT_VERSION("cache") == "")) {
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "DB! ext_name={$ext_name}");
// Load from database
SQL_FREERESULT($result);
// Write cache array
- //* DEBUG: */ echo $ext_name."[DB]: {$active}");
+ //* DEBUG: */ echo $ext_name."[DB]: {$active}<br />\n";
$GLOBALS['cache_array']['extensions']['ext_active'][$ext_name] = $active;
} else {
// Extension not active!
- //* DEBUG: */ echo $ext_name.": Not active!");
+ //* DEBUG: */ echo $ext_name.": Not active!<br />\n";
$GLOBALS['cache_array']['extensions']['ext_active'][$ext_name] = "N";
}
// Updates a given extension with current extension version to latest version
function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
- // This shall never do a non-admin user!
- global $INC_POOL;
+ // Only admins are allowed to update extensions
+ if ((!IS_ADMIN()) || (empty($ext_name))) return false;
+
+ // Set current SQL name
+ EXT_SET_CURR_NAME($ext_name);
// Init arrays
- INIT_SQLS();
+ INIT_EXT_SQLS();
EXT_INIT_NOTES();
- $INC_POOL = array();
-
- // Only admins are allowed to update extensions
- if ((!IS_ADMIN()) || (empty($ext_name))) return false;
+ INIT_INC_POOL();
// Load extension in test mode
LOAD_EXTENSION($ext_name, "test", $ext_ver, $dry_run);
$history = EXT_GET_VER_HISTORY();
// Remove old SQLs array to prevent possible bugs
- INIT_SQLS();
+ INIT_EXT_SQLS();
// Check if version is updated
if (((EXT_GET_VERSION() != $ext_ver) || ($dry_run)) && (is_array($history))) {
// And load SQL queries in order of version history
for ($idx = ($start + 1); $idx < count($history); $idx++) {
// Set extension version
- $GLOBALS['cache_array']['update_ver'][$ext_name] = $history[$idx];
+ $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()] = $history[$idx];
// Load again...
- LOAD_EXTENSION($ext_name, "update", $GLOBALS['cache_array']['update_ver'][$ext_name], $dry_run);
+ LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run);
if (EXT_GET_UPDATE_DEPENDS() != "") {
// Backup current SQL queries
- $GLOBALS['cache_array']['update_sqls'][$ext_name] = GET_SQLS();
+ $GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()] = GET_SQLS();
// Is the extension there?
if (GET_EXT_VERSION(EXT_GET_UPDATE_DEPENDS()) != "") {
$test = EXTENSION_UPDATE(EXT_GET_UPDATE_DEPENDS(), GET_EXT_VERSION(EXT_GET_UPDATE_DEPENDS()), $dry_run);
} else {
// Register new extension
- $test = EXTENSION_REGISTER(EXT_GET_UPDATE_DEPENDS(), 0, $dry_run, false);
+ $test = REGISTER_EXTENSION(EXT_GET_UPDATE_DEPENDS(), 0, $dry_run, false);
}
// Restore previous SQL queries
- SET_SQLS($GLOBALS['cache_array']['update_sqls'][$ext_name]);
- unset($GLOBALS['cache_array']['update_sqls'][$ext_name]);
+ SET_SQLS($GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()]);
+ unset($GLOBALS['cache_array']['update_sqls'][EXT_GET_CURR_NAME()]);
} // END - if
// Add notes
- ADD_EXTENSION_NOTES($GLOBALS['cache_array']['update_ver'][$ext_name]);
+ ADD_EXTENSION_NOTES($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()]);
} // END - for
// In real-mode execute any existing includes
if (!$dry_run) {
- $GLOBALS['cache_array']['inc_pool'][$ext_name] = $INC_POOL;
- runFilterChain('load_includes', $INC_POOL);
- $INC_POOL = $GLOBALS['cache_array']['inc_pool'][$ext_name];
- unset($GLOBALS['cache_array']['inc_pool'][$ext_name]);
+ $GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()] = GET_INC_POOL();
+ runFilterChain('load_includes');
+ SET_INC_POOL($GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()]);
+ unset($GLOBALS['cache_array']['inc_pool'][EXT_GET_CURR_NAME()]);
} // END - if
// Run SQLs
if (!$dry_run) {
// Create task
- CREATE_EXTENSION_UPDATE_TASK(GET_CURRENT_ADMIN_ID(), $ext_name, $GLOBALS['cache_array']['update_ver'][$ext_name], SQL_ESCAPE(EXT_GET_NOTES(EXT_GET_NOTES())));
+ CREATE_EXTENSION_UPDATE_TASK(GET_CURRENT_ADMIN_ID(), EXT_GET_CURR_NAME(), $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], SQL_ESCAPE(EXT_GET_NOTES(EXT_GET_NOTES())));
// 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_name], $ext_name), __FILE__, __LINE__);
+ array($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], EXT_GET_CURR_NAME()), __FILE__, __LINE__);
// Remove arrays
UNSET_SQLS();
- unset($GLOBALS['cache_array']['update_ver'][$ext_name]);
+ unset($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()]);
// Run filters on success extension update
- runFilterChain('extension_update', $ext_name);
+ runFilterChain('extension_update', EXT_GET_CURR_NAME());
} // END - if
} // END - if
}
}
// Setter for EXT_UPDATE_DEPENDS flag
-function EXT_SET_UPDATE_DEPENDS ($updateDepends) {
- $GLOBALS['ext_update_depends'] = (string) $updateDepends;
+function EXT_ADD_UPDATE_DEPENDS ($updateDepends) {
+ // Is the update depency empty? (NEED TO BE FIXED!)
+ if (empty($updateDepends)) {
+ // Please report this bug!
+ debug_report_bug("updateDepends is left empty!");
+ } // END - if
+
+ // Is it not yet added?
+ if (!in_array($updateDepends, $GLOBALS['ext_running_updates'])) {
+ //* DEBUG */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."/".$updateDepends."<br />\n";
+ // Add it to the list of extension update depencies map
+ $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][] = (string) $updateDepends;
+
+ // Remember it in the list of running updates
+ $GLOBALS['ext_running_updates'][] = $updateDepends;
+ } // END - if
+}
+
+// Init EXT_UPDATE_DEPENDS flag
+function EXT_INIT_UPDATE_DEPENDS () {
+ //* DEBUG: */ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+
+ // Init update depency map
+ $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()] = array();
+
+ // Init running updates array
+ EXT_INIT_RUNNING_UPDATES();
+}
+
+// Initializes the list of running updates
+function EXT_INIT_RUNNING_UPDATES () {
+ // Auto-init ext_running_updates
+ if (!isset($GLOBALS['ext_running_updates'])) {
+ $GLOBALS['ext_running_updates'] = array();
+ } // END - if
}
// Getter for EXT_UPDATE_DEPENDS flag
function EXT_GET_UPDATE_DEPENDS () {
- return $GLOBALS['ext_update_depends'];
+ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+ return $GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()];
+}
+
+// Getter for next iterator depency
+function EXT_GET_ITERATOR_UPDATE_DEPENDS () {
+ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+ return ($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][EXT_GET_UPDATE_ITERATOR()]);
+}
+
+// Counter for extension update depencies
+function EXT_COUNT_UPDATE_DEPENDS () {
+ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+ return count($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]);
+}
+
+// Removes given extension from update denpency list
+function EXT_REMOVE_UPDATE_DEPENDS ($ext_name) {
+ // Look it up
+ $key = array_search($ext_name, EXT_GET_UPDATE_DEPENDS());
+
+ // Is it valid?
+ if ($key !== false) {
+ // Then remove it
+ unset($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()][$key]);
+
+ // And sort the array
+ ksort($GLOBALS['ext_update_depends'][EXT_GET_CURR_NAME()]);
+ } // END - if
+}
+
+// Init iterator for update depencies
+function EXT_INIT_UPDATE_ITERATOR () {
+ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+ $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()] = 0;
+}
+
+// Getter for depency iterator
+function EXT_GET_UPDATE_ITERATOR () {
+ // Auto-init iterator
+ if (!isset($GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()])) EXT_INIT_UPDATE_ITERATOR();
+
+ // Return it
+ print __FUNCTION__.":".EXT_GET_CURR_NAME()."/".$GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]."<br />\n";
+ return $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()];
+}
+
+// Increments the update iterator
+function EXT_INCREMENT_UPDATE_INTERATOR () {
+ print __FUNCTION__.":".EXT_GET_CURR_NAME()."<br />\n";
+ $GLOBALS['ext_depend_iterator'][EXT_GET_CURR_NAME()]++;
}
// Setter for EXT_REPORTS_FAILURE flag
function EXT_SET_REPORTS_FAILURE ($reportsFailure) {
- $GLOBALS['ext_reports_failure'] = (string) $reportsFailure;
+ $GLOBALS['ext_reports_failure'] = (bool) $reportsFailure;
}
// Getter for EXT_REPORTS_FAILURE flag
return $GLOBALS['ext_notes'];
}
+// Setter for current extension name
+function EXT_SET_CURR_NAME ($ext_name) {
+ $GLOBALS['curr_ext_name'] = (string) $ext_name;
+}
+
+// Getter for current extension name
+function EXT_GET_CURR_NAME () {
+ if (isset($GLOBALS['curr_ext_name'])) {
+ return $GLOBALS['curr_ext_name'];
+ } // END - if
+
+ // Not set!
+ debug_report_bug(__FUNCTION__.": curr_ext_name not initialized. Please execute INIT_EXT_SQLS() before calling this function.");
+}
+
+// Init SQLs array for current extension
+function INIT_EXT_SQLS () {
+ $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()] = array();
+}
+
+// Adds SQLs to the SQLs array but "assigns" it with current extension name
+function ADD_EXT_SQL ($sql) {
+ $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()][] = $sql;
+}
+
+// Getter for SQLs array for current extension
+function GET_EXT_SQLS () {
+ // Output debug backtrace if not found (SHOULD NOT HAPPEN!)
+ 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()
+ ));
+ } // END - if
+
+ // Return the array
+ return $GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()];
+}
+
+// Removes SQLs for current extension
+function UNSET_EXT_SQLS () {
+ unset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()]);
+}
+
+// Auto-initializes the removal list
+function EXT_INIT_REMOVAL_LIST () {
+ // Is the remove list there?
+ if (!isset($GLOBALS['ext_update_remove'])) {
+ // Then create it
+ $GLOBALS['ext_update_remove'] = array();
+ } // END - if
+}
+
+// Checks wether the current extension is on the removal list
+function EXT_IS_ON_REMOVAL_LIST () {
+ // Init removal list
+ EXT_INIT_REMOVAL_LIST();
+
+ // Is it there?
+ return (in_array(EXT_GET_CURR_NAME(), $GLOBALS['ext_update_remove']));
+}
+
+// Adds the current extension to the removal list
+function EXT_ADD_CURRENT_TO_REMOVAL_LIST () {
+ // Simply add it
+ $GLOBALS['ext_update_remove'][] = EXT_GET_CURR_NAME();
+}
+
+// Getter for removal list
+function EXT_GET_REMOVAL_LIST () {
+ // Return the removal list
+ return $GLOBALS['ext_update_remove'];
+}
+
//
?>
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active'");
+ 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);
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1");
break;
case "update": // Update an extension
break;
case "0.0.5": // SQL queries for v0.0.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<strong>Heute Online</strong> im Gastbereich) vornehmen.', 8)");
+ 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 (<strong>Heute Online</strong> 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.");
case "0.0.9": // SQL queries for v0.0.9
// Make update depending on "online"
- EXT_SET_UPDATE_DEPENDS("online");
+ EXT_ADD_UPDATE_DEPENDS("online");
// Register filter
REGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, $dry_run);
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_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_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')");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins'");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl");
+ 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);
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.2": // SQL queries for v0.2
- ADD_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')");
+ 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 "0.3": // SQL queries for v0.3
// Add admin menu
- ADD_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')");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
// Default is deny everything
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".get_session('admin_login')."' LIMIT 1");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_acls` (
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".get_session('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 '',
break;
case "0.3.1": // SQL queries for v0.3.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_mails` (
+ 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_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')");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template LIKE '% %'");
+ 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.");
break;
case "0.5.6": // SQL queries for v0.5.6
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+ 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 <strong>admins</strong> und (kommender) <strong>contact</strong>.");
break;
case "0.5.8": // SQL queries for v0.5.8
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+ 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.6.6": // SQL queries for v0.5.6
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+ 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 <strong>admins</strong> und (kommender) <strong>contact</strong>.");
break;
case "0.6.7": // SQL queries for v0.6.7
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'");
+ 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 <strong>admins</strong> und (kommender) <strong>contact</strong>. Beseitigung eines Fehlers <strong>HTTP_POSR_VARS</strong> beim Ändern von Administratoren.");
break;
case "0.6.9": // SQL queries for v0.6.9
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (what='' OR `what` IS NULL) LIMIT 1");
+ 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.");
case "0.7.1": // SQL queries for v0.7.1
// Update depends on sql_patches
- EXT_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Add filters
REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run);
break;
case "0.7.2": // SQL queries for v0.7.2
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP login_failtures");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP last_failture");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
+ 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.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Remove all other themes
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Remove all other menu themes
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
}
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP ap_notified");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.1": // SQL queries for v0.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'");
- ADD_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_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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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.9": // SQL queries for v0.1.9
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'");
+ 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).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
break;
case "0.2.0": // SQL queries for v0.2.0
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ 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.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
break;
case "0.3.3": // SQL queries for v0.3.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'");
+ 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.");
// 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
- $INC_POOL[] = sprintf("%sinc/autopurge.php", constant('PATH'));
+ ADD_INC_TO_POOL(sprintf("%sinc/autopurge.php", constant('PATH')));
}
break;
}
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` (
+ 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,
INDEX (account_locked),
INDEX (last_tan_stamp)
) TYPE={!_TABLE_TYPE!}");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
- ADD_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,
INDEX (to_account_id, from_account_id),
INDEX (day_bookkeeping, day_available)
) TYPE={!_TABLE_TYPE!}");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
- ADD_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,
// 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` (
+ 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,
) TYPE={!_TABLE_TYPE!}");
// Admin menu queries
- ADD_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_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_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_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_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_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_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_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_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_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_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_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_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_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)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8");
+ 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_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_beg_ips` (
+ 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',
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2'");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='beg' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='beg' LIMIT 1");
+ 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
break;
case "0.0.3": // SQL queries for v0.0.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'");
+ 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.6": // SQL queries for v0.0.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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 <u>admin_config_beg.tpl</u> (und pro!) nicht vergessen, zu aktualisieren.");
break;
case "0.0.8": // SQL queries for v0.0.8
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
+ 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.");
case "0.1.2":
// SQL queries for v0.1.2
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')");
- ADD_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')");
+ 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.5": // SQL queries for v0.1.5
- ADD_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");
+ 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.7": // SQL queries for v0.1.7
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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 <strong>Einstellungen --> Bettel-Link/-rallye</strong> 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.2.2": // SQL queries for v0.2.2
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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.4": // SQL queries for v0.2.4
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1");
+ 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.6": // SQL queries for v0.2.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;");
+ 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.");
// 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
- $INC_POOL[] = sprintf("%sinc/mails/beg_mails.php", constant('PATH'));
+ ADD_INC_TO_POOL(sprintf("%sinc/mails/beg_mails.php", constant('PATH')));
} // END - if
break;
}
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
break;
case "0.2": // SQL queries for v0.2
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_birthday` (
+ 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,
KEY(userid),
PRIMARY KEY(id)
) Type={!_TABLE_TYPE!}");
- ADD_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)");
+ 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.3.6": // SQL queries for v0.3.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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.9": // SQL queries for v0.3.9
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+ 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");
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
- $INC_POOL[] = sprintf("%sinc/mails/birthday_mails.php", constant('PATH'));
+ ADD_INC_TO_POOL(sprintf("%sinc/mails/birthday_mails.php", constant('PATH')));
}
break;
}
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus` (
+ 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 '',
KEY(cat_id),
PRIMARY KEY (id)
)TYPE={!_TABLE_TYPE!}");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD INDEX (bonus_id)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ if (EXT_IS_ACTIVE("html_mail")) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='show_bonus' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='show_bonus' LIMIT 1");
+ 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
break;
case "0.2.0": // SQL queries for v0.2.0
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''");
+ 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 <a href=\"{!URL!}/modules.php?module=admin&what=updates\">Updates prüfen</a> herunter.");
break;
case "0.2.1": // SQL queries for v0.2.1
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1");
- ADD_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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` (
+ 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,
break;
case "0.2.3": // SQL queries for v0.2.3
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)");
+ 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.5": // SQL queries for v0.2.5
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
+ 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 <u>{!MYSQL_PREFIX!}_bonus_urls</u> und <u>{!MYSQL_PREFIX!}_bonus_customer</u> entfernt, da dies bald von der Erweiterung <u>paidlinks</u> erledigt wird.");
break;
case "0.2.8": // SQL queries for v0.2.8
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET timestamp='0' WHERE timestamp='0000000000'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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.3.4": // SQL queries for v0.3.4
- ADD_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)");
+ 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 <u>Aktiv-Rallye-Teilnehmer</u> hinzugefügt, inklusive manuelle Vorbereitung der Vergütung.");
break;
case "0.3.5": // SQL queries for v0.3.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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.4.0": // SQL queries for v0.4.0
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+ 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.4": // SQL queries for v0.4.4
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'");
// 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.<br />Template <u>admin_config_bonus_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!<br />Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben.");
break;
case "0.4.7": // SQL queries for v0.4.7
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0");
+ 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.");
$mark = mktime(0, 0, 0, $curr, 1, date('Y', time()));
// Update accounts which are not active last months
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data`
+ 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");
break;
case "0.6.4": // SQL queries for v0.6.4
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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.8": // SQL queries for v0.6.8
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ 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.7": // SQL queries for v0.7.7
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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.8.2": // SQL queries for v0.8.2
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1");
+ 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.7": // SQL queries for v0.8.7
- ADD_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)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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.");
// 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) $INC_POOL[] = sprintf("%sinc/stats_bonus.php", constant('PATH'));
- $INC_POOL[] = sprintf("%sinc/monthly/monthly_bonus.php", constant('PATH'));
+ 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
- $INC_POOL[] = sprintf("%sinc/reset/reset_bonus.php", constant('PATH'));
+ 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
- $INC_POOL[] = sprintf("%sinc/mails/bonus_mails.php", constant('PATH'));
+ ADD_INC_TO_POOL(sprintf("%sinc/mails/bonus_mails.php", constant('PATH')));
}
break;
}
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Configuration entries
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3)."");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_book`(
+ 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',
) TYPE={!_TABLE_TYPE!} COMMENT='Member points booking table'");
// Admin menu
- ADD_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_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)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN ('config_booking','list_booking')");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='booking'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1");
break;
case "modify": // When the extension got modified
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0");
- ADD_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)");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_cache','cache_stats')");
+ 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);
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
break;
case "0.0.7": // SQL queries for v0.0.7
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_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)");
+ 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.1.3": // SQL queries for v0.1.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ 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.8": // SQL queries for v0.1.8
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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.");
case "0.2.0": // SQL queries for v0.2.0
// This update depends on sql_patches
- EXT_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Die Erweiterung hängt nun von der <strong>sql_patches</strong> ab.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` (
+ 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',
KEY(code),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
// Admin menu
- ADD_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_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_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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Table for debug log entries
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log` (
+ 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',
) TYPE={!_TABLE_TYPE!} COMMENT='Debug log data'");
// Table against debug log abuse
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_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',
) TYPE={!_TABLE_TYPE!} COMMENT='Debug log abuse'");
// Table on relay/server for client exchanges
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client` (
+ 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 '',
) TYPE={!_TABLE_TYPE!} COMMENT='Debug clients'");
// Add this exchange as first client
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client_log` (
+ 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,
) TYPE={!_TABLE_TYPE!} COMMENT='Debug client <-> log connection'");
// Guest menus
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)");
+ 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_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 <strong>inc/cache/</strong> befindet.',10)");
- ADD_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 <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)");
- ADD_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_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_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_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)");
+ 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 <strong>inc/cache/</strong> 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 <em>debug.log</em> 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5");
+ 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_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Doubler table
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_doubler` (
+ 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,
// --- SETTINGS ---
//
// Minimum points to double
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000");
// Referal percents
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
//
// --- MENU SYSTEMS ---
//
// Admin menu
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)");
- ADD_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='doubler' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='doubler' LIMIT 1");
break;
case "update": // Update an extension
case "0.0.2": // SQL queries for v0.0.2
// Total used points
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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.");
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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_own ENUM('Y','N') NOT NULL 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.6": // SQL queries for v0.0.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ 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.<br />Template <u>admin_config_doubler_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
break;
case "0.1.4": // SQL queries for v0.1.4
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1");
+ 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.");
default: // Do stuff when extension is loaded
if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) {
// So let's check for points
- $INC_POOL[] = sprintf("%sinc/doubler_send.php", constant('PATH'));
+ ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH')));
}
break;
}
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Create database
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_holidays` (
+ 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,
) TYPE={!_TABLE_TYPE!}");
// Add default values to config
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
// Add member menu
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')");
+ 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_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')");
- ADD_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_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.')");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1");
break;
case "update": // Update an extension
break;
case "0.1.3": // SQL queries for v0.1.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'");
+ 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)."'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!");
break;
case "0.1.4": // SQL queries for v0.1.4
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.");
break;
case "0.1.5": // SQL queries for v0.1.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
break;
case "0.1.6": // SQL queries for v0.1.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Fehlende Tabellenspalte hinzugefügt.");
break;
case "0.1.8": // SQL queries for v0.1.8
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')");
+ 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_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert.");
break;
case "0.1.9": // SQL queries for v0.1.9
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
break;
case "0.2.0": // SQL queries for v0.2.0
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (what='' OR `what` IS NULL) LIMIT 1");
+ 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.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1");
break;
case "update": // Update an extension
case "0.1.6":
// Dependency is needed for ext-registration!! (want to alter a non existent Table)
- EXT_SET_UPDATE_DEPENDS("bonus");
+ EXT_ADD_UPDATE_DEPENDS("bonus");
EXT_SET_UPDATE_NOTES("Abhänigkeit von der Erweiterung <strong>bonus</strong> hinzugefügt.");
break;
}
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DELETE FROM `{!_MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` DROP `provider`;");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (`code`,`descr`,`provider`)
+ 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'),
('ZW', 'Zimbabwe', 'ext-iso3166');");
// This extension depends on the country extension
- EXT_SET_UPDATE_DEPENDS("country");
+ EXT_ADD_UPDATE_DEPENDS("country");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Erste Liste von 243 Ländercodes nach ISO 3166. (Quelle: Selfhtml)<br />Alle Länder sind zuerst deaktiviert. Achtung DE könnte doppelt vorkommen.<br />Ein Aktivieren/Deaktivieren lässt alle Länder beim Registrieren anzeigen oder nicht Anzeigen.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'");
break;
case "activate": // Do stuff when admin activates this extension
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='mailid' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='mailid' LIMIT 1");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='mailid' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='mailid' LIMIT 1");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';");
- ADD_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')");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
case "0.0.4": // SQL queries for v0.0.4
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` (
+ 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)
break;
case "0.0.7": // SQL queries for v0.0.7
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'");
- ADD_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)");
+ 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)<br />
break;
case "0.0.9": // SQL queries for v0.0.9
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')");
+ 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.");
if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) {
if ((!$dry_run) && ($EXT_LOAD_MODE == "update") && ($EXT_VER == "0.0.4")) {
// Add auto-check file
- $INC_POOL[] = sprintf("%sinc/gen_mediadata.php", constant('PATH'));
+ ADD_INC_TO_POOL(sprintf("%sinc/gen_mediadata.php", constant('PATH')));
} // END - if
} // END - if
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_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_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)");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
break;
case "0.0.8": // SQL queries for v0.0.8
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (what='' OR `what` IS NULL) LIMIT 1");
+ 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.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
<strong>Wichtig: Laden Sie noch die Template member_mydata_overview und member_mydata_edit (beide zu finden unter templates/".GET_LANGUAGE()."/html/member/ !) mit hoch!</strong>");
// Depends on 'country'!
- EXT_SET_UPDATE_DEPENDS("country");
+ EXT_ADD_UPDATE_DEPENDS("country");
break;
case "0.1.3": // SQL queries for v0.1.3
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1");
+ 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_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)");
- ADD_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_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0");
+ 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.");
if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
// Daily reset was run so let's check out for expired newsletter orders
- $INC_POOL[] = sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH'));
+ ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH')));
}
break;
}
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname')");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='nickname' AND ext_has_css='N' LIMIT 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_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden.");
break;
case "0.0.6": // SQL queries for v0.0.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'");
- ADD_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)");
+ 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.1.1": // SQL queries for v0.1.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP nick_uid");
+ 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.6": // SQL queries for v0.1.6
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1");
+ 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.9": // SQL queries for v0.1.9
- ADD_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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_nickname_history` (
+ 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 '',
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_online` (
+ 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 '',
KEY(refid),
KEY `admin_member` (`is_admin`,`is_member`)
) TYPE={!_TABLE_TYPE!}");
- ADD_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)");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online'");
+ 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);
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1");
break;
case "update": // Update an extension
break;
case "0.0.5": // SQL queries for v0.0.5
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N')");
+ 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 "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_optimize_gain`(
+ 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_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')");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='order' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE module='order' LIMIT 1");
+ 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": // SQL queries for v0.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
- ADD_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!}_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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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.2.3": // SQL queries for v0.2.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+ 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.3.1": // SQL queries for v0.3.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
+ 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.4.6": // SQL queries for v0.4.6
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1");
+ 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.8": // SQL queries for v0.4.8
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_url_blacklist`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_url_blacklist` (
+ 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,
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
break;
case "0.0.4": // SQL queries for v0.0.4
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden.");
break;
case "0.1.6": // SQL queries for v0.1.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{!URL!}'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{!URL!}'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
break;
case "0.1.7": // SQL queries for v0.1.7
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt.");
break;
case "0.1.9": // SQL queries for v0.1.9
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
break;
case "0.2.0": // SQL queries for v0.2.0
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
break;
case "0.2.1": // SQL queries for v0.2.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16");
+ 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.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_payouts` (
+ 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',
KEY(payout_id),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
- ADD_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_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_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGBLOB NOT NULL");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGBLOB NOT NULL");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGBLOB NOT NULL");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGBLOB 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'");
+ 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
break;
case "0.2.1": // SQL queries for v0.2.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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.");
break;
case "0.3.7": // SQL queries for v0.3.7
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (what='' OR `what` IS NULL) LIMIT 1");
+ 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.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_primera` (
+ 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 '',
) TYPE={!_TABLE_TYPE!}");
// Confiuration
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''");
// Admin menu
- ADD_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_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_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)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
// Do we have a daily-reset-run?
if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
// So let's check for profiles which needs an update
- $INC_POOL[] = sprintf("%sinc/profile-updte.php", constant('PATH'));
+ ADD_INC_TO_POOL(sprintf("%sinc/profile-updte.php", constant('PATH')));
}
break;
}
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_data` (
+ 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 '',
KEY (admin_id),
PRIMARY KEY (id)
) TYPE={!_TABLE_TYPE!}");
- ADD_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,
KEY (rallye_id),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- ADD_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,
) TYPE={!_TABLE_TYPE!}");
// Admin menu
- ADD_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_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_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_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')");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'");
+ 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);
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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.1.0": // SQL queries for v0.2.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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.2.0": // SQL queries for v0.2.0
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'");
+ 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 <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br />
break;
case "0.3.2": // SQL queries for v0.3.2
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1");
+ 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.");
case "0.3.5": // SQL queries for 0.3.5
// This update depends on sql_patches
- EXT_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Register filter
REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run);
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_refs` (
+ 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,
KEY (`level`),
KEY (`refid`)
) ENGINE={!_TABLE_TYPE!} COMMENT='User Referals With Refback'");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback')");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100");
- ADD_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)");
+ 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.");
// Shall we include special files?
if ($EXT_LOAD_MODE == "register") {
// Execute this special file on this update
- $INC_POOL[] = sprintf("%sinc/gen_refback.php",
+ ADD_INC_TO_POOL(sprintf("%sinc/gen_refback.php",
constant('PATH')
- );
+ ));
} // END - if
//
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.1": // SQL queries for v0.1
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_must_register`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_must_register` (
+ 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',
) TYPE={!_TABLE_TYPE!}");
// Add all entries as required (DO NOT DELETE THEM FROM DATABASE!)
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')");
+ 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_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 <strong>Profildaten ändern</strong> ein.', 12)");
+ 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 <strong>Profildaten ändern</strong> 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='register' AND ext_has_css='N' LIMIT 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_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
case "0.1.3": // SQL queries for v0.1.3
// This update depends on sql_patches update!
- EXT_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
<strong>Wichtig: Laden Sie noch das Template <strong>guest_register.tpl</strong> mit hoch, welches unter templates/".GET_LANGUAGE()."/html/guest/ zu finden ist!</strong>");
// Depends on 'country'
- EXT_SET_UPDATE_DEPENDS("country");
+ EXT_ADD_UPDATE_DEPENDS("country");
break;
case "0.3.3": // SQL queries for v0.3.3
break;
case "0.4.2": // SQL queries for v0.4.2
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1");
+ 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 <strong>templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl</strong> ist nicht mehr nötig.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_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_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)");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip'");
+ 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);
{
case "0.0.1": // SQL queries for v0.0.1
// Update depends on sql_patches
- EXT_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Add filters
REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run);
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.1": // SQL queries for v0.1
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amenu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmenu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmenu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amenu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmenu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmenu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')");
// 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.");
} // END - if
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite'");
+ 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
} // END - if
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
break;
case "0.0.9": // SQL queries for v0.0.9
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'");
- ADD_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)");
+ 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.");
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
// SQL commands to run
//
// Try to make it depend on repair
- EXT_SET_UPDATE_DEPENDS("repair");
+ EXT_ADD_UPDATE_DEPENDS("repair");
//
// Sponsor data
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_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 '',
//
// Sponsor orders
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_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,
//
// Pay-types
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_paytypes` (
+ 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,
//
// Points-to-action converting
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_action_convert` (
+ 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,
//
// Sponsor menu system (default)
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_menu` (
+ 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,
//
// Registry for performable actions by your sponsors
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_registry` (
+ 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',
//
// URLs from the sponsors
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_urls` (
+ 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://',
//
// Banners of any size from the sponsors
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_banner` (
+ 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://',
//
// Campaigns
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_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,
//
// Campaigns + URLs + Banner
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns` (
+ 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,
//
// Allowed data to display (administrative)
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_admin_data` (
+ 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',
//
// Allowed data to display (sponsor-side)
//
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_display_data` (
+ 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 '',
//
// Default allowed data to display
//
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('id','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('position','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('family','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('url','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('password','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('status','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".GET_CURRENT_ADMIN_ID().",UNIX_TIMESTAMP())");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '€')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '€')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '€')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".GET_CURRENT_ADMIN_ID().",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_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)");
- ADD_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_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_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)");
- ADD_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_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_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_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_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_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_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_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_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)");
+ 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_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_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)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auffüllen','N', 7)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// Drop tables
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
+ 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!}_user_stats_data`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
// Delete admin menu entries
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE
`what`='config_extensions' OR
`what`='config_home' OR
`what`='list_unconfirmed' OR
`what`='list_filter'");
// Delete/update member menu entries
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE
+ 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_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
// Drop indexes
/* @TODO SQL_ALTER_TABLE() should work now properly
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP UNIQUE KEY `ext_name`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP UNIQUE KEY `login`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP INDEX `status`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` DROP INDEX `visible`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` DROP UNIQUE KEY `level`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP INDEX `data_type`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` DROP UNIQUE KEY `module`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `action`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_type`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `status`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_created`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP FULLTEXT `subject`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `subject`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP INDEX `ext_active`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP INDEX `status`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP FULLTEXT `family`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP INDEX `max_mails`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP INDEX `password`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `action`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `sort`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `visible`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `locked`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `sort`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `visible`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `locked`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `visible`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `sort`");
+ 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!}_user_data` DROP INDEX `status`");
+ 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!}_user_data` DROP INDEX `status`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP FULLTEXT `family`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP INDEX `max_mails`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP INDEX `password`");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ext_autopurge ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14)."");
+ 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 <strong>{!_MYSQL_PREFIX!}_config</strong> musste die Spalte <strong>auto_purge</strong> (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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose oder € schreiben.");
break;
case "0.0.4": // SQL queries for v0.0.4
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+ 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 <strong>EMail-Details ansehen</strong> und <strong>EMail-Archiv</strong> hinzugefügt.");
break;
case "0.0.5": // SQL queries for v0.0.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'");
- ADD_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)");
+ 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.");
break;
case "0.0.6": // SQL queries for v0.0.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD ext_has_css ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD ext_has_css ENUM('Y','N') NOT NULL DEFAULT 'N'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Es können nun SQL-Updates von einander abhängig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden.");
break;
case "0.0.7": // SQL queries for v0.0.7
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt.");
break;
case "0.0.8": // SQL queries for v0.0.8
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' <strong><big>·</big></strong> '");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' <strong><big>·</big></strong> '");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)");
break;
case "0.0.9": // SQL queries for v0.0.9
- ADD_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)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden.");
break;
case "0.1.0": // SQL queries for v0.2.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Soll der einmalige Ref-Bonus über das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?");
break;
case "0.1.1": // SQL queries for v0.1.1
- ADD_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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365)."");
+ 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)."");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Sie können nun <a href=\"{!URL!}/modules.php?module=admin&`what`=config_home\">hier</a> die Verzögerungszeit in der <a href=\"{!URL!}/index.php\">Eingangsseite</a> einstellen.");
break;
case "0.1.2": // SQL queries for v0.1.2
- ADD_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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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");
// 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.3": // SQL queries for v0.1.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?");
break;
case "0.1.5": // SQL queries for v0.1.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!_MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.");
break;
case "0.1.6": // SQL queries for v0.1.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_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)");
+ 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 <strong>what</strong>-Dateien kann hinzugefügt werden.");
break;
case "0.2.0": // SQL queries for v0.2.0
- ADD_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!}_jackpot` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE price price 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");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE used_points used_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_points` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_points` CHANGE locked_points locked_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE used_points used_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_points` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_points` CHANGE locked_points locked_points 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'");
+ 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.3": // SQL queries for v0.2.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ 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.");
// Switch to JPEG format
$auto_type = "jpg";
}
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'");
+ 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 <u>imagecreatefromjpeg()</u> und das JPEG-Bild vorhanden sind oder nicht.");
break;
case "0.2.5": // SQL queries for v0.2.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Spalten <u>max_mails</u> und <u>receive_mails</u> auf BIGINT(20) gesetzt.");
break;
case "0.2.6": // SQL queries for v0.2.6
- ADD_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)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1");
+ 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("<ol>
break;
case "0.2.8": // SQL queries for v0.2.8
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD last_login VARCHAR(10) NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD last_login VARCHAR(10) NOT NULL DEFAULT 0");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Letzter Login wird gespeichert, Cache wird bei installierter Cache-Erweiterung bei Sprachenänderung aufgefrischt.");
break;
case "0.2.9": // SQL queries for v0.2.9
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'");
+ 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 <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
break;
case "0.3.0": // SQL queries for v0.3.0
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailvergütungen...' WHERE `what`='payments' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD UNIQUE KEY (ext_name)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD UNIQUE KEY (login)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD INDEX (status)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` ADD INDEX (visible)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (level)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD INDEX (level)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD INDEX (data_type)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (module)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (action)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (what)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_type)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (status)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_created)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD FULLTEXT (subject)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD INDEX (ext_active)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD INDEX (status)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD FULLTEXT (family)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD INDEX (max_mails)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD INDEX (password)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (action)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (what)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (sort)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (visible)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (locked)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (what)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (sort)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (visible)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (locked)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (visible)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (sort)");
+ 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!}_user_data` ADD INDEX (status)");
+ 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!}_user_data` ADD INDEX (status)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD FULLTEXT (family)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD INDEX (max_mails)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD INDEX (password)");
+ 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.");
case "0.3.2": // SQL queries for v0.3.2
// Connection table between the menu system and the "logical area" system
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las` (
+ 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 '',
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
// All "logical areas" together
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las_data` (
+ 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 '',
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
// Which menu do you like?
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'");
// Insert menus
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)");
+ 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.");
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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'");
// The statistics table
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_stats` (
+ 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',
case "0.3.5": // SQL queries for v0.3.5
// List accounts with no referal
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` MODIFY user_hash VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET has_menu='Y' WHERE module='admin' OR module='index' OR module='login' LIMIT 3");
+ 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!}_user_data` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` MODIFY user_hash 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.8": // SQL queries for v0.3.8
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE descr descr MEDIUMTEXT NULL");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` CHANGE `text` `text` LONGTEXT NOT NULL");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP INDEX `status`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD INDEX `status_mails` (`status`,`max_mails`)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP INDEX `status`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD INDEX `status_mails` (`status`,`max_mails`)");
+ 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.3": // SQL queries for v0.4.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_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)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD UNIQUE (`what`)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD UNIQUE (`what`)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD UNIQUE (`what`)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'");
+ 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
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD gender ENUM ('M','F') NOT NULL DEFAULT 'M'");
- // @DEPRECATED ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET gender=sex WHERE sex != 'M'");
- // @DEPRECATED ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP sex");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD gender ENUM ('M','F') NOT NULL DEFAULT 'M'");
+ // @DEPRECATED ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET gender=sex WHERE sex != 'M'");
+ // @DEPRECATED ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP sex");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Offensives Wort "Sex" gegen "Gender" ausgetauscht.");
break;
case "0.4.8": // SQL queries for v0.4.8
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
+ 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
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `user_hash` `user_hash` VARCHAR(255) NULL DEFAULT NULL");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET user_hash=NULL WHERE user_hash IS NOT NULL AND `status`='CONFIRMED'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD UNIQUE (`user_hash`)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `user_hash` `user_hash` VARCHAR(255) NULL DEFAULT NULL");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET user_hash=NULL WHERE user_hash IS NOT NULL AND `status`='CONFIRMED'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD UNIQUE (`user_hash`)");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("User-Hash zum Bestätigen wird auf NULL gesetzt, wenn Account bestätigt wird.");
break;
case "0.5.0": // SQL queries for v0.5.0
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid`");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP `descr`");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_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)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')");
+ 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_SET_UPDATE_DEPENDS("refback");
+ EXT_ADD_UPDATE_DEPENDS("refback");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Ref-Übersicht eingebaut. Diese hängt von der Erweiterung <strong>refback</strong> ab.");
break;
case "0.5.5": // SQL queries for v0.5.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ 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
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
- ADD_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',
break;
case "0.5.7": // SQL queries for v0.5.7
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_filters` (
+ 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 '',
`filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`filter_id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Filter system'");
- ADD_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;
case "0.6.0": // SQL queries for v0.6.0
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'");
+ 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 <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden.");
break;
case "0.6.1": // SQL queries for v0.6.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP login_failtures");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP last_failture");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP login_failtures");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP last_failture");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` 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("Falsche Schreibweise korregiert.");
case "0.6.2": // SQL queries for v0.6.2
// Depends on refback extension
- EXT_SET_UPDATE_DEPENDS("user");
+ EXT_ADD_UPDATE_DEPENDS("user");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Abhängigkeit von <u>ext-user</u> gesetzt.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run (surfbar URLs)
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_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 '',
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar URLs'");
// Reload locks
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_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,
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar reload locks'");
// Surfbar salts
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_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,
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar last used salts'");
// Statistics
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_stats` (
+ 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,
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Statistics'");
// Member actions pending on status
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_actions` (
+ 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,
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Member Actions'");
// Member actions
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5)."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6)."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3)."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)");
+ 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_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_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. <strong>Vorsicht!</strong> Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)");
- ADD_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_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_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_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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)");
+ 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. <strong>Vorsicht!</strong> 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='surfbar' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='surfbar' LIMIT 1");
+ 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_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_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_SQL("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE ext_name='task' AND ext_has_css='N' LIMIT 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_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
case "remove": // Do stuff when removing extension
// Drop theme table
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
// Delete admin menu
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'");
// Delete guest menu entries
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'");
// Delete member menu entries
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes'");
+ 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_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
case "0.0.8": // SQL queries for v0.0.8
// Theme table
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_themes` (
+ 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 '',
) TYPE={!_TABLE_TYPE!} COMMENT='Themes'");
// Admin menu
- ADD_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_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_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_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)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'");
+ 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 <u>sql_patches</u> übertragen. (Kann Fehlermeldungen verursacht haben!)");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)");
- ADD_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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1");
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
+ 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_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` (
+ 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,
) Type={!_TABLE_TYPE!}");
// Transfers to a member
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` (
+ 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,
) Type={!_TABLE_TYPE!}");
// Admin menu
- ADD_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_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_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_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)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
break;
case "update": // Update an extension
break;
case "0.0.5": // SQL queries for v0.0.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ 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 <em>Auflisten</em> 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.2.3": // SQL queries for v0.2.3
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')");
+ 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_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert.");
break;
case "0.2.5": // SQL queries for v0.2.5
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1");
+ 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.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'");
break;
case "activate": // Do stuff when admin activates this extension
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_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_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_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_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_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_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_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_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_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_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)");
+ 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_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
+ 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`");
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_SQL("");
+ ADD_EXT_SQL("");
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.1": // SQL queries for v0.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20");
+ 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
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_has_css`='Y' WHERE `ext_name`='user' AND `ext_has_css`='N' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_has_css`='Y' WHERE `ext_name`='user' AND `ext_has_css`='N' LIMIT 1");
// This update depends on sql_patches update!
- EXT_SET_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS("sql_patches");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
case "0.1.2": // SQL queries for v0.1.2
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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.4": // SQL queries for v0.1.4
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</big>");
break;
case "0.2.1": // SQL queries for v0.2.1
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- ADD_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)");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'");
+ 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.9": // SQL queries for v0.2.9
- ADD_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)");
+ 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.1": // SQL queries for v0.3.1
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 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.4": // SQL queries for v0.3.4
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
- ADD_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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` (
+ 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 '',
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` (
+ 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 '',
) TYPE={!_TABLE_TYPE!}");
// Confiuration
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''");
// Admin menu
- ADD_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_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_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)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)");
+ 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_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)");
+ 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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1");
+ 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_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+ 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_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+ 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.");
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8)."");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
+ 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_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_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. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)");
+ 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. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)");
// Reload lock table
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
- ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_yoomedia_reload` (
+ 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,
case "remove": // Do stuff when removing extension
// SQL commands to run
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
+ 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
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- ADD_SQL("");
+ ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
REGISTER_FILTER('post_extension_installed', 'AUTO_ACTIVATE_EXTENSION');
REGISTER_FILTER('post_extension_installed', 'SOLVE_TASK');
REGISTER_FILTER('post_extension_installed', 'LOAD_INCLUDES');
+ REGISTER_FILTER('post_extension_installed', 'REMOVE_UPDATES');
// Solving tasks
REGISTER_FILTER('solve_task', 'SOLVE_TASK');
}
// Filter to load include files
-function FILTER_LOAD_INCLUDES ($data) {
+function FILTER_LOAD_INCLUDES () {
// Default is $data as inclusion list
- $INC_POOL = $data;
+ $data = GET_INC_POOL();
// Is it an array?
if ((!isset($data)) || (!is_array($data))) {
// Then abort here
- debug_report_bug(sprintf("INC_POOL is no array! Type: %s", gettype($INC_POOL)));
+ debug_report_bug(sprintf("INC_POOL is no array! Type: %s", gettype($data)));
} elseif (isset($data['inc_pool'])) {
// Use this as new inclusion pool!
- $INC_POOL = $data['inc_pool'];
+ SET_INC_POOL($data['inc_pool']);
}
// Check for added include files
- if (count($INC_POOL) > 0) {
+ if (COUNT_INC_POOL() > 0) {
// Loads every include file
- foreach ($INC_POOL as $FQFN) {
+ foreach (GET_INC_POOL() as $FQFN) {
LOAD_INC_ONCE($FQFN);
} // END - foreach
// Reset array
- if (isset($data['inc_pool'])) $data['inc_pool'] = array();
+ INIT_INC_POOL();
} // END - if
// Continue with processing
} else {
// Run regular SQL command
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Running regular query: {$sql}");
- $result = SQL_QUERY($sql, __FUNCTION__, __LINE__, false);
+ SQL_QUERY($sql, __FUNCTION__, __LINE__, false);
}
} // END - if
} // END - foreach
mt_srand(generateSeed() + constant('_ADD'));
}
+// Filter for removing updates
+function FILTER_REMOVE_UPDATES () {
+ // Init removal list
+ EXT_INIT_REMOVAL_LIST();
+
+ // Add the current extension to it
+ EXT_ADD_CURRENT_TO_REMOVAL_LIST();
+
+ // Simply remove it
+ UNSET_EXT_SQLS();
+
+ // Do we need to remove update depency?
+ if (EXT_COUNT_UPDATE_DEPENDS() > 0) {
+ // Then find all updates we shall no longer execute
+ foreach (EXT_GET_UPDATE_DEPENDS() as $id=>$ext_name) {
+ // Shall we remove this update?
+ if (in_array($ext_name, EXT_GET_REMOVAL_LIST())) {
+ // Then remove this extension!
+ EXT_REMOVE_UPDATE_DEPENDS($ext_name);
+ } // END - if
+ } // END - foreach
+ } // END - if
+}
+
//
?>
// Get current theme name
function GET_CURR_THEME() {
- global $INC_POOL;
-
// The default theme is 'default'... ;-)
$ret = "default";
$theme = sprintf("%stheme/%s/theme.php", constant('PATH'), SQL_ESCAPE($ret));
// Try to load the requested include file
- if (FILE_READABLE($theme)) $INC_POOL[] = $theme;
+ if (FILE_READABLE($theme)) ADD_INC_TO_POOL($theme);
// Return theme value
return $ret;
} // END - if
// Get more daily reset scripts
- $INC_POOL = GET_DIR_AS_ARRAY("inc/reset/", "reset_");
+ SET_INC_POOL(GET_DIR_AS_ARRAY("inc/reset/", "reset_"));
// Update database
if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
// Has it changed?
if (getConfig('last_week') != $currWeek) {
// Include weekly reset scripts
- $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY("inc/weekly/", "weekly_"));
+ MERGE_INC_POOL(GET_DIR_AS_ARRAY("inc/weekly/", "weekly_"));
// Update config
if (!defined('DEBUG_WEEKLY')) UPDATE_CONFIG("last_week", $currWeek);
// Has it changed?
if (getConfig('last_month') != $currMonth) {
// Include monthly reset scripts
- $INC_POOL = merge_array($INC_POOL, GET_DIR_AS_ARRAY("inc/monthly/", "monthly_"));
+ MERGE_INC_POOL(GET_DIR_AS_ARRAY("inc/monthly/", "monthly_"));
// Update config
if (!defined('DEBUG_MONTHLY')) UPDATE_CONFIG("last_month", $currMonth);
} // END - if
// Run the filter
- runFilterChain('load_includes', $INC_POOL);
+ runFilterChain('load_includes');
}
// Handle extra values
return $isDirectory;
}
+// Init INC_POOL
+function INIT_INC_POOL () {
+ $GLOBALS['inc_pool'] = array();
+}
+
+// Setter for INC_POOL
+function SET_INC_POOL ($includePool) {
+ $GLOBALS['inc_pool'] = (array) $includePool;
+}
+
+// Getter for INC_POOL
+function GET_INC_POOL () {
+ return $GLOBALS['inc_pool'];
+}
+
+// Count INC_POOL
+function COUNT_INC_POOL () {
+ return count($GLOBALS['inc_pool']);
+}
+
+// Merge INC_POOL into given
+function MERGE_INC_POOL ($includePool) {
+ SET_INC_POOL(merge_array(GET_INC_POOL(), $includePool));
+}
+
+// Add single include file to INC_POOL
+function ADD_INC_TO_POOL ($INC) {
+ $GLOBALS['inc_pool'][] = (string) $INC;
+}
+
+// Remove an include file from INC_POOL
+function REMOVE_INC_FROM_POOL ($INC) {
+ // First look it up
+ $key = array_search($INC, GET_INC_POOL());
+
+ // Is it valid?
+ if ($key !== false) {
+ // Then remove it
+ unset($GLOBALS['inc_pool'][$key]);
+
+ // And sort the list
+ asort($GLOBALS['inc_pool']);
+ } // END - if
+}
+
//////////////////////////////////////////////////
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
//////////////////////////////////////////////////
// Remove current from array and set new
$theme = sprintf("%stheme/%s/theme.php", constant('PATH'), $GLOBALS['curr_theme']);
- unset($INC_POOL[array_search($theme, $INC_POOL)]);
- $INC_POOL[] = sprintf("%stheme/%s/theme.php", constant('PATH'), $newTheme);
+ REMOVE_INC_FROM_POOL($theme);
+ ADD_INC_TO_POOL(sprintf("%stheme/%s/theme.php", constant('PATH'), $newTheme));
} // END - if
//
require($INC);
}
+// Init & set the INC_POOL
+INIT_INC_POOL();
+SET_INC_POOL(GET_DIR_AS_ARRAY("inc/loader/", "load_cache-"));
+
// Run the filter
-runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/loader/", "load_cache-"));
+runFilterChain('load_includes');
//
?>
} // END - if
// Init inc pool array
-$INC_POOL = array();
+INIT_INC_POOL();
//
// Load extensions
}
// Run the filter
-runFilterChain('load_includes', $INC_POOL);
+runFilterChain('load_includes');
// Uninstall extensions that are no longer in our system
if (!empty($DEL[0])) {
// Check for menu entries
$result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
array($menu), __FUNCTION__, __LINE__);
- if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu)) {
+
+ // Remember the count for later checks
+ setAdminMenuHasEntries($menu, ((SQL_NUMROWS($result_what) > 0) && ($act == $menu)));
+
+ // Do we have entries?
+ if (ifAdminMenuHasEntries($menu)) {
$GLOBALS['menu']['description'] = array();
$GLOBALS['menu']['title'] = array(); $SUB = true;
$OUT .= "<tr>
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET %s='%s' WHERE id=%s LIMIT 1",
array($row, $data, bigintval($id)), __FUNCTION__, __LINE__);
}
+
+// Checks wether if the admin menu has entries
+function ifAdminMenuHasEntries ($action) {
+ return (
+ ((
+ isset($GLOBALS['admin_menu_has_entries'][$action])
+ ) && (
+ $GLOBALS['admin_menu_has_entries'][$action] === true
+ )) || (
+ $action == "login"
+ )
+ );
+}
+
+// Setter for 'admin_menu_has_entries'
+function setAdminMenuHasEntries ($action, $hasEntries) {
+ $GLOBALS['admin_menu_has_entries'][$action] = (bool) $hasEntries;
+}
+
//
?>
$ext_name = substr($subj, 1, strpos($subj, ":") - 1);
if ($type == "EXTENSION") {
// Load SQL commands for registering
- SET_SQLS(EXTENSION_REGISTER($ext_name, $id, true));
+ REGISTER_EXTENSION($ext_name, $id, true);
// Add notes to text
$text .= EXT_GET_NOTES();
// Is the extension deprecated?
if (EXT_GET_DEPRECATED() == "N") {
// ... so we can finally register and load it in registration mode
- if (EXTENSION_REGISTER($ext_name, $ext_id)) {
+ if (REGISTER_EXTENSION($ext_name, $ext_id)) {
// Extension was found and successfully registered
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_EXTENSION_REGISTERED'));
} // END - if
// Are we in 'welcome' page and are there jobs to be done?
-if ($GLOBALS['action'] != "login") {
+if (!ifAdminMenuHasEntries($GLOBALS['action'])) {
// This menu is empty and so no content is displayed
LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_MENU_IS_EMPTY'), $GLOBALS['action']));
} elseif ($jobsDone === true) {
// Load configuration stuff
loadConfiguration();
+ // Load "databases" aka static arrays
+ LOAD_INC_ONCE("inc/databases.php");
+
// Init session
LOAD_INC_ONCE("inc/session.php");
- // Load "databases" aka static arrays
- LOAD_INC_ONCE("inc/databases.php");
+ // Load versions
+ LOAD_INC_ONCE("inc/versions.php");
// Loading patching system is required here...
LOAD_INC_ONCE("inc/patch-system.php"); // Initialize patch system
// Set other missing variables
if (!isset($GLOBALS['output_mode'])) $GLOBALS['output_mode'] = "0";
+ // Include databases.php
+ LOAD_INC_ONCE("inc/databases.php");
+
// Init session
LOAD_INC_ONCE("inc/session.php");
- // Include databases.php
- LOAD_INC_ONCE("inc/databases.php");
+ // Load versions
+ LOAD_INC_ONCE("inc/versions.php");
// Check if we are in installation routine
if ((!isInstalling()) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != -1)) {
// Init counter
$GLOBALS['pool_cnt'] = 0;
+// Init & set the include pool
+INIT_INC_POOL();
+SET_INC_POOL(GET_DIR_AS_ARRAY("inc/pool/", "pool-"));
+
// Run the filter
-runFilterChain('load_includes', GET_DIR_AS_ARRAY("inc/pool/", "pool-"));
+runFilterChain('load_includes');
// Remove counter again
unset($GLOBALS['pool_cnt']);
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 03/07/2009 *
+ * =============== Last change: 03/07/2009 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : versions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Version definitions *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Versionsdefinierungen *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 880 $ *
+ * $Date:: 2009-03-07 03:55:57 +0100 (Sat, 07 Mar 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: quix0r $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+} // END - if
+
+// If you understand regular expressions ^^^ you may know how I versionize... ;-)
+define('FULL_VERSION', getActualVersion('Tag'));
+
+// Current SVN revision and date
+define('CURR_SVN_REVISION', getActualVersion('Revision'));
+define('CURR_SVN_DATE' , getActualVersion('Date'));
+
+//
+?>