X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=3ec60ca2d5eed0b01d4c1a9e28966c75cc655ec1;hb=8a6e423d71bdd68443026b4fe7466f7164625c87;hp=2aedbdb8cf4a184929ffdf4ff3e81035af6b5c4e;hpb=74ea26a36ff202cfdca545025a17c9faf4d68efb;p=mailer.git diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 2aedbdb8cf..3ec60ca2d5 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 @@ -702,6 +702,11 @@ function fetchUserData ($userid, $column = 'userid') { // This patched function will reduce many SELECT queries for the specified or current admin login function isAdmin ($adminLogin = '') { + // No admin in installation phase! + if ((isInstallationPhase()) || (!isAdminRegistered())) { + return false; + } // END - if + // Init variables $ret = false; $passCookie = ''; @@ -1044,7 +1049,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__); @@ -1921,7 +1926,7 @@ function generateReceiverList ($cat, $receiver, $mode = '') { } // END - if // Exclude users in holiday? - if (getExtensionVersion('holiday') >= '0.1.3') { + if (isExtensionInstalledAndNewer('holiday', '0.1.3')) { // Add something for the holiday extension $CAT_WHERE .= " AND d.`holiday_active`='N'"; } // END - if