From 516996fe9fc8d82a5f2dc719a360e4005948326c Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 17 May 2008 11:29:58 -0400 Subject: make config kinda work darcs-hash:20080517152958-84dde-1170f017a6cf42845d74f75057c923be91404c29.gz --- lib/common.php | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'lib/common.php') diff --git a/lib/common.php b/lib/common.php index 4cef9f0d9..069541026 100644 --- a/lib/common.php +++ b/lib/common.php @@ -29,28 +29,32 @@ define('MAX_AVATAR_SIZE', 256 * 1024); # global configuration object +require_once('PEAR.php'); +require_once('DB_DataObject.php'); + // default configuration, overwritten in config.php $config = array('site' => - array('name' => 'Just another µB', + array('name' => 'Just another Laconica microblog', 'server' => 'localhost', 'path' => '/'), 'avatar' => array('directory' => INSTALLDIR . 'files', 'path' => '/files'), - 'dsn' => - array('phptype' => 'mysql', - 'username' => 'stoica', - 'password' => 'apasswd', - 'hostspec' => 'localhost', - 'database' => 'thedb') - 'dboptions' => - array('debug' => 2, - 'portability' => DB_PORTABILITY_ALL)); + 'db' => &PEAR::getStaticProperty('DB_DataObject','options'), +); + +$config['db'] = + array('database' => 'YOU HAVE TO SET THIS IN config.php', + 'schema_location' => $INSTALLDIR . '/classes', + 'class_location' => $INSTALLDIR . '/classes', + 'require_prefix' => 'classes/', + 'class_prefix' => '', + 'db_driver' => 'MDB2', + 'quote_identifiers' => false); require_once(INSTALLDIR . '/config.php'); -require_once('DB.php'); # Show a server error -- cgit v1.2.3-54-g00ecf