diff options
author | Nicolas Lécureuil <neoclust@mageia.org> | 2020-05-17 14:46:00 +0200 |
---|---|---|
committer | Nicolas Lécureuil <neoclust@mageia.org> | 2020-05-17 14:46:00 +0200 |
commit | e3de9d7dd1331f9718e04cc98e9ca7cfa27cf4aa (patch) | |
tree | 336981502f93ceb9fa5ed33ea3b47dcefc5a8402 /common/app/app.php | |
parent | ff32e499745367b816d10f25e63ff3328214c32f (diff) | |
download | planet-user/wally/upstream-10-dev.tar planet-user/wally/upstream-10-dev.tar.gz planet-user/wally/upstream-10-dev.tar.bz2 planet-user/wally/upstream-10-dev.tar.xz planet-user/wally/upstream-10-dev.zip |
Sync with master of moonmoon ( version 9.0.0-rc)HEADuser/wally/upstream-10-devmaster
Source from https://github.com/Emmafrs/moonmoon/
Diffstat (limited to 'common/app/app.php')
-rwxr-xr-x | common/app/app.php | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/common/app/app.php b/common/app/app.php index 0703ac5..0797cc7 100755 --- a/common/app/app.php +++ b/common/app/app.php @@ -1,29 +1,15 @@ <?php -//Debug ? -$debug = isset($_GET['debug']) ? $_GET['debug'] : 0; -if ($debug) { - error_reporting(E_ALL); -} else { - error_reporting(0); -} - -include(dirname(__FILE__).'/lib/lib.opml.php'); -include(dirname(__FILE__).'/lib/simplepie/simplepie.inc'); -include(dirname(__FILE__).'/lib/spyc-0.5/spyc.php'); +error_reporting(0); -include_once(dirname(__FILE__).'/classes/PlanetConfig.php'); -include_once(dirname(__FILE__).'/classes/PlanetFeed.php'); -include_once(dirname(__FILE__).'/classes/PlanetItem.php'); -include_once(dirname(__FILE__).'/classes/PlanetError.php'); -include_once(dirname(__FILE__).'/classes/Planet.class.php'); -include_once(dirname(__FILE__).'/classes/Simplel10n.class.php'); +require_once __DIR__.'/../vendor/autoload.php'; -$savedConfig = dirname(__FILE__).'/../custom/config.yml'; -$moon_version = file_get_contents(dirname(__FILE__).'/../VERSION'); +$savedConfig = __DIR__.'/../custom/config.yml'; +$moon_version = file_get_contents(__DIR__.'/../VERSION'); -if (is_file($savedConfig)){ +session_start(); +if (is_installed()) { $conf = Spyc::YAMLLoad($savedConfig); // this is a check to upgrade older config file without l10n @@ -35,13 +21,12 @@ if (is_file($savedConfig)){ $PlanetConfig = new PlanetConfig($conf); $Planet = new Planet($PlanetConfig); -} -$l10n = new Simplel10n($conf['locale']); + if ($conf['debug']) { + error_reporting(E_ALL); + } -// this is an helper function. We will usually use that function and not Simplel10n::getString() -function _g($str, $comment='') { - return Simplel10n::getString($str); } - +$l10n = new Simplel10n($conf['locale']); +$csrf = new CSRF(); |