// CFG: CACHE_PATH
setConfigEntry('CACHE_PATH', 'inc/cache/');
-// CFG: STATS-ENABLED (This setting is overwritten by ext-other; at least version 0.2.6)
-setConfigEntry('stats_enabled', 'N');
+// CFG: INTERNAL-STATS (This setting is overwritten by ext-other equal and prior version 0.2.7)
+setConfigEntry('internal_stats', 'N');
// GLOBAL: DEBUG-TEMPLATE-CACHE
setConfigEntry('DEBUG_TEMPLATE_CACHE', 'N');
} // END - if
// Version number
-setThisExtensionVersion('0.2.6');
+setThisExtensionVersion('0.2.7');
// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.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', '0.2.4', '0.2.5', '0.2.6'));
+setExtensionVersionHistory(array('0.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', '0.2.4', '0.2.5', '0.2.6', '0.2.7'));
// Keep this extension always active!
setExtensionAlwaysActive('Y');
setExtensionUpdateNotes("Codelänge aus tables.sql rausgeholt.");
break;
- case '0.2.6': // SQL queries for v0.2.5
+ case '0.2.6': // SQL queries for v0.2.6
addConfigAddSql('stats_enabled', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Interne Statistiken sind nun abschaltbar (kann Performance bringen).");
break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ addConfigChangeSql('stats_enabled', 'internal_stats', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Der Suffix <strong>_enabled</strong> in Konfigurationseinträgen ist deprecated und sollte nicht mehr verwendet werden. Da sonst Wrapper-Funktionsnamen wie z.B. <strong>isStatsEnabledEnabled()</strong> nach streng genommender Namenskonvention entstehen.");
+ break;
} // END - switch
break;
'ADMIN_CONFIG_MINIMUM_AGE' => "Ab welchem Mindestalter dürfen sich Ihre Mitglieder anmelden?",
'ADMIN_CONFIG_SQL_TITLE' => "SQL-Einstellungen",
'ADMIN_CONFIG_DISPLAY_DEBUG_SQLS' => "Sollen die SQL-Abfragen für Administratoren zu Debug-Zwecken angezeigt werden?. Das Einschalten dieser Einstellung kann enorme Performanceverluste bedeuten.",
- 'ADMIN_CONFIG_STATS_TITLE' => "Interne Statistik Einstellungen",
- 'ADMIN_CONFIG_STATS_ENABLED' => "Sollen die internen Statistiken eingeschaltet sein? Das Abschalten dieser Statistiken kann etwas Performance bringen, ist aber für Performancemessungen vorraussetzend.",
+ 'ADMIN_CONFIG_INTERNAL_STATS_TITLE' => "Interne Statistik Einstellungen",
+ 'ADMIN_CONFIG_INTERNAL_STATS_ENABLED' => "Sollen die internen Statistiken eingeschaltet sein? Das Abschalten dieser Statistiken kann etwas Performance bringen, ist aber für Performancemessungen vorraussetzend.",
));
// [EOF]
addYouAreHereLink('admin', __FILE__);
// Activated?
-if (ifStatsAreEnabled()) {
+if (ifInternalStatsEnabled()) {
// Prepare data for the template
$content['db_hits'] = getStatsEntry('db_hits');
$content['cache_hits'] = getStatsEntry('cache_hits');
$content['profile_update'] = createConfigurationTimeSelections('profile_update' , 'YM');
$content['profile_reupdate'] = createConfigurationTimeSelections('resend_profile_update', 'MWD');
- // Prepare more Y/N selections
- foreach (array('show_points_unconfirmed','show_timings','youre_here','member_menu','guest_menu','order_multi_page','autosend_active','send_prof_update','admin_notify','display_debug_sqls','stats_enabled') as $entry) {
- $content[$entry . '_y'] = '';
- $content[$entry . '_n'] = '';
- $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
- } // END - foreach
-
// Prepare more
foreach (array('css_php_direct','css_php_file','css_php_inline','mailid_error_redirect_index','mailid_error_redirect_reject') as $entry) {
$content[$entry] = '';
// Init stats system
function initStatsSystem () {
// Is stats cache loaded?
- if ((!isset($GLOBALS['stats_loaded'])) && (ifStatsAreEnabled())) {
+ if ((!isset($GLOBALS['stats_loaded'])) && (ifInternalStatsEnabled())) {
// Init statistics array
$GLOBALS['stats'] = array();
// Increments a statistics entry
function incrementStatsEntry ($entry, $amount=1) {
// Do we have stats enabled?
- if (!ifStatsAreEnabled()) return;
+ if (!ifInternalStatsEnabled()) {
+ return;
+ } // END - if
// Is it there?
if (isStatsEntrySet($entry)) {
// Filter for flushing statistics
function FILTER_FLUSH_STATS () {
// Now do we have stats?
- if ((isset($GLOBALS['stats'])) && (!isInstallationPhase()) && (ifStatsAreEnabled())) {
+ if ((isset($GLOBALS['stats'])) && (!isInstallationPhase()) && (ifInternalStatsEnabled())) {
// Write statistics to temporary table
writeStatsTable();
} // END - if
}
// Checks wether stats are enabled
-function ifStatsAreEnabled () {
+function ifInternalStatsEnabled () {
// Do we have cache?
if (!isset($GLOBALS[__FUNCTION__])) {
// Then determine it
- $GLOBALS[__FUNCTION__] = (getConfig('stats_enabled') == 'Y');
+ $GLOBALS[__FUNCTION__] = (getConfig('internal_stats') == 'Y');
} // END - if
// Return cached value
{--ADMIN_CONFIG_ADMIN_MENU_JAVASCRIPT_ENABLED--}
</td>
<td class="bottom" align="center" colspan="2">
- {%template,ConfigurationYesNoSelectionBox=admin_menu_javascript_enabled%}
+ {%template,ConfigurationYesNoSelectionBox=admin_menu_javascript%}
</td>
</tr>
<tr>
<tr>
<td colspan="2" align="center" class="table_header bottom">
- <strong>{--ADMIN_CONFIG_STATS_TITLE--}</strong>
+ <strong>{--ADMIN_CONFIG_INTERNAL_STATS_TITLE--}</strong>
</td>
</tr>
<tr>
<td class="bottom" align="right">
- {--ADMIN_CONFIG_STATS_ENABLED--}
+ {--ADMIN_CONFIG_INTERNAL_STATS_ENABLED--}
</td>
<td class="bottom" align="center">
- {%template,ConfigurationYesNoSelectionBox=stats_enabled%}
+ {%template,ConfigurationYesNoSelectionBox=internal_stats%}
</td>
</tr>