From 79e051a1f216704752e05f5174633abf20dde582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 20 Jan 2015 14:11:26 +0100 Subject: restructure folders --- src/Wallabag/Wallabag/Database.php | 2 ++ src/Wallabag/Wallabag/Language.php | 4 +++- src/Wallabag/Wallabag/Template.php | 11 +++++++++-- src/Wallabag/Wallabag/Tools.php | 3 +++ src/Wallabag/Wallabag/Wallabag.php | 7 ++++++- 5 files changed, 23 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Wallabag/Wallabag/Database.php b/src/Wallabag/Wallabag/Database.php index afda69de..fa132910 100755 --- a/src/Wallabag/Wallabag/Database.php +++ b/src/Wallabag/Wallabag/Database.php @@ -10,6 +10,8 @@ namespace Wallabag\Wallabag; +use \PDO; + class Database { var $handle; diff --git a/src/Wallabag/Wallabag/Language.php b/src/Wallabag/Wallabag/Language.php index 43411817..a8fbbc35 100644 --- a/src/Wallabag/Wallabag/Language.php +++ b/src/Wallabag/Wallabag/Language.php @@ -10,6 +10,8 @@ namespace Wallabag\Wallabag; +use \Session; + class Language { protected $wallabag; @@ -38,7 +40,7 @@ class Language $pocheUser = Session::getParam('poche_user'); $language = (is_null($pocheUser) ? LANG : $pocheUser->getConfigValue('language')); - @putenv('LC_ALL=' . $language); + putenv('LC_ALL=' . $language); setlocale(LC_ALL, $language); bindtextdomain($language, LOCALE); textdomain($language); diff --git a/src/Wallabag/Wallabag/Template.php b/src/Wallabag/Wallabag/Template.php index e8a6daa3..d0fc9b07 100644 --- a/src/Wallabag/Wallabag/Template.php +++ b/src/Wallabag/Wallabag/Template.php @@ -10,6 +10,13 @@ namespace Wallabag\Wallabag; +use \Twig_Environment; +use \Session; +use \Twig_Loader_Chain; +use \Twig_Loader_Filesystem; +use \Twig_Extensions_Extension_I18n; +use \Twig_SimpleFilter; + class Template extends Twig_Environment { protected $wallabag; @@ -117,11 +124,11 @@ class Template extends Twig_Environment $this->addExtension(new Twig_Extensions_Extension_I18n()); # filter to display domain name of an url - $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain'); + $filter = new Twig_SimpleFilter('getDomain', 'Wallabag\\Wallabag\\Tools::getDomain'); $this->addFilter($filter); # filter for reading time - $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); + $filter = new Twig_SimpleFilter('getReadingTime', 'Wallabag\\Wallabag\\Tools::getReadingTime'); $this->addFilter($filter); } diff --git a/src/Wallabag/Wallabag/Tools.php b/src/Wallabag/Wallabag/Tools.php index 19d98614..9350c660 100755 --- a/src/Wallabag/Wallabag/Tools.php +++ b/src/Wallabag/Wallabag/Tools.php @@ -10,6 +10,9 @@ namespace Wallabag\Wallabag; +use \RecursiveIteratorIterator; +use \RecursiveDirectoryIterator; + final class Tools { /** diff --git a/src/Wallabag/Wallabag/Wallabag.php b/src/Wallabag/Wallabag/Wallabag.php index c172a95d..0a498ebf 100755 --- a/src/Wallabag/Wallabag/Wallabag.php +++ b/src/Wallabag/Wallabag/Wallabag.php @@ -10,6 +10,11 @@ namespace Wallabag\Wallabag; +use \Paginator; +use \Session; +use \Messages; +use \FeedWriter; + class Wallabag { /** @@ -50,7 +55,7 @@ class Wallabag { Tools::initPhp(); - $pocheUser = Session::getParam('poche_user'); + $pocheUser = \Session::getParam('poche_user'); if ($pocheUser && $pocheUser != array()) { $this->user = $pocheUser; -- cgit v1.2.3