2008-05-08 01:48:07 +09:00
|
|
|
<?php
|
2008-05-21 04:14:12 +09:00
|
|
|
/*
|
2009-08-26 07:14:12 +09:00
|
|
|
* StatusNet - the distributed open-source microblogging tool
|
2010-10-16 05:33:26 +09:00
|
|
|
* Copyright (C) 2008-2010, StatusNet, Inc.
|
2008-05-21 04:14:12 +09:00
|
|
|
*
|
2008-05-15 04:26:48 +09: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-21 04:14:12 +09:00
|
|
|
*
|
2008-05-15 04:26:48 +09: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-21 04:14:12 +09:00
|
|
|
*
|
2008-05-15 04:26:48 +09: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 23:41:36 +09:00
|
|
|
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
2008-05-15 04:00:09 +09:00
|
|
|
|
2010-10-16 05:33:26 +09:00
|
|
|
// @fixme shouldn't this be in index.php instead?
|
2009-11-14 12:52:39 +09:00
|
|
|
//exit with 200 response, if this is checking fancy from the installer
|
2009-12-23 09:41:39 +09:00
|
|
|
if (isset($_REQUEST['p']) && $_REQUEST['p'] == 'check-fancy') { exit; }
|
2009-11-14 12:52:39 +09:00
|
|
|
|
2010-10-16 05:33:26 +09:00
|
|
|
// All the fun stuff to actually initialize StatusNet's framework code,
|
|
|
|
// without loading up a site configuration.
|
2010-10-16 07:01:43 +09:00
|
|
|
require_once INSTALLDIR . '/lib/framework.php';
|
2010-03-02 11:40:42 +09:00
|
|
|
|
2010-01-13 12:57:15 +09: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-29 07:39:45 +09:00
|
|
|
// TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
|
2010-10-20 07:35:39 +09:00
|
|
|
echo '<p>'. _('No configuration file found.') .'</p>';
|
2010-09-29 07:39:45 +09: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).
|
2010-10-20 07:35:39 +09:00
|
|
|
echo '<p>'. _('I looked for configuration files in the following places:') .'<br /> ';
|
2010-09-29 07:39:45 +09:00
|
|
|
echo implode($e->configFiles, '<br />');
|
|
|
|
// TRANS: Error message displayed when no configuration file was found for a StatusNet installation.
|
2010-01-13 12:57:15 +09:00
|
|
|
echo '<p>'. _('You may wish to run the installer to fix this.') .'</p>';
|
2010-09-29 07:39:45 +09: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 12:57:15 +09:00
|
|
|
echo '<a href="install.php">'. _('Go to the installer.') .'</a>';
|
|
|
|
exit;
|
2009-10-02 04:11:12 +09:00
|
|
|
}
|