svn: /pear/packages/Bugtracker/trunk/include/ config_local_sample.php prepend.inc

From: Date: Sun, 02 Aug 2009 21:55:57 +0000
Subject: svn: /pear/packages/Bugtracker/trunk/include/ config_local_sample.php prepend.inc
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-56856@lists.php.net to get a copy of this message
saltybeagle Sun, 02 Aug 2009 21:55:57 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=286702 Log: Accept patch from troels and move config into a separate file. Simply copy config_local_sample.php to config_local.php. Allow configuring the db_driver. Remove FIXME note. Add config_local.php to svn:ignore. Changed paths: _U pear/packages/Bugtracker/trunk/include/ A pear/packages/Bugtracker/trunk/include/config_local_sample.php U pear/packages/Bugtracker/trunk/include/prepend.inc Property changes on: pear/packages/Bugtracker/trunk/include ___________________________________________________________________ Added: svn:ignore + config_local.php Added: pear/packages/Bugtracker/trunk/include/config_local_sample.php =================================================================== --- pear/packages/Bugtracker/trunk/include/config_local_sample.php (rev 0) +++ pear/packages/Bugtracker/trunk/include/config_local_sample.php 2009-08-02 21:55:57 UTC (rev 286702) @@ -0,0 +1,47 @@ +<?php +// This is a sample configuration file, copy to config_local.php and customize. + +// Define which site settings to use. +$site = 'php'; + +// Specifics +$site_data = array ( + 'php' => array ( + 'url' => 'bugs.php.net', + 'basedir' => '/bugs', + 'email' => 'php-bugs@lists.php.net', + 'security_email' => 'security@php.net', + 'db' => 'phpbugsdb', + 'db_driver' => 'mysqli', + 'db_user' => 'nobody', + 'db_pass' => '', + 'db_host' => 'localhost', + 'patch_tmp' => '/tmp/patches/', + ), + 'pear' => array ( + 'url' => 'pear.php.net', + 'basedir' => '/bugs', + 'email' => 'pear-bugs@lists.php.net', + 'security_email' => 'pear-group@php.net', + 'db' => 'pear', + 'db_driver' => 'mysqli', + 'db_user' => 'nobody', + 'db_pass' => '', + 'db_host' => 'localhost', + 'patch_tmp' => '/tmp/patches/', + ), + 'pecl' => array ( + 'url' => 'pecl.php.net', + 'basedir' => '/bugs', + 'email' => 'pecl-bugs@lists.php.net', + 'security_email' => 'security@php.net', + 'db' => 'pear', + 'db_driver' => 'mysqli', + 'db_user' => 'nobody', + 'db_pass' => '', + 'db_host' => 'localhost', + 'patch_tmp' => '/tmp/patches/', + ), +); + +define('DEVBOX', true); Modified: pear/packages/Bugtracker/trunk/include/prepend.inc =================================================================== --- pear/packages/Bugtracker/trunk/include/prepend.inc 2009-08-02 21:21:46 UTC (rev 286701) +++ pear/packages/Bugtracker/trunk/include/prepend.inc 2009-08-02 21:55:57 UTC (rev 286702) @@ -23,56 +23,18 @@ die('Turn off "magic_quotes_gpc" in php.ini!'); } -// FIXME: Configuration should be elsewhere! +// Copy config_local_sample.php to config_local.php and override settings. -// CONFIG START -$site = 'php'; // This can be one of php, pear or pecl. +require_once(dirname(__FILE__).'/config_local.php'); -$site_data = array ( - 'php' => array ( - 'url' => 'bugs.php.net', - 'basedir' => '/bugs', - 'email' => 'php-bugs@lists.php.net', - 'security_email' => 'security@php.net', - 'db' => 'phpbugsdb', - 'db_user' => 'nobody', - 'db_pass' => '', - 'db_host' => 'localhost', - 'patch_tmp' => '/tmp/patches/', - ), - 'pear' => array ( - 'url' => 'pear.php.net', - 'basedir' => '/bugs', - 'email' => 'pear-bugs@lists.php.net', - 'security_email' => 'pear-group@php.net', - 'db' => 'pear', - 'db_user' => 'nobody', - 'db_pass' => '', - 'db_host' => 'localhost', - 'patch_tmp' => '/tmp/patches/', - ), - 'pecl' => array ( - 'url' => 'pecl.php.net', - 'basedir' => '/bugs', - 'email' => 'pecl-bugs@lists.php.net', - 'security_email' => 'security@php.net', - 'db' => 'pear', - 'db_user' => 'nobody', - 'db_pass' => '', - 'db_host' => 'localhost', - 'patch_tmp' => '/tmp/patches/', - ), -); +if (!defined('DEVBOX')) { + define('DEVBOX', true); +} -define('DEVBOX', true); +if (!defined('PEAR_CHANNELNAME')) { + define ('PEAR_CHANNELNAME', 'pear.php.net'); +} -if (!defined('PEAR_CHANNELNAME')) - define ('PEAR_CHANNELNAME', 'pear.php.net'); - - -// CONFIG END - -// DO NOT EDIT ANYTHING BELOW THIS LINE, edit $site_data above instead! $logged_in = false; $siteBig = strtoupper($site); $site_url = $site_data[$site]['url']; @@ -80,7 +42,7 @@ $basedir = $site_data[$site]['basedir']; $ROOT_DIR = realpath(dirname(__FILE__) . '/../'); define('BUG_PATCHTRACKER_TMPDIR', $site_data[$site]['patch_tmp']); -define('PEAR_DATABASE_DSN', "mysqli://{$site_data[$site]['db_user']}:{$site_data[$site]['db_pass']}@{$site_data[$site]['db_host']}/{$site_data[$site]['db']}"); +define('PEAR_DATABASE_DSN', "{$site_data[$site]['db_driver']}://{$site_data[$site]['db_user']}:{$site_data[$site]['db_pass']}@{$site_data[$site]['db_host']}/{$site_data[$site]['db']}"); // Database connection (required always?) include_once 'MDB2.php';

« previous php.pear.cvs (#56856) next »