From: Roland Häder Date: Wed, 6 Oct 2010 04:07:48 +0000 (+0000) Subject: Korn/csh support improved, if() block rewritten: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c744215dba419b52b84291622179c5e3a6ab17e2;p=mailer.git Korn/csh support improved, if() block rewritten: - 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 --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 44c02fc533..436f5d35b6 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -200,12 +200,12 @@ ./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 diff --git a/DOCS/todo-builder.sh b/DOCS/todo-builder.sh index 9eb697114b..f059853f7c 100755 --- a/DOCS/todo-builder.sh +++ b/DOCS/todo-builder.sh @@ -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 diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index 8fab51c468..332a3d2324 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -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 diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 749a368f42..f6bc8baaec 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -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 { diff --git a/mailid_top.php b/mailid_top.php index 5fa5fb3e1b..ceb720dce3 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -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) {