From 3602405ec0dbc576fce09ff9e865ba2404622080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 11 Jul 2014 16:03:59 +0200 Subject: WHAT. A. BIG. REFACTOR. + new license (we moved to MIT one) --- inc/poche/global.inc.php | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'inc/poche/global.inc.php') diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index 8cf86d03..2c22c014 100755 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php @@ -5,7 +5,7 @@ * @category wallabag * @author Nicolas Lœuillet * @copyright 2013 - * @license http://www.wtfpl.net/ see COPYING file + * @license http://opensource.org/licenses/MIT see COPYING file */ # the poche system root directory (/inc) @@ -18,6 +18,10 @@ require_once INCLUDES . '/poche/Tools.class.php'; require_once INCLUDES . '/poche/User.class.php'; require_once INCLUDES . '/poche/Url.class.php'; require_once INCLUDES . '/3rdparty/class.messages.php'; +require_once ROOT . '/vendor/autoload.php'; +require_once INCLUDES . '/poche/Template.class.php'; +require_once INCLUDES . '/poche/Language.class.php'; +require_once INCLUDES . '/poche/Routing.class.php'; require_once INCLUDES . '/poche/Poche.class.php'; require_once INCLUDES . '/poche/Database.class.php'; @@ -36,22 +40,11 @@ require_once INCLUDES . '/3rdparty/libraries/PHPePub/Logger.php'; require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPub.php'; require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPubChapterSplitter.php'; -# Composer its autoloader for automatically loading Twig -if (! file_exists(ROOT . '/vendor/autoload.php')) { - Poche::$canRenderTemplates = false; -} else { - require_once ROOT . '/vendor/autoload.php'; -} - # system configuration; database credentials et caetera -if (! file_exists(INCLUDES . '/poche/config.inc.php')) { - Poche::$configFileAvailable = false; -} else { - require_once INCLUDES . '/poche/config.inc.php'; - require_once INCLUDES . '/poche/config.inc.default.php'; -} +require_once INCLUDES . '/poche/config.inc.php'; +require_once INCLUDES . '/poche/config.inc.default.php'; -if (Poche::$configFileAvailable && DOWNLOAD_PICTURES) { +if (DOWNLOAD_PICTURES) { require_once INCLUDES . '/poche/pochePictures.php'; } -- cgit v1.2.3 From b3cda72e93fff3a4c3476e9e7e78ef2b2a3f02b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 11 Jul 2014 17:06:51 +0200 Subject: PicoFarad framework for routing --- inc/poche/global.inc.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'inc/poche/global.inc.php') diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index 2c22c014..9d710b6c 100755 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php @@ -40,6 +40,12 @@ require_once INCLUDES . '/3rdparty/libraries/PHPePub/Logger.php'; require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPub.php'; require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPubChapterSplitter.php'; +require_once INCLUDES . '/3rdparty/PicoFarad/Request.php'; +require_once INCLUDES . '/3rdparty/PicoFarad/Response.php'; +require_once INCLUDES . '/3rdparty/PicoFarad/Router.php'; +require_once INCLUDES . '/3rdparty/PicoFarad/Session.php'; +require_once INCLUDES . '/3rdparty/PicoFarad/Template.php'; + # system configuration; database credentials et caetera require_once INCLUDES . '/poche/config.inc.php'; require_once INCLUDES . '/poche/config.inc.default.php'; @@ -50,4 +56,15 @@ if (DOWNLOAD_PICTURES) { if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timezone'))) { date_default_timezone_set('UTC'); -} \ No newline at end of file +} + +if (defined('ERROR_REPORTING')) { + error_reporting(ERROR_REPORTING); +} + +// Start session +Session::$sessionName = 'wallabag'; +Session::init(); + +// Let's rock ! +$wallabag = new Poche(); -- cgit v1.2.3 From 26b77483ee7545c0e4f8eeb205a5743bf3589adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 12 Jul 2014 16:39:31 +0200 Subject: remove PicoFarad MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’ll implement it an other day. --- inc/poche/global.inc.php | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'inc/poche/global.inc.php') diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index 9d710b6c..3eb64df0 100755 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php @@ -40,12 +40,6 @@ require_once INCLUDES . '/3rdparty/libraries/PHPePub/Logger.php'; require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPub.php'; require_once INCLUDES . '/3rdparty/libraries/PHPePub/EPubChapterSplitter.php'; -require_once INCLUDES . '/3rdparty/PicoFarad/Request.php'; -require_once INCLUDES . '/3rdparty/PicoFarad/Response.php'; -require_once INCLUDES . '/3rdparty/PicoFarad/Router.php'; -require_once INCLUDES . '/3rdparty/PicoFarad/Session.php'; -require_once INCLUDES . '/3rdparty/PicoFarad/Template.php'; - # system configuration; database credentials et caetera require_once INCLUDES . '/poche/config.inc.php'; require_once INCLUDES . '/poche/config.inc.default.php'; @@ -61,10 +55,3 @@ if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timez if (defined('ERROR_REPORTING')) { error_reporting(ERROR_REPORTING); } - -// Start session -Session::$sessionName = 'wallabag'; -Session::init(); - -// Let's rock ! -$wallabag = new Poche(); -- cgit v1.2.3 From 2f26729c841a68669a1baf799091cb2c6c9f585a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 12 Jul 2014 19:01:11 +0200 Subject: Refactor --- inc/poche/global.inc.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/poche/global.inc.php') diff --git a/inc/poche/global.inc.php b/inc/poche/global.inc.php index 3eb64df0..b8c487e3 100755 --- a/inc/poche/global.inc.php +++ b/inc/poche/global.inc.php @@ -22,6 +22,7 @@ require_once ROOT . '/vendor/autoload.php'; require_once INCLUDES . '/poche/Template.class.php'; require_once INCLUDES . '/poche/Language.class.php'; require_once INCLUDES . '/poche/Routing.class.php'; +require_once INCLUDES . '/poche/WallabagEpub.class.php'; require_once INCLUDES . '/poche/Poche.class.php'; require_once INCLUDES . '/poche/Database.class.php'; -- cgit v1.2.3