}
// Getter for 'max_text_length' config entry
-function getMaxTextLenngth () {
+function getMaxTextLength () {
// Is there cache?
if (!isset($GLOBALS[__FUNCTION__])) {
// Determine it
return $GLOBALS[__FUNCTION__];
}
+// Getter for 'order_min' config entry
+function getOrderMin () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('order_min');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'allow_url_in_text' config entry
+function getAllowUrlInText () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('allow_url_in_text');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Determines whether 'allow_url_in_text' is set to 'Y'
+function isAllowUrlInTextEnabled () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = (getAllowUrlInText() == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Getter for 'allow_url_in_subject' config entry
+function getAllowUrlInSubject () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('allow_url_in_subject');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Determines whether 'allow_url_in_subject' is set to 'Y'
+function isAllowUrlInSubjectEnabled () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = (getAllowUrlInSubject() == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
// [EOF]
?>
return $GLOBALS[__FUNCTION__];
}
+// "Getter" for admin_notify
+function getAdminNotify () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('admin_notify');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for internal_stats
+function getInternalStats () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('internal_stats');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for display_debug_sqls
+function getDisplayDebugSqls () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('display_debug_sqls');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
// [EOF]
?>
* and check the text and subject against some filters
*/
$data['url'] = '';
- if (getConfig('allow_url_in_text') == 'Y') {
+ if (!isAllowUrlInTextEnabled()) {
// Test submitted text against some filters (length, URLs in text etc.)
if ((isInStringIgnoreCase('https://', postRequestElement('text'))) || (isInStringIgnoreCase('http://', postRequestElement('text'))) || (isInStringIgnoreCase('www', postRequestElement('text')))) {
// URL found
} // END - if
// Shall I test the subject line against URLs?
- if (getConfig('allow_url_in_subject') == 'Y') {
+ if (!isAllowUrlInSubjectEnabled()) {
// Check the subject line for issues
setPostRequestElement('subject', str_replace(chr(92), '[nl]', substr(postRequestElement('subject'), 0, 200)));
if ((isInStringIgnoreCase('https://', postRequestElement('subject'))) || (isInStringIgnoreCase('http://', postRequestElement('subject'))) || (isInStringIgnoreCase('www', postRequestElement('subject')))) {
} // END - if
// Enougth receivers entered?
- if ((postRequestElement('receiver') < getConfig('order_min')) && (!isAdmin())) {
+ if ((postRequestElement('receiver') < getOrderMin()) && (!isAdmin())) {
// Less than allowed receivers entered!
$data['url'] = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS3');
} // END - if
// Is there cache?
if (!isset($GLOBALS[__FUNCTION__])) {
// Determine it
- $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y'));
+ $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('other', '0.2.2')) && (getDisplayDebugSqls() == 'Y'));
} // END - if
// Return cache
// Is there cache?
if (!isset($GLOBALS[__FUNCTION__])) {
// Then determine it
- $GLOBALS[__FUNCTION__] = (getConfig('internal_stats') == 'Y');
+ $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('other', '0.2.6')) && (getInternalStats() == 'Y'));
} // END - if
// Return cached value
// Is there cache?
if (!isset($GLOBALS[__FUNCTION__])) {
// Determine it
- $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('other', '0.3.0')) && (getConfig('admin_notify') == 'Y'));
+ $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('other', '0.3.0')) && (getAdminNotify() == 'Y'));
} // END - if
// Return cache