]> git.mxchange.org Git - mailer.git/commitdiff
Various fixes to fix bug #226, comment #562, removed extension dependency register...
authorRoland Häder <roland@mxchange.org>
Sun, 30 Sep 2012 19:11:50 +0000 (19:11 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 30 Sep 2012 19:11:50 +0000 (19:11 +0000)
inc/db/lib-mysql3.php
inc/extensions-functions.php
inc/extensions/ext-country.php
inc/extensions/ext-register.php
inc/extensions/ext-task.php
inc/filter-functions.php
inc/install-inc.php
inc/template-functions.php
install/tables.sql

index 756f97ed3f4833171846489fd2bae653b15c4089..2f1c1b4fe1bfa93295d677caf688c1d40e7553ab 100644 (file)
@@ -73,7 +73,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) {
 
                // Cache it and remember as last SQL query
                $GLOBALS[__FUNCTION__][$sqlString] = $sqlStringModified;
-               $GLOBALS['last_sql'] = $sqlStringModified;
+               $GLOBALS['last_sql']               = $sqlStringModified;
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Stored cache: ' . $sqlStringModified);
        }  else {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cache used: ' . $sqlString);
@@ -269,10 +269,18 @@ function SQL_FREERESULT ($resource) {
 // SQL string escaping
 function SQL_QUERY_ESC ($sqlString, $data, $F, $L, $run = true, $strip = true, $secure = true) {
        // Link is there?
-       if ((!SQL_IS_LINK_UP()) || (!is_array($data))) return false;
+       if ((!SQL_IS_LINK_UP()) || (!is_array($data))) {
+               // Link is down or data is not an array
+               /* DEBUG: */ logDebugMessage($F, $L, 'SQL_IS_LINK_UP()=' . intval(SQL_IS_LINK_UP()) . ',data[]=' . gettype($data) . ',sqlString=' . $sqlString . ': ABORTING!');
+               return false;
+       } // END - if
+
+       // Init array for escaped data with SQL string
+       $dataSecured = array(
+               '__sql_string' => $sqlString
+       );
 
        // Escape all data
-       $dataSecured['__sql_string'] = $sqlString;
        foreach ($data as $key => $value) {
                $dataSecured[$key] = SQL_ESCAPE($value, $secure, $strip);
        } // END - foreach
@@ -612,7 +620,10 @@ function ifSqlColumnExists ($tableName, $columnName) {
 
                // Get column information
                $result = SQL_QUERY_ESC("SHOW COLUMNS FROM `%s` LIKE '%s'",
-                       array($tableName, $columnName), __FUNCTION__, __LINE__);
+                       array(
+                               $tableName,
+                               $columnName
+                       ), __FUNCTION__, __LINE__);
 
                // Determine it
                $GLOBALS[__FUNCTION__][$tableName][$columnName] = (!SQL_HASZERONUMS($result));
index 00722ad55fccae68cc0931c7dc683e96b3adbc17..b3e95cdcfaa43337297cb8cd09c9be58978f0cec 100644 (file)
@@ -41,8 +41,8 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Load the extension and maybe found language and function files.
-function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $dry_run = false) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_mode=' . $ext_mode . ',ext_ver=' . $ext_ver . ',dry_run=' . intval($dry_run) . ' - ENTERED!');
+function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $isDryRun = false) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_mode=' . $ext_mode . ',ext_ver=' . $ext_ver . ',isDryRun=' . intval($isDryRun) . ' - ENTERED!');
        // Loading an extension in same mode, but not test/update, twice is not
        // good, so is the extension $ext_name already loaded in mode $ext_mode?
        if ((isset($GLOBALS['loaded_extension'][$ext_name][$ext_mode])) && (!in_array($ext_mode, array('update', 'test')))) {
@@ -78,12 +78,12 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $dry_run = fal
                // In all but test-mode we need these messages to debug! Please report all (together, e.g.)
                if (($ext_mode != 'test') && (getCurrentExtensionVersion() == '0.0.0')) {
                        // Abort here, this must now always be set!
-                       reportBug(__FUNCTION__, __LINE__, 'Extension version is empty, setting to 0.0. ext_name=' . $ext_name . ', ext_mode=' . $ext_mode . ', dry_run=' . intval($dry_run));
+                       reportBug(__FUNCTION__, __LINE__, 'Extension version is empty, setting to 0.0.0 ext_name=' . $ext_name . ', ext_mode=' . $ext_mode . ', isDryRun=' . intval($isDryRun));
                } // END - if
        }
 
        // Set dry-run
-       enableExtensionDryRun($dry_run);
+       enableExtensionDryRun($isDryRun);
 
        // Init array
        initIncludePool('extension');
@@ -177,13 +177,13 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $dry_run = fal
 }
 
 // Registers an extension and possible update dependencies
-function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates = false) {
+function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdates = false) {
        // Set current extension name
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',task_id=' . intval($taskId) . ',dry_run=' . intval($dry_run) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - ENTERED!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId=' . intval($taskId) . ',isDryRun=' . intval($isDryRun) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - ENTERED!');
        setCurrentExtensionName($ext_name);
 
        // Enable dry-run
-       enableExtensionDryRun($dry_run);
+       enableExtensionDryRun($isDryRun);
 
        // By default all extensions are in productive phase
        enableExtensionProductive();
@@ -198,8 +198,8 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates
        // When this extension is already in registration/update phase, all is fine
        if ((isExtensionRegistrationRunning($ext_name)) || ((isExtensionUpdateRunning($ext_name)) && ($ignoreUpdates === false))) {
                // Then abort here with 'true' becaus it is fine
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in registration/update phase, all fine,taskId=' . $taskId . ',dry_run=' . intval($dry_run) . ',ignoreUpdates=' . intval($ignoreUpdates));
-               //* BUG: */ reportBug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId=' . $taskId . ',dry_run=' . intval($dry_run) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - Please investigate!');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in registration/update phase, all fine,taskId=' . $taskId . ',isDryRun=' . intval($isDryRun) . ',ignoreUpdates=' . intval($ignoreUpdates));
+               //* BUG: */ reportBug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId=' . $taskId . ',isDryRun=' . intval($isDryRun) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - Please investigate!');
                return true;
        } // END - if
 
@@ -213,17 +213,17 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates
        } // END - if
 
        // Is the task id zero? Then we need to auto-fix it here
-       if (($taskId == '0') && (!isInstallationPhase())) {
+       if (((is_null($taskId)) || ($taskId == '0')) && (!isInstallationPhase())) {
                // Try to find the task
                $taskId = determineExtensionTaskId(getCurrentExtensionName());
 
                // Still zero and not in dry-run?
-               if (($taskId == '0') && (!isExtensionDryRun())) {
+               if (((is_null($taskId)) || ($taskId == '0')) && (!isExtensionDryRun())) {
                        // Now try to create a new task
                        $taskId = createNewExtensionTask(getCurrentExtensionName());
 
                        // Is it still zero?
-                       if ($taskId == '0') {
+                       if ((is_null($taskId)) || ($taskId == '0')) {
                                // Then request a bug report
                                reportBug(__FUNCTION__, __LINE__, sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)",
                                        __FUNCTION__,
@@ -288,14 +288,14 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates
                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_ver[' . gettype($ext_ver) . ']=' . $ext_ver . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ',currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ' - EMPTY?');
                                if (empty($ext_ver)) {
                                        // Extension not registered so far so first load task's id...
-                                       $taskId = determineExtensionTaskId($ext_update);
+                                       $updateTaskId = determineExtensionTaskId($ext_update);
 
                                        // Entry found?
-                                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'taskId=' . $taskId . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ',currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ' - CHECKING!');
-                                       if (($taskId > 0) || (isInstallationPhase())) {
+                                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'updateTaskId=' . $updateTaskId . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ',currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ' - CHECKING!');
+                                       if (($updateTaskId > 0) || (isInstallationPhase())) {
                                                // Try to register the extension
-                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ',taskId=' . $taskId . ',isExtensionDryRun()=' . isExtensionDryRun());
-                                               $processResult = registerExtension($ext_update, $taskId, isExtensionDryRun(), true);
+                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ',updateTaskId=' . $updateTaskId . ',isExtensionDryRun()=' . intval(isExtensionDryRun()));
+                                               $processResult = registerExtension($ext_update, $updateTaskId, isExtensionDryRun(), true);
 
                                                // Reset extension name
                                                setCurrentExtensionName($ext_name);
@@ -332,6 +332,7 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates
                // Is there no update?
                if (countExtensionUpdateDependencies(getCurrentExtensionName()) == 0) {
                        // Then test is passed!
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',processResult=true,countExtensionUpdateDependencies()=0 - Test passed!');
                        $processResult = true;
                } // END - if
 
@@ -418,7 +419,7 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates
        }
 
        // @TODO This redirect is still needed to register sql_patches! Please try to avoid it
-       if (($ret === true) && ($dry_run === false) && ($ext_name == 'sql_patches') && (!isInstallationPhase())) {
+       if (($ret === true) && ($isDryRun === false) && ($ext_name == 'sql_patches') && (!isInstallationPhase())) {
                /*
                 * This is a really dirty hack to prevent an error about a missing
                 * configuration entry which should be there after registration of
@@ -428,7 +429,7 @@ function registerExtension ($ext_name, $taskId, $dry_run = false, $ignoreUpdates
        } // END - if
 
        // Return status code
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',currName=' . getCurrentExtensionName() . ',ext_name=' . $ext_name . ',processResult=' . intval($processResult) . ',ret=' . intval($ret) . ' - EXIT!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',currName=' . getCurrentExtensionName() . ',processResult=' . intval($processResult) . ',ret=' . intval($ret) . ' - EXIT!');
        return $ret;
 }
 
@@ -667,9 +668,9 @@ function getExtensionVersion ($ext_name, $force = false) {
 }
 
 // Updates a given extension with current extension version to latest version
-function updateExtension ($ext_name, $ext_ver, $dry_run = false, $ignoreDependencies = false) {
+function updateExtension ($ext_name, $ext_ver, $isDryRun = false, $ignoreDependencies = false) {
        // Only admins are allowed to update extensions
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_ver=' . $ext_ver . ',dry_run=' . intval($dry_run) . ',ignoreDependencies=' . intval($ignoreDependencies) . ' - ENTERED!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_ver=' . $ext_ver . ',isDryRun=' . intval($isDryRun) . ',ignoreDependencies=' . intval($ignoreDependencies) . ' - ENTERED!');
        if ((!isAdmin()) || (empty($ext_name))) {
                // Called as non-admin or empty extension
                reportBug(__FUNCTION__, __LINE__, 'Called as non-admin (isAdmin()=' . intval(isAdmin()) . '), or empty extension name. ext_name=' . $ext_name);
@@ -679,7 +680,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false, $ignoreDependen
        setCurrentExtensionName($ext_name);
 
        // Is this extension update already running?
-       if ((isExtensionUpdateRunning($ext_name, $ignoreDependencies)) && ($dry_run === false)) {
+       if ((isExtensionUpdateRunning($ext_name, $ignoreDependencies)) && ($isDryRun === false)) {
                // This is fine but needs logging ATM
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in update phase, all fine.');
                //* BUG: */ reportBug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in update phase, please investigate!');
@@ -738,7 +739,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false, $ignoreDependen
                                                        $processResult = updateExtension($ext_depend, getExtensionVersion($ext_depend), isExtensionDryRun(), true);
                                                } else {
                                                        // Register new extension
-                                                       $processResult = registerExtension($ext_depend, 0, isExtensionDryRun());
+                                                       $processResult = registerExtension($ext_depend, NULL, isExtensionDryRun());
                                                }
                                        } // END - if
                                } // END - foreach
@@ -775,7 +776,7 @@ function updateExtension ($ext_name, $ext_ver, $dry_run = false, $ignoreDependen
                } // END - if
        } // END - if
 
-       //* DEBUG: */logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_ver=' . $ext_ver . ',dry_run=' . intval($dry_run) . ',ignoreDependencies=' . intval($ignoreDependencies) . ' - EXIT!');
+       //* DEBUG: */logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_ver=' . $ext_ver . ',isDryRun=' . intval($isDryRun) . ',ignoreDependencies=' . intval($ignoreDependencies) . ' - EXIT!');
 }
 
 // Output verbose SQL table for extension
@@ -1086,8 +1087,14 @@ function createExtensionDeactivationTask ($ext_name) {
 
 // Determines the task id for given extension
 function determineExtensionTaskId ($ext_name) {
+       // Is it installation phase and table task_system is not found?
+       if ((isInstallationPhase()) && (!ifSqlTableExists('task_system'))) {
+               // Then return NULL (not found)
+               return NULL;
+       } // END - if
+
        // Default is not found
-       $data['task_id'] = '0';
+       $data['task_id'] = NULL;
 
        // Search for extension task's id
        $result = SQL_QUERY_ESC("SELECT `id` AS task_id FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `task_type`='EXTENSION' AND `subject`='[%s:]' LIMIT 1",
@@ -1270,7 +1277,7 @@ function addExtensionDependency ($updateDepends) {
                 * Double-adding happens when the extension and an update of the same
                 * extension requires the same other extension again.
                 */
-               logDebugMessage(__FUNCTION__, __LINE__, 'updateDepends=' . $updateDepends . ',extensionMode=' . getExtensionMode() . ',currentExtension=' . getCurrentExtensionName() . ' - called twice.');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'updateDepends=' . $updateDepends . ',extensionMode=' . getExtensionMode() . ',currentExtension=' . getCurrentExtensionName() . ' - called twice.');
                return;
        } // END - if
 
@@ -1663,14 +1670,14 @@ function getExtensionMode () {
 }
 
 // Setter for dry-run
-function enableExtensionDryRun ($dry_run = true) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()='.getCurrentExtensionName().',dry_run='.intval($dry_run));
-       $GLOBALS['ext_dry_run'] = (bool) $dry_run;
+function enableExtensionDryRun ($isDryRun = true) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()='.getCurrentExtensionName().',isDryRun='.intval($isDryRun));
+       $GLOBALS['ext_isDryRun'] = (bool) $isDryRun;
 }
 
 // Getter for dry-run
 function isExtensionDryRun () {
-       return $GLOBALS['ext_dry_run'];
+       return $GLOBALS['ext_isDryRun'];
 }
 
 // Setter for current extension version
index 46fceed039c2e6d4bdb4e31310291598e28abdcd..170328812d56cd70e3b840ad6cbb96869c556cf9 100644 (file)
@@ -69,8 +69,11 @@ UNIQUE (`code`)",
                addAdminMenuSql('country', NULL, 'L&auml;ndercodes verwalten','Stellen Sie hier L&auml;ndercodes ein, damit auch internationale Mitglieder sich zu Ihrem {OPEN_CONFIG}mt_word{CLOSE_CONFIG} anmelden k&ouml;nnen.', 8);
                addAdminMenuSql('country','list_country','Verwalten','Hinzuf&uuml;gen, &Auml;ndern und L&ouml;schen von L&auml;ndercodes.', 1);
 
+               // This extension depends on ext-user
+               addExtensionDependency('user');
+
                // Add entry to user table
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1");
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `country_code` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1");
                break;
 
        case 'remove': // Do stuff when removing extension
index 4919f4e0673db1076813097540b9a392e7436c1a..25cc59fecc1a2a8ff7190b11936aac7a6e5c10e5 100644 (file)
@@ -215,9 +215,6 @@ PRIMARY KEY (`id`)",
                                setExtensionUpdateNotes("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <strike>meiner Seite herunterladen</strike> m&uuml;ssen.<br />
 <br />
 <strong>Wichtig: Laden Sie noch das Template <strong>guest_register.tpl</strong> mit hoch, welches unter templates/".getLanguage()."/html/guest/ zu finden ist!</strong>");
-
-                               // Depends on 'country'
-                               addExtensionDependency('country');
                                break;
 
                        case '0.3.3': // SQL queries for v0.3.3
index 486eb0423bac5d0301aeb931a8ac8446a54bab89..7697edc51a30470781b064ff4af8fb35a564a300 100644 (file)
@@ -243,8 +243,8 @@ switch (getExtensionMode()) {
                                break;
 
                        case '0.3.3': // SQL queries for v0.3.3
-                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` CHANGE `assigned_admin` `assigned_admin` BIGINT(20) NULL DEFAULT NULL');
-                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` CHANGE `userid` `userid` BIGINT(20) NULL DEFAULT NULL');
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` CHANGE `assigned_admin` `assigned_admin` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL');
                                addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=NULL WHERE `assigned_admin`=0');
                                addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `userid`=NULL WHERE `userid`=0');
 
index d7479b1af35d28eae779b8342dde774362458d7a..f10ce83848c266df4beb6698735c40d17d964e43 100644 (file)
@@ -197,7 +197,7 @@ ORDER BY
 }
 
 // "Registers" a new filter function
-function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = true, $force = false, $dry_run = false) {
+function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = true, $force = false, $isDryRun = false) {
        // Extend the filter function name
        $filterFunction = 'FILTER_' . strtoupper($filterFunction);
 
@@ -217,7 +217,7 @@ function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = tr
        } // END - if
 
        // Shall we add it?
-       if ($dry_run === false) {
+       if ($isDryRun === false) {
                // Is the function there?
                if (!function_exists($filterFunction)) {
                        // Then abort here
@@ -235,8 +235,8 @@ function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = tr
 }
 
 // "Unregisters" a filter from the given chain
-function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false, $dry_run = false) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - ENTERED!');
+function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false, $isDryRun = false) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',isDryRun=' . intval($isDryRun) . ' - ENTERED!');
 
        // Extend the filter function name only if not loaded from database
        if (!isset($GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction])) {
@@ -251,13 +251,13 @@ function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false,
        } // END - if
 
        // Shall we remove? (default, not while just showing an extension removal)
-       if ($dry_run === false) {
+       if ($isDryRun === false) {
                // Mark for filter removal
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - REMOVE!');
                $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'R';
        } // END - if
 
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',dry_run=' . intval($dry_run) . ' - EXIT!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',isDryRun=' . intval($isDryRun) . ' - EXIT!');
 }
 
 // "Runs" the given filters, filterData is optional and can be any type of data
index 28db1db9a3087b9639cc8186125a1ca15c562fd0..c9ed06d1d671dda501ffdf07c457ca130e6ca14b 100644 (file)
@@ -284,7 +284,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                                        // We have handled all fatal errors here
                                        initFatalMessages();
                                } else {
-                                       // Register ext-sql_patches
+                                       // Register ext-sql_patches and ext-task
                                        if ((registerExtension('sql_patches', NULL)) && (registerExtension('task', NULL))) {
                                                // Installation is done!
                                                redirectToUrl('install.php?install_page=finished');
index 34469e68de3b650fa1864f8245c78be203f20224..6ca436f10b6ee8e95afb2e6d145315e315ea0514 100644 (file)
@@ -1276,7 +1276,7 @@ function reportBug ($F, $L, $message = '', $sendEmail = true) {
        } // END - if
 
        // Add output
-       $debug .= 'Please report this bug at <a title="Direct link to the bug-tracker" href="http://bugs.mxchange.org" rel="external" target="_blank">http://bugs.mxchange.org</a> and include the logfile from <strong>' . str_replace(getPath(), '', getCachePath()) . 'debug.log</strong> in your report (you can now attach files):<pre>';
+       $debug .= 'Please report this bug at <a title="Direct link to the bug-tracker" href="http://bugs.mxchange.org" rel="external" target="_blank">http://bugs.mxchange.org</a> and include this whole message + logfile from <strong>' . str_replace(getPath(), '', getCachePath()) . 'debug.log</strong> in your report (you can now attach files).<br />Backtrace:<pre>';
        $debug .= debug_get_printable_backtrace();
        $debug .= '</pre>';
        $debug .= '<div class="para">Request-URI: ' . getRequestUri() . '</div>';
index 0e8fea2963fe612f14776a0fd66df40ae3cfcafc..8bbafe0e8695d54c77f896ffc5d7c693103d81f7 100644 (file)
@@ -174,7 +174,7 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_refsystem` (
 DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_task_system`;
 CREATE TABLE `{?_MYSQL_PREFIX?}_task_system` (
   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-  `assigned_admin` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `assigned_admin` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
   `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
   `status` ENUM('NEW','OPEN','SOLVED','CLOSED','DELETED') NOT NULL DEFAULT 'NEW',
   `task_type` VARCHAR(255)  NOT NULL DEFAULT 'FIRST_USER',