X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=c74bf46c3c002136db1c27d6aa9008a0e244306d;hb=ad30a667fd8abeb576c04026b62c2e8a29d86f52;hp=44e848747020d5efa5fb0dd5cc999045bfc4bde4;hpb=c85ddc06cc16f2cd38ddd7d4c142a3f578bbab69;p=mailer.git diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 44e8487470..c74bf46c3c 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -79,7 +79,7 @@ function getModuleTitle ($module) { // Still no luck or empty title? if (empty($data['title'])) { // No name found - $data['title'] = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $module); + $data['title'] = getMaskedMessage('UNKNOWN_MODULE_DETECTED', $module); if ((is_resource($result)) && (SQL_HASZERONUMS($result))) { // Add module to database $dummy = checkModulePermissions($module); @@ -631,7 +631,7 @@ function fetchUserData ($userid, $column = 'userid') { // Don't look for invalid userids... if ($userid < 1) { // Invalid, so abort here - debug_report_bug('User id ' . $userid . ' is invalid.'); + debug_report_bug(__FUNCTION__, __LINE__, 'User id ' . $userid . ' is invalid.'); } elseif (isUserDataValid()) { // Use cache, so it is fine return true; @@ -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 = ''; @@ -791,7 +796,7 @@ function addMaxReceiveList ($mode, $default = '', $return = false) { $OUT = loadTemplate(($mode . '_receive_table'), true, $OUT); } else { // Maybe the admin has to setup some maximum values? - debug_report_bug('Nothing is being done here?'); + debug_report_bug(__FUNCTION__, __LINE__, 'Nothing is being done here?'); } // Free result @@ -1557,7 +1562,7 @@ function generateOptionList ($table, $id, $name, $default='', $special='', $wher } // END - foreach } else { // Problem in request - debug_report_bug('Not all are arrays: id[' . count($id) . ']=' . gettype($id) . ',name[' . count($name) . ']=' . gettype($name)); + debug_report_bug(__FUNCTION__, __LINE__, 'Not all are arrays: id[' . count($id) . ']=' . gettype($id) . ',name[' . count($name) . ']=' . gettype($name)); } } else { // Data from database @@ -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