function run()
 {
     $vc = new reasonVersionCheck();
     $resp = $vc->check();
     echo '<p>' . htmlspecialchars($resp['message'], ENT_QUOTES);
     if (!empty($resp['url'])) {
         echo ' <a href="' . htmlspecialchars($resp['url'], ENT_QUOTES) . '">Link</a>';
     }
     echo '<p>' . "\n";
     echo '<p class="smallText">Current version: ' . htmlspecialchars($vc->get_current_version_id(), ENT_QUOTES) . '</p>' . "\n";
 }
Example #2
0
/**
 * Returns the version number of this instance of Reason CMS.
 */
function reason_get_version()
{
    static $version;
    if (!isset($version)) {
        reason_include_once('classes/version_check.php');
        $rvc = new reasonVersionCheck();
        $version = $rvc->get_current_version_id();
    }
    return $version;
}
Example #3
0
 function run()
 {
     echo '<div class="oldBrowserAlert">Notice: Reason works with all browsers.  However, it will look and feel quite a lot nicer if you can use it with a modern, standards-based browser such as Internet Explorer 6+, Mozilla 1.5+, Firefox, Netscape 7, Safari, or Opera.</div>' . "\n";
     if (!HTTPS_AVAILABLE && reason_user_has_privs($this->admin_page->user_id, 'upgrade')) {
         echo '<div id="securityWarning">' . "\n";
         echo '<h3>Security Notice</h3>' . "\n";
         echo '<p>This instance of Reason is running <strong>without</strong> https/ssl. This means that credentials and other potentially sensitive information are being sent in the clear. To run Reason with greater security -- and to make this notice go away -- 1) make sure your server is set up to run https and 2) change the setting HTTPS_AVAILABLE to true in settings/package_settings.php.</p>' . "\n";
         echo '</div>' . "\n";
     }
     if ((!defined('REASON_DISABLE_AUTO_UPDATE_CHECK') || !REASON_DISABLE_AUTO_UPDATE_CHECK) && reason_user_has_privs($this->admin_page->user_id, 'upgrade')) {
         reason_include_once('classes/version_check.php');
         $vc = new reasonVersionCheck();
         $resp = $vc->check();
         switch ($resp['code']) {
             case 'version_out_of_date':
                 echo '<div class="versionUpdateNotice">' . htmlspecialchars($resp['message'], ENT_QUOTES);
                 if (!empty($resp['url'])) {
                     echo ' <a href="' . htmlspecialchars($resp['url'], ENT_QUOTES) . '">Link</a>';
                 }
                 echo '</div>' . "\n";
                 break;
             case 'no_version_provided':
             case 'version_not_recognized':
                 trigger_error('Error checking version: ' . $resp['message']);
                 break;
         }
     }
     if (reason_unique_name_exists('whats_new_in_reason_blurb')) {
         $intro = new entity(id_of('whats_new_in_reason_blurb'));
         echo "\n" . '<div id="whatsNew">' . "\n";
         echo '<h3>' . $intro->get_value('name') . '</h3>' . "\n";
         echo '<p><em>Updated ' . prettify_mysql_timestamp($intro->get_value('last_modified'), 'j F Y') . '</em></p>' . "\n";
         echo $intro->get_value('content');
         echo '</div>' . "\n";
     }
 }
Example #4
0
/**
 * If this is a bleeding edge version of Reason, provide a reminder that upgrade scripts may need to be run (and a link)
 */
function upgrade_script_reminder()
{
    reason_include_once('classes/version_check.php');
    $vc = new reasonVersionCheck();
    $cur_version = $vc->get_current_version_id();
    $all_versions = $vc->get_all_versions();
    if (isset($all_versions[$cur_version]) && $all_versions[$cur_version] == 'bleeding') {
        echo '<h3>Bleeding Edge Version Detected</h3>';
        echo 'You are running a bleeding edge version of reason cms (' . $cur_version . '). Make sure you <a href="upgrade.php">run the latest upgrade scripts</a> to ensure your database is up to date.';
    }
}