Several constant fixes
authorRoland Häder <roland@mxchange.org>
Fri, 28 Mar 2008 18:48:38 +0000 (18:48 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 28 Mar 2008 18:48:38 +0000 (18:48 +0000)
inc/install-inc.php
inc/libs/task_functions.php
inc/modules/admin.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-add_rallye.php
inc/modules/guest/what-login.php
inc/modules/guest/what-mediadata.php
inc/modules/guest/what-register.php
inc/modules/member/what-mydata.php
install.php

index 22205b1..9bdd5f3 100644 (file)
@@ -372,24 +372,24 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                                                }
 
                                                // Ok, all done. So we can write the config data to the php files
-                                               if ($_POST['spath'] != PATH) install_WriteData($_POST['spath']."inc/config.php", "SERVER-PATH", "define ('PATH', \"", "\");", $_POST['spath'], 0);
-                                               if ($_POST['burl']  != URL)  install_WriteData($_POST['spath']."inc/config.php", "HOST-URL", "define ('URL', \"", "\");", $_POST['burl'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "MAIN_TITLE", "define ('MAIN_TITLE', \"", "\");", $_POST['title'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "SLOGAN", "define ('SLOGAN', \"", "\");", $_POST['slogan'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "WEBMASTER", "define ('WEBMASTER', \"", "\");", $_POST['email'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "NULLPASS-WARNING", "define ('warn_no_pass', ", ");", $_POST['warn_no_pass'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "WRITE-FOOTER", "define ('WRITE_FOOTER', ", ");", $_POST['wfooter'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "BACKLINK", "define ('ENABLE_BACKLINK', ", ");", $_POST['blink'], 0);
-                                               // install_WriteData($_POST['spath']."inc/config.php", "OUTPUT-MODE", "define ('OUTPUT_MODE', \"", "\");", $_POST['omode'], 0);
+                                               if ($_POST['spath'] != PATH) install_WriteData($_POST['spath']."inc/config.php", "SERVER-PATH", "define('PATH', \"", "\");", $_POST['spath'], 0);
+                                               if ($_POST['burl']  != URL)  install_WriteData($_POST['spath']."inc/config.php", "HOST-URL", "define('URL', \"", "\");", $_POST['burl'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "MAIN_TITLE", "define('MAIN_TITLE', \"", "\");", $_POST['title'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "SLOGAN", "define('SLOGAN', \"", "\");", $_POST['slogan'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "WEBMASTER", "define('WEBMASTER', \"", "\");", $_POST['email'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "NULLPASS-WARNING", "define('warn_no_pass', ", ");", $_POST['warn_no_pass'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "WRITE-FOOTER", "define('WRITE_FOOTER', ", ");", $_POST['wfooter'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "BACKLINK", "define('ENABLE_BACKLINK', ", ");", $_POST['blink'], 0);
+                                               // install_WriteData($_POST['spath']."inc/config.php", "OUTPUT-MODE", "define('OUTPUT_MODE', \"", "\");", $_POST['omode'], 0);
                                                install_WriteData($_POST['spath']."inc/config.php", "MYSQL-HOST", "     'host'     => \"", "\",", $mysql['host'], 0);
                                                install_WriteData($_POST['spath']."inc/config.php", "MYSQL-DBASE", "    'dbase'    => \"", "\",", $mysql['dbase'], 0);
                                                install_WriteData($_POST['spath']."inc/config.php", "MYSQL-LOGIN", "    'login'    => \"", "\",", $mysql['login'], 0);
                                                install_WriteData($_POST['spath']."inc/config.php", "MYSQL-PASSWORD", " 'password' => \"", "\",", $mysql['pass1'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "MYSQL-PREFIX", "define ('_MYSQL_PREFIX', \"", "\");", $mysql['prefix'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "SMTP-HOSTNAME", "define ('SMTP_HOSTNAME', \"", "\");", $_POST['smtp_host'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "SMTP-USER", "define ('SMTP_USER', \"", "\");", $_POST['smtp_user'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "SMTP-PASSWORD", "define ('SMTP_PASSWORD', \"", "\");", $_POST['smtp_pass'], 0);
-                                               install_WriteData($_POST['spath']."inc/config.php", "INSTALLED", "define ('mxchange_installed', ", ");", "true", 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "MYSQL-PREFIX", "define('_MYSQL_PREFIX', \"", "\");", $mysql['prefix'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "SMTP-HOSTNAME", "define('SMTP_HOSTNAME', \"", "\");", $_POST['smtp_host'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "SMTP-USER", "define('SMTP_USER', \"", "\");", $_POST['smtp_user'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "SMTP-PASSWORD", "define('SMTP_PASSWORD', \"", "\");", $_POST['smtp_pass'], 0);
+                                               install_WriteData($_POST['spath']."inc/config.php", "INSTALLED", "define('mxchange_installed', ", ");", "true", 0);
 
                                                // Close the link
                                                SQL_CLOSE($link, __FILE__, __LINE__);
index ce4b5f6..7f103ca 100644 (file)
@@ -63,12 +63,12 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main)
                SQL_FREERESULT($result);
 
                if ($value > 0) {
-                       define ('__TASK_UPDATE_VALUE', "<A href=\"".URL."/modules.php?module=admin&amp;what=list_task&amp;type=updates\">".$value."</A>");
+                       define('__TASK_UPDATE_VALUE', "<A href=\"".URL."/modules.php?module=admin&amp;what=list_task&amp;type=updates\">".$value."</A>");
                } else {
-                       define ('__TASK_UPDATE_VALUE', "0");
+                       define('__TASK_UPDATE_VALUE', "0");
                }
        } else {
-               define ('__TASK_UPDATE_VALUE', "0");
+               define('__TASK_UPDATE_VALUE', "0");
        }
 
        //
index e7aabd5..c364ae2 100644 (file)
@@ -67,7 +67,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                switch ($ret)
                {
                case "done":
-                       admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define ('admin_registered', ", ");", "true", 0);
+                       admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
                        if (!_FATAL) {
                                // Registering is done
                                LOAD_URL(URL."/modules.php?module=admin&amp;action=login&register=done");
@@ -91,7 +91,7 @@ if (!isBooleanConstantAndTrue('admin_registered')) {
                        }
                        if (!isBooleanConstantAndTrue('admin_registered')) {
                                // Write to config that registration is done
-                               admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define ('admin_registered', ", ");", "true", 0);
+                               admin_WriteData(PATH."inc/config.php", "ADMIN-SETUP", "define('admin_registered', ", ");", "true", 0);
 
                                // Load URL for login
                                $URL = URL."/modules.php?module=admin&amp;action=login";
index dd93fce..6aba44b 100644 (file)
@@ -199,17 +199,17 @@ function admin_WriteData ($file, $comment, $prefix, $suffix, $DATA, $seek=0)
                                // Copy back tmp file and delete tmp :-)
                                @copy($tmp, $file);
                                @unlink($tmp);
-                               define ('_FATAL', false);
+                               define('_FATAL', false);
                        }
                         elseif (!$found)
                        {
                                OUTPUT_HTML("<STRONG>CHANGE:</STRONG> 404!");
-                               define ('_FATAL', true);
+                               define('_FATAL', true);
                        }
                         else
                        {
                                OUTPUT_HTML("<STRONG>TMP:</STRONG> UNDONE!");
-                               define ('_FATAL', true);
+                               define('_FATAL', true);
                        }
                }
        }
index d2ee8c9..0b46d15 100644 (file)
@@ -121,7 +121,7 @@ define('_END_MONTH', ADD_SELECTION("month", $M               , "end"));
 define('_END_YEAR' , ADD_SELECTION("year" , $Y               , "end"));
 
 // Transfer (maybe found) templates into constant for the template
-define ('_TEMPLATES', RALLYE_TEMPLATE_SELECTION());
+define('_TEMPLATES', RALLYE_TEMPLATE_SELECTION());
 
 // Load template
 LOAD_TEMPLATE("admin_add_rallye");
index 9aea8f9..62450c8 100644 (file)
@@ -328,12 +328,12 @@ if (IS_LOGGED_IN()) {
   </TD>
   <TD width=\"10\">&nbsp;</TD>
 </TR>\n";
-               define ('LOGIN_FAILURE_MSG', $MSG);
+               define('LOGIN_FAILURE_MSG', $MSG);
        }
         else
        {
                // No problems, no output
-               define ('LOGIN_FAILURE_MSG', "");
+               define('LOGIN_FAILURE_MSG', "");
        }
        // Display login form with resend-password form
        if (EXT_IS_ACTIVE("nickname"))
index 994a48f..b6c41f6 100644 (file)
@@ -133,7 +133,7 @@ define('user_stats', ($nmails + $bmails));
 define('sent'      , $sent);
 
 // All clicks
-define ('user_links', abs($sent - $clicks));
+define('user_links', abs($sent - $clicks));
 
 $clr = "0.00000";
 if ($sent > 0) $clr = $clicks / $sent * 100;
index eaad356..2ec132d 100644 (file)
@@ -416,10 +416,10 @@ array(
        }
 
        // Adds a table for the guests with all visible categories
-       define ('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE("guest", true));
+       define('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE("guest", true));
 
        // Adds maximum receiveable mails list... :)
-       define ('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST("guest", "", true));
+       define('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST("guest", "", true));
 
        // Check if nickname extension is active and get state if nickname is selected or userid
        $nick = false;
@@ -443,7 +443,7 @@ array(
                define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid", true, $GLOBALS['refid']));
        } else {
                // Load "hide" form template
-               define ('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
+               define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
        }
 
        // You may want to modify the register_header.tpl.xx file and not this script when you add your scripts etc. :-)
index ee8c3d9..fbcf7b5 100644 (file)
@@ -96,8 +96,8 @@ case "show": // Show his data
        if (strlen($DATA[8]) == 1) $DATA[8] = "0".$DATA[8];
        switch (GET_LANGUAGE())
        {
-               case "de": define ('DOB', $DATA[7].".".$DATA[8].".".$DATA[9]); break;
-               default  : define ('DOB', $DATA[8]."-".$DATA[7]."-".$DATA[9]); break;
+               case "de": define('DOB', $DATA[7].".".$DATA[8].".".$DATA[9]); break;
+               default  : define('DOB', $DATA[8]."-".$DATA[7]."-".$DATA[9]); break;
        }
 
        if (EXT_IS_ACTIVE("country"))
index 2dc4e84..3e394cc 100644 (file)
@@ -46,7 +46,7 @@
  ************************************************************************/
 
 // Tell every module / include file we are installing
-define ('mxchange_installing', true);
+define('mxchange_installing', true);
 
 // Load security system
 require ("inc/libs/security_functions.php");