Korn/csh support improved, if() block rewritten:
authorRoland Häder <roland@mxchange.org>
Wed, 6 Oct 2010 04:07:48 +0000 (04:07 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 6 Oct 2010 04:07:48 +0000 (04:07 +0000)
- Support for non-bash (e.g. korn/csh) shells in todo-builder.sh
- if() block rewritten to curley braces
- Better TODO lines (fixed)
- TODOs.txt updated

DOCS/TODOs.txt
DOCS/todo-builder.sh
inc/extensions-functions.php
inc/mysql-manager.php
mailid_top.php

index 44c02fc533add09bf8a64257e0aea2eefbe0f8db..436f5d35b6e09183ec1afc04f4829b328a779843 100644 (file)
 ./inc/wrapper-functions.php:452:// @TODO Do some more sanity check here
 ./mailid.php:138:                                      // @TODO Rewrite this to a filter
 ./mailid.php:95:               // @TODO Rewrite this to a filter
-./mailid_top.php:132:                                  // @TODO Rewrite this to a filter
-./mailid_top.php:179:                                                  // @TODO Rewrite this to a filter
-./mailid_top.php:186:                                                                  // @TODO Rewrite this to a filter
-./mailid_top.php:221:                                                                  // @TODO Rewrite these blocks to filter
-./mailid_top.php:254:                                                                          // @TODO Try to rewrite the following unset()
-./mailid_top.php:99:           // @TODO Rewrite this to a filter
+./mailid_top.php:102:          // @TODO Rewrite this to a filter
+./mailid_top.php:135:                                  // @TODO Rewrite this to a filter
+./mailid_top.php:182:                                                  // @TODO Rewrite this to a filter
+./mailid_top.php:189:                                                                  // @TODO Rewrite this to a filter
+./mailid_top.php:224:                                                                  // @TODO Rewrite these blocks to filter
+./mailid_top.php:257:                                                                          // @TODO Try to rewrite the following unset()
 ./network-check.php:54:// @TODO Add processing of request here
 ./show_bonus.php:105:                  // @TODO No more needed? $content['points'] = translateComma($content['points']);
 ./view.php:68:         // @TODO No banner found, output some default banner
index 9eb697114bbe60c348dd8f906d56a7eb6368e7cd..f059853f7c9e48f27dc396a5ae071097557ba262 100755 (executable)
@@ -11,21 +11,21 @@ fi
 TODO=`dirname $0`/TODOs.txt
 
 echo "$0: Generating TODOs.txt ..."
-echo "### WARNING: THIS FILE IS AUTO-GENERATED BY $0 (uid=$UID/user=$USER) ###" > $TODO
-echo "### DO NOT EDIT THIS FILE. ###" >> $TODO
+echo "### WARNING: THIS FILE IS AUTO-GENERATED BY $0 (uid=${UID}/user=${USER}) ###" > ${TODO}
+echo "### DO NOT EDIT THIS FILE. ###" >> ${TODO}
 echo "$0: Searching for @TODO ..."
-find -type f -name "*.php" -exec grep -Hin "@TODO" {} \; | sort >> $TODO
-find -type f -name "*.tpl" -exec grep -Hin "@TODO" {} \; | sort >> $TODO
-echo "### ### DEPRECATION FOLLOWS: ### ###" >> $TODO
+find -type f -name "*.php" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO}
+find -type f -name "*.tpl" -exec grep -Hin "@TODO" {} \; | sort >> ${TODO}
+echo "### ### DEPRECATION FOLLOWS: ### ###" >> ${TODO}
 echo "$0: Searching for @DEPRECATED ..."
-find -type f -name "*.php" -exec grep -Hin "@DEPRECATED" {} \; | sort >> $TODO
-find -type f -name "*.tpl" -exec grep -Hin "@DEPRECATED" {} \; | sort >> $TODO
+find -type f -name "*.php" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO}
+find -type f -name "*.tpl" -exec grep -Hin "@DEPRECATED" {} \; | sort >> ${TODO}
 echo "$0: Checking for template-warnings.log ..."
 LOG=`dirname $0`/template-warnings.log
-if test -e "$LOG"; then
+if test -e "${LOG}"; then
        echo "$0: Found a template-warnings.log, adding it..."
-       echo "### ### template-warnings.log follows: ### ###" >> $TODO
-       cat $LOG >> $TODO
+       echo "### ### template-warnings.log follows: ### ###" >> ${TODO}
+       cat ${LOG} >> ${TODO}
 fi
 echo "$0: Done."
 exit 0
index 8fab51c468ce87a10d168a3e8fe0ca9e7e2b9eed..332a3d2324e8db138c49751ea49ba89b70735b93 100644 (file)
@@ -1201,7 +1201,7 @@ function isExtensionDeprecated () {
 
 // Setter for EXT_UPDATE_DEPENDS flag
 function addExtensionDependency ($updateDepends) {
-       //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ' - ENTERED!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ' - ENTERED!');
        // Is the update depency empty? (NEED TO BE FIXED!)
        if (empty($updateDepends)) {
                // Please report this bug!
@@ -1221,7 +1221,7 @@ function addExtensionDependency ($updateDepends) {
 
        // Remember it in the list of running updates
        $GLOBALS['ext_running_updates'][getCurrentExtensionName()][] = $updateDepends;
-       //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ' - EXIT!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . '/' . $updateDepends . ' - EXIT!');
 }
 
 // Getter for running updates
@@ -1546,19 +1546,19 @@ function redirectOnUninstalledExtension ($ext_name) {
 // Filter for initialization of all extensions by loading them in 'init' mode
 function FILTER_INIT_EXTENSIONS () {
        // Do we have some entries?
-       //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY!');
        if (isset($GLOBALS['cache_array']['extension']['ext_name'])) {
                // Load all found extensions if found
-               //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHE - START!');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHE - START!');
                foreach ($GLOBALS['cache_array']['extension']['ext_name'] as $key => $ext_name) {
                        // Load it
-                       //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name='.$ext_name.' - START');
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name='.$ext_name.' - START');
                        loadExtension($ext_name, 'init', getExtensionVersion($ext_name));
-                       //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name='.$ext_name.' - END');
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name='.$ext_name.' - END');
                } // END - foreach
-               //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHE - END!');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHE - END!');
        } // END - if
-       //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'EXIT!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'EXIT!');
 }
 
 // Setter for extension mode
index 749a368f42e504db7d443c74214e19c48a530eb2..f6bc8baaeca843f8454a8a61ddd702ffc50030a0 100644 (file)
@@ -407,7 +407,7 @@ function isMember () {
                                $ret = true;
                        } else {
                                // Maybe got locked etc.
-                               //* DEBUG */ logDebugMessage(__FUNCTION__, __LINE__, 'status=' . getUserData('status') . ',' . $valPass . '(' . strlen($valPass) . ')/' . getSession('u_hash') . '(' . strlen(getSession('u_hash')) . ')/' . getUserData('password') . '(' . strlen(getUserData('password')) . ')');
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'status=' . getUserData('status') . ',' . $valPass . '(' . strlen($valPass) . ')/' . getSession('u_hash') . '(' . strlen(getSession('u_hash')) . ')/' . getUserData('password') . '(' . strlen(getUserData('password')) . ')');
                                destroyMemberSession();
                        }
                } else {
index 5fa5fb3e1b1486931f20f24dbac8fb020382a745..ceb720dce3cf1c463a8eabd459c084dd60a89bd9 100644 (file)
@@ -73,8 +73,11 @@ if (isGetRequestParameterSet('mode'))    $mode    = getRequestParameter('mode');
 
 // 01             2       21    12           2    2            21    1                      2210
 if ((isValidUserId($userId)) && (($mailId > 0) || ($bonusId > 0)) && (!ifFatalErrorsDetected())) {
-       // No image? Then output header
-       if ($mode != 'img') loadIncludeOnce('inc/header.php');
+       // No image?
+       if ($mode != 'img') {
+               // ... then output header
+               loadIncludeOnce('inc/header.php');
+       } // END - fi
 
        // Maybe he wants to confirm an email?
        if ($mailId > 0) {