当前位置: 首页>>代码示例>>PHP>>正文


PHP Settings::getVersion方法代码示例

本文整理汇总了PHP中thebuggenie\core\framework\Settings::getVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP Settings::getVersion方法的具体用法?PHP Settings::getVersion怎么用?PHP Settings::getVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在thebuggenie\core\framework\Settings的用法示例。


在下文中一共展示了Settings::getVersion方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: runUpgrade

 public function runUpgrade(framework\Request $request)
 {
     $version_info = explode(',', file_get_contents(THEBUGGENIE_PATH . 'installed'));
     $this->current_version = $version_info[0];
     $this->upgrade_available = $this->current_version != framework\Settings::getVersion(false);
     if ($this->upgrade_available) {
         $scope = new \thebuggenie\core\entities\Scope();
         $scope->setID(1);
         $scope->setEnabled();
         framework\Context::setScope($scope);
         if ($this->current_version == '3.2') {
             $this->statuses = \thebuggenie\core\entities\tables\ListTypes::getTable()->getStatusListForUpgrade();
             $this->adminusername = \thebuggenie\core\modules\installation\upgrade_32\TBGUsersTable::getTable()->getAdminUsername();
         }
     }
     $this->upgrade_complete = false;
     if ($this->upgrade_available && $request->isPost()) {
         $this->upgrade_complete = false;
         switch ($this->current_version) {
             case '3.2':
                 $this->_upgradeFrom3dot2($request);
                 break;
             default:
                 $this->upgrade_complete = true;
         }
         if ($this->upgrade_complete) {
             $existing_installed_content = file_get_contents(THEBUGGENIE_PATH . 'installed');
             file_put_contents(THEBUGGENIE_PATH . 'installed', framework\Settings::getVersion(false, false) . ', upgraded ' . date('d.m.Y H:i') . "\n" . $existing_installed_content);
             $this->current_version = framework\Settings::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(framework\Context::getRouting()->generate('home'));
     }
 }
开发者ID:JonathanRH,项目名称:thebuggenie,代码行数:40,代码来源:Main.php

示例2: make_url

$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' => \thebuggenie\core\framework\Settings::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()) {
    ?>
开发者ID:JonathanRH,项目名称:thebuggenie,代码行数:30,代码来源:index.html.php

示例3: make_url

        <script type="text/javascript" src="<?php 
echo make_url('home');
?>
js/HackTimer.min.js"></script>
        <script type="text/javascript" src="<?php 
echo make_url('home');
?>
js/HackTimer.silent.min.js"></script>
        <script type="text/javascript" src="<?php 
echo make_url('home');
?>
js/HackTimerWorker.min.js"></script>
        <script>
            var bust = function (path) {
                return path + '?bust=' + <?php 
echo \thebuggenie\core\framework\Context::isDebugMode() ? ' Math.random()' : "'" . \thebuggenie\core\framework\Settings::getVersion() . "'";
?>
;
            };

            var require = {
                baseUrl: '<?php 
echo make_url('home');
?>
js',
                paths: {
                    jquery: 'jquery-2.1.3.min',
                    'jquery-ui': 'jquery-ui.min',
                    'thebuggenie': bust('thebuggenie.js'),
                    'thebuggenie/tbg': bust('thebuggenie/tbg.js'),
                    'thebuggenie/tools': bust('thebuggenie/tools.js'),
开发者ID:ellipsonic,项目名称:thebuggenige_app,代码行数:31,代码来源:layout.php

示例4: image_tag

<footer>
    <?php 
echo image_tag('footer_logo.png');
?>
    <?php 
echo link_tag(make_url('about'), 'The Bug Genie') . '&nbsp;' . \thebuggenie\core\framework\Settings::getVersion();
?>
    <?php 
if ($tbg_user->canAccessConfigurationPage()) {
    ?>
        | <b><?php 
    echo link_tag(make_url('configure'), __('Configure %thebuggenie_name', array('%thebuggenie_name' => \thebuggenie\core\framework\Settings::getSiteHeaderName())));
    ?>
</b>
    <?php 
}
?>
    | <a href="http://www.thebuggenie.com/support">Support</a>
    | <a href="http://www.thebuggenie.com/feedback">Feedback</a>
    <?php 
if (\thebuggenie\core\framework\Context::isDebugMode() && \thebuggenie\core\framework\Logging::isEnabled()) {
    ?>
        <script>
            function tbg_debug_show_menu_tab(tab, clicked) {
                $('debug-bar').childElements().each(function (unclicked) {
                    unclicked.removeClassName('selected');
                });
                clicked.addClassName('selected');
                $('debug-frames-container').childElements().each(function (container) {
                    (container.id == tab) ? container.addClassName('selected') : container.removeClassName('selected');
                });
开发者ID:founderio,项目名称:thebuggenie,代码行数:31,代码来源:footer.inc.php

示例5: initialize

 /**
  * Initialize the context
  *
  * @return null
  */
 public static function initialize()
 {
     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('\\thebuggenie\\core\\framework\\Context', 'exceptionHandler'));
         set_error_handler(array('\\thebuggenie\\core\\framework\\Context', 'errorHandler'));
         error_reporting(E_ALL | E_NOTICE | E_STRICT);
         // Set the start time
         self::setLoadStart($starttime[1] + $starttime[0]);
         self::checkInstallMode();
         self::getCache()->setPrefix(str_replace('.', '_', Settings::getVersion()));
         if (!self::isReadySetup()) {
             self::getCache()->disable();
         } else {
             self::getCache()->checkEnabled();
             if (self::getCache()->isEnabled()) {
                 Logging::log(self::getCache()->getCacheType() == Cache::TYPE_APC ? 'Caching enabled: APC, filesystem' : 'Caching enabled: filesystem');
             } else {
                 Logging::log('No caching available');
             }
         }
         self::loadConfiguration();
         if (self::$_debug_mode) {
             self::$debug_id = uniqid();
         }
         Logging::log('Initializing Caspar framework');
         Logging::log('PHP_SAPI says "' . PHP_SAPI . '"');
         Logging::log('We are version "' . Settings::getVersion() . '"');
         Logging::log('Debug mode: ' . (self::$_debug_mode ? 'yes' : 'no'));
         if (!self::isCLI() && !ini_get('session.auto_start')) {
             self::initializeSession();
         }
         Logging::log('Loading B2DB');
         if (array_key_exists('b2db', self::$_configuration)) {
             \b2db\Core::initialize(self::$_configuration['b2db'], self::getCache());
         } else {
             \b2db\Core::initialize(array(), self::getCache());
         }
         if (self::isReadySetup() && !\b2db\Core::isInitialized()) {
             throw new exceptions\ConfigurationException("The Bug Genie seems installed, but B2DB isn't configured.", exceptions\ConfigurationException::NO_B2DB_CONFIGURATION);
         }
         Logging::log('...done (Initializing B2DB)');
         if (\b2db\Core::isInitialized() && self::isReadySetup()) {
             Logging::log('Database connection details found, connecting');
             \b2db\Core::doConnect();
             Logging::log('...done (Database connection details found, connecting)');
         }
         Logging::log('...done');
         Logging::log('Initializing context');
         mb_internal_encoding("UTF-8");
         mb_language('uni');
         mb_http_output("UTF-8");
         Logging::log('Loading scope');
         self::setScope();
         Logging::log('done (loading scope)');
         self::loadInternalModules();
         if (!self::isInstallmode()) {
             self::setupCoreListeners();
             self::loadModules();
         }
         if (!self::getRouting()->hasCachedRoutes()) {
             self::loadRoutes();
         } else {
             self::loadCachedRoutes();
         }
         Logging::log('...done');
         Logging::log('...done initializing');
         Logging::log('Caspar framework loaded');
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:JonathanRH,项目名称:thebuggenie,代码行数:80,代码来源:Context.php

示例6: include_component

                    <h5>How to get involved in The Bug Genie community:</h5>
                    <a target="_blank" href="http://thebuggenie.org/community">http://thebuggenie.org/community</a> <i>(opens in a new window)</i>
                    <div class="progress_buttons">
                        <a href="javascript:void(0);" class="button button-silver button-next" onclick="tbg_upgrade_next($(this).up('.installpage'));">Next</a>
                    </div>
                </div>
                <div class="padded_box installpage backup" id="install_page_2">
                    <?php 
        include_component('main/percentbar', array('percent' => 5, 'height' => 5));
        ?>
                    <h2 style="margin-bottom: 15px; padding-bottom: 0;">
                        <span style="font-weight: normal;">You are performing the following upgrade: </span><?php 
        echo $current_version;
        ?>
.x => <?php 
        echo \thebuggenie\core\framework\Settings::getVersion(false, true);
        ?>
<br>
                    </h2>
                    Although this upgrade process has been thoroughly tested before the release, errors may still occur. You are strongly encouraged to take a backup of your installation before you continue!<br>
                    <br>
                    Before continuing, please make sure you have backed up the following:
                    <ul class="backuplist">
                        <li style="background-image: url('iconsets/oxygen/backup_database.png');">
                            The Bug Genie database<br>
                            Currently connected to <?php 
        echo b2db\Core::getDBtype();
        ?>
 database <span class="command_box"><?php 
        echo b2db\Core::getDBname();
        ?>
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:31,代码来源:upgrade.html.php

示例7: array

<?php

$tbg_response->setTitle(__('About %sitename', array('%sitename' => \thebuggenie\core\framework\Settings::getSiteHeaderName())));
$tbg_response->addBreadcrumb(__('About %sitename', array('%sitename' => \thebuggenie\core\framework\Settings::getSiteHeaderName())), 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' => \thebuggenie\core\framework\Settings::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 &ndash; 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>
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:31,代码来源:about.html.php

示例8: runStatus

 public function runStatus(framework\Request $request)
 {
     $status_info = array('api_version' => $this->getApiVersion(), 'version' => framework\Settings::getVersion(), 'version_long' => framework\Settings::getVersion(true, true), 'site_name' => framework\Settings::getSiteHeaderName(), 'host' => framework\Settings::getURLhost(), 'urls' => array('site' => framework\Settings::getHeaderLink() == '' ? framework\Context::getWebroot() : framework\Settings::getHeaderLink(), 'logo' => framework\Settings::getHeaderIconURL(), 'icon' => framework\Settings::getFaviconURL()), 'online' => !(bool) framework\Settings::isMaintenanceModeEnabled());
     if (framework\Settings::hasMaintenanceMessage()) {
         $status_info['maintenance_msg'] = framework\Settings::getMaintenanceMessage();
     }
     $this->status_info = $status_info;
 }
开发者ID:thebuggenie,项目名称:module-api,代码行数:8,代码来源:Main.php


注:本文中的thebuggenie\core\framework\Settings::getVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。