From c85ddc06cc16f2cd38ddd7d4c142a3f578bbab69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 9 Mar 2010 23:48:16 +0000 Subject: [PATCH] Introduced new wrapper functions to make the code more readable, new extension ext-report introduced --- .gitattributes | 2 + beg.php | 2 +- debug.php | 2 +- inc/classes/rdf.class.php | 4 +- inc/db/lib-mysql3.php | 19 +++- inc/extensions-functions.php | 2 +- inc/extensions/ext-report.php | 97 +++++++++++++++++++ inc/filters.php | 2 +- inc/install-inc.php | 8 +- inc/libs/admins_functions.php | 2 +- inc/libs/jackpot_functions.php | 2 +- inc/libs/mediadata_functions.php | 2 +- inc/libs/rallye_functions.php | 2 +- inc/libs/refback_functions.php | 6 +- inc/libs/register_functions.php | 2 +- inc/libs/surfbar_functions.php | 47 +++++---- inc/libs/yoomedia_functions.php | 2 +- inc/modules/admin/admin-inc.php | 4 +- inc/modules/admin/what-add_rallye.php | 2 +- inc/modules/admin/what-config_admins.php | 2 +- inc/modules/admin/what-config_cats.php | 2 +- inc/modules/admin/what-config_email.php | 2 +- inc/modules/admin/what-config_mods.php | 2 +- inc/modules/admin/what-config_payouts.php | 2 +- .../admin/what-config_rallye_prices.php | 2 +- inc/modules/admin/what-extensions.php | 2 +- inc/modules/admin/what-list_country.php | 2 +- inc/modules/admin/what-list_sponsor_pay.php | 4 +- inc/modules/admin/what-list_surfbar_urls.php | 2 +- inc/modules/admin/what-list_yoomedia_tm.php | 2 +- inc/modules/admin/what-optimize.php | 2 +- inc/modules/admin/what-refbanner.php | 2 +- inc/modules/admin/what-unlock_emails.php | 2 +- inc/modules/guest/what-login.php | 2 +- inc/modules/guest/what-sponsor_reg.php | 2 +- inc/modules/member/what-categories.php | 2 +- inc/modules/member/what-nickname.php | 2 +- inc/modules/member/what-refback.php | 2 +- inc/mysql-manager.php | 4 +- inc/pool/pool-bonus.php | 4 +- inc/pool/pool-user.php | 2 +- inc/wrapper-functions.php | 6 ++ mailid.php | 2 +- mailid_top.php | 2 +- modules.php | 8 +- templates/de/html/ext/ext_report.tpl | 24 +++++ 46 files changed, 226 insertions(+), 75 deletions(-) create mode 100644 inc/extensions/ext-report.php create mode 100644 templates/de/html/ext/ext_report.tpl diff --git a/.gitattributes b/.gitattributes index 03996dc968..f2fb25c472 100644 --- a/.gitattributes +++ b/.gitattributes @@ -170,6 +170,7 @@ inc/extensions/ext-refsell.php -text inc/extensions/ext-register.php -text inc/extensions/ext-removeip.php -text inc/extensions/ext-repair.php -text +inc/extensions/ext-report.php -text inc/extensions/ext-rewrite.php -text inc/extensions/ext-safe.php -text inc/extensions/ext-seo.php -text @@ -1358,6 +1359,7 @@ templates/de/html/ext/ext_refsell.tpl -text templates/de/html/ext/ext_register.tpl -text templates/de/html/ext/ext_removeip.tpl -text templates/de/html/ext/ext_repair.tpl -text +templates/de/html/ext/ext_report.tpl -text templates/de/html/ext/ext_rewrite.tpl -text templates/de/html/ext/ext_safe.tpl -text templates/de/html/ext/ext_seo.tpl -text diff --git a/beg.php b/beg.php index febde55fec..397fdf302c 100644 --- a/beg.php +++ b/beg.php @@ -108,7 +108,7 @@ if (isGetRequestParameterSet('userid')) { array(getUserData('userid'), detectRemoteAddr(), session_id()), __FILE__, __LINE__); // Entry not found, points set and not logged in? - if (((SQL_NUMROWS($result) == '0') || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) { + if (((SQL_HASZERONUMS($result)) || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) { // Admin is testing? if (!isAdmin()) { diff --git a/debug.php b/debug.php index 55381b148a..44af72c545 100644 --- a/debug.php +++ b/debug.php @@ -48,7 +48,7 @@ $GLOBALS['output_mode'] = -1; require('inc/config-global.php'); // Redirect only to registration page when this script is installed -if ((isExtensionActive('debug')) && (getTotalFatalErrors() == '0')) { +if ((isExtensionActive('debug')) && (!ifFatalErrorsDetected())) { // Is the request parameter set? if (isPostRequestParameterSet('request')) { // Handle the request diff --git a/inc/classes/rdf.class.php b/inc/classes/rdf.class.php index c74eada6fb..9c9a0a2ff0 100644 --- a/inc/classes/rdf.class.php +++ b/inc/classes/rdf.class.php @@ -1025,7 +1025,7 @@ class fase4_rdf { $_cache_f = $this->_cache_dir.$this->_cached_file; - if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == '0')) { + if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) { // We have to parse the remote file $this->_use_cached_file = false; // --> we want to provide proper Information for Use in @@ -1385,7 +1385,7 @@ class fase4_rdf { } $i++; } - if ((count($dummy) > 0) && (count($reply) == '0') && (!$isContent)) { + if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) { // Transfer content from dummy $reply = $content; } diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index c7cc26c7fa..77568f0338 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -135,6 +135,9 @@ Query string:
// SQL num rows function SQL_NUMROWS ($result) { + // Valid link resource? + if (!SQL_IS_LINK_UP()) return false; + // Link is not up, no rows by default $lines = false; @@ -145,9 +148,9 @@ function SQL_NUMROWS ($result) { // Is the result empty? Then we have an error! if (empty($lines)) $lines = '0'; - } elseif (SQL_IS_LINK_UP()) { - // No resource given, no lines found! - $lines = '0'; + } else { + // No resource given, please fix this + trigger_error('No resource given! result[]=' . gettype($result)); } // Return lines @@ -403,14 +406,14 @@ function SQL_ALTER_TABLE ($sql, $F, $L) { // Do we have no entry on ADD or an entry on DROP? // 123 4 4 3 3 4 4 32 23 4 4 3 3 4 4 321 - if (((SQL_NUMROWS($result) == '0') && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) { + if (((SQL_HASZERONUMS($result)) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) { // Do the query //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Executing: ' . $sql); $result = SQL_QUERY($sql, $F, $L, false); // Skip further attempt(s) break; - } elseif ((((SQL_NUMROWS($result) == 1) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == '0') && (strpos($sql, 'DROP') !== false))) && ($columnName != 'KEY')) { + } elseif ((((SQL_NUMROWS($result) == 1) && (strpos($sql, 'ADD') !== false)) || ((SQL_HASZERONUMS($result)) && (strpos($sql, 'DROP') !== false))) && ($columnName != 'KEY')) { // Abort here because it is alreay there //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Skipped: ' . $sql); break; @@ -545,5 +548,11 @@ function SQL_IS_LINK_UP () { return $linkUp; } +// Wrapper function to make code more readable +function SQL_HASZERONUMS ($result) { + // Just pass it through + return (SQL_NUMROWS($result) === 0); +} + // [EOF] ?> diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index a33aabce0f..743f97281f 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -282,7 +282,7 @@ function registerExtension ($ext_name, $task_id, $dry_run = false, $logout = tru } // END - for // Is there no update? - if (countExtensionUpdateDependencies(getCurrentExtensionName()) == '0') { + if (countExtensionUpdateDependencies(getCurrentExtensionName()) == 0) { // Then test is passed! $test = true; } // END - if diff --git a/inc/extensions/ext-report.php b/inc/extensions/ext-report.php new file mode 100644 index 0000000000..975f9dd5d3 --- /dev/null +++ b/inc/extensions/ext-report.php @@ -0,0 +1,97 @@ + diff --git a/inc/filters.php b/inc/filters.php index 36d843b78d..a7a36334f8 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -754,7 +754,7 @@ function FILTER_COUNT_MODULE () { // Handles fatal errors function FILTER_HANDLE_FATAL_ERRORS () { // Do we have errors to handle and right output mode? - if ((getTotalFatalErrors() == '0') || (getOutputMode() != 0)) { + if ((!ifFatalErrorsDetected()) || (getOutputMode() != '0')) { // Abort executing here return false; } // END - if diff --git a/inc/install-inc.php b/inc/install-inc.php index c45dc021bd..25150d184e 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -100,7 +100,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { if (empty($mysql['host'])) $mysql['host'] = 'localhost'; if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange'; if (empty($mysql['type'])) $mysql['type'] = 'MyISAM'; - if (getTotalFatalErrors() > 0) { + if (ifFatalErrorsDetected()) { addToInstallContent('
'); foreach (getFatalArray() as $key => $err) { addToInstallContent('
· {--FATAL_NO--}' . ($key + 1) . ': ' . $err . '
'); @@ -203,7 +203,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS')); } // END - if - if (getTotalFatalErrors() == '0') { + if (!ifFatalErrorsDetected()k) { // Set type and prefix from POST data setConfigEntry('_TABLE_TYPE' , postRequestParameter('mysql', 'type')); setConfigEntry('_MYSQL_PREFIX', postRequestParameter('mysql', 'prefix')); @@ -228,7 +228,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { //* DEBUG: */ die('
'.print_r(getSqls(), true).'
'); // Are some SQLs found? - if (countSqls() == '0') { + if (countSqls() == 0) { // Abort here addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED')); return; @@ -243,7 +243,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { } // END - if } // END - if - if (getTotalFatalErrors() > 0) { + if (ifFatalErrorsDetected()) { $OUT = ''; foreach (getFatalArray() as $value) { $OUT .= '
  • ' . $value . '
  • '; diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index f86d80446e..e0424383fb 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -431,7 +431,7 @@ function sendAdminsEmails ($subj, $template, $content, $userid) { // Check which admin shall receive this mail $result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC", array($template), __FUNCTION__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Create new entry (to all admins) SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')", array($template), __FUNCTION__, __LINE__); diff --git a/inc/libs/jackpot_functions.php b/inc/libs/jackpot_functions.php index cc71ba6730..b2e567049f 100644 --- a/inc/libs/jackpot_functions.php +++ b/inc/libs/jackpot_functions.php @@ -52,7 +52,7 @@ function getJackpotPoints () { $result = SQL_QUERY("SELECT `points` FROM `{?_MYSQL_PREFIX?}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__); // Do we have an entry? - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // No, so create line SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__); } else { diff --git a/inc/libs/mediadata_functions.php b/inc/libs/mediadata_functions.php index 7f9b1dd359..db14350b4d 100644 --- a/inc/libs/mediadata_functions.php +++ b/inc/libs/mediadata_functions.php @@ -50,7 +50,7 @@ function updateMediadataEntry ($keys_array, $mode, $value) { // First check if it does exist $result_media = SQL_QUERY_ESC("SELECT media_key FROM `{?_MYSQL_PREFIX?}_mediadata` WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__); - if (SQL_NUMROWS($result_media) == '0') { + if (SQL_NUMROWS($result_media) == 0) { // Not found so we create it (mode will be ignored here!) SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mediadata` (media_key, media_value) VALUES ('%s', '%s')", array($key, $value), __FUNCTION__, __LINE__); diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index 0744b6b32c..59c1f0192f 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -86,7 +86,7 @@ function autostartReferalRallyes ($result) { // Check if line is already included... $result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s AND `userid`=%s LIMIT 1", array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__); - if (SQL_NUMROWS($result_ref) == '0') { + if (SQL_NUMROWS($result_ref) == 0) { // Free memory SQL_FREERESULT($result_ref); diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index ff6f2dbf43..9278ccc555 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -218,7 +218,7 @@ function updateRefbackTable ($userid) { // Do we have no entry? //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!
    "); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Insert this level //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - ADD!
    "); SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)", @@ -239,7 +239,7 @@ function updateRefbackTable ($userid) { // Do we have no entry? //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},numRows=".SQL_NUMROWS($result)." - BACK!
    "); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Insert this level SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)", array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__); @@ -373,7 +373,7 @@ function updateMemberRefbackPercents ($id, $percents) { $dummy = getArrayFromUserRefbackData($id); // Is this valid? - if (count($dummy) == '0') { + if (count($dummy) == 0) { // id does not belong to user! $status['message'] = getMessage('MEMBER_REFBACK_ERROR_ID_MISMATCH'); return $status; diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 5a50b7df07..d73f86568f 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -381,7 +381,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`=0 LIMIT 1", array($userid), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Add only when the line was not found (maybe some more secure?) $locked = 'points'; diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 354b33b3a4..e62d6835f0 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -109,7 +109,7 @@ function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) { } elseif (!is_array($IDs)) { // No array return false; - } elseif (count($IDs) == '0') { + } elseif (count($IDs) == 0) { // Empty array return false; } @@ -136,7 +136,7 @@ function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) { } elseif (!is_array($IDs)) { // No array return false; - } elseif (count($IDs) == '0') { + } elseif (count($IDs) == 0) { // Empty array return false; } @@ -553,12 +553,25 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'id', $order = 'id', $sort } // END - if // Look up the record - $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, views_max, views_allowed, status, registered, last_locked, lock_reason, views_max, views_allowed, fixed_reload -FROM `{?_MYSQL_PREFIX?}_surfbar_urls` -WHERE %s='%s'".$add." -ORDER BY %s %s + $result = SQL_QUERY_ESC("SELECT + `id`, `userid`, `url`, + `views_total`, `views_max`, `views_allowed`, `status`, + UNIX_TIMESTAMP(`registered`) AS `registered`, UNIX_TIMESTAMP(`last_locked`) AS `last_locked`, `lock_reason`, + `views_max`, `views_allowed`, `fixed_reload` +FROM + `{?_MYSQL_PREFIX?}_surfbar_urls` +WHERE + `%s`='%s'".$add." +ORDER BY + `%s` %s %s", - array($column, $searchTerm, $order, $sort, $limit), __FUNCTION__, __LINE__); + array( + $column, + $searchTerm, + $order, + $sort, + $limit + ), __FUNCTION__, __LINE__); // Is there at least one record? if (SQL_NUMROWS($result) > 0) { @@ -640,14 +653,14 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) { // Just run the insert query for now SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)", - array( - $userid, - $urlData['url'], - $urlData['status'], - $urlData['limit'], - $urlData['limit'], - $urlData['reload'] - ), __FUNCTION__, __LINE__ + array( + $userid, + $urlData['url'], + $urlData['status'], + $urlData['limit'], + $urlData['limit'], + $urlData['reload'] + ), __FUNCTION__, __LINE__ ); // Return insert id @@ -875,7 +888,7 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = '0') { $userids = SURFBAR_DETERMINE_DEPLETED_USERIDS(); // If we dont get any user ids back, there are no URLs - if (count($userids['userid']) == '0') { + if (count($userids['userid']) == 0) { // No user ids found, no URLs! return 0; } // END - if @@ -1245,7 +1258,7 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) $newStatus = strtolower($newStatus); // Get URL data for status comparison if missing - if ((!is_array($data)) || (count($data) == '0')) { + if ((!is_array($data)) || (count($data) == 0)) { // Fetch missing URL data $data = SURFBAR_GET_URL_DATA($urlId); } // END - if diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index ef00bd8e29..ab92eba1d2 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -119,7 +119,7 @@ function YOOMEDIA_TEST_CONFIG ($data) { $errorCode = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($response); // Log the response if failed - if (count($response) == '0') { + if (count($response) == 0) { // Queries depleted (as we count here!) logDebugMessage(__FUNCTION__, __LINE__, 'Requested depleted. Maxmimum was: ' . getConfig('yoomedia_requests_total')); $errorCode = -1; diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 76d9c6666c..914622a461 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -52,7 +52,7 @@ function addAdminAccount ($adminLogin, $passHash, $adminEmail) { array($adminLogin), __FUNCTION__, __LINE__); // Is the entry there? - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Ok, let's create the admin login SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins` (`login`, `password`, `email`) VALUES ('%s', '%s', '%s')", array( @@ -1091,7 +1091,7 @@ function sendAdminPasswordResetLink ($email) { array($email), __FUNCTION__, __LINE__); // Is there an account? - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // No account found! return getMessage('ADMIN_NO_LOGIN_WITH_EMAIL'); } // END - if diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index d4346aa5e9..0cb4d2e5ae 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -54,7 +54,7 @@ if (isFormSent()) { $result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1", array($START, $START, $START, $END), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Ok, start and end time did not overlap SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_data` (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')", diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index 31ad63e180..97834713ae 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -174,7 +174,7 @@ if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Main or sub menu selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1", array(bigintval(postRequestParameter('admin_id')), postRequestParameter('action_menu'), postRequestParameter('what_menu')), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Finally add the new ACL SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_acls` (admin_id, action_menu, what_menu, access_mode) VALUES ('%s','%s','%s','%s')", diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index 2d1e5051d4..691f063d76 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -53,7 +53,7 @@ if (isPostRequestParameterSet('add')) { // Add a new category $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `cat`='%s' LIMIT 1", array(postRequestParameter('catname')), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Category does not exists, we simply add it... SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (`cat`, `visible`, `sort`) VALUES ('%s','%s','%s')", array( diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 8f571d6011..8d45685920 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -52,7 +52,7 @@ if (isPostRequestParameterSet(('add_max'))) { // Save all settings $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1", array(bigintval(postRequestParameter('max'))), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Add this value (including comment) SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('%s','%s')", array(bigintval(postRequestParameter('max')), postRequestParameter('comment')),__FILE__, __LINE__); diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index 3c98f73df6..2048856418 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -123,7 +123,7 @@ if (isPostRequestParameterSet('edit')) { loadTemplate('admin_settings_saved', false, getMessage('MODS_CHANGED')); } -if (countPostSelection() == '0') { +if (countPostSelection() == 0) { // Load module data (We do not need to check if there's at least one...) $result = SQL_QUERY('SELECT id, module, locked, hidden, admin_only, title, mem_only FROM `{?_MYSQL_PREFIX?}_mod_reg` diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index 395d6087e4..bda7aff95f 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -51,7 +51,7 @@ if ((isPostRequestParameterSet('add')) && (isPostRequestParameterSet('title')) & // Add new payout type $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1", array(postRequestParameter('title')), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Add now SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_payout_types` (type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url) diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index a4aca48501..0d08a22550 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -53,7 +53,7 @@ if (isGetRequestParameterSet('rallye')) { $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1", array(bigintval(getRequestParameter('rallye')), bigintval(postRequestParameter('level'))), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Ok, new price level entered! SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_prices` (rallye_id, price_level, points, info) VALUES ('%s','%s','%s','%s')", diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 94a7c2238b..a9403850a7 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -323,7 +323,7 @@ ORDER BY `ext_name` ASC", __FILE__, __LINE__); // ... so we can finally register and load it in registration mode if (registerExtension($ext_name, $ext_id)) { // Errors? - if (getTotalFatalErrors() == '0') { + if (!ifFatalErrorsDetected()) { // Extension was found and successfully registered loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSION_REGISTERED', $ext_name)); diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index 13f412d212..3026a3fb24 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -50,7 +50,7 @@ if ((isPostRequestParameterSet('add')) && (isPostRequestParameterSet(('code'))) // Check if country code does already exist $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` WHERE code='%s' LIMIT 1", array(strtoupper(postRequestParameter('code'))), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Save entry SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('%s','%s','%s')", array( diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index fe4ee1849a..d57c721c51 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -50,7 +50,7 @@ $message = ''; if (isPostRequestParameterSet('add')) { // Check input variables if (!isPostRequestParameterSet('pay_name')) unsetPostRequestParameter('add'); - if ((round(postRequestParameter('pay_rate')) == '0') || (!isPostRequestParameterSet('pay_rate'))) unsetPostRequestParameter('add'); + if ((round(postRequestParameter('pay_rate')) == 0) || (!isPostRequestParameterSet('pay_rate'))) unsetPostRequestParameter('add'); setPostRequestParameter('pay_min_count', bigintval(postRequestParameter('pay_min_count'))); @@ -115,7 +115,7 @@ if (isPostRequestParameterSet('add')) { // Check if entry with same name does exists $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1", array(postRequestParameter('pay_name')), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // No entry found so add this line SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')", array( diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index 5bc5655ec0..076a5c3065 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -49,7 +49,7 @@ addMenuDescription('admin', __FILE__); $show = true; // Check for 'id' element -if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('id')) || (!is_array(postRequestParameter('id'))) || (count(postRequestParameter('id')) == '0'))) { +if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('id')) || (!is_array(postRequestParameter('id'))) || (count(postRequestParameter('id')) == 0))) { // Not found so output message loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS')); diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index 58d120c46b..41aa282d7f 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -81,7 +81,7 @@ if (getConfig('yoomedia_requests_remain') == '0') { $result = YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS(); // Sanity-check on result array -if ((!is_array($result)) || (count($result) == '0') || (!isset($result[0]['id']))) { +if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) { // Invalid result loadTemplate('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_INVALID_RESULT')); return false; diff --git a/inc/modules/admin/what-optimize.php b/inc/modules/admin/what-optimize.php index d2a0773b57..1290113e3a 100644 --- a/inc/modules/admin/what-optimize.php +++ b/inc/modules/admin/what-optimize.php @@ -66,7 +66,7 @@ foreach ($DATA['tables'] as $row_array) { $OPT = getMessage('OPTIMIZE_STATUS_OPTIMIZED'); $B1 = ''; $B2 = ''; $gain_tabs++; - } elseif (count(explode(' ', $row_array[2])) == '0') { + } elseif (count(explode(' ', $row_array[2])) == 0) { $OPT = getMessage('OPTIMIZE_STATUS_' . strtoupper($row_array[2]).''); } diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 7cbaf8b46e..71f5ad53c7 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -59,7 +59,7 @@ if (isFormSent()) { // Check if banner is already added $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE url='%s' LIMIT 1", array(postRequestParameter('url')), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Add banner SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (url, alternate, visible) VALUES ('%s','%s','%s')", diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index bba0aa2b9a..194a3a0ff1 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -179,7 +179,7 @@ LIMIT 1", // Lookup in blacklist $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1", array($url), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Did not find a record so we can add it... :) SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)", array($url, $id), __FILE__, __LINE__); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 62cca5a238..caa950e645 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -136,7 +136,7 @@ if (isExtensionActive('nickname')) { // Was an URL constructed? if (!empty($URL)) { // URL was constructed - if (getTotalFatalErrors() > 0) { + if (ifFatalErrorsDetected()) { // Handle fatal errors runFilterChain('handle_fatal_errors'); } else { diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 312627aac8..f1ccf3837a 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -199,7 +199,7 @@ if (isFormSent()) { if (count($FORM_ERRORS) > 0) unsetPostRequestParameter('ok'); } -if ((isFormSent()) && (count($FORM_ERRORS) == '0')) { +if ((isFormSent()) && (count($FORM_ERRORS) == 0)) { // Generate message array $messageArray = array( 'failed' => getMessage('SPONSOR_REGISTRATION_FAILED'), diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index a870b6ab1c..86263f07e8 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -83,7 +83,7 @@ if ($cats > 0) { $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1", array(getMemberId(), bigintval($cat)), __FILE__, __LINE__); - if (SQL_NUMROWS($result_user) == '0') { + if (!SQL_HASZERONUMS($result_user)) { $sql = "INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (userid, cat_id) VALUES ('%s','%s')"; } // END - if diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index bd40a66b78..7a9e7b5114 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -70,7 +70,7 @@ if ($isValid === true) { // Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !) $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1", array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // Nickname not in use, so set it now SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1", array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__); diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 5889f82ce3..8446643766 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -69,7 +69,7 @@ if ((isPostRequestParameterSet('edit')) && (isPostRequestParameterSet('id'))) { $percents = convertCommaToDot(postRequestParameter('percents')); // Validate percents - if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == '0')) && ($percents <= getConfig('refback_max_perc'))) { + if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) { // Change ref-back for this direct id $status = updateMemberRefbackPercents(postRequestParameter('id'), postRequestParameter('percents')); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 2aedbdb8cf..44e8487470 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -80,7 +80,7 @@ function getModuleTitle ($module) { if (empty($data['title'])) { // No name found $data['title'] = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $module); - if (SQL_NUMROWS($result) == '0') { + if ((is_resource($result)) && (SQL_HASZERONUMS($result))) { // Add module to database $dummy = checkModulePermissions($module); } // END - if @@ -1044,7 +1044,7 @@ function removeReceiver (&$receivers, $key, $userid, $pool_id, $stats_id = '', $ array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__); // Was it *not* found? - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // So we add one! SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_links` (`%s`, `userid`, `link_type`) VALUES ('%s','%s','%s')", array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__); diff --git a/inc/pool/pool-bonus.php b/inc/pool/pool-bonus.php index 0787499781..d904d52758 100644 --- a/inc/pool/pool-bonus.php +++ b/inc/pool/pool-bonus.php @@ -131,7 +131,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { } // END - if // Do we have send maximum mails? - if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == '0')) { + if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == 0)) { // Yes, we have //* DEBUG: */ print("*EXIT/L:".__LINE__."
    "); break; @@ -151,7 +151,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) { // Close sending system //* DEBUG: */ print("-L:".__LINE__.'/'.countSelection($dummy)."-
    "); - if (countSelection($dummy) == '0') { + if (countSelection($dummy) == 0) { // Queue reached! SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1", array(bigintval($DATA['id'])), __FILE__, __LINE__); diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 1abf8a079b..981c43d62e 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -101,7 +101,7 @@ if (SQL_NUMROWS($result_main) > 0) { // If there's no stats entry add it! //* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!
    "); - if (SQL_NUMROWS($result_stats) == '0') { + if (SQL_NUMROWS($result_stats) == 0) { // No entry was found, so we add him! SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (`pool_id` , `userid`, `cat_id`, `payment_id`, `subject`, `url` , `max_rec` , `timestamp_ordered`, `timestamp_sstart`) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())", array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['timestamp'])), __FILE__, __LINE__); diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index bb570f585a..4a07785f7d 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -873,5 +873,11 @@ function isInStringIgnoreCase ($needle, $haystack) { return (isInString(strtolower($needle), strtolower($haystack))); } +// Wrapper to check for if fatal errors where detected +function ifFatalErrorsDetected () { + // Just call the inner function + return (getTotalFatalErrors() > 0); +} + // [EOF] ?> diff --git a/mailid.php b/mailid.php index 5415fc5fc2..06acf208ca 100644 --- a/mailid.php +++ b/mailid.php @@ -68,7 +68,7 @@ if (isGetRequestParameterSet('mailid')) $url_mid = bigintval(getRequestParam if (isGetRequestParameterSet('bonusid')) $url_bid = bigintval(getRequestParameter('bonusid')); // 01 1 12 2 2 21 1 22 10 -if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) { +if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (!ifFatalErrorsDetected())) { // Init result $result_link = false; diff --git a/mailid_top.php b/mailid_top.php index 38349b669c..ff1cecd9a4 100644 --- a/mailid_top.php +++ b/mailid_top.php @@ -74,7 +74,7 @@ if (isGetRequestParameterSet('code')) $code = bigintval(getRequestParam if (isGetRequestParameterSet('mode')) $mode = getRequestParameter('mode'); // 01 1 12 2 2 21 1 22 10 -if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) { +if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (!ifFatalErrorsDetected())) { // No image? Then output header if ($mode != 'img') loadIncludeOnce('inc/header.php'); diff --git a/modules.php b/modules.php index 9868be46fb..f2d1639a6c 100644 --- a/modules.php +++ b/modules.php @@ -77,7 +77,7 @@ $check = 'failed'; if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && (!isAdmin()) && (getModule() != 'admin')) { // Maintain mode is active and you are no admin addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE')); -} elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == '0')) { +} elseif ((SQL_IS_LINK_UP()) && (!ifFatalErrorsDetected())) { // Construct module name $GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule()); @@ -89,10 +89,10 @@ if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && ( case 'mem_only': // Member-only access case 'done': // All fine! // Does the module exists on local file system? - if ((isIncludeReadable($GLOBALS['module_inc'])) && (getTotalFatalErrors() == '0')) { + if ((isIncludeReadable($GLOBALS['module_inc'])) && (!ifFatalErrorsDetected())) { // Module is valid, active and located on the local disc... $isModuleValid = true; - } elseif (getTotalFatalErrors() == '0') { + } elseif (!ifFatalErrorsDetected()) { // Module not found! addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_404', getModule())); } @@ -117,7 +117,7 @@ if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && ( addFatalMessage(__FILE__, __LINE__, getMaskedMessage('LANG_MOD_REG_UNKNOWN', $check)); break; } // END - switch -} elseif (getTotalFatalErrors() == '0') { +} elseif (!ifFatalErrorsDetected()) { // MySQL problems! addFatalMessage(__FILE__, __LINE__, getMessage('MYSQL_ERRORS')); } diff --git a/templates/de/html/ext/ext_report.tpl b/templates/de/html/ext/ext_report.tpl new file mode 100644 index 0000000000..d662bc4510 --- /dev/null +++ b/templates/de/html/ext/ext_report.tpl @@ -0,0 +1,24 @@ +
    +Lassen Sie das Script automatisiert Bug-Mails an mich schicken! Was Sie dazu +brauchen ist noch nicht mal ein API-Key oder dergleichen. Installieren Sie +dazu einfach diese Erweiterung und die Mails gehen in Kopie an mich raus. +Sollten Sie diese Funktionalität nicht mehr wünschen, so deaktivieren +Sie einfach die Erweiterung. Alternativ können Sie diese auch einfach +wieder deinstallieren. +
    + +
    +Wichtig: Es werden dabei (fast) keine Daten Ihrer Mitglieder +oder von Ihren Administratorenaccounts gesendet! Es werden die +Browserbezeichnung und die IP-Adresse sowie den Bug-Report selbst an mich +geschickt. Sie können dies allerdings verhindern, in dem Sie es einfach im +Adminbereich abschalten, dann wird ein Bindestrich als Browserbezeichnung bzw. +0.0.0.0 als IP an mich gesendet. +
    + +
    +Die Daten aus den Bugs werden stets vertraulich behandelt und unterliegen den +aktuellen Datenschutzgesetzen. Es erfolgt ausnahmelos keine Weitergabe oder +Weiterleitung in jeglicher Form an Dritte. +
    + -- 2.39.5