2008-05-07 17:48:07 +01:00
|
|
|
<?php
|
2019-07-12 16:31:14 +01:00
|
|
|
// This file is part of GNU social - https://www.gnu.org/software/social
|
|
|
|
//
|
|
|
|
// GNU social 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.
|
|
|
|
//
|
|
|
|
// GNU social 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.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
|
2008-05-14 20:26:48 +01:00
|
|
|
|
2019-07-12 16:31:14 +01:00
|
|
|
defined('GNUSOCIAL') || die();
|
2008-05-14 20:00:09 +01:00
|
|
|
|
2019-07-12 16:31:14 +01:00
|
|
|
/* Work internally in UTC */
|
|
|
|
date_default_timezone_set('UTC');
|
|
|
|
|
|
|
|
/* Work internally with UTF-8 */
|
|
|
|
mb_internal_encoding('UTF-8');
|
|
|
|
|
|
|
|
// All the fun stuff to actually initialize GNU social's framework code,
|
2010-10-15 21:33:26 +01:00
|
|
|
// 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 {
|
2015-02-27 11:44:15 +00:00
|
|
|
GNUsocial::init(@$server, @$path, @$conffile);
|
2010-01-13 03:57:15 +00:00
|
|
|
} 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-10-19 23:35:39 +01: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).
|
2010-10-19 23:35:39 +01:00
|
|
|
echo '<p>'. _('I looked for configuration files in the following places:') .'<br /> ';
|
2010-09-28 23:39:45 +01:00
|
|
|
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
|
|
|
}
|