X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=7c8d7b4947b49e6e4cec558ccde9637ee6459e08;hp=311fdb0a19483dedccb8b8e199d737f1974f5084;hb=a2ca374f65976d21651fffb64a78d3a9678bb3b8;hpb=854fcac4ae5fe26e28e9d4d7b8361f2ab455aeb1 diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 311fdb0a19..7c8d7b4947 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1641,11 +1641,17 @@ function FILTER_ACTIVATE_EXCHANGE () { // Deletes a user account with given reason function deleteUserAccount ($userid, $reason) { $points = 0; - $result = SQL_QUERY_ESC("SELECT (SUM(p.points) - d.used_points) AS points -FROM `{?_MYSQL_PREFIX?}_user_points` AS p -LEFT JOIN `{?_MYSQL_PREFIX?}_user_data` AS d -ON p.userid=d.userid -WHERE p.userid=%s", array(bigintval($userid)), __FUNCTION__, __LINE__); + $result = SQL_QUERY_ESC("SELECT + (SUM(p.points) - d.used_points) AS points +FROM + `{?_MYSQL_PREFIX?}_user_points` AS p +LEFT JOIN + `{?_MYSQL_PREFIX?}_user_data` AS d +ON + p.userid=d.userid +WHERE + p.userid=%s", + array(bigintval($userid)), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Save his points to add them to the jackpot list($points) = SQL_FETCHROW($result); @@ -1718,7 +1724,14 @@ function getWhatFromModule ($modCheck) { case 'login': case 'index': - $what = getConfig('index_home'); + // Is ext-sql_patches installed and newer than 0.0.5? + if (isExtensionInstalledAndNewer('sql_patches', '0.0.5')) { + // Use it from config + $what = getConfig('index_home'); + } else { + // Use default 'welcome' + $what = 'welcome'; + } break; default: