From: Evan Prodromou Date: Sat, 17 May 2008 15:29:58 +0000 (-0400) Subject: make config kinda work X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=516996fe9fc8d82a5f2dc719a360e4005948326c;p=quix0rs-gnu-social.git make config kinda work darcs-hash:20080517152958-84dde-1170f017a6cf42845d74f75057c923be91404c29.gz --- diff --git a/config.php b/config.php deleted file mode 100644 index cd00072a6f..0000000000 --- a/config.php +++ /dev/null @@ -1,26 +0,0 @@ - 'pgsql', - 'username' => 'someuser', - 'password' => 'apasswd', - 'hostspec' => 'localhost', - 'database' => 'thedb', - ); - -$options = array( - 'debug' => 2, - 'portability' => DB_PORTABILITY_ALL, - ); - -$db =& DB::connect($dsn, $options); -if (PEAR::isError($db)) { - die($db->getMessage()); -} - -$config['db'] = - array( 'username' => 'stoica', - 'password' => 'replaceme', - diff --git a/config.php.sample b/config.php.sample new file mode 100644 index 0000000000..dea20ec951 --- /dev/null +++ b/config.php.sample @@ -0,0 +1,19 @@ + - 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