Beispiel #1
0
 /**
  * test version number (upgrade script requirements vs database version) to see if upgrade script should be run
  * @param object $version
  * @return bool
  */
 function checkVersion($version)
 {
     $db_version = $version->major . '.' . $version->minor . '.' . $version->revision;
     $to_version = explode('.', $this->to_version);
     $to_ver->major = $to_version[0];
     $to_ver->minor = $to_version[1];
     $to_ver->revision = $to_version[2];
     $to_ver->type = '';
     $to_ver->iteration = '';
     $from_version = explode('.', $this->from_version);
     $from_ver->major = $from_version[0];
     $from_ver->minor = $from_version[1];
     $from_ver->revision = $from_version[2];
     $from_ver->type = '';
     $from_ver->iteration = '';
     // check if db version is equal to or inside the versions
     if ($db_version == $this->from_version || $db_version == $this->to_version) {
         return true;
         //		} elseif ($version >= $this->from_version && $version <= $this->to_version) {
     } elseif (expVersion::compareVersion($from_ver, $version) && expVersion::compareVersion($version, $to_ver)) {
         return true;
     } else {
         return false;
     }
 }
Beispiel #2
0
# Copyright (c) 2004-2011 OIC Group, Inc.
# Written and Designed by James Hunt
#
# This file is part of Exponent
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
if (!defined('EXPONENT')) {
    exit('');
}
/**
 * PosGreSQL Database Engine Info File
 *
 * Contains information about the PosGreSQL Database Engine implementation
 *
 * @author James Hunt
 * @copyright 2004-2011 OIC Group, Inc.
 * @version 0.95
 *
 * @package Subsystems
 * @subpackage Database
 */
return array("name" => "PostGreSQL Database Backend", "author" => "James Hunt", "description" => "PostGreSQL Database Backend.", 'is_valid' => 0, "version" => expVersion::getVersion(true));
Beispiel #3
0
# Written and Designed by James Hunt
#
# This file is part of Exponent
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
if (!defined('EXPONENT')) {
    exit('');
}
/**
 * MySQL Database Engine Info File
 *
 * Contains information about the MySQL Database Engine implementation
 *
 * @author James Hunt
 * @copyright 2004-2011 OIC Group, Inc.
 * @version 0.95
 *
 * @package Subsystems
 * @subpackage Database
 */
//TODO: investigate/fix PHP5 MySql function issues
return array('name' => 'MySQL Database Backend', 'author' => 'James Hunt', 'description' => 'MySQL Database Backend.', 'is_valid' => 0, 'version' => expVersion::getVersion(true));
Beispiel #4
0
# Copyright (c) 2004-2011 OIC Group, Inc.
# Written and Designed by James Hunt
#
# This file is part of Exponent
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
if (!defined('EXPONENT')) {
    exit('');
}
/**
 * MySQL Database Engine Info File
 *
 * Contains information about the MySQL Database Engine implementation
 *
 * @author Ron Miller
 * @copyright 2004-2011 OIC Group, Inc.
 * @version 0.96.6
 *
 * @package Subsystems
 * @subpackage Database
 */
return array('name' => 'MySQLi Database Backend', 'author' => 'Ron Miller', 'description' => 'MySQLi Database Backend available in PHP5+. Offers greatly improved database performance.', 'is_valid' => function_exists('mysqli_connect') ? 1 : 0, 'version' => expVersion::getVersion(true));
Beispiel #5
0
 public static function headerInfo($config)
 {
     global $sectionObj, $validateTheme, $head_config, $cur_lang;
     $validateTheme['headerinfo'] = true;
     // end checking for headerInfo
     // globalize header configuration
     $head_config = $config;
     // check to see if we're in XHTML or HTML mode
     if (isset($config['xhtml']) && $config['xhtml'] == true) {
         define('XHTML', 1);
         define('XHTML_CLOSING', "/");
         //default
     } else {
         define('XHTML', 0);
         define('XHTML_CLOSING', "");
     }
     // Load primer CSS files, or default to false if not set.
     if (!empty($config['css_primer'])) {
         expCSS::pushToHead($config);
     } else {
         $config['css_primer'] = false;
     }
     if (isset($config['css_core'])) {
         if (is_array($config['css_core'])) {
             $corecss = implode(",", $config['css_core']);
             expCSS::pushToHead(array("corecss" => $corecss));
         }
     } else {
         $config['css_core'] = false;
     }
     // Default the running of view based CSS inclusion to true
     if (empty($config['css_links'])) {
         $config['css_links'] = true;
     }
     // default theme css collecting to true if not set
     if (empty($config['css_theme'])) {
         $config['css_theme'] = true;
     }
     //eDebug($config);
     if (empty($sectionObj)) {
         return false;
     }
     $metainfo = self::pageMetaInfo();
     $str = '';
     $str = '<title>' . $metainfo['title'] . "</title>\r\n";
     $str .= "\t" . '<meta http-equiv="Content-Type" content="text/html; charset=' . LANG_CHARSET . '" ' . XHTML_CLOSING . '>' . "\n";
     $str .= "\t" . '<meta name="Generator" content="Exponent Content Management System - ' . expVersion::getVersion(true) . '" ' . XHTML_CLOSING . '>' . "\n";
     $str .= "\t" . '<meta name="Keywords" content="' . $metainfo['keywords'] . '" ' . XHTML_CLOSING . '>' . "\n";
     $str .= "\t" . '<meta name="Description" content="' . $metainfo['description'] . '" ' . XHTML_CLOSING . '>' . "\n";
     //the last little bit of IE 6 support
     $str .= "\t" . '<!--[if IE 6]><style type="text/css">  body { behavior: url(' . PATH_RELATIVE . 'external/csshover.htc); }</style><![endif]-->' . "\n";
     // when minification is used, the comment below gets replaced when the buffer is dumped
     $str .= '<!-- MINIFY REPLACE -->';
     //		if(file_exists(BASE.'themes/'.DISPLAY_THEME_REAL.'/favicon.ico')) {
     //			$str .= "\t".'<link rel="shortcut icon" href="'.URL_FULL.'themes/'.DISPLAY_THEME_REAL.'/favicon.ico" type="image/x-icon" />'."\r\n";
     if (file_exists(BASE . 'themes/' . DISPLAY_THEME . '/favicon.ico')) {
         $str .= "\t" . '<link rel="shortcut icon" href="' . URL_FULL . 'themes/' . DISPLAY_THEME . '/favicon.ico" type="image/x-icon" ' . XHTML_CLOSING . '>' . "\r\n";
     }
     return $str;
 }
Beispiel #6
0
# This file is part of Exponent
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
if (!defined('EXPONENT')) {
    exit('');
}
//$num_version = EXPONENT_VERSION_MAJOR.'.'.EXPONENT_VERSION_MINOR.'.'.EXPONENT_VERSION_REVISION;
$num_version = expVersion::getVersion();
global $db;
$db_version = $db->selectObject('version', '1');
?>
<h2><?php 
echo gt('Upgrade Scripts');
?>
</h2>
<p>
<?php 
echo gt("Exponent will perform the following upgrades") . ':';
//display the upgrade scripts
$upgrade_dir = 'upgrades';
$i = 0;
if (is_readable('include/upgradescript.php')) {
    include_once 'include/upgradescript.php';
Beispiel #7
0
// Check to see if we are in maintenance mode.
if (MAINTENANCE_MODE && !$user->isAdmin() && (!isset($_REQUEST['controller']) || $_REQUEST['controller'] != 'login') && !expJavascript::inAjaxAction()) {
    //only admins/acting_admins are allowed to get to the site, all others get the maintenance view
    $template = new standalonetemplate('_maintenance');
    $template->output();
} else {
    if (MAINTENANCE_MODE > 0) {
        flash('error', gt('Maintenance Mode is Enabled'));
    }
    //the default user is anonymous
    //	if (!expSession::loggedIn()) {
    //TODO: Maxims initial anonymous user implementation
    //user::login("anonymous", "anonymous");
    //	}
    // check to see if we need to install or upgrade the system
    expVersion::checkVersion();
    // Handle sub themes
    $page = expTheme::getTheme();
    // If we are in a printer friendly request then we need to change to our printer friendly subtheme
    if (PRINTER_FRIENDLY == 1) {
        expSession::set("uilevel", 0);
        $pftheme = expTheme::getPrinterFriendlyTheme();
        // get the printer friendly theme
        $page = $pftheme == null ? $page : $pftheme;
        // if there was no theme found then just use the current subtheme
    }
    if (is_readable($page)) {
        if (!expJavascript::inAjaxAction()) {
            include_once $page;
            expTheme::satisfyThemeRequirements();
        } else {