From: Roland Häder Date: Thu, 28 Jul 2011 22:05:27 +0000 (+0000) Subject: Minor cleanups: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5d1def95c2e8bf26d1972cbb43b119eb75721f2d;p=mailer.git Minor cleanups: - isFileReadable() does now check is_file() first - Internal TODO closed (was not needed) - TODOs.txt updated --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 9bc31bcda9..ee7c8bee0b 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -167,11 +167,11 @@ ./inc/modules/member/what-unconfirmed.php:162: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() ./inc/modules/member/what-unconfirmed.php:227: // @TODO This 'userid' cannot be saved because of encapsulated EL code ./inc/modules/order.php:74: // @TODO Unused: 2,4 -./inc/mysql-manager.php:1267: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() -./inc/mysql-manager.php:1331: // @TODO Rewrite these lines to a filter -./inc/mysql-manager.php:1355: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1614: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1660:// @TODO Fix inconsistency between last_module and getWhat() +./inc/mysql-manager.php:1270: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() +./inc/mysql-manager.php:1334: // @TODO Rewrite these lines to a filter +./inc/mysql-manager.php:1358: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1617: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1663:// @TODO Fix inconsistency between last_module and getWhat() ./inc/mysql-manager.php:387: // @TODO Try to rewrite this to one or more functions ./inc/mysql-manager.php:44:// @TODO Can we cache this? ./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter @@ -187,9 +187,7 @@ ./inc/template-functions.php:436: // @TODO $DATA is deprecated and should be avoided and replaced with $content ./inc/template-functions.php:602:// @TODO $simple/$constants are deprecated ./inc/template-functions.php:628: // @TODO Do only use $content and deprecate $DATA in templates -./inc/wrapper-functions.php:130:// @TODO Implement $compress -./inc/wrapper-functions.php:137:// @TODO Implement $decompress -./inc/wrapper-functions.php:514:// @TODO Do some more sanity check here +./inc/wrapper-functions.php:512:// @TODO Do some more sanity check here ./mailid.php:139: // @TODO Rewrite this to a filter ./mailid.php:96: // @TODO Rewrite this to a filter ./mailid_top.php:105: // @TODO Rewrite this to a filter diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 557f7e2d3d..fe44a0b7d1 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -127,15 +127,13 @@ function clearOutputBuffer () { } // Encode strings -// @TODO Implement $compress -function encodeString ($str, $compress = true) { +function encodeString ($str) { $str = urlencode(base64_encode(compileUriCode($str))); return $str; } // Decode strings encoded with encodeString() -// @TODO Implement $decompress -function decodeString ($str, $decompress = true) { +function decodeString ($str) { $str = compileUriCode(base64_decode(urldecode(compileUriCode($str)))); return $str; } @@ -172,7 +170,7 @@ function isFileReadable ($FQFN) { // Do we have cache? if (!isset($GLOBALS['file_readable'][$FQFN])) { // Check all... - $GLOBALS['file_readable'][$FQFN] = ((file_exists($FQFN)) && (is_file($FQFN)) && (is_readable($FQFN))); + $GLOBALS['file_readable'][$FQFN] = ((is_file($FQFN)) && (file_exists($FQFN)) && (is_readable($FQFN))); } // END - if // Return result