2008-05-08 01:48:07 +09:00
|
|
|
<?php
|
2019-07-13 00:31:14 +09: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-15 04:26:48 +09:00
|
|
|
|
2019-07-13 00:31:14 +09:00
|
|
|
defined('GNUSOCIAL') || die();
|
2008-05-15 04:00:09 +09:00
|
|
|
|
2019-07-13 00:31:14 +09: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-16 05:33:26 +09:00
|
|
|
// without loading up a site configuration.
|
2019-08-23 21:36:02 +09:00
|
|
|
require_once INSTALLDIR . '/lib/util/framework.php';
|
2010-03-02 11:40:42 +09:00
|
|
|
|
2010-01-13 12:57:15 +09:00
|
|
|
try {
|
2015-02-27 20:44:15 +09:00
|
|
|
GNUsocial::init(@$server, @$path, @$conffile);
|
2010-01-13 12:57:15 +09: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-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 /> ';
|
2020-09-15 20:59:27 +09:00
|
|
|
echo implode('<br />', $e->configFiles);
|
2010-09-29 07:39:45 +09:00
|
|
|
// 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
|
|
|
}
|