restructure folders

This commit is contained in:
Nicolas Lœuillet 2015-01-20 14:11:26 +01:00
parent 97a2dd74c8
commit 79e051a1f2
190 changed files with 43 additions and 16 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.idea
.DS_Store .DS_Store
.vagrant .vagrant
app/assets/* app/assets/*

View file

@ -1 +0,0 @@
!.htaccess

2
app/cache/.htaccess vendored
View file

@ -1,2 +0,0 @@
Order deny,allow
Deny from all

View file

@ -67,7 +67,7 @@
@define ('DEFAULT_THEME', 'baggy'); @define ('DEFAULT_THEME', 'baggy');
@define ('THEME', ROOT . '/themes'); @define ('THEME', ROOT . '/themes');
@define ('LOCALE', ROOT . '/src/Wallabag/Wallabag/Resources/translations/locale'); @define ('LOCALE', ROOT . '/src/Wallabag/Wallabag/Resources/translations');
@define ('CACHE', ROOT . '/app/cache'); @define ('CACHE', ROOT . '/app/cache');
@define ('PAGINATION', '12'); @define ('PAGINATION', '12');

Binary file not shown.

View file

@ -75,7 +75,7 @@
"phpunit/phpunit": "~3.7" "phpunit/phpunit": "~3.7"
}, },
"autoload": { "autoload": {
"psr-0": { "Wallabag\\Wallabag": "src/" } "psr-4": { "Wallabag\\": "src/Wallabag" }
}, },
"config": { "config": {
"bin-dir": "bin" "bin-dir": "bin"

2
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "7915fd3c1343f447145fb167b0bb4d36", "hash": "6fa216371c9d7577a117526db6f07407",
"packages": [ "packages": [
{ {
"name": "ezyang/htmlpurifier", "name": "ezyang/htmlpurifier",

View file

@ -10,6 +10,8 @@
namespace Wallabag\Wallabag; namespace Wallabag\Wallabag;
use \PDO;
class Database { class Database {
var $handle; var $handle;

View file

@ -10,6 +10,8 @@
namespace Wallabag\Wallabag; namespace Wallabag\Wallabag;
use \Session;
class Language class Language
{ {
protected $wallabag; protected $wallabag;
@ -38,7 +40,7 @@ class Language
$pocheUser = Session::getParam('poche_user'); $pocheUser = Session::getParam('poche_user');
$language = (is_null($pocheUser) ? LANG : $pocheUser->getConfigValue('language')); $language = (is_null($pocheUser) ? LANG : $pocheUser->getConfigValue('language'));
@putenv('LC_ALL=' . $language); putenv('LC_ALL=' . $language);
setlocale(LC_ALL, $language); setlocale(LC_ALL, $language);
bindtextdomain($language, LOCALE); bindtextdomain($language, LOCALE);
textdomain($language); textdomain($language);

View file

@ -10,6 +10,13 @@
namespace Wallabag\Wallabag; 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 class Template extends Twig_Environment
{ {
protected $wallabag; protected $wallabag;
@ -117,11 +124,11 @@ class Template extends Twig_Environment
$this->addExtension(new Twig_Extensions_Extension_I18n()); $this->addExtension(new Twig_Extensions_Extension_I18n());
# filter to display domain name of an url # 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); $this->addFilter($filter);
# filter for reading time # filter for reading time
$filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); $filter = new Twig_SimpleFilter('getReadingTime', 'Wallabag\\Wallabag\\Tools::getReadingTime');
$this->addFilter($filter); $this->addFilter($filter);
} }

View file

@ -10,6 +10,9 @@
namespace Wallabag\Wallabag; namespace Wallabag\Wallabag;
use \RecursiveIteratorIterator;
use \RecursiveDirectoryIterator;
final class Tools final class Tools
{ {
/** /**

View file

@ -10,6 +10,11 @@
namespace Wallabag\Wallabag; namespace Wallabag\Wallabag;
use \Paginator;
use \Session;
use \Messages;
use \FeedWriter;
class Wallabag class Wallabag
{ {
/** /**
@ -50,7 +55,7 @@ class Wallabag
{ {
Tools::initPhp(); Tools::initPhp();
$pocheUser = Session::getParam('poche_user'); $pocheUser = \Session::getParam('poche_user');
if ($pocheUser && $pocheUser != array()) { if ($pocheUser && $pocheUser != array()) {
$this->user = $pocheUser; $this->user = $pocheUser;

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 612 B

View file

@ -24,7 +24,7 @@
<dd><a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a></dd> <dd><a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a></dd>
<dt>{% trans "Version" %}</dt> <dt>{% trans "Version" %}</dt>
<dd>{{ constant('POCHE') }}</dd> <dd>{{ constant('WALLABAG') }}</dd>
</dl> </dl>
<p>{% trans "wallabag is a read-it-later application: you can save a web page by keeping only content. Elements like ads or menus are deleted." %}</p> <p>{% trans "wallabag is a read-it-later application: you can save a web page by keeping only content. Elements like ads or menus are deleted." %}</p>

View file

@ -178,7 +178,7 @@
<h2>{% trans "Upgrading wallabag" %}</h2> <h2>{% trans "Upgrading wallabag" %}</h2>
<ul> <ul>
<li>{% trans "Installed version" %}: <strong>{{ constant('POCHE') }}</strong></li> <li>{% trans "Installed version" %}: <strong>{{ constant('WALLABAG') }}</strong></li>
<li>{% trans "Latest stable version" %}: {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_prod }})</li> <li>{% trans "Latest stable version" %}: {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_prod }})</li>
{% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "Latest dev version" %}: {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent development version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_dev }}){% endif %}</li> {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "Latest dev version" %}: {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent development version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_dev }}){% endif %}</li>
</ul> </ul>

View file

Before

Width:  |  Height:  |  Size: 9 KiB

After

Width:  |  Height:  |  Size: 9 KiB

View file

Before

Width:  |  Height:  |  Size: 141 B

After

Width:  |  Height:  |  Size: 141 B

View file

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

View file

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

View file

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 229 B

View file

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 444 B

View file

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 250 B

View file

Before

Width:  |  Height:  |  Size: 403 B

After

Width:  |  Height:  |  Size: 403 B

View file

Before

Width:  |  Height:  |  Size: 339 B

After

Width:  |  Height:  |  Size: 339 B

View file

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 288 B

View file

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 269 B

View file

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 361 B

View file

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 331 B

View file

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 264 B

View file

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 404 B

View file

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 300 B

View file

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 288 B

View file

Before

Width:  |  Height:  |  Size: 841 B

After

Width:  |  Height:  |  Size: 841 B

View file

Before

Width:  |  Height:  |  Size: 382 B

After

Width:  |  Height:  |  Size: 382 B

View file

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 327 B

View file

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 250 B

View file

Before

Width:  |  Height:  |  Size: 375 B

After

Width:  |  Height:  |  Size: 375 B

1
themes/dark/public/public Symbolic link
View file

@ -0,0 +1 @@
../../themes/default/public

View file

@ -1,4 +1,4 @@
<footer class="w600p center mt3 mb3 smaller txtright"> <footer class="w600p center mt3 mb3 smaller txtright">
<p>{% trans "powered by" %} <a href="http://wallabag.org">wallabag</a></p> <p>{% trans "powered by" %} <a href="http://wallabag.org">wallabag</a></p>
{% if constant('DEBUG_POCHE') == 1 %}<p><strong>{% trans "debug mode is on so cache is off." %} {% trans "your wallabag version:" %}{{constant('POCHE')}}. {% trans "storage:" %} {{constant('STORAGE')}}</strong></p>{% endif %} {% if constant('DEBUG_POCHE') == 1 %}<p><strong>{% trans "debug mode is on so cache is off." %} {% trans "your wallabag version:" %}{{constant('WALLABAG')}}. {% trans "storage:" %} {{constant('STORAGE')}}</strong></p>{% endif %}
</footer> </footer>

View file

@ -24,7 +24,7 @@
<dd><a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a></dd> <dd><a href="http://en.wikipedia.org/wiki/MIT_License">MIT</a></dd>
<dt>{% trans "Version" %}</dt> <dt>{% trans "Version" %}</dt>
<dd>{{ constant('POCHE') }}</dd> <dd>{{ constant('WALLABAG') }}</dd>
</dl> </dl>
<p>{% trans "wallabag is a read-it-later application: you can save a web page by keeping only content. Elements like ads or menus are deleted." %}</p> <p>{% trans "wallabag is a read-it-later application: you can save a web page by keeping only content. Elements like ads or menus are deleted." %}</p>

View file

@ -179,7 +179,7 @@
<h2>{% trans "Upgrading wallabag" %}</h2> <h2>{% trans "Upgrading wallabag" %}</h2>
<ul> <ul>
<li>{% trans "Installed version" %}: <strong>{{ constant('POCHE') }}</strong></li> <li>{% trans "Installed version" %}: <strong>{{ constant('WALLABAG') }}</strong></li>
<li>{% trans "Latest stable version" %}: {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_prod }})</li> <li>{% trans "Latest stable version" %}: {{ prod }}. {% if compare_prod == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent stable version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_prod }})</li>
{% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "Latest dev version" %}: {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent development version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_dev }}){% endif %}</li> {% if constant('DEBUG_POCHE') == 1 %}<li>{% trans "Latest dev version" %}: {{ dev }}. {% if compare_dev == -1 %}<strong><a href="http://wallabag.org/">{% trans "A more recent development version is available." %}</a></strong>{% else %}{% trans "You are up to date." %}{% endif %} ({% trans "Last check:" %} {{ check_time_dev }}){% endif %}</li>
</ul> </ul>

View file

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

View file

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

View file

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 335 B

View file

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 207 B

View file

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 262 B

View file

Before

Width:  |  Height:  |  Size: 262 B

After

Width:  |  Height:  |  Size: 262 B

View file

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 332 B

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View file

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Some files were not shown because too many files have changed in this diff Show more