Exemplo n.º 1
0
// | Copyright (C) 2007  by Florian  Florian Schmitz <*****@*****.**>
// +----------------------------------------------------------------------
// |
// | Copyright: See COPYING file that comes with this distribution
// +----------------------------------------------------------------------
//
@set_time_limit(0);
//do it fast damn it
ini_set('memory_limit', '64M');
// define basic stuff first.
define('IN_FS', 1);
define('BASEDIR', dirname(__FILE__));
define('APPLICATION_PATH', dirname(BASEDIR));
define('OBJECTS_PATH', APPLICATION_PATH . '/includes');
require_once OBJECTS_PATH . '/class.flyspray.php';
define('CONFIG_PATH', Flyspray::get_config_path(APPLICATION_PATH));
define('TEMPLATE_FOLDER', BASEDIR . '/templates/');
$conf = @parse_ini_file(CONFIG_PATH, true) or die('Cannot open config file at ' . CONFIG_PATH);
$borked = str_replace('a', 'b', array(-1 => -1));
if (!isset($borked[-1])) {
    die("Flyspray cannot run here, sorry :-( \n PHP 4.4.x/5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" . "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n");
}
require_once OBJECTS_PATH . '/fix.inc.php';
require_once OBJECTS_PATH . '/class.gpc.php';
require_once OBJECTS_PATH . '/i18n.inc.php';
# fake objects for load_translation()
class user
{
    var $infos = array();
}
class project
Exemplo n.º 2
0
<?php

/**
 * Basic constants/variables required for flyspray operation
 *
 * @notes be a real paranoid here.
 * @version $Id$
 * @notes : do not modify this file, use constants.$_SERVER['SERVER_NAME'].php if you need
 * to alter some behaviuor.
 */
if (!defined('BASEDIR')) {
    define('BASEDIR', dirname(dirname(__FILE__)));
}
// Change this line if you move flyspray.conf.php elsewhere
$conf = @parse_ini_file(Flyspray::get_config_path(), true);
// $baseurl
if (isset($conf['general']['force_baseurl']) && $conf['general']['force_baseurl'] != '') {
    $baseurl = $conf['general']['force_baseurl'];
} else {
    if (!isset($webdir)) {
        $webdir = dirname($_SERVER['SCRIPT_NAME']);
        if (!$webdir) {
            $webdir = dirname(htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'utf-8'));
        }
        if (substr($webdir, -9) == 'index.php') {
            $webdir = dirname($webdir);
        }
    }
    $baseurl = rtrim(Flyspray::absoluteURI($webdir), '/\\') . '/';
}
define('NOTIFY_TASK_OPENED', 1);
Exemplo n.º 3
0
define('IN_FS', 1);
define('IN_UPGRADER', 1);
define('BASEDIR', dirname(__FILE__));
define('OBJECTS_PATH', BASEDIR . '/../includes');
define('TEMPLATE_FOLDER', BASEDIR . '/../setup/templates/');
$borked = str_replace('a', 'b', array(-1 => -1));
if (!isset($borked[-1])) {
    die("Flyspray cannot run here, sorry :-( \n PHP 4.4.x/5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" . "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n");
}
require_once OBJECTS_PATH . '/fix.inc.php';
require_once OBJECTS_PATH . '/class.gpc.php';
require_once OBJECTS_PATH . '/class.flyspray.php';
require_once OBJECTS_PATH . '/constants.inc.php';
require_once OBJECTS_PATH . '/class.database.php';
@(require_once OBJECTS_PATH . '/class.tpl.php');
define('CONFIG_PATH', Flyspray::get_config_path(BASEDIR . '/../'));
$conf = @parse_ini_file(CONFIG_PATH, true) or die('Cannot open config file at ' . CONFIG_PATH);
$db = NewDatabase($conf['database']);
$db->setOption('portability', MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_FIX_CASE);
// ---------------------------------------------------------------------
// Application Web locations
// ---------------------------------------------------------------------
$fs = new Flyspray();
define('APPLICATION_SETUP_INDEX', Flyspray::absoluteURI());
define('UPGRADE_VERSION', Flyspray::base_version($fs->version));
// Get installed version
$installed_version = $db->x->GetOne('SELECT pref_value FROM {prefs} WHERE pref_name = ?', null, 'fs_ver');
$page = new Tpl();
$page->assign('title', 'Upgrade ');
$page->assign('short_version', UPGRADE_VERSION);
// ---------------------------------------------------------------------