diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-02-01 00:01:36 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-02-02 17:34:31 +0000 |
| commit | a25f0a04682c4c39c1947220c90af4118c713952 (patch) | |
| tree | f7e9c2c630a50dd3e5dd76ce501dff4b1d8d4c26 /site-offline.php | |
| parent | 4d2a5476ceb1c11dc1fd146bfb0be077baa5fb01 (diff) | |
| download | webtrees-a25f0a04682c4c39c1947220c90af4118c713952.tar.gz webtrees-a25f0a04682c4c39c1947220c90af4118c713952.tar.bz2 webtrees-a25f0a04682c4c39c1947220c90af4118c713952.zip | |
Refactor classes to use namespaces, as per PSR-4. Replace GPL2 with GPL3.
Diffstat (limited to 'site-offline.php')
| -rw-r--r-- | site-offline.php | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/site-offline.php b/site-offline.php index 0bd0b5f255..dc435f0c11 100644 --- a/site-offline.php +++ b/site-offline.php @@ -1,22 +1,20 @@ <?php -// Site Unavailable -// -// webtrees: Web based Family History software -// Copyright (C) 2014 webtrees development team. -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// 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 General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +namespace Webtrees; + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * 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 General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ define('WT_SCRIPT_NAME', 'site-offline.php'); @@ -24,7 +22,7 @@ define('WT_SCRIPT_NAME', 'site-offline.php'); if (version_compare(PHP_VERSION, '5.4', '<')) { require WT_ROOT . 'includes/php_53_compatibility.php'; } -require 'library/autoload.php'; +require 'vendor/autoload.php'; // This script does not load session.php. // session.php won’t run until a configuration file and database connection exist... @@ -34,12 +32,12 @@ define('WT_ROOT', ''); define('WT_GED_ID', 0); define('WT_DATA_DIR', realpath('data') . DIRECTORY_SEPARATOR); -$WT_SESSION = new stdClass; +$WT_SESSION = new \stdClass; $WT_SESSION->locale = ''; require 'includes/functions/functions.php'; -define('WT_LOCALE', WT_I18N::init()); +define('WT_LOCALE', I18N::init()); if (file_exists(WT_DATA_DIR . 'offline.txt')) { $offline_txt = file_get_contents(WT_DATA_DIR . 'offline.txt'); @@ -55,7 +53,7 @@ header('Content-Type: text/html; charset=UTF-8'); echo '<!DOCTYPE html>', - '<html ', WT_I18N::html_markup(), '>', + '<html ', I18N::html_markup(), '>', '<head>', '<meta charset="UTF-8">', '<title>', WT_WEBTREES, '</title>', @@ -71,13 +69,13 @@ echo .good {color: green;} </style>', '</head><body>', - '<h1>', WT_I18N::translate('This website is temporarily unavailable'), '</h1>', + '<h1>', I18N::translate('This website is temporarily unavailable'), '</h1>', '<div class="content"><p>'; if ($offline_txt) { echo $offline_txt; } else { - echo WT_I18N::translate('This website is down for maintenance. You should <a href="index.php">try again</a> in a few minutes.'); + echo I18N::translate('This website is down for maintenance. You should <a href="index.php">try again</a> in a few minutes.'); } echo '</p>'; echo '</div>'; |
