diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-20 14:11:26 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-01-20 14:11:26 +0100 |
commit | 79e051a1f216704752e05f5174633abf20dde582 (patch) | |
tree | e55b7f46aad7c8df42534e638b25cdbc258a3c40 /src | |
parent | 97a2dd74c872891b694bff0485a0fcc9a82a09e4 (diff) | |
download | wallabag-79e051a1f216704752e05f5174633abf20dde582.tar.gz wallabag-79e051a1f216704752e05f5174633abf20dde582.tar.zst wallabag-79e051a1f216704752e05f5174633abf20dde582.zip |
restructure folders
Diffstat (limited to 'src')
-rwxr-xr-x | src/Wallabag/Wallabag/Database.php | 2 | ||||
-rw-r--r-- | src/Wallabag/Wallabag/Language.php | 4 | ||||
-rw-r--r-- | src/Wallabag/Wallabag/Template.php | 11 | ||||
-rwxr-xr-x | src/Wallabag/Wallabag/Tools.php | 3 | ||||
-rwxr-xr-x | src/Wallabag/Wallabag/Wallabag.php | 7 |
5 files changed, 23 insertions, 4 deletions
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 @@ | |||
10 | 10 | ||
11 | namespace Wallabag\Wallabag; | 11 | namespace Wallabag\Wallabag; |
12 | 12 | ||
13 | use \PDO; | ||
14 | |||
13 | class Database { | 15 | class Database { |
14 | 16 | ||
15 | var $handle; | 17 | 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 @@ | |||
10 | 10 | ||
11 | namespace Wallabag\Wallabag; | 11 | namespace Wallabag\Wallabag; |
12 | 12 | ||
13 | use \Session; | ||
14 | |||
13 | class Language | 15 | class Language |
14 | { | 16 | { |
15 | protected $wallabag; | 17 | protected $wallabag; |
@@ -38,7 +40,7 @@ class Language | |||
38 | $pocheUser = Session::getParam('poche_user'); | 40 | $pocheUser = Session::getParam('poche_user'); |
39 | $language = (is_null($pocheUser) ? LANG : $pocheUser->getConfigValue('language')); | 41 | $language = (is_null($pocheUser) ? LANG : $pocheUser->getConfigValue('language')); |
40 | 42 | ||
41 | @putenv('LC_ALL=' . $language); | 43 | putenv('LC_ALL=' . $language); |
42 | setlocale(LC_ALL, $language); | 44 | setlocale(LC_ALL, $language); |
43 | bindtextdomain($language, LOCALE); | 45 | bindtextdomain($language, LOCALE); |
44 | textdomain($language); | 46 | 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 @@ | |||
10 | 10 | ||
11 | namespace Wallabag\Wallabag; | 11 | namespace Wallabag\Wallabag; |
12 | 12 | ||
13 | use \Twig_Environment; | ||
14 | use \Session; | ||
15 | use \Twig_Loader_Chain; | ||
16 | use \Twig_Loader_Filesystem; | ||
17 | use \Twig_Extensions_Extension_I18n; | ||
18 | use \Twig_SimpleFilter; | ||
19 | |||
13 | class Template extends Twig_Environment | 20 | class Template extends Twig_Environment |
14 | { | 21 | { |
15 | protected $wallabag; | 22 | protected $wallabag; |
@@ -117,11 +124,11 @@ class Template extends Twig_Environment | |||
117 | $this->addExtension(new Twig_Extensions_Extension_I18n()); | 124 | $this->addExtension(new Twig_Extensions_Extension_I18n()); |
118 | 125 | ||
119 | # filter to display domain name of an url | 126 | # filter to display domain name of an url |
120 | $filter = new Twig_SimpleFilter('getDomain', 'Tools::getDomain'); | 127 | $filter = new Twig_SimpleFilter('getDomain', 'Wallabag\\Wallabag\\Tools::getDomain'); |
121 | $this->addFilter($filter); | 128 | $this->addFilter($filter); |
122 | 129 | ||
123 | # filter for reading time | 130 | # filter for reading time |
124 | $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); | 131 | $filter = new Twig_SimpleFilter('getReadingTime', 'Wallabag\\Wallabag\\Tools::getReadingTime'); |
125 | $this->addFilter($filter); | 132 | $this->addFilter($filter); |
126 | } | 133 | } |
127 | 134 | ||
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 @@ | |||
10 | 10 | ||
11 | namespace Wallabag\Wallabag; | 11 | namespace Wallabag\Wallabag; |
12 | 12 | ||
13 | use \RecursiveIteratorIterator; | ||
14 | use \RecursiveDirectoryIterator; | ||
15 | |||
13 | final class Tools | 16 | final class Tools |
14 | { | 17 | { |
15 | /** | 18 | /** |
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 @@ | |||
10 | 10 | ||
11 | namespace Wallabag\Wallabag; | 11 | namespace Wallabag\Wallabag; |
12 | 12 | ||
13 | use \Paginator; | ||
14 | use \Session; | ||
15 | use \Messages; | ||
16 | use \FeedWriter; | ||
17 | |||
13 | class Wallabag | 18 | class Wallabag |
14 | { | 19 | { |
15 | /** | 20 | /** |
@@ -50,7 +55,7 @@ class Wallabag | |||
50 | { | 55 | { |
51 | Tools::initPhp(); | 56 | Tools::initPhp(); |
52 | 57 | ||
53 | $pocheUser = Session::getParam('poche_user'); | 58 | $pocheUser = \Session::getParam('poche_user'); |
54 | 59 | ||
55 | if ($pocheUser && $pocheUser != array()) { | 60 | if ($pocheUser && $pocheUser != array()) { |
56 | $this->user = $pocheUser; | 61 | $this->user = $pocheUser; |