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