./inc/functions.php:2272: // @TODO This is still very static, rewrite it somehow
./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
./inc/install-functions.php:57: // @TODO DEACTIVATED: changeDataInInclude(getCachePath() . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
-./inc/language/de.php:1085:// @TODO Rewrite these two constants
-./inc/language/de.php:1100:// @TODO Rewrite these three constants
+./inc/language/de.php:1087:// @TODO Rewrite these two constants
+./inc/language/de.php:1102:// @TODO Rewrite these three constants
./inc/language/de.php:280: // @TODO Following two are unused?
./inc/language/de.php:784:// @TODO Are these constants longer used?
./inc/language-functions.php:243: // @TODO These are all valid languages, again hard-coded
./inc/template-functions.php:1054: // @TODO Deprecate this thing
./inc/template-functions.php:1141: // @TODO This can be easily moved out after the merge from EL branch to this is complete
./inc/template-functions.php:1174: // @TODO Add a little more infos here
-./inc/template-functions.php:1462:// @TODO Lame description for this function
-./inc/template-functions.php:1484: // @TODO Move this in a filter
+./inc/template-functions.php:1483:// @TODO Lame description for this function
+./inc/template-functions.php:1505: // @TODO Move this in a filter
./inc/template-functions.php:189: * @TODO On some pages this is buggy
./inc/template-functions.php:265: // @TODO Remove this sanity-check if all is fine
./inc/template-functions.php:578:// @TODO $simple/$constants are deprecated
'ADMIN_NO_POINTS_REPAYED' => "Die Mailbuchung hatte keine {?POINTS?} zum zurückbuchen.",
'ADMIN_POINTS_SHREDDED' => "Es wurden <span class=\"data\">%s {?POINTS?}</span> geschrettert.",
'ADMIN_EXTENSION_PROBLEM_EXTENSION_INACTIVE' => "Die Erweiterung <span class=\"data\">%s</span> ist derzeit deaktiviert. <a href=\"{%%url=modules.php?module=admin&what=extensions%%}\">Hier</a> können Sie diese aktivieren.",
+ 'ADMIN_EXTENSION_PROBLEM_EXTENSION_OUTDATED' => "Die Erweiterung <span class=\"data\">%s</span> ist veraltet. Ihre Version: <span class=\"data\">{%%ext,version=%s%%}</span>, erwartete Version: <span class=\"data\">%s</span>.",
'ADMIN_EXTENSION_PROBLEM_EXTENSION_NOT_INSTALLED' => "Die Erweiterung <span class=\"data\">%s</span> ist derzeit nicht installiert. <a href=\"{%%url=modules.php?module=admin&what=extensions%%}\">Hier</a> können Sie diese aktivieren.",
'ADMIN_TASK_ROW_EXTENSION_NOT_INSTALLED' => "Erweiterung <span class=\"data\">%s</span> nicht installiert..",
'EXTENSION_PROBLEM_EXTENSION_INACTIVE' => "Kann nicht fortfahren! Fehler: Erweiterung <span class=\"data\">%s</span> deaktiviert.",
'EXTENSION_PROBLEM_EXTENSION_NOT_INSTALLED' => "Kann nicht fortfahren! Fehler: Erweiterung <span class=\"data\">%s</span> nicht installiert.",
'EXTENSION_PROBLEM_UNSET_EXT' => "Skriptfehler: Parameter <strong>ext</strong> nicht gesetzt.",
+ 'EXTENSION_PROBLEM_EXTENSION_OUTDATED' => "Kann nicht fortfahren! Fehler Eine Erweiterung ist veraltet. Bitte benachrichten Sie den Support.",
'EXTENSION_WARNING_EXTENSION_INACTIVE' => "Die Erweiterung <span class=\"data\">%s</span> ist nicht aktiv. Dies kann zu Störungen führen.<br />\nBitte aktivieren Sie diese unter <em>Verschiedenes->Erweiterungen</em>.",
'EXTENSION_WARNING_USER_LIMIT' => "Die Erweiterung <u>user</u> ist nicht aktiv. Die Anzahl Mitglieder pro Seite wurde auf 100 gesetzt. Bitte aktivieren Sie diese unter <em>Verschiedenes->Erweiterungen</em>.",
'ADMIN_PROXY_SETTINGS_INVALID' => "Ihre Proxy-Einstellungen scheinen ungültig zu sein.",
// Overlapping detected
loadTemplate('admin_settings_saved', false, '{--RALLYE_OVERLAP_TIMES--}');
}
-}
+} // END - if
// Prepare some constants for the template
$content['auto_add_options'] = generateOptionList('/ARRAY/', array('Y','N'), array('{--YES--}', '{--NO--}' ));
// Set offset an current page to default values
if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1);
-if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getConfig('mails_page'));
+if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getMailsPage());
// Add limitation to SQL string
$sql .= ' LIMIT ' . (getRequestParameter('offset') * getRequestParameter('page') - getRequestParameter('offset')) . ', ' . getRequestParameter('offset');
$result = SQL_QUERY($sql, __FILE__, __LINE__);
// Calculate pages
-$numPages = round(SQL_NUMROWS($result_maximum) / getConfig('mails_page') + 0.5);
+$numPages = round(SQL_NUMROWS($result_maximum) / getMailsPage() + 0.5);
// Free the result which we don't need
SQL_FREERESULT($result_maximum);
// Mail orders are in pool so we can display them
// Add navigation table rows
- $content['top_email_nav'] = addEmailNavigation($numPages, getConfig('mails_page'), true , 3, true);
- $content['bottom_email_nav'] = addEmailNavigation($numPages, getConfig('mails_page'), false, 3, true);
+ $content['top_email_nav'] = addEmailNavigation($numPages, getMailsPage(), true , 3, true);
+ $content['bottom_email_nav'] = addEmailNavigation($numPages, getMailsPage(), false, 3, true);
// List all entries
$OUT = '';
// Add description as navigation point
addYouAreHereLink('admin', __FILE__);
+// Is 'sql_patches' updated?
+if (!isExtensionInstalledAndNewer('sql_patches', '0.7.4')) {
+ // No, abort here
+ loadTemplate('admin_settings_saved', false, generateExtensionOutdatedMessage('sql_patches', '0.7.4'));
+ return false;
+} // END - if
+
// Normal mails ordered by your members
$sql = "SELECT
`id`, `sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `target_send`, `mails_sent`, `cat_id`
`is_notify`='N'
ORDER BY
`timestamp` DESC", __FILE__, __LINE__);
-}
+} // END - if
// Check for maximum pages
$result_normal = SQL_QUERY($sql, __FILE__, __LINE__);
if (!isGetRequestParameterSet('offset')) {
if (isConfigEntrySet('mails_page')) {
// Set config entry
- setGetRequestParameter('offset', getConfig('mails_page'));
+ setGetRequestParameter('offset', getMailsPage());
} else {
// Set default one
setGetRequestParameter('offset', 10);
// Calculate pages
$numPages = '0';
if (isConfigEntrySet('mails_page')) {
- $numPages = round(SQL_NUMROWS($result_normal) / getConfig('mails_page') + 0.3);
+ $numPages = round(SQL_NUMROWS($result_normal) / getMailsPage() + 0.3);
} // END - if
// Free result
SQL_FREERESULT($result_list);
// Add navigation (with change box and colspan=3)
- $content['nav'] = addEmailNavigation($numPages, getConfig('mails_page'), false, 3, true);
+ $content['nav'] = addEmailNavigation($numPages, getMailsPage(), false, 3, true);
// Prepare content
$content['rows'] = $OUT;
// Load bonus mails only when extension is active
if (!SQL_HASZERONUMS($result_bonus)) {
// Calculate pages
- $numPages = round(SQL_NUMROWS($result_bonus) / getConfig('mails_page') + 0.5);
+ $numPages = round(SQL_NUMROWS($result_bonus) / getMailsPage() + 0.5);
// List emails
$OUT = '';
} // END - while
// Add navigation (without change box but with colspan=3)
- $content['nav'] = addEmailNavigation($numPages, getConfig('mails_page'), false, 3, true);
+ $content['nav'] = addEmailNavigation($numPages, getMailsPage(), false, 3, true);
// Prepare content
$content['rows'] = $OUT;
// Set offset an current page to default values
if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1);
-if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getConfig('mails_page'));
+if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getMailsPage());
if (isExtensionActive('bonus')) {
// Bonus mails sent by you
// Load bonus mails only when extension is active
if (!SQL_HASZERONUMS($result_bonus)) {
// Calculate pages
- $numPages = round(SQL_NUMROWS($result_bonus) / getConfig('mails_page') + 0.5);
+ $numPages = round(SQL_NUMROWS($result_bonus) / getMailsPage() + 0.5);
// List emails
$OUT = ''; $content = array();
} // END - if
// Add navigation (without change box but with colspan=3)
- $content['nav'] = addEmailNavigation($numPages, getConfig('mails_page'), false, 3, true);
+ $content['nav'] = addEmailNavigation($numPages, getMailsPage(), false, 3, true);
// Prepare content
$content['rows'] = $OUT;
} // END - if
}
+// Generates a 'extension foo out-dated' message
+function generateExtensionOutdatedMessage ($ext_name, $ext_ver) {
+ // Is the extension empty?
+ if (empty($ext_name)) {
+ // This should not happen
+ debug_report_bug(__FUNCTION__, __LINE__, 'Parameter ext is empty. This should not happen.');
+ } // END - if
+
+ // Default message
+ $message = getMaskedMessage('EXTENSION_PROBLEM_EXTENSION_OUTDATED', $ext_name);
+
+ // Is an admin logged in?
+ if (isAdmin()) {
+ // Then output admin message
+ $message = sprintf(getMessage('ADMIN_EXTENSION_PROBLEM_EXTENSION_INACTIVE'), $ext_name, $ext_name, $ext_ver);
+ } // END - if
+
+ // Return prepared message
+ return $message;
+}
+
// Generates a 'extension foo inactive' message
function generateExtensionInactiveMessage ($ext_name) {
// Is the extension empty?
return $GLOBALS[__FUNCTION__];
}
+// "Getter" for mails_page
+function getMailsPage () {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('mails_page');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
// "Getter" for __DB_NAME
function getDbName () {
// Do we have cache?