From 201efe6b62f57a479f4d24dca7142f5dff7b0f59 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 15 Oct 2010 13:33:26 -0700 Subject: Split the core-setup bits of common.php out to framework.php (better ideas?) so we can easily set up our framework to run Schema setup before we have a core database to load a live config from. --- lib/common.php | 128 +++------------------------------------------------------ 1 file changed, 5 insertions(+), 123 deletions(-) (limited to 'lib/common.php') diff --git a/lib/common.php b/lib/common.php index 2a11ab722..de12f342b 100644 --- a/lib/common.php +++ b/lib/common.php @@ -1,7 +1,7 @@ getCode() == DB_DATAOBJECT_ERROR_NODATA) { - return; - } - if ($err->getCode()) { - throw new PEAR_Exception($err->getMessage(), $err->getCode()); - } - throw new PEAR_Exception($err->getMessage()); -} -PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception'); +// All the fun stuff to actually initialize StatusNet's framework code, +// without loading up a site configuration. +require_once INSTALLDIR . '/framework.php'; try { StatusNet::init(@$server, @$path, @$conffile); -- cgit v1.2.3-54-g00ecf