2008-05-07 17:48:07 +01:00
|
|
|
<?php
|
2008-05-20 20:14:12 +01:00
|
|
|
/*
|
2009-08-25 23:14:12 +01:00
|
|
|
* StatusNet - the distributed open-source microblogging tool
|
2010-10-15 21:33:26 +01:00
|
|
|
* Copyright (C) 2008-2010, StatusNet, Inc.
|
2008-05-20 20:14:12 +01:00
|
|
|
*
|
2008-05-14 20:26:48 +01:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2008-05-20 20:14:12 +01:00
|
|
|
*
|
2008-05-14 20:26:48 +01:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
2008-05-20 20:14:12 +01:00
|
|
|
*
|
2008-05-14 20:26:48 +01:00
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2009-08-26 15:41:36 +01:00
|
|
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
2008-05-14 20:00:09 +01:00
|
|
|
|
2010-10-15 21:33:26 +01:00
|
|
|
// @fixme shouldn't this be in index.php instead?
|
2009-11-14 03:52:39 +00:00
|
|
|
//exit with 200 response, if this is checking fancy from the installer
|
2009-12-23 00:41:39 +00:00
|
|
|
if (isset($_REQUEST['p']) && $_REQUEST['p'] == 'check-fancy') { exit; }
|
2009-11-14 03:52:39 +00:00
|
|
|
|
2010-10-15 21:33:26 +01:00
|
|
|
// All the fun stuff to actually initialize StatusNet's framework code,
|
|
|
|
// without loading up a site configuration.
|
2010-10-15 23:01:43 +01:00
|
|
|
require_once INSTALLDIR . '/lib/framework.php';
|
2010-03-02 02:40:42 +00:00
|
|
|
|
2010-01-13 03:57:15 +00:00
|
|
|
try {
|
|
|
|
StatusNet::init(@$server, @$path, @$conffile);
|
|
|
|
} catch (NoConfigException $e) {
|
|
|
|
// XXX: Throw a conniption if database not installed
|
|
|
|
// XXX: Find a way to use htmlwriter for this instead of handcoded markup
|
2010-09-28 23:39:45 +01:00
|
|
|
// TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
|
2010-01-13 03:57:15 +00:00
|
|
|
echo '<p>'. _('No configuration file found. ') .'</p>';
|
2010-09-28 23:39:45 +01:00
|
|
|
// TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
|
|
|
|
// TRANS: Is followed by a list of directories (separated by HTML breaks).
|
|
|
|
echo '<p>'. _('I looked for configuration files in the following places: ') .'<br /> ';
|
|
|
|
echo implode($e->configFiles, '<br />');
|
|
|
|
// TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
|
2010-01-13 03:57:15 +00:00
|
|
|
echo '<p>'. _('You may wish to run the installer to fix this.') .'</p>';
|
2010-09-28 23:39:45 +01:00
|
|
|
// @todo FIXME Link should be in a para?
|
|
|
|
// TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
|
|
|
|
// TRANS: The text is link text that leads to the installer page.
|
2010-01-13 03:57:15 +00:00
|
|
|
echo '<a href="install.php">'. _('Go to the installer.') .'</a>';
|
|
|
|
exit;
|
2009-10-01 20:11:12 +01:00
|
|
|
}
|