setCurrentExtensionName($ext_depend);
// Is the extension there?
- if (isExtensionInstalled()) {
+ if (isExtensionInstalled($ext_depend)) {
// Update another extension first!
$test = updateExtension($ext_depend, getExtensionVersion($ext_depend), getExtensionDryRun());
} else {
} // END - if
// Version number
-setThisExtensionVersion('0.2.2');
+setThisExtensionVersion('0.2.3');
// Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2'));
+setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("(Fast) alle SQL-Abfragen lassen sich nun zu Debugging-Zwecken (!) einschalten. Nur der Administrator sieht diese unten am Ende der Seite.");
break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `max_send` BIGINT(20) NOT NULL DEFAULT 10");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Fehlende Konfiguration hinzugefügt.");
+ break;
}
break;
debug_report_bug(getMessage('FILTER_FAILED_ALREADY_INIT'));
} // END - if
- // Init dummy array
- $filterArray = array(
- 'chains' => array(),
- 'loaded' => array(),
- 'counter' => array()
- );
-
// Load all saved filers if sql_patches is updated
if (isset($GLOBALS['cache_array']['filter']['filter_name'])) {
+ // Init dummy array
+ $filterArray = array(
+ 'chains' => array(),
+ 'loaded' => array(),
+ 'counter' => array()
+ );
+
// Found in cache so rewrite the array
foreach ($GLOBALS['cache_array']['filter']['filter_name'] as $idx => $filterName) {
// Get filter function
// Remove the cache
$GLOBALS['cache_array']['filter'] = $filterArray;
- } elseif (isExtensionInstalledAndNewer('sql_patches', '0.5.9')) {
+ } elseif ((!isInstallationPhase()) && (isExtensionInstalledAndNewer('sql_patches', '0.5.9'))) {
// Init add
$add = '';
if (getExtensionVersion('sql_patches') >= '0.6.0') $add = ", `filter_counter`";
} // END - if
// Simply add it to the array
- //* DEBUG: */ print 'filterName='.$filterName.',filterFunction='.$filterFunction.'<br />';
+ //* DEBUG: */ print __FUNCTION__.': filterName='.$filterName.',filterFunction='.$filterFunction.'<br />';
$GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'A';
$GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 0;
} // END - if
// Shall we remove? (default, not while just showing an extension removal)
if ($dry_run === false) {
// Mark for filter removal
+ //* DEBUG: */ print __FUNCTION__.': filterName='.$filterName.',filterFunction='.$filterFunction.'<br />';
$GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'R';
} // END - if
}
// Is that filter chain there?
if (!isset($GLOBALS['cache_array']['filter']['chains'][$filterName])) {
// We should find all these non-existing filter chains
- if ($filterName != 'sql_admin_extra_data') {
- /* Only for tracking: */ debug_report_bug('Filter chain <strong>' . $filterName . '</strong> not found!');
- }
+ /* Only for tracking: */ if ($filterName != 'sql_admin_extra_data') {
+ /* Only for tracking: */ debug_report_bug('Filter chain <strong>' . $filterName . '</strong> not found!');
+ /* Only for tracking: */ }
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found!');
// Abort here and return content
// Filter for determining what/action/module
function FILTER_DETERMINE_WHAT_ACTION () {
+ // In installation phase we don't have what/action
+ if (isInstallationPhase()) {
+ // Set both to empty
+ setAction('');
+ setWhat('');
+
+ // Abort here
+ return;
+ } // END - if
+
// Get all values
if ((getOutputMode() != 1) && (getOutputMode() != -1)) {
// Fix module
// Init cache instance and array
$GLOBALS['cache_instance'] = null;
-$GLOBALS['cache_array'] = array();
// Init cache first
initCacheInstance();
die();
} // END - if
+// Use this code if you don't want to run this cache loader on installation phase
+//if (isInstallationPhase()) return;
+
// Let's start with the admins table...
if (($GLOBALS['cache_instance']->loadCacheFile('foo')) && ($GLOBALS['cache_instance']->extensionVersionMatches('foo'))) {
// Load cache
die();
} // END - if
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Let's start with the admins table...
if (($GLOBALS['cache_instance']->loadCacheFile('admins')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
// Load cache
die();
}
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Next cached table is the configuration (config)...
if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load config from cache
die();
} // END - if
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Next cached table is the extension
if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load extension from cache
die();
} // END - if
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Next cached table is the filteruration (filter)...
if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load filter from cache
return;
}
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Let's start with the admins table...
if (($GLOBALS['cache_instance']->loadCacheFile('imprint')) && ($GLOBALS['cache_instance']->extensionVersionMatches('imprint'))) {
// Load cache
die();
} // END - if
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Next cached table is the module registry (mod_reg)...
if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load cache
die();
}
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Next cached table is the referal system (refdepths)...
if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load referal system from cache
die();
}
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Next cached table is the referal system (refsystem)...
if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load referal system from cache
return false;
}
+// Use this code if you don't want to run this cache loader on installation phase
+if (isInstallationPhase()) return;
+
// Next cached table is the referal system (themes)...
if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_instance']->extensionVersionMatches('theme'))) {
// Load referal system from cache
// Remove MySQL array from namespace
unset($GLOBALS['mysql']);
- // Administrative functions
+ // Load cache
loadIncludeOnce('inc/load_cache.php');
// Init filter system
loadIncludeOnce($inc);
} // END - foreach
- // Init filter system here
- initFilterSystem();
+ // Load config
+ loadIncludeOnce('inc/load_config.php');
// Are we installation routine?
if ((!isInstalling()) && (getOutputMode() != '1') && (getOutputMode() != -1)) {
redirectToUrl('install.php');
} // END - if
- // Administrative functions
+ // Init filter system here
+ initFilterSystem();
+
+ // Load cache
loadIncludeOnce('inc/load_cache.php');
// Run the init filter chain
runFilterChain('init');
-
- // Load configuration file(s) here
- loadIncludeOnce('inc/load_config.php');
}
// Handle fatal errors