standard_error('exception', $e->getMessage()); } /* * since froxlor, we have to check if there's still someone * out there using syscp and needs to upgrade */ if (!isFroxlor()) { /** * Upgrading SysCP to Froxlor-0.9 */ include_once makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/upgrade_syscp.inc.php'); } if (isFroxlor()) { include_once makeCorrectFile(dirname(__FILE__) . '/updates/froxlor/0.9/update_0.9.inc.php'); // Check Froxlor - database integrity (only happens after all updates are done, so we know the db-layout is okay) showUpdateStep("Checking database integrity"); $integrity = new IntegrityCheck(); if (!$integrity->checkAll()) { lastStepStatus(2, 'Monkeys ate the integrity'); showUpdateStep("Trying to remove monkeys, feeding bananas"); if (!$integrity->fixAll()) { lastStepStatus(2, 'Some monkeys just would not move'); } else { lastStepStatus(0); } } else { lastStepStatus(0); } $filelog->logAction(ADM_ACTION, LOG_WARNING, '--------------- END LOG ---------------'); unset($filelog); }
while ($array = $result_stmt->fetch(PDO::FETCH_ASSOC)) { $difference = Settings::Get('system.mail_quota') - $array['quota']; Database::pexecute($upd_stmt, array('diff' => $difference, 'customerid' => $customerid)); } } // Set the new quota $upd_stmt = Database::prepare("\n\t\t\tUPDATE `" . TABLE_MAIL_USERS . "` SET `quota` = :quota\n\t\t"); Database::pexecute($upd_stmt, array('quota' => Settings::Get('system.mail_quota'))); // Update the Customer, if the used quota is bigger than the allowed quota Database::query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `email_quota` = `email_quota_used` WHERE `email_quota` < `email_quota_used`"); $log->logAction(ADM_ACTION, LOG_WARNING, 'enforcing mailquota to all customers: ' . Settings::Get('system.mail_quota') . ' MB'); redirectTo($filename, array('s' => $s)); } else { ask_yesno('admin_quotas_reallyenforce', $filename, array('page' => $page)); } } elseif ($page == 'integritycheck' && $userinfo['change_serversettings'] == '1') { $integrity = new IntegrityCheck(); if (isset($_POST['send']) && $_POST['send'] == 'send') { $integrity->fixAll(); } elseif (isset($_GET['action']) && $_GET['action'] == "fix") { ask_yesno('admin_integritycheck_reallyfix', $filename, array('page' => $page)); } $integritycheck = ''; foreach ($integrity->available as $id => $check) { $displayid = $id + 1; $result = $integrity->{$check}(); $checkdesc = $lng['integrity_check'][$check]; eval("\$integritycheck.=\"" . getTemplate("settings/integritycheck_row") . "\";"); } eval("echo \"" . getTemplate("settings/integritycheck") . "\";"); }