]> git.mxchange.org Git - mailer.git/commitdiff
Fixes/rewrites for content-type
authorRoland Häder <roland@mxchange.org>
Wed, 16 Dec 2009 19:45:35 +0000 (19:45 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 16 Dec 2009 19:45:35 +0000 (19:45 +0000)
admin.php
agb.php
confirm.php
inc/functions.php
inc/modules/admin/what-usr_online.php
inc/modules/guest/what-register.php
js.php
ref.php
sponsor_confirm.php
sponsor_ref.php

index b2c5768b7e085066cf6c8974c2e8e08d3a83470e..629a255f768be2860ef616ba0e7cd55b42c588ab 100644 (file)
--- a/admin.php
+++ b/admin.php
@@ -47,7 +47,7 @@ $GLOBALS['output_mode'] = -1;
 require('inc/config-global.php');
 
 // Set content type for e.g. search engines
-if (isSpider()) setContentType('text/html');
+setContentType('text/html');
 
 // Is the admin logged-in and no sql_patches installed?
 if ((isAdmin()) && (!isExtensionActive('sql_patches'))) {
diff --git a/agb.php b/agb.php
index 102f160db8d4b6230496714bf17fc3e80dc5c140..fb1630b884ca365b278d26b612bc209e52e367a9 100644 (file)
--- a/agb.php
+++ b/agb.php
@@ -47,7 +47,7 @@ $GLOBALS['output_mode'] = -1;
 require('inc/config-global.php');
 
 // Set content type for e.g. search engines
-if (isSpider()) setContentType('text/html');
+setContentType('text/html');
 
 // Simply redirect... :-)
 redirectToUrl('modules.php?module=index&amp;what=agb');
index b4134087323c5c5118d136e9b6640269e49e4856..84c94b68653dbb047bb2eaf240ba20904303e722 100644 (file)
@@ -47,7 +47,7 @@ $GLOBALS['output_mode'] = -1;
 require('inc/config-global.php');
 
 // Set content type for e.g. search engines
-if (isSpider()) setContentType('text/html');
+setContentType('text/html');
 
 // No hash provided by default
 $URL = 'modules.php?module=index';
index 744aadb9f4013e15957808ee834e50e188346e0b..dcdf01e71ceb44f365db39c93319cfa8485a6b48 100644 (file)
@@ -2292,11 +2292,8 @@ function app_die ($F, $L, $message) {
                // Make sure, that the script realy realy diese here and now
                $GLOBALS['app_died'] = true;
 
-               // Set content type if not set
-               if (!isContentTypeSet()) {
-                       // text/html is the right one
-                       setContentType('text/html');
-               } // END - if
+               // Set content type as text/html
+               setContentType('text/html');
 
                // Load header
                loadIncludeOnce('inc/header.php');
index 019b56484207033299c95053e4f29df5c990fa12..24c0db7dbbd0b0fd2ece410b4dd8822d48b5070d 100644 (file)
@@ -39,7 +39,7 @@
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAdmin())) {
        die();
-}
+} // END - if
 
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
@@ -97,7 +97,7 @@ if (isExtensionActive('online')) {
 
                // Remember rows and fancy time in array
                $content['rows']           = $OUT;
-               $content['online_timeout'] = getMaskedMessage('ONLINE_TIMEOUT_IS');
+               $content['online_timeout'] = getMessage('ONLINE_TIMEOUT_IS');
 
                // Load footer template
                loadTemplate('admin_list_online', false, $content);
index 827231b4996958e2015ba68c06b20b6ad8e81d07..98c7d4ee983714944fc012fb96ba112a24b6d9ae 100644 (file)
@@ -61,46 +61,49 @@ if ((isFormSent()) && (isRegistrationDataComplete())) {
        // Output success registration
        loadTemplate('admin_settings_saved', false, getMessage('REGISTRATION_DONE'));
 } else {
-       if (postRequestParameter('agree') == '!') {
-               registerOutputFailedMessage('HAVE_TO_AGREE');
-       } // END - if
-
-       if (postRequestParameter('email') == '!') {
-               registerOutputFailedMessage('ENTER_EMAIL');
-               setPostRequestParameter('email', '');
-       } elseif (postRequestParameter('email') == '?') {
-               registerOutputFailedMessage('EMAIL_ALREADY_DB');
-               setPostRequestParameter('email', '');
-       }
-
-       if (postRequestParameter('surname') == '!') {
-               registerOutputFailedMessage('ENTER_SURNAME');
-               setPostRequestParameter('surname', '');
-       } // END - if
-
-       if (postRequestParameter('family') == '!') {
-               registerOutputFailedMessage('ENTER_FAMILY');
-               setPostRequestParameter('family', '');
-       } // END - if
-
-       if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) {
-               registerOutputFailedMessage('ENTER_BOTH_PASSWORDS');
-       } elseif (postRequestParameter('pass1') == '!') {
-               registerOutputFailedMessage('ENTER_PASS1');
-       } elseif (postRequestParameter('pass2') == '!') {
-               registerOutputFailedMessage('ENTER_PASS2');
-       }
-
-       if ($GLOBALS['registration_short_password'] === true) {
-               registerOutputFailedMessage('SHORT_PASS', ': ' . getConfig('pass_len'));
-       } // END - if
-
-       if ($GLOBALS['registration_ip_timeout'] === true) {
-               registerOutputFailedMessage('REMOTE_ADDR_TIMEOUT');
-       } // END - if
-
-       if ((!empty($GLOBALS['register_selected_cats'])) && ($GLOBALS['register_selected_cats'] < getConfig('least_cats'))) {
-               registerOutputFailedMessage('', getMessage('CATS_LEAST'));
+       // Do this only if form is sent
+       if (isFormSent()) {
+               if (postRequestParameter('agree') == '!') {
+                       registerOutputFailedMessage('HAVE_TO_AGREE');
+               } // END - if
+
+               if (postRequestParameter('email') == '!') {
+                       registerOutputFailedMessage('ENTER_EMAIL');
+                       setPostRequestParameter('email', '');
+               } elseif (postRequestParameter('email') == '?') {
+                       registerOutputFailedMessage('EMAIL_ALREADY_DB');
+                       setPostRequestParameter('email', '');
+               }
+
+               if (postRequestParameter('surname') == '!') {
+                       registerOutputFailedMessage('ENTER_SURNAME');
+                       setPostRequestParameter('surname', '');
+               } // END - if
+
+               if (postRequestParameter('family') == '!') {
+                       registerOutputFailedMessage('ENTER_FAMILY');
+                       setPostRequestParameter('family', '');
+               } // END - if
+
+               if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) {
+                       registerOutputFailedMessage('ENTER_BOTH_PASSWORDS');
+               } elseif (postRequestParameter('pass1') == '!') {
+                       registerOutputFailedMessage('ENTER_PASS1');
+               } elseif (postRequestParameter('pass2') == '!') {
+                       registerOutputFailedMessage('ENTER_PASS2');
+               }
+
+               if ((isset($GLOBALS['registration_short_password'])) && ($GLOBALS['registration_short_password'] === true)) {
+                       registerOutputFailedMessage('SHORT_PASS', ': ' . getConfig('pass_len'));
+               } // END - if
+
+               if ((isset($GLOBALS['registration_ip_timeout'])) && ($GLOBALS['registration_ip_timeout'] === true)) {
+                       registerOutputFailedMessage('REMOTE_ADDR_TIMEOUT');
+               } // END - if
+
+               if ((!empty($GLOBALS['register_selected_cats'])) && ($GLOBALS['register_selected_cats'] < getConfig('least_cats'))) {
+                       registerOutputFailedMessage('', getMessage('CATS_LEAST'));
+               } // END - if
        } // END - if
 
        // Generate birthday selection
diff --git a/js.php b/js.php
index 6cdea2a1c6545d812b82de7e244fb7e6ddb00605..b12d5270ed4816cb59f2d1816834544625cbe672 100644 (file)
--- a/js.php
+++ b/js.php
@@ -55,11 +55,11 @@ $GLOBALS['module'] = 'js';
 // Load the required file(s)
 require('inc/config-global.php');
 
+// Set header
+setContentType('text/javascript');
+
 // Is 'js' is provied?
 if (isGetRequestParameterSet('js')) {
-       // Set header
-       setContentType('text/javascript');
-
        // Load header
        loadIncludeOnce('inc/header.php');
 
diff --git a/ref.php b/ref.php
index f3fa2597bb8842c1952d0d279dfc4079ab8c421c..a475c51acea62bfee71d163502ec7bc87677bcae 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -47,7 +47,7 @@ $GLOBALS['output_mode'] = -1;
 require('inc/config-global.php');
 
 // Set content type for e.g. search engines
-if (isSpider()) setContentType('text/html');
+setContentType('text/html');
 
 // No refid by default
 $URL = 'modules.php?module=index';
index 875728f9b0b58ea1cf20a6258af9673d4ee1859a..c6301e32758e912a74d673291e8cc7e087bf3ae9 100644 (file)
@@ -48,7 +48,7 @@ $GLOBALS['output_mode'] = -2;
 require('inc/config-global.php');
 
 // Set content type for e.g. search engines
-if (isSpider()) setContentType('text/html');
+setContentType('text/html');
 
 // No hash provided by default
 $URL = 'modules.php?module=index';
index 6fccdfda7070c656e07f6df7f694a3da5fd0448a..8f732c086c8f55bd067f399bfffbae746c017f2f 100644 (file)
@@ -48,7 +48,7 @@ $GLOBALS['output_mode'] = -2;
 require('inc/config-global.php');
 
 // Set content type for e.g. search engines
-if (isSpider()) setContentType('text/html');
+setContentType('text/html');
 
 // Base URL for redirection
 $URL = 'modules.php?module=index&amp;what=sponsor_reg&amp;refid=';