<?php $tbg_response->setTitle(__('About %sitename', array('%sitename' => TBGSettings::getTBGname()))); $tbg_response->addBreadcrumb(__('About %sitename', array('%sitename' => TBGSettings::getTBGname())), make_url('about'), tbg_get_breadcrumblinks('main_links')); ?> <div class="rounded_box borderless mediumgrey" style="margin: 10px auto 0 auto; width: 500px; padding: 5px 5px 15px 5px; font-size: 13px; text-align: center;"> <div style="text-align: left; padding: 10px;"> <h1 style="font-size: 25px; margin-bottom: 0px; padding-bottom: 3px;"> The Bug Genie <span style="font-size: 14px; font-weight: normal; color: #888;"> <?php echo __('Version %thebuggenie_version', array('%thebuggenie_version' => TBGSettings::getVersion(true))); ?> </span> </h1> <h3 style="margin-top: 0; padding-top: 0;">Beautiful issue tracking and project management</h3> <?php echo __('The Bug Genie is an issue tracking system with a strong focus on being friendly – both for regular users and power users'); ?> .<br> <br> <?php echo __('The Bug Genie follows an open development model, and is released under an open source software license called the MPL (Mozilla Public License). This license gives you the freedom to pick up the sourcecode for The Bug Genie and work with it any way you need.'); ?> <br> <br> <?php echo __('Extend, develop and change The Bug Genie in any way you want, and do whatever you want with the new piece of software (The only thing you cannot do is call your software The Bug Genie). Please do send us your modifications for inclusion in The Bug Genie.'); ?> <br> <br>
<?php include_template('installation/header'); ?> <div class="installation_box"> <h2 style="margin-top: 0px;">Pre-installation checks</h2> <p style="margin-bottom: 10px;"> Before we can start the installation, we need to check a few things.<br> Please look through the list of prerequisites below, and take the necessary steps to correct any errors that may have been highlighted.</p> <div class="feature" id="upgrade_warning"> <h4 style="padding-top: 0; margin-top: 0;">ARE YOU UPGRADING FROM A PREVIOUS VERSION?</h4> <h5>If you are upgrading from version 3.0</h5> You should not see this page if you are upgrading from version 3.0. Please see the upgrade instructions included in the release notes, or the UPGRADE file included with your download for information on how to upgrade to version <?php echo TBGSettings::getVersion(false, false); ?> <h5>If you are upgrading from version 2.x</h5> Please see the instructions in the Import of the configuration center after installation is complete <h5>If you are upgrading from version 1.x</h5> Users of The Bug Genie 1.x will need to upgrade to the latest release of The Bug Genie 2.1 before attempting to upgrade to this version. <div style="text-align: center;"> <button onclick="$('upgrade_warning').hide();$('installation_main_box').show();" style="font-size: 16px; font-weight: bold; padding: 5px; margin: 25px auto 10px auto;">I am not upgrading from a previous version</button> </div> </div> <div id="installation_main_box" style="display: none;"> <div class="install_progress prereq_ok"><?php echo image_tag('themes/oxygen/action_ok.png', array(), true); ?> Mozilla Public License 1.1 accepted ...</div> <?php if ($php_ok) { ?>
$tbg_response->setTitle(__('Configuration center')); ?> <div class="configuration_update_check_container"> <a class="button button-silver" id="update_button" href="javascript:void(0);" onclick="TBG.Config.updateCheck('<?php echo make_url('configure_update_check'); ?> ');"><?php echo __('Check for updates now'); ?> </a> <?php echo image_tag('spinning_16.gif', array('id' => 'update_spinner', 'style' => 'display: none;')); ?> <?php echo __('You currently have version %thebuggenie_version of The Bug Genie.', array('%thebuggenie_version' => TBGSettings::getVersion())); ?> </div> <?php if (count($outdated_modules) > 0) { ?> <div class="update_div rounded_box yellow" style="margin-top: 20px;"> <div class="header"><?php echo __('You have %count outdated modules. They have been disabled until you upgrade them, you can upgrade them from Module settings.', array('%count' => count($outdated_modules))); ?> </div> </div> <?php } if (get_magic_quotes_gpc()) { ?>
public function runUpgrade(TBGRequest $request) { $version_info = explode(',', file_get_contents(THEBUGGENIE_PATH . 'installed')); $this->current_version = $version_info[0]; $this->upgrade_available = $this->current_version != '3.1'; if ($this->upgrade_available) { $scope = new TBGScope(); $scope->setID(1); $scope->setEnabled(); TBGContext::setScope($scope); } $this->upgrade_complete = false; if ($this->upgrade_available && $request->isMethod(TBGRequest::POST)) { $this->upgrade_complete = false; switch ($this->current_version) { case '3.0': $this->_upgradeFrom3dot0(); break; } if ($this->upgrade_complete) { $existing_installed_content = file_get_contents(THEBUGGENIE_PATH . 'installed'); file_put_contents(THEBUGGENIE_PATH . 'installed', TBGSettings::getVersion(false, false) . ', upgraded ' . date('d.m.Y H:i') . "\n" . $existing_installed_content); unlink(THEBUGGENIE_PATH . 'upgrade'); $this->current_version = '3.1'; $this->upgrade_available = false; } } elseif ($this->current_version != '3.1') { $this->permissions_ok = false; if (is_writable(THEBUGGENIE_PATH . 'installed') && is_writable(THEBUGGENIE_PATH . 'upgrade')) { $this->permissions_ok = true; } } else { $this->forward(TBGContext::getRouting()->generate('home')); } }
public function runUpgrade(TBGRequest $request) { $version_info = explode(',', file_get_contents(THEBUGGENIE_PATH . 'installed')); $this->current_version = $version_info[0]; $this->upgrade_available = $this->current_version != '3.3'; if ($this->upgrade_available) { $scope = new TBGScope(); $scope->setID(1); $scope->setEnabled(); TBGContext::setScope($scope); TBGContext::addAutoloaderClassPath(THEBUGGENIE_MODULES_PATH . 'installation' . DS . 'classes' . DS . 'upgrade_3.2'); $this->statuses = TBGListTypesTable::getTable()->getStatusListForUpgrade(); $this->adminusername = TBGUsersTable3dot2::getTable()->getAdminUsername(); } $this->upgrade_complete = false; if ($this->upgrade_available && $request->isPost()) { $this->upgrade_complete = false; switch ($this->current_version) { case '3.0': $this->_upgradeFrom3dot0(); case '3.1': $this->_upgradeFrom3dot1(); case '3.2': $this->_upgradeFrom3dot2($request); } if ($this->upgrade_complete) { $existing_installed_content = file_get_contents(THEBUGGENIE_PATH . 'installed'); file_put_contents(THEBUGGENIE_PATH . 'installed', TBGSettings::getVersion(false, false) . ', upgraded ' . date('d.m.Y H:i') . "\n" . $existing_installed_content); $prev_error_reportiong_level = error_reporting(0); unlink(THEBUGGENIE_PATH . 'upgrade'); error_reporting($prev_error_reportiong_level); if (file_exists(THEBUGGENIE_PATH . 'upgrade')) { $this->upgrade_file_failed = true; } $this->current_version = TBGSettings::getVersion(false, false); $this->upgrade_available = false; } } elseif ($this->upgrade_available) { $this->permissions_ok = false; if (is_writable(THEBUGGENIE_PATH . 'installed') && is_writable(THEBUGGENIE_PATH . 'upgrade')) { $this->permissions_ok = true; } } elseif ($this->upgrade_complete) { $this->forward(TBGContext::getRouting()->generate('home')); } }
/** * Initialize the context * * @return null */ public static function initialize() { if (self::$_debug_mode) { self::$debug_id = uniqid(); } try { // The time the script was loaded $starttime = explode(' ', microtime()); define('NOW', (int) $starttime[1]); // Set up error and exception handling set_exception_handler(array('TBGContext', 'exceptionHandler')); set_error_handler(array('TBGContext', 'errorHandler')); error_reporting(E_ALL | E_NOTICE | E_STRICT); // Set the start time self::setLoadStart($starttime[1] + $starttime[0]); TBGLogging::log('Initializing Caspar framework'); TBGLogging::log('PHP_SAPI says "' . PHP_SAPI . '"'); TBGLogging::log('We are version "' . TBGSettings::getVersion() . '"'); self::checkInstallMode(); if (!is_writable(THEBUGGENIE_CORE_PATH . DIRECTORY_SEPARATOR . 'cache')) { throw new Exception('The cache directory is not writable. Please correct the permissions of core/cache, and try again'); } if (!self::isCLI() && !ini_get('session.auto_start')) { self::initializeSession(); } TBGCache::checkEnabled(); if (TBGCache::isEnabled()) { TBGCache::setPrefix(str_replace('.', '_', TBGSettings::getVersion())); TBGLogging::log(TBGCache::getCacheType() == TBGCache::TYPE_APC ? 'Caching enabled: APC, filesystem' : 'Caching enabled: filesystem'); } else { TBGLogging::log('No caching available'); } TBGLogging::log('Loading B2DB'); if (self::isCLI()) { \b2db\Core::setHTMLException(false); } \b2db\Core::initialize(THEBUGGENIE_CORE_PATH . 'b2db_bootstrap.inc.php'); if (!\b2db\Core::isInitialized()) { throw new Exception("The Bug Genie seems installed, but B2DB isn't configured. This usually indicates an error with the installation. Try removing the file " . THEBUGGENIE_PATH . "installed and try again."); } if (!self::isReadySetup()) { \b2db\Core::setCachingEnabled(false); } TBGLogging::log('...done (Initializing B2DB)'); if (\b2db\Core::isInitialized()) { TBGLogging::log('Database connection details found, connecting'); \b2db\Core::doConnect(); TBGLogging::log('...done (Database connection details found, connecting)'); } TBGLogging::log('...done'); TBGLogging::log('Initializing context'); mb_internal_encoding("UTF-8"); mb_language('uni'); mb_http_output("UTF-8"); TBGLogging::log('Loading scope'); self::setScope(); TBGLogging::log('done (loading scope)'); if (!self::getRouting()->hasCachedRoutes()) { self::loadPreModuleRoutes(); } if (!self::isInstallmode()) { self::setupCoreListeners(); self::loadModules(); } if (!self::getRouting()->hasCachedRoutes()) { self::loadPostModuleRoutes(); if (!self::isInstallmode()) { self::getRouting()->cacheRoutes(); } } else { self::loadCachedRoutes(); } TBGLogging::log('...done'); TBGLogging::log('...done initializing'); TBGLogging::log('Caspar framework loaded'); } catch (Exception $e) { if (!self::isCLI() && !self::isInstallmode()) { throw $e; } } }