private function updatingProcessController($status) { $response = array(); switch ($status) { case 'prepareForUpdate': $response['status'] = 'prepareForUpdateCompleted'; break; case 'updateFiles': $this->lockPatchDatabaseOnlyUsingSJB(); $response['status'] = 'updateFilesShowPreloader'; break; case 'updateFilesStart': $_REQUEST['updateFilesStart'] = true; $this->updateToNewVersion(); $response['status'] = 'updateFilesCompleted'; break; case 'updateDatabase': $response['percentagePerPatch'] = SJB_UpdateManager::updateDatabasePercentagePerPatch(); $response['status'] = 'updateDatabaseShowPreloader'; break; case 'updateDatabaseStart': $_REQUEST['updateDatabaseStart'] = true; $this->updateToNewVersion(); if ($GLOBALS['updateDatabasePatched'] === true) { $response['status'] = 'updateDatabasePatchSet'; } else { if ($GLOBALS['updateDatabasePatched'] === false) { $response['status'] = 'updateDatabaseCompleted'; SJB_UpdateManager::removeDatabasePatchFile(); $this->unlockPatchDatabaseOnlyUsingSJB(); } else { $response['message'] = $GLOBALS['updateDatabasePatched']; $response['success'] = false; } } break; case 'updateRestPart': $response['status'] = 'updateRestPartShowPreloader'; break; case 'updateRestPartStart': $_REQUEST['updateRestPart'] = true; $this->updateToNewVersion(); $response['status'] = 'updateRestPartCompleted'; break; } return $response; }
if (is_null(SJB_System::getSystemSettings('SITE_URL'))) { header("Location: install.php"); exit; } else { if (is_readable("install.php") && SJB_System::getSystemSettings('IGNORE_INSTALLER') != 'true') { echo '<p>Your installation is temporarily disabled because the install.php file in the root of your' . ' installation is still readable.<br> To proceed, please remove the file or change its mode to make' . ' it non-readable for the Apache server process and refresh this page.</p>'; exit; } } SJB_System::boot(); SJB_System::init(); if (SJB_Profiler::getInstance()->isProfilerEnable()) { SJB_Profiler::getInstance()->setStartTime($timeBegin); } SJB_Event::dispatch('AfterSystemBoot'); SJB_UpdateManager::updateDatabase(); //bind send notification emails if listing deactivated/deleted SJB_Event::handle('listingDeactivated', array('SJB_Notifications', 'notifyOnUserListingDeactivated')); SJB_Event::handle('beforeListingDelete', array('SJB_Notifications', 'notifyOnUserListingDeleted')); //bind send notification emails if user deactivated/deleted SJB_Event::handle('onBeforeUserDelete', array('SJB_Notifications', 'notifyOnUserDeleted')); SJB_Event::handle('onBeforeUserDeactivate', array('SJB_Notifications', 'notifyOnUserDeactivated')); // bind session clear to task scheduler event SJB_Event::handle('task_scheduler_run', array('SJB_Session', 'clearTemporaryData')); SJB_Request::getInstance()->execute(); SJB_Statistics::addStatistics('siteView', '', 0, true); $isPseudoCronEnabled = intval(SJB_Settings::getSettingByName('isPseudoCronEnabled')) === 1; if ($isPseudoCronEnabled) { $isEmailSchedulerEnabled = intval(SJB_Settings::getSettingByName('email_scheduling')) === 1; $isOncePerHourCondition = SJB_Settings::getSettingByName('emailSchedule_lastTimeExecuted') < strtotime('1 hour ago'); if ($isEmailSchedulerEnabled && $isOncePerHourCondition) {