if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-}
+} // END - if
// Version of this extension
-EXT_SET_VERSION('0.0.4');
+EXT_SET_VERSION('0.0.3');
// Version history array (add more with , '0.1.0' and so on)
-EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4'));
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3'));
-switch ($EXT_LOAD_MODE)
-{
+switch ($EXT_LOAD_MODE) {
case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
break;
case 'update': // Update an extension
- switch ($EXT_VER)
- {
+ switch ($EXT_VER) {
case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
break;
case '0.0.3': // SQL queries for v0.0.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert.");
- break;
-
- case '0.0.4': // SQL queries for v0.0.4
ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
// Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Ref-Id hinzugetan.");
+ EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf INT(5) geändert.");
break;
}
break;
ADD_DESCR('admin', __FILE__);
// Normally we want the overview of all registered extensions
-$do = "overview";
+$do = 'overview';
$SEL = 0;
-if (REQUEST_ISSET_POST('sel')) $SEL = countPostSelection();
-if (REQUEST_ISSET_GET(('reg_ext'))) {
+// Are some extensions submitted?
+if (REQUEST_ISSET_POST('sel')) {
+ // Then count all
+ $SEL = countPostSelection();
+} // END - if
+
+if (REQUEST_ISSET_GET('reg_ext')) {
// We are about to register a new extension
$do = 'register'; $ext_id = bigintval(REQUEST_GET('reg_ext'));
// The ID comes from task management and it is - of course - *not* the extension's name!
if (($subElement != -1) && (REQUEST_ISSET_POST($element, $subElement))) {
// Then use this
$value = SQL_ESCAPE($value[$subElement]);
- } else {
+ } elseif (!is_array($value)) {
// Escape it here
$value = SQL_ESCAPE($value);
}
// Set it in cache
- $GLOBALS['cache_request']['request_post'][$element][$subElement] = SQL_ESCAPE($value);
+ $GLOBALS['cache_request']['request_post'][$element][$subElement] = $value;
} // END - if
// Return value