From: Roland Häder Date: Tue, 28 Jul 2009 21:36:38 +0000 (+0000) Subject: TODOs.txt updated, TODO added for SUB_POINTS(), some rewrites, fix for isWhatSet() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a6f31d458bf99f570e5c5efe7ea5f072eb2ae41b;p=mailer.git TODOs.txt updated, TODO added for SUB_POINTS(), some rewrites, fix for isWhatSet() --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index a31fbd24ec..3de6f53517 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -11,22 +11,21 @@ ./inc/extensions/ext-sql_patches.php:93: /* @TODO SQL_ALTER_TABLE() should work now properly ./inc/extensions/ext-surfbar.php:237: // @TODO Set some constants we need??? ./inc/extensions.php:355:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) ) -./inc/extensions.php:431: // @TODO Extension is loaded, what next? +./inc/extensions.php:437: // @TODO Extension is loaded, what next? ./inc/functions.php:1227: // @TODO Rewrite this unnice code ./inc/functions.php:1288: // @TODO Remove this if() block if all is working fine ./inc/functions.php:1588: // @TODO This can be, somehow, rewritten ./inc/functions.php:211: // @TODO Remove this sanity-check if all is fine -./inc/functions.php:2392: // @TODO The status should never be empty -./inc/functions.php:2468: $GLOBALS['cache_instance']->destroyCacheFile(); // @TODO isn't it better to do $GLOBALS['cache_instance']->destroyCacheFile('revision')? -./inc/functions.php:2470: // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')? +./inc/functions.php:2395: // @TODO The status should never be empty +./inc/functions.php:2483: // @TODO shouldn't do the unset and the reloading $GLOBALS['cache_instance']->destroyCacheFile() Or a new methode like forceCacheReload('revision')? ./inc/functions.php:250: // @TODO Fine all templates which are using these direct variables and rewrite them. ./inc/functions.php:251: // @TODO After this step is done, this else-block is history -./inc/functions.php:2531:// @TODO Please describe this function -./inc/functions.php:2543: searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time); -./inc/functions.php:2626: // @TODO Add a little more infos here -./inc/functions.php:2637: // @TODO This cannot be rewritten to app_die(), try to find a solution for this. -./inc/functions.php:2794: // @TODO Are these convertions still required? -./inc/functions.php:2812:// @TODO Rewrite this function to use readFromFile() and writeToFile() +./inc/functions.php:2546:// @TODO Please describe this function +./inc/functions.php:2558: searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time); +./inc/functions.php:2641: // @TODO Add a little more infos here +./inc/functions.php:2652: // @TODO This cannot be rewritten to app_die(), try to find a solution for this. +./inc/functions.php:2809: // @TODO Are these convertions still required? +./inc/functions.php:2827:// @TODO Rewrite this function to use readFromFile() and writeToFile() ./inc/functions.php:466:// @TODO Rewrite this to an extension 'smtp' ./inc/install-inc.php:20: * @TODO Rewrite all constants in this include file * ./inc/language/de.php:1159:// @TODO Rewrite these two constants @@ -39,8 +38,7 @@ ./inc/language/rallye_de.php:110:// @TODO Rewrite following two lines to one ./inc/language/refback_de.php:46:// @TODO Rewrite these constants to one ./inc/language/sponsor_de.php:118:// @TODO Rewrite these four constants to one and use sprintf() -./inc/libs/cache_functions.php:238: // @TODO remove from $GLOBALS['cache_array']!!! -./inc/libs/cache_functions.php:384: // @TODO Add support for more types which break in last else-block +./inc/libs/cache_functions.php:412: // @TODO Add support for more types which break in last else-block ./inc/libs/doubler_functions.php:46:// @TODO Lame description ./inc/libs/nickname_functions.php:59: // @TODO Can we replace this with GET_TOTAL_DATA() ? ./inc/libs/rallye_functions.php:631: $EXPIRE = getConfig('one_day') * 3; // @TODO The hard-coded value... @@ -59,12 +57,12 @@ ./inc/load_config.php:77: // @TODO Rewrite them to avoid this else block ./inc/load_extensions.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php * ./inc/mails/birthday_mails.php:85: // @TODO 4 is hard-coded here, should we move it out in config? -./inc/modules/admin/admin-inc.php:343: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/modules/admin/admin-inc.php:348: // @TODO ACL is 'allow'... hmmm -./inc/modules/admin/admin-inc.php:390: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/modules/admin/admin-inc.php:396: // @TODO ACL is 'allow'... hmmm -./inc/modules/admin/admin-inc.php:504: // @TODO Rewrite these both constants -./inc/modules/admin/admin-inc.php:530: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query +./inc/modules/admin/admin-inc.php:342: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/modules/admin/admin-inc.php:347: // @TODO ACL is 'allow'... hmmm +./inc/modules/admin/admin-inc.php:389: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/modules/admin/admin-inc.php:395: // @TODO ACL is 'allow'... hmmm +./inc/modules/admin/admin-inc.php:503: // @TODO Rewrite these both constants +./inc/modules/admin/admin-inc.php:529: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query ./inc/modules/admin/overview-inc.php:144: // @TODO Rewrite this to a filter ./inc/modules/admin/overview-inc.php:154: // @TODO Can this SQL be encapsulated in a function, so all similar queries can be rewritten? ./inc/modules/admin/overview-inc.php:190: // @TODO Should we init sql_notes here or inside REGISTER_EXTENSION()? @@ -109,7 +107,7 @@ ./inc/modules/admin/what-edit_emails.php:60: // @TODO More constants to rewrite ./inc/modules/admin/what-edit_emails.php:95: // @TODO Rewritings: subj->subject in template ./inc/modules/admin/what-extensions.php:159: // @TODO Rewrite this constant -./inc/modules/admin/what-extensions.php:338: // @TODO Rewrite this to a filter +./inc/modules/admin/what-extensions.php:335: // @TODO Rewrite this to a filter ./inc/modules/admin/what-guest_add.php:123: // @TODO This can be somehow rewritten to a function ./inc/modules/admin/what-guest_add.php:62: // @TODO Cant this be rewritten? ./inc/modules/admin/what-guest_add.php:78: // @TODO This can be somehow rewritten to a function @@ -121,6 +119,8 @@ ./inc/modules/admin/what-list_beg.php:86: // @TODO to shorten this block. Please also do so with uid->userid ./inc/modules/admin/what-list_cats.php:92: // @TODO Rewrite this constant ./inc/modules/admin/what-list_country.php:181: // @TODO Rewritings: name->descr,status->is_active in template +./inc/modules/admin/what-list_doubler.php:59:// @TODO Try to rewrite this into include files +./inc/modules/admin/what-list_doubler.php:73: // @TODO Rewrite all these constants ./inc/modules/admin/what-list_holiday.php:82: // @TODO Rewrite this constant ./inc/modules/admin/what-list_links.php:96: // @TODO Find a way to rewrite this. See some lines above for different queries ./inc/modules/admin/what-list_newsletter.php:64: // @TODO Currently under construction! @@ -205,18 +205,20 @@ ./inc/modules/member/what-transfer.php:364: // @TODO Rewrite these constants ./inc/modules/member/what-transfer.php:451: // @TODO Rewrite all these constants ./inc/modules/member/what-unconfirmed.php:134: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() -./inc/mysql-manager.php:1556: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() -./inc/mysql-manager.php:1599: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1777: // @TODO Find a way for updating $_CONFIG here -./inc/mysql-manager.php:1801: // @TODO Find a way for updating $_CONFIG here -./inc/mysql-manager.php:1824:// @TODO Can this be rewritten to a filter? -./inc/mysql-manager.php:1886: // @TODO Rewrite this to $content = SQL_FETCHARRAY() -./inc/mysql-manager.php:199: // @TODO Nothing helped??? -./inc/mysql-manager.php:2180: // @TODO This can be somehow rewritten -./inc/mysql-manager.php:517: // @TODO Try to rewrite this to one or more functions -./inc/mysql-manager.php:546: // @TODO Try to rewrite this to one or more functions -./inc/mysql-manager.php:954: // @TODO Why does this lead into an endless loop but we still need it??? -./inc/mysql-manager.php:955: // @TODO Commented out redirectToUrl('admin.php'); +./inc/mysql-manager.php:1569: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() +./inc/mysql-manager.php:1612: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1764: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1792: // @TODO Find a way for updating $_CONFIG here +./inc/mysql-manager.php:1816: // @TODO Find a way for updating $_CONFIG here +./inc/mysql-manager.php:1839:// @TODO Can this be rewritten to a filter? +./inc/mysql-manager.php:1901: // @TODO Rewrite this to $content = SQL_FETCHARRAY() +./inc/mysql-manager.php:209: // @TODO Nothing helped??? +./inc/mysql-manager.php:2195: // @TODO This can be somehow rewritten +./inc/mysql-manager.php:244: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:530: // @TODO Try to rewrite this to one or more functions +./inc/mysql-manager.php:559: // @TODO Try to rewrite this to one or more functions +./inc/mysql-manager.php:967: // @TODO Why does this lead into an endless loop but we still need it??? +./inc/mysql-manager.php:968: // @TODO Commented out redirectToUrl('admin.php'); ./inc/wrapper-functions.php:152:// @TODO Implement $compress ./inc/wrapper-functions.php:159:// @TODO Implement $decompress ./inc/wrapper-functions.php:391:// @TODO Do some more sanity check here diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 8acc8e75a3..d0edc7d94f 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1730,10 +1730,11 @@ function getWhatFromModule ($modCheck) { return REQUEST_GET('what'); } // END - if + // Default is empty $wht = ''; + //* DEBUG: */ echo __LINE__.'!'.$modCheck."!
\n"; - switch ($modCheck) - { + switch ($modCheck) { case 'admin': $wht = 'overview'; break; @@ -1747,7 +1748,7 @@ function getWhatFromModule ($modCheck) { default: $wht = ''; break; - } + } // END - switch // Return what value return $wht; @@ -1757,9 +1758,10 @@ function getWhatFromModule ($modCheck) { function SUB_POINTS ($subject, $uid, $points) { // Add points to used points SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1", - array($points, bigintval($uid)), __FUNCTION__, __LINE__); + array($points, bigintval($uid)), __FUNCTION__, __LINE__); // Insert booking record + // @TODO Rewrite this to a filter if (EXT_IS_ACTIVE('booking')) { // Add record ADD_BOOKING_RECORD($subject, $uid, $points, 'sub'); diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 7cc9c9ec6b..3622206589 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -476,7 +476,7 @@ function setWhatFromConfig ($configEntry) { // Checks wether what is set and optionally aborts on miss function isWhatSet ($abortOnMiss = false) { // Check for it - $isset = (!empty($GLOBALS['what'])); + $isset = (isset($GLOBALS['what'])); // Should we abort here? if (($abortOnMiss === true) && ($isset === false)) {