aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-20 14:11:26 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-20 14:11:26 +0100
commit79e051a1f216704752e05f5174633abf20dde582 (patch)
treee55b7f46aad7c8df42534e638b25cdbc258a3c40 /src/Wallabag
parent97a2dd74c872891b694bff0485a0fcc9a82a09e4 (diff)
downloadwallabag-79e051a1f216704752e05f5174633abf20dde582.tar.gz
wallabag-79e051a1f216704752e05f5174633abf20dde582.tar.zst
wallabag-79e051a1f216704752e05f5174633abf20dde582.zip
restructure folders
Diffstat (limited to 'src/Wallabag')
-rwxr-xr-xsrc/Wallabag/Wallabag/Database.php2
-rw-r--r--src/Wallabag/Wallabag/Language.php4
-rw-r--r--src/Wallabag/Wallabag/Template.php11
-rwxr-xr-xsrc/Wallabag/Wallabag/Tools.php3
-rwxr-xr-xsrc/Wallabag/Wallabag/Wallabag.php7
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
11namespace Wallabag\Wallabag; 11namespace Wallabag\Wallabag;
12 12
13use \PDO;
14
13class Database { 15class 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
11namespace Wallabag\Wallabag; 11namespace Wallabag\Wallabag;
12 12
13use \Session;
14
13class Language 15class 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
11namespace Wallabag\Wallabag; 11namespace Wallabag\Wallabag;
12 12
13use \Twig_Environment;
14use \Session;
15use \Twig_Loader_Chain;
16use \Twig_Loader_Filesystem;
17use \Twig_Extensions_Extension_I18n;
18use \Twig_SimpleFilter;
19
13class Template extends Twig_Environment 20class 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
11namespace Wallabag\Wallabag; 11namespace Wallabag\Wallabag;
12 12
13use \RecursiveIteratorIterator;
14use \RecursiveDirectoryIterator;
15
13final class Tools 16final 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
11namespace Wallabag\Wallabag; 11namespace Wallabag\Wallabag;
12 12
13use \Paginator;
14use \Session;
15use \Messages;
16use \FeedWriter;
17
13class Wallabag 18class 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;