Compare commits

..

110 Commits
2.0.0 ... 2.0.3

Author SHA1 Message Date
08dea0edb1 Change travis configuration 2016-04-22 18:54:43 +02:00
79c44cb4f8 Release wallabag 2.0.3 2016-04-22 18:45:46 +02:00
9c0bc04cfe Merge pull request #1965 from wallabag/prepare-203
Prepare release 2.0.3
2016-04-22 18:40:48 +02:00
dafde7fb2f Prepare release 2.0.3 2016-04-22 18:08:16 +02:00
9481187896 Merge pull request #1962 from wallabag/update-api-documentation
Update API documentation with cURL examples
2016-04-22 08:38:04 +02:00
1c90663b79 Update API documentation with cURL examples 2016-04-21 18:48:17 +02:00
7d5b4631d0 Merge pull request #1948 from wallabag/prepare-202
Prepare release 2.0.2
2016-04-21 09:44:44 +02:00
9f151b469f Update changelog 2016-04-21 08:42:41 +02:00
45919a295e Merge pull request #1957 from wallabag/fix-gotoaccount-button-translation
Fix translation for Go to your account button after subscription
2016-04-21 08:37:36 +02:00
2499cdbf29 Fix translation for Go to your account button after subscription
Fix #1956
2016-04-20 15:53:20 +02:00
868e76af10 Merge pull request #1945 from ddeimeke/master
Added some curl examples
2016-04-20 10:10:46 +02:00
f88530de68 Merge pull request #1954 from wallabag/update-links-doc
Update links in documentation
2016-04-19 20:25:36 +02:00
4a25bef077 Update links in documentation 2016-04-19 20:03:34 +02:00
24f65a838c Merge pull request #1953 from maxi62330/master
Actualisation des liens morts (Documentation de traduction)
2016-04-19 19:54:44 +02:00
89bafa95ed Actualisation des liens morts (Documentation de traduction) 2016-04-19 19:25:04 +02:00
18bb5a90d5 Prepare release 2.0.2 2016-04-19 10:01:29 +02:00
938a16c0f6 Added some curl examples 2016-04-19 08:00:07 +02:00
ca8d61b958 Merge pull request #1942 from wallabag/optimize-import
Optimize import
2016-04-18 22:13:48 +02:00
23feba63bb Merge pull request #1944 from wallabag/travis-rename-branches
Update Travis configuration with branches renaming
2016-04-18 22:12:52 +02:00
3320d39418 Update Travis configuration with branches renaming 2016-04-18 21:46:36 +02:00
23d24b1750 Add tests 2016-04-18 15:29:57 +02:00
dc12084d93 Add doctrine clear after flush, thanks to @BitOne talk at Symfony Live 2016-04-18 14:48:18 +02:00
0907a72c64 Merge pull request #1938 from wallabag/hide-pagination
Display pagination only if we have more than one page
2016-04-18 09:41:56 +02:00
188b74b6df Display pagination only if we have more than one page 2016-04-18 09:03:21 +02:00
71601c171f Merge pull request #1935 from jami7/patch-8
Update messages.es.yml
2016-04-17 08:03:36 +02:00
5c2c1a6434 Update messages.es.yml 2016-04-16 14:04:39 -10:00
7fdecbb73c Merge pull request #1933 from wallabag/hide-pagination
Hide pagination if we only have one entry to display
2016-04-16 08:36:24 +02:00
1f034a3316 Hide pagination if we only have one entry to display 2016-04-16 07:19:30 +02:00
d1f4996b77 Merge pull request #1925 from wallabag/fix-redirect-without-referer
Redirect to homepage if referer is null
2016-04-15 17:52:33 +02:00
5180302650 Merge pull request #1929 from wallabag/change-guid-rss
Change guid and link in RSS feeds to give original entry URL
2016-04-15 17:51:56 +02:00
2d899e8d30 Change guid and link in RSS feeds to give original entry URL
Fix #1926
2016-04-15 16:07:34 +02:00
345d74268b Fix redirect when delete entry 2016-04-15 15:39:00 +02:00
4086e0782e Fix tests 2016-04-15 09:58:29 +02:00
af497a641c Redirect to homepage if referer is null
Fix #1924
2016-04-15 07:58:01 +02:00
f2e5fdc366 Merge pull request #1916 from wallabag/cleanup
Convert array + phpDoc
2016-04-13 09:43:14 +02:00
a417b86923 Merge pull request #1918 from wallabag/improve-pagination
Improve pagination when user has lot of entries
2016-04-13 09:42:18 +02:00
18078ded12 Fix indentation 2016-04-13 09:20:01 +02:00
245e2e2cae Merge pull request #1919 from wallabag/cleanup-composerjson
Remove useless dependancy
2016-04-12 22:20:05 +02:00
86732aa01c Move test parameters out of parameters.yml
The end user doesn't care to about the test database.
2016-04-12 22:14:22 +02:00
c31ea8a409 Remove useless dependancy 2016-04-12 21:47:16 +02:00
c95e39c51a Lost in translation pager 2016-04-12 20:38:56 +02:00
63995be5ee Fix display for Next/Previous link when they are disabled 2016-04-12 18:03:40 +02:00
1880da7420 Restore old behavior for OutOfRangeCurrentPageException 2016-04-12 16:40:18 +02:00
76cd8dbb05 Fix tests 2016-04-12 16:32:01 +02:00
624a7c6df1 Improve pagination when user has lot of entries
Fix #1905
* Usage of whiteoctober/WhiteOctoberPagerfantaBundle
2016-04-12 16:04:17 +02:00
80bd17f00d Merge pull request #1911 from wallabag/title-on-title-entry
add title hover on entry titles
2016-04-12 14:54:59 +02:00
1b8b3859c0 Add title hover on entry titles 2016-04-12 14:30:42 +02:00
443cff9840 Fix MySQL tests on HHVM 2016-04-12 12:37:10 +02:00
4094ea4771 Convert array + phpDoc
Thanks for https://github.com/thomasbachem/php-short-array-syntax-converter
2016-04-12 12:25:29 +02:00
7eccbda99f Merge pull request #1915 from wallabag/doc-links
Fix doc links
2016-04-12 11:24:11 +02:00
8846ad0a90 Fix doc links 2016-04-12 10:51:46 +02:00
41e79f9792 Merge pull request #1912 from wallabag/install-config
Move setup config outside setupAdmin
2016-04-11 20:16:49 +02:00
637dc4bb21 Move setup config outside setupAdmin
If user doesn't want to create a new admin (even if it's recommended) the internal config weren't created resulting in error when using the interface.
2016-04-11 19:37:29 +02:00
a83fbf4504 Merge pull request #1909 from wallabag/prepare-release-2.0.1
Prepare release 2.0.1
2016-04-11 14:14:25 +02:00
d098cb04a8 Prepare release 2.0.1 2016-04-11 11:13:02 +02:00
574d101561 Merge pull request #1902 from wallabag/v2-changelog
Add changelog
2016-04-10 23:13:21 +02:00
386d1120c3 Update changelog 2016-04-10 20:24:20 +02:00
15e9483323 Merge pull request #1823 from wallabag/translation-fa
Translation fa
2016-04-10 20:00:03 +02:00
c5dede8445 Merge pull request #1903 from wallabag/force-server-version
Force server version to avoid connexion error
2016-04-10 19:57:45 +02:00
e9497f6fc0 Merge pull request #1901 from wallabag/spanish
Update Spanish translation
2016-04-10 15:43:40 +02:00
c71d83b60c Merge pull request #1887 from wallabag/v2-duplicate-bookmarklet
Fix duplicate article when added via the bookmarklet
2016-04-10 15:37:33 +02:00
f642863ff2 Merge pull request #1895 from wallabag/v2-fix-entries-api
All the entries are fetched via GET /api/entries
2016-04-10 15:37:05 +02:00
69c21157ba Force server version to avoid connexion error
When installing a new project with MySQL, if the database doesn't exist before installation will fail because DBAL will try to get the server version by querying it.
And since this query is done using the default database connexion and since the database doesn't exist, DBAL can't connect to the server.
2016-04-10 15:34:32 +02:00
9b2fe57eb6 Add changelog 2016-04-10 15:12:54 +02:00
b351d0494b Fix FA translations indentation 2016-04-10 14:33:11 +02:00
6d0db75328 Update messages.fa.yml 2016-04-10 14:33:11 +02:00
615fc1d237 Merge pull request #1900 from wallabag/v2-remove-pt-empty-doc
Remove empty portugese documentation
2016-04-10 14:25:01 +02:00
61fcbe9f57 Fix typo in french documentation 2016-04-10 14:23:43 +02:00
eaec84fcd3 Uncommented translated ES lines
Also, turn yaml lint into a more versbose check
2016-04-10 14:21:42 +02:00
834efe84ac Change visibility of checkIfEntryAlreadyExists method to private 2016-04-10 14:20:39 +02:00
466c0c6684 Remove empty portugese documentation 2016-04-10 14:18:03 +02:00
661d5ae0cf Update messages.es.yml
On line 103, I'm not sure what symbol that is that looks like this (<<) but it looks smaller? Where is that? Should I just copy and paste it? And just to clarity, please look at line 101 too cause I'm not too sure if/how I change the stuff within <...> I stopped mid line in 103 just until I get clarification on this. Thanks.
2016-04-10 14:18:03 +02:00
dd4997d705 Update messages.es.yml 2016-04-10 14:17:35 +02:00
c29747357a Merge pull request #1899 from wallabag/v2-nginx-doc
Add documentation about importing large file into nginx
2016-04-10 14:15:38 +02:00
0135c98b24 Remove int cast 2016-04-10 14:15:21 +02:00
cea846d407 Add documentation about importing large file into nginx
Fix #1849: configuration to avoid 413 Request Entity Too Large.
2016-04-10 14:12:25 +02:00
54ecbb41d6 Merge pull request #1898 from wallabag/v2-fix-readingtime-display-material
Fix estimated reading time in material view
2016-04-10 14:12:13 +02:00
19a7ea2a44 Merge pull request #1896 from wallabag/v2-fix-internal-settings
Fix internal settings
2016-04-10 09:49:10 +02:00
2504fe46ed Merge pull request #1894 from wallabag/v2-fix-doc-link
Fix documentation link in developer page
2016-04-10 09:44:48 +02:00
82dbd47391 Merge pull request #1891 from wallabag/v2-fix-rules-typo
Fix typo on configuration page
2016-04-10 09:37:49 +02:00
7ead8a0d9d Fix estimated reading time in material view
Fix #1893
2016-04-10 08:48:53 +02:00
cb48a569e0 Fix internal settings
Fix #1867: remove download_picture setting and manage show_printlink in material theme
2016-04-09 21:34:50 +02:00
5c3ca4fe9e All the entries are fetched via GET /api/entries
Fix #1863: only the unread entries were fetched with GET /api/entries entrypoint. Now, all the entries are fetched
2016-04-09 21:13:56 +02:00
808f541ea9 Fix documentation link in developer page 2016-04-09 20:43:22 +02:00
7a2157b8d7 Fix typo on configuration page 2016-04-09 14:04:43 +02:00
b00a89e08f Refactor EntryController 2016-04-09 13:44:54 +02:00
015e4284f0 Merge pull request #1824 from wallabag/v2-alternative-env
Remove SMTP configuration environment overrides
2016-04-08 21:03:17 +02:00
f652f41dab Fix duplicate article when added via the bookmarklet 2016-04-08 15:41:05 +02:00
7704ef5d3f Add documentation 2016-04-08 14:09:31 +02:00
e969c2a7ef Merge pull request #1879 from wallabag/v2-tag-field-position
Move tag form in Material theme
2016-04-08 13:51:20 +02:00
5b732257db Merge pull request #1884 from wallabag/nicosomb-patch-1
Change the installation method in issue template
2016-04-08 13:50:22 +02:00
0c608f1183 Change the installation method in issue template 2016-04-08 13:14:47 +02:00
77b9db87b8 Merge pull request #1804 from wallabag/j0k3r-patch-1
Force user-agent for iansommerville.com
2016-04-08 11:18:44 +02:00
6a986910b6 Merge pull request #1868 from wallabag/v2-tagrule-baggy
Remove keyboard shortcut and add tagging rule panel in baggy
2016-04-07 14:10:08 +02:00
c6cbe75b2e Move tag form in Material theme 2016-04-07 13:47:35 +02:00
9479ae834c Lock ocramius/proxy-manager
To avoid problem with PHP < 7.0
2016-04-06 11:37:03 +02:00
c802181126 Documentation about wallabag API 2016-04-06 11:30:41 +02:00
8687bcd0c9 Remove keybaord shortcut and add tagging rule panel in baggy 2016-04-05 22:29:47 +02:00
4b0b77e4d7 Merge pull request #1862 from wallabag/v2-doc-import-wllbg1-cli
Add production environment for CLI import
2016-04-05 16:57:43 +02:00
e543d03fd7 Merge pull request #1861 from wallabag/v2-round-estimated-time
Round estimated time and add reading speed for Baggy
2016-04-05 16:18:26 +02:00
6d3a3cfcda Add production environment for CLI import 2016-04-05 15:45:59 +02:00
4a749cad8d Round estimated time and add reading speed for Baggy 2016-04-05 15:35:01 +02:00
3a7df76013 Merge pull request #1856 from wallabag/v2-doc-import-wllbg1-cli
Documentation about wallabag v1 CLI import
2016-04-05 13:49:40 +02:00
af47742dd0 Documentation about wallabag v1 CLI import 2016-04-05 13:46:59 +02:00
52d806ea6b Add migrate link in french documentation 2016-04-05 08:48:53 +02:00
48bb9675c1 Add migrate link in english documentation 2016-04-05 08:48:29 +02:00
6b82630838 Merge pull request #1840 from wallabag/v2-fix-archive-page-title
Fix Archive page title translation
2016-04-04 09:20:04 +02:00
b5cf84bdf6 Fix Archive page title translation 2016-04-04 08:00:31 +02:00
0bb5669cf6 Remove SMTP configuration environment overrides
SMTP configuration has been added in #1518 to use ParameterHandle's
env-map. But Symfony actually has a native way of allowing parameters to
be overriden from environment so rather than having to define a mapping
for each possible parameter, users can define any override in
parameters.yml:

> parameters:
>     database_host: %WALLABAG_DB_HOST%

and define an environment variable SYMFONY__WALLABAG_DB_HOST.

Links:
env-map: https://github.com/Incenteev/ParameterHandler#using-environment-variables-to-set-the-parameters
Symfony external parameters: http://symfony.com/doc/current/cookbook/configuration/external_parameters.html
2016-03-29 13:44:12 +02:00
e71c376db9 Force user-agent for iansommerville.com
When using the default User Agent, the website returns a 403. By forcing the User Agent for this domain, we got the proper behavior: a 200

Since we can't _append_ new user agent to the default graby configuration, we need to rewrite all the default config + the new one.

Fix #1801
2016-03-18 20:55:54 +01:00
132 changed files with 8357 additions and 1224 deletions

View File

@ -6,7 +6,7 @@ Remember, this is _not_ a place to ask questions. For that, go to http://gitter.
### Environment ### Environment
* wallabag version (or git revision) that exhibits the issue: * wallabag version (or git revision) that exhibits the issue:
* How did you install wallabag? Via `composer create-project` or by downloading the package? * How did you install wallabag? Via `git clone` or by downloading the package?
* Last wallabag version that did not exhibit the issue (if applicable): * Last wallabag version that did not exhibit the issue (if applicable):
* php version: * php version:
* OS: * OS:

View File

@ -41,8 +41,7 @@ matrix:
# exclude v1 branches # exclude v1 branches
branches: branches:
except: except:
- master - legacy
- dev
before_script: before_script:
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; - if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
@ -54,8 +53,8 @@ before_install:
- if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
script: script:
- travis_wait composer install --no-interaction --no-progress --prefer-dist -o - travis_wait composer update --no-interaction --no-progress
- ant prepare-$DB - ant prepare-$DB
- bin/phpunit -v - bin/phpunit -v
- if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi;
- if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations ; fi; - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi;

96
CHANGELOG.md Normal file
View File

@ -0,0 +1,96 @@
# Changelog
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
## [2.0.3] - 2016-04-22
### Added
- [#1962](https://github.com/wallabag/wallabag/pull/1962) cURL examples in documentation about API (Dirk Deimeke)
### Fixed
- Forgot `composer.lock` file in 2.0.2 release so some users may encounter `Fatal error: Out of memory` error during installation
## [2.0.2] - 2016-04-21
### Added
- [#1945](https://github.com/wallabag/wallabag/pull/1945) cURL examples in documentation about API (Dirk Deimeke)
- [#1911](https://github.com/wallabag/wallabag/pull/1911) Add title hover on entry titles (Thomas Citharel)
### Changed
- [#1944](https://github.com/wallabag/wallabag/pull/1944), [#1953](https://github.com/wallabag/wallabag/pull/1953), [#1954](https://github.com/wallabag/wallabag/pull/1954) Due to branches renaming, update documentation and configuration (maxi62330, Nicolas Lœuillet)
- [#1942](https://github.com/wallabag/wallabag/pull/1942) Optimize import (Nicolas Lœuillet)
- [#1935](https://github.com/wallabag/wallabag/pull/1935) Update spanish translation (jami7)
- [#1929](https://github.com/wallabag/wallabag/pull/1929) Change guid and link in RSS feeds to give original entry URL (Nicolas Lœuillet)
- [#1918](https://github.com/wallabag/wallabag/pull/1918) Improve pagination when user has lot of entries (Nicolas Lœuillet)
- [#1916](https://github.com/wallabag/wallabag/pull/1916) Change PHP arrays and move test parameters in a separated file (Jeremy Benoist)
### Fixed
- [#1957](https://github.com/wallabag/wallabag/pull/1957) Fix translation for `Go to your account` button (Nicolas Lœuillet)
- [#1925](https://github.com/wallabag/wallabag/pull/1925) Redirect to homepage if refered is null (Nicolas Lœuillet)
- [#1912](https://github.com/wallabag/wallabag/pull/1912) Fix 500 Internal Server Error -> "Setting piwik_enabled couldn't be found" (Jeremy Benoist)
## [2.0.1] - 2016-04-11
### Added
- [Documentation about importing large file](http://doc.wallabag.org/en/v2/user/installation.html#installing-on-nginx) into nginx. (Nicolas Lœuillet)
- [Documentation about wallabag API](http://doc.wallabag.org/en/v2/developer/api.html) (Nicolas Lœuillet)
- [#1861](https://github.com/wallabag/wallabag/pull/1861) Round estimated time and add reading speed for Baggy (Nicolas Lœuillet)
- [Documentation about wallabag v1 CLI import](http://doc.wallabag.org/en/v2/user/migration.html#import-via-command-line-interface-cli) (Nicolas Lœuillet)
- [Add migrate link](http://doc.wallabag.org/en/v2/user/migration.html) in documentation (Nicolas Lœuillet)
### Changed
- [#1823](https://github.com/wallabag/wallabag/pull/1823) Persian translation (Masoud Abkenar)
- [#1901](https://github.com/wallabag/wallabag/pull/1901) Spanish translation (Jeremy Benoist)
- [#1879](https://github.com/wallabag/wallabag/pull/1879) Move tag form in Material theme (Nicolas Lœuillet)
### Fixed
- [#1903](https://github.com/wallabag/wallabag/pull/1903) Force server version to avoid connection error (Jeremy Benoist)
- [#1887](https://github.com/wallabag/wallabag/pull/1887) Fix duplicate article when added via the bookmarklet (Nicolas Lœuillet)
- [#1895](https://github.com/wallabag/wallabag/pull/1895) API: All the entries are fetched via GET /api/entries (Nicolas Lœuillet)
- [#1898](https://github.com/wallabag/wallabag/pull/1898) Fix estimated reading time in material view #1893 (Nicolas Lœuillet)
- [#1896](https://github.com/wallabag/wallabag/pull/1896) remove download_picture setting and manage show_printlink in material theme #1867 (Nicolas Lœuillet)
- [#1894](https://github.com/wallabag/wallabag/pull/1894) Fix documentation link in developer page (Nicolas Lœuillet)
- [#1891](https://github.com/wallabag/wallabag/pull/1891) Fix typo on configuration page (Nicolas Lœuillet)
- [#1884](https://github.com/wallabag/wallabag/pull/1884) Change the installation method in issue template (Nicolas Lœuillet)
- [#1844](https://github.com/wallabag/wallabag/pull/1844) Lock ocramius/proxy-manager (Jeremy Benoist)
- [#1840](https://github.com/wallabag/wallabag/pull/1840) Fix Archive page title translation (Nicolas Lœuillet)
- [#1801](https://github.com/wallabag/wallabag/pull/1804) Force user-agent for iansommerville.com (Jeremy Benoist)
### Removed
- [#1900](https://github.com/wallabag/wallabag/pull/1900) Remove empty portugese documentation (Nicolas Lœuillet)
- [#1868](https://github.com/wallabag/wallabag/pull/1868) Remove keyboard shortcut and add tagging rule panel in baggy (Nicolas Lœuillet)
- [#1824](https://github.com/wallabag/wallabag/pull/1824) Remove SMTP configuration environment overrides (Mathieu Bruyen)
## [2.0.0] - 2016-04-03
### Added
* save an article, read it, favorite it, archive it. (Hopefully)
* annotations: In each article you read, you can write annotations. ([read the doc](http://doc.wallabag.org/en/v2/user/annotations.html))
* filter entries by reading time, domain name, creation date, status, etc.
* assign tags to entries
* edit article titles
* a REST API ([you can have a look to the documentation](http://v2.wallabag.org/api/doc))
* authorization via oAuth2
* a new default theme, called `material`
* RSS feeds (with ability to limit number of articles)
* create a new account from the config page (for super admin only)
* recover passwords from login page (you have to fill your email on config page)
* picture preview, if available, is displayed for each entry
* Public registration
* migration from wallabag v1/v2 (based on JSON export) ([read the doc](http://doc.wallabag.org/en/v2/user/import.html))
* migration from Pocket (it works, but we need to implement asynchronous import: if you have too many articles, it can fail) ([read the doc](http://doc.wallabag.org/en/v2/user/import.html))
* exports in many formats (PDF, JSON, EPUB, MOBI, XML, CSV and TXT).
* 2-Factor authentication via email ([read the doc](http://doc.wallabag.org/en/v2/user/configuration.html#two-factor-authentication))
* Tagging rule: create a rule to automatically assign tags to entries! ([read the doc](http://doc.wallabag.org/en/v2/user/configuration.html#tagging-rules))
* Occitan, German, French, Turkish, Persian, Romanian, Polish, Danish, Spanish and English translations
* Quickstart for beginners (when you don't have any entries)
* Internal settings for administrator (the account created during installation)
* For 3rd apps developers, a developer page is available to create API token

View File

@ -16,7 +16,7 @@ Then you can install wallabag by executing the following commands:
``` ```
git clone https://github.com/wallabag/wallabag.git git clone https://github.com/wallabag/wallabag.git
cd wallabag cd wallabag
git checkout 2.0.0 git checkout 2.0.3
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
php bin/console wallabag:install --env=prod php bin/console wallabag:install --env=prod
php bin/console server:run --env=prod php bin/console server:run --env=prod

View File

@ -22,19 +22,22 @@ class AppKernel extends Kernel
new Nelmio\ApiDocBundle\NelmioApiDocBundle(), new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(), new Nelmio\CorsBundle\NelmioCorsBundle(),
new Liip\ThemeBundle\LiipThemeBundle(), new Liip\ThemeBundle\LiipThemeBundle(),
new Wallabag\CoreBundle\WallabagCoreBundle(),
new Wallabag\ApiBundle\WallabagApiBundle(),
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(), new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(), new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
new FOS\OAuthServerBundle\FOSOAuthServerBundle(), new FOS\OAuthServerBundle\FOSOAuthServerBundle(),
new Wallabag\UserBundle\WallabagUserBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Scheb\TwoFactorBundle\SchebTwoFactorBundle(), new Scheb\TwoFactorBundle\SchebTwoFactorBundle(),
new KPhoen\RulerZBundle\KPhoenRulerZBundle(), new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
new Wallabag\ImportBundle\WallabagImportBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(), new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Craue\ConfigBundle\CraueConfigBundle(), new Craue\ConfigBundle\CraueConfigBundle(),
new Lexik\Bundle\MaintenanceBundle\LexikMaintenanceBundle(), new Lexik\Bundle\MaintenanceBundle\LexikMaintenanceBundle(),
new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
// wallabag bundles
new Wallabag\CoreBundle\WallabagCoreBundle(),
new Wallabag\ApiBundle\WallabagApiBundle(),
new Wallabag\UserBundle\WallabagUserBundle(),
new Wallabag\ImportBundle\WallabagImportBundle(),
new Wallabag\AnnotationBundle\WallabagAnnotationBundle(), new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
]; ];

View File

@ -1,2 +1,2 @@
set :branch, 'v2' set :branch, 'master'
set :deploy_to, '/var/www/v2.wallabag.org/web/' set :deploy_to, '/var/www/v2.wallabag.org/web/'

View File

@ -28,7 +28,7 @@ framework:
assets: ~ assets: ~
wallabag_core: wallabag_core:
version: 2.0.0 version: 2.0.3
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
languages: languages:
en: 'English' en: 'English'
@ -82,6 +82,7 @@ doctrine:
password: "%database_password%" password: "%database_password%"
charset: UTF8 charset: UTF8
path: "%database_path%" path: "%database_path%"
server_version: 5.6
orm: orm:
auto_generate_proxy_classes: "%kernel.debug%" auto_generate_proxy_classes: "%kernel.debug%"

View File

@ -1,5 +1,6 @@
imports: imports:
- { resource: config_dev.yml } - { resource: config_dev.yml }
- { resource: parameters_test.yml }
framework: framework:
test: ~ test: ~

View File

@ -19,14 +19,6 @@ parameters:
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite" database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_ database_table_prefix: wallabag_
test_database_driver: pdo_sqlite
test_database_host: 127.0.0.1
test_database_port: ~
test_database_name: ~
test_database_user: ~
test_database_password: ~
test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
mailer_transport: smtp mailer_transport: smtp
mailer_host: 127.0.0.1 mailer_host: 127.0.0.1
mailer_user: ~ mailer_user: ~

View File

@ -0,0 +1,8 @@
parameters:
test_database_driver: pdo_sqlite
test_database_host: 127.0.0.1
test_database_port: null
test_database_name: null
test_database_user: null
test_database_password: null
test_database_path: '%kernel.root_dir%/../data/db/wallabag_testYO.sqlite'

View File

@ -6,7 +6,7 @@ services:
filesystem_cache: filesystem_cache:
class: Doctrine\Common\Cache\FilesystemCache class: Doctrine\Common\Cache\FilesystemCache
arguments: arguments:
- %kernel.cache_dir%/doctrine/metadata - "%kernel.cache_dir%/doctrine/metadata"
twig.extension.text: twig.extension.text:
class: Twig_Extensions_Extension_Text class: Twig_Extensions_Extension_Text

View File

@ -1,37 +0,0 @@
# This file is a "template" of what your parameters.yml file should look like
parameters:
database_driver: pdo_sqlite
database_host: 127.0.0.1
database_port: ~
database_name: symfony
database_user: root
database_password: ~
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_
test_database_driver: pdo_mysql
test_database_host: localhost
test_database_port: 3306
test_database_name: wallabag_test
test_database_user: root
test_database_password: ~
test_database_path: ~
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
locale: en
# A secret key that's used to generate certain security-related tokens
secret: ThisTokenIsNotSoSecretChangeIt
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_confirmation: true
from_email: no-reply@wallabag.org

View File

@ -1,37 +0,0 @@
# This file is a "template" of what your parameters.yml file should look like
parameters:
database_driver: pdo_sqlite
database_host: 127.0.0.1
database_port: ~
database_name: symfony
database_user: root
database_password: ~
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_
test_database_driver: pdo_pgsql
test_database_host: localhost
test_database_port:
test_database_name: wallabag_test
test_database_user: travis
test_database_password: ~
test_database_path: ~
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
locale: en
# A secret key that's used to generate certain security-related tokens
secret: ThisTokenIsNotSoSecretChangeIt
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_confirmation: true
from_email: no-reply@wallabag.org

View File

@ -1,37 +0,0 @@
# This file is a "template" of what your parameters.yml file should look like
parameters:
database_driver: pdo_sqlite
database_host: 127.0.0.1
database_port: ~
database_name: symfony
database_user: root
database_password: ~
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_
test_database_driver: pdo_sqlite
test_database_host: localhost
test_database_port:
test_database_name: ~
test_database_user: ~
test_database_password: ~
test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
locale: en
# A secret key that's used to generate certain security-related tokens
secret: ThisTokenIsNotSoSecretChangeIt
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_confirmation: true
from_email: no-reply@wallabag.org

View File

@ -0,0 +1,8 @@
parameters:
test_database_driver: pdo_mysql
test_database_host: localhost
test_database_port: 3306
test_database_name: wallabag_test
test_database_user: root
test_database_password: ~
test_database_path: ~

View File

@ -0,0 +1,8 @@
parameters:
test_database_driver: pdo_pgsql
test_database_host: localhost
test_database_port:
test_database_name: wallabag_test
test_database_user: travis
test_database_password: ~
test_database_path: ~

View File

@ -0,0 +1,8 @@
parameters:
test_database_driver: pdo_sqlite
test_database_host: localhost
test_database_port:
test_database_name: ~
test_database_user: ~
test_database_password: ~
test_database_path: "%kernel.root_dir%/../data/db/wallabag_testHU.sqlite"

View File

@ -42,8 +42,8 @@
<target name="db_mysql" description="Run test for MySQL"> <target name="db_mysql" description="Run test for MySQL">
<delete dir="${basedir}/app/config/parameters.yml"/> <delete dir="${basedir}/app/config/parameters.yml"/>
<exec executable="cp"> <exec executable="cp">
<arg value="${basedir}/app/config/tests/parameters.yml.dist.mysql"/> <arg value="${basedir}/app/config/tests/parameters_test.mysql.yml"/>
<arg value="${basedir}/app/config/parameters.yml"/> <arg value="${basedir}/app/config/parameters_test.yml"/>
</exec> </exec>
<exec executable="php"> <exec executable="php">
@ -56,8 +56,8 @@
<target name="db_sqlite" description="Run test for SQLite"> <target name="db_sqlite" description="Run test for SQLite">
<delete dir="${basedir}/app/config/parameters.yml"/> <delete dir="${basedir}/app/config/parameters.yml"/>
<exec executable="cp"> <exec executable="cp">
<arg value="${basedir}/app/config/tests/parameters.yml.dist.sqlite"/> <arg value="${basedir}/app/config/tests/parameters_test.sqlite.yml"/>
<arg value="${basedir}/app/config/parameters.yml"/> <arg value="${basedir}/app/config/parameters_test.yml"/>
</exec> </exec>
<exec executable="php"> <exec executable="php">
@ -70,8 +70,8 @@
<target name="db_pgsql" description="Run test for PostgreSQL"> <target name="db_pgsql" description="Run test for PostgreSQL">
<delete dir="${basedir}/app/config/parameters.yml"/> <delete dir="${basedir}/app/config/parameters.yml"/>
<exec executable="cp"> <exec executable="cp">
<arg value="${basedir}/app/config/tests/parameters.yml.dist.pgsql"/> <arg value="${basedir}/app/config/tests/parameters_test.pgsql.yml"/>
<arg value="${basedir}/app/config/parameters.yml"/> <arg value="${basedir}/app/config/parameters_test.yml"/>
</exec> </exec>
<exec executable="php"> <exec executable="php">

View File

@ -58,7 +58,6 @@
"friendsofsymfony/rest-bundle": "~1.4", "friendsofsymfony/rest-bundle": "~1.4",
"jms/serializer-bundle": "~1.0", "jms/serializer-bundle": "~1.0",
"nelmio/api-doc-bundle": "~2.7", "nelmio/api-doc-bundle": "~2.7",
"ezyang/htmlpurifier": "~4.6",
"mgargano/simplehtmldom": "~1.5", "mgargano/simplehtmldom": "~1.5",
"tecnickcom/tcpdf": "~6.2", "tecnickcom/tcpdf": "~6.2",
"simplepie/simplepie": "~1.3.1", "simplepie/simplepie": "~1.3.1",
@ -80,7 +79,9 @@
"paragonie/random_compat": "~1.0", "paragonie/random_compat": "~1.0",
"craue/config-bundle": "~1.4", "craue/config-bundle": "~1.4",
"mnapoli/piwik-twig-extension": "^1.0", "mnapoli/piwik-twig-extension": "^1.0",
"lexik/maintenance-bundle": "~2.1" "lexik/maintenance-bundle": "~2.1",
"ocramius/proxy-manager": "1.*",
"white-october/pagerfanta-bundle": "^1.0"
}, },
"require-dev": { "require-dev": {
"doctrine/doctrine-fixtures-bundle": "~2.2", "doctrine/doctrine-fixtures-bundle": "~2.2",
@ -90,11 +91,8 @@
"fabpot/php-cs-fixer": "~1.9" "fabpot/php-cs-fixer": "~1.9"
}, },
"scripts": { "scripts": {
"build-parameters": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
],
"post-cmd": [ "post-cmd": [
"@build-parameters", "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets", "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
@ -116,13 +114,7 @@
"symfony-tests-dir": "tests", "symfony-tests-dir": "tests",
"symfony-assets-install": "relative", "symfony-assets-install": "relative",
"incenteev-parameters": { "incenteev-parameters": {
"file": "app/config/parameters.yml", "file": "app/config/parameters.yml"
"env-map": {
"mailer_host": "WALLABAG_MAILER_HOST",
"mailer_user": "WALLABAG_MAILER_USER",
"mailer_password": "WALLABAG_MAILER_PASSWORD",
"secret": "WALLABAG_SECRET"
}
} }
}, },
"autoload": { "autoload": {

6050
composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

259
docs/en/developer/api.rst Normal file

File diff suppressed because one or more lines are too long

View File

@ -12,15 +12,15 @@ Translation files
As wallabag is mainly developed by a French team, please consider that french As wallabag is mainly developed by a French team, please consider that french
translation is the most updated one and please copy it to create your own translation. translation is the most updated one and please copy it to create your own translation.
You can find translation files here: https://github.com/wallabag/wallabag/tree/v2/src/Wallabag/CoreBundle/Resources/translations. You can find translation files here: https://github.com/wallabag/wallabag/tree/master/src/Wallabag/CoreBundle/Resources/translations.
You have to create ``messages.CODE.yml``, where CODE You have to create ``messages.CODE.yml``, where CODE
is the ISO 639-1 code of your language (`see wikipedia <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`__). is the ISO 639-1 code of your language (`see wikipedia <https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>`__).
Other files to translate: Other files to translate:
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/CraueConfigBundle/translations. - https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations.
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/FOSUserBundle/translations. - https://github.com/wallabag/wallabag/tree/master/app/Resources/FOSUserBundle/translations.
You have to create ``THE_TRANSLATION_FILE.CODE.yml`` files. You have to create ``THE_TRANSLATION_FILE.CODE.yml`` files.
@ -28,7 +28,7 @@ Configuration file
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
You have to edit `app/config/config.yml You have to edit `app/config/config.yml
<https://github.com/wallabag/wallabag/blob/v2/app/config/config.yml>`__ to display <https://github.com/wallabag/wallabag/blob/master/app/config/config.yml>`__ to display
your language on Configuration page of wallabag (to allow users to switch to this new translation). your language on Configuration page of wallabag (to allow users to switch to this new translation).
Under the ``wallabag_core.languages`` section, you have to add a new line with Under the ``wallabag_core.languages`` section, you have to add a new line with
@ -55,6 +55,6 @@ wallabag documentation
Contrary to the web application, the main language for documentation is english. Contrary to the web application, the main language for documentation is english.
Documentation files are stored here: https://github.com/wallabag/wallabag/tree/v2/docs Documentation files are stored here: https://github.com/wallabag/wallabag/tree/master/docs
You need to respect the ``en`` folder structure when you create your own translation. You need to respect the ``en`` folder structure when you create your own translation.

View File

@ -24,6 +24,7 @@ The main documentation for this application is organized into a couple sections:
:caption: User documentation :caption: User documentation
user/installation user/installation
user/migration
user/create_account user/create_account
user/login user/login
user/configuration user/configuration
@ -41,7 +42,7 @@ The main documentation for this application is organized into a couple sections:
:maxdepth: 2 :maxdepth: 2
:caption: Developer documentation :caption: Developer documentation
developer/api
developer/docker developer/docker
developer/translate developer/translate
developer/maintenance developer/maintenance
developer/releasing

View File

@ -12,9 +12,9 @@ There may be several reasons:
How can I help to fix that? How can I help to fix that?
--------------------------- ---------------------------
- `by sending us an email with the article's URL <mailto:hello@wallabag.org>`_ - `by sending us an email with the article's URL <mailto:hello\@wallabag.org>`_
- by trying to fix this article by yourself :) by creating a file for the article. - by trying to fix this article by yourself :) by creating a file for the article.
You can use this tool http://siteconfig.fivefilters.org/. You can use `this tool <http://siteconfig.fivefilters.org/>`__.
How can I try to re-fetch this article? How can I try to re-fetch this article?
--------------------------------------- ---------------------------------------

View File

@ -42,7 +42,7 @@ Install Composer:
curl -s http://getcomposer.org/installer | php curl -s http://getcomposer.org/installer | php
You can find specific instructions here : __ https://getcomposer.org/doc/00-intro.md You can find specific instructions `here <https://getcomposer.org/doc/00-intro.md>`__:
To install wallabag itself, you must run these two commands: To install wallabag itself, you must run these two commands:
@ -50,7 +50,7 @@ To install wallabag itself, you must run these two commands:
git clone https://github.com/wallabag/wallabag.git git clone https://github.com/wallabag/wallabag.git
cd wallabag cd wallabag
git checkout 2.0.0 git checkout 2.0.3
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
php bin/console wallabag:install --env=prod php bin/console wallabag:install --env=prod
@ -62,6 +62,10 @@ To start php's build-in server and test if everything did install correctly, you
And access wallabag at http://yourserverip:8000 And access wallabag at http://yourserverip:8000
.. note::
To define parameters with environment variables, you have to set these variables with ``SYMFONY__`` prefix. For example, ``SYMFONY__DATABASE_DRIVER``. You can have a look to the `Symfony documentation <http://symfony.com/doc/current/cookbook/configuration/external_parameters.html>`__.
Installing on Apache Installing on Apache
-------------------- --------------------
@ -146,3 +150,7 @@ Assuming you install wallabag in the /var/www/wallabag folder, here's the recipe
} }
After reloading or restarting nginx, you should now be able to access wallabag at http://domain.tld. After reloading or restarting nginx, you should now be able to access wallabag at http://domain.tld.
.. note::
When you want to import large file into wallabag, you need to add this line in your nginx configuration ``client_max_body_size XM; # allows file uploads up to X megabytes``.

View File

@ -24,6 +24,28 @@ After creating an user account on your new wallabag v2 instance, you must head o
:alt: Import from wallabag v1 :alt: Import from wallabag v1
:align: center :align: center
Import via command-line interface (CLI)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you have a CLI access on your web server, you can execute this command to import your wallabag v1 export:
::
bin/console wallabag:import-v1 1 ~/Downloads/wallabag-export-1-2016-04-05.json --env=prod
Please replace values:
* ``1`` is the user identifier in database (The ID of the first user created on wallabag is 1)
* ``~/Downloads/wallabag-export-1-2016-04-05.json`` is the path of your wallabag v1 export
You'll have this in return:
::
Start : 05-04-2016 11:36:07 ---
403 imported
0 already saved
End : 05-04-2016 11:36:09 ---
From wallabag 2.x From wallabag 2.x
----------------- -----------------

259
docs/fr/developer/api.rst Normal file

File diff suppressed because one or more lines are too long

View File

@ -13,15 +13,15 @@ Fichiers de traductions
cette traduction qui est considérée comme la plus récente. Merci de vous baser cette traduction qui est considérée comme la plus récente. Merci de vous baser
sur celle-ci pour créer votre traduction. sur celle-ci pour créer votre traduction.
Les principaux fichiers de traduction se trouvent ici : https://github.com/wallabag/wallabag/tree/v2/src/Wallabag/CoreBundle/Resources/translations. Les principaux fichiers de traduction se trouvent ici : https://github.com/wallabag/wallabag/tree/master/src/Wallabag/CoreBundle/Resources/translations.
Vous devez créer le fichier ``messages.CODE.yml``, Vous devez créer le fichier ``messages.CODE.yml``,
où CODE est le code ISO 639-1 de votre langue (`cf wikipedia <https://fr.wikipedia.org/wiki/Liste_des_codes_ISO_639-1>`__). où CODE est le code ISO 639-1 de votre langue (`cf wikipedia <https://fr.wikipedia.org/wiki/Liste_des_codes_ISO_639-1>`__).
Autres fichiers à traduire : Autres fichiers à traduire :
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/CraueConfigBundle/translations. - https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations.
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/FOSUserBundle/translations. - https://github.com/wallabag/wallabag/tree/master/app/Resources/FOSUserBundle/translations.
Vous devez créer les fichiers ``LE_FICHIER_DE_TRADUCTION.CODE.yml``. Vous devez créer les fichiers ``LE_FICHIER_DE_TRADUCTION.CODE.yml``.
@ -29,7 +29,7 @@ Fichier de configuration
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
Vous devez éditer `app/config/config.yml Vous devez éditer `app/config/config.yml
<https://github.com/wallabag/wallabag/blob/v2/app/config/config.yml>`__ pour <https://github.com/wallabag/wallabag/blob/master/app/config/config.yml>`__ pour
afficher votre langue dans la page Configuration de wallabag (pour permettre aux afficher votre langue dans la page Configuration de wallabag (pour permettre aux
utilisateurs de choisir cette nouvelle traduction). utilisateurs de choisir cette nouvelle traduction).
@ -57,6 +57,6 @@ Documentation de wallabag
Contrairement à l'application, la langue principale de la documentation est l'anglais Contrairement à l'application, la langue principale de la documentation est l'anglais
Les fichiers de documentation se trouvent ici : https://github.com/wallabag/wallabag/tree/v2/docs Les fichiers de documentation se trouvent ici : https://github.com/wallabag/wallabag/tree/master/docs
Vous devez respecter la structure du dossier ``en`` quand vous crééz votre traduction. Vous devez respecter la structure du dossier ``en`` quand vous crééz votre traduction.

View File

@ -25,6 +25,7 @@ La documentation principale de cette application est découpée en plusieurs sec
:caption: Documentation utilisateur :caption: Documentation utilisateur
user/installation user/installation
user/migration
user/create_account user/create_account
user/login user/login
user/configuration user/configuration
@ -42,6 +43,7 @@ La documentation principale de cette application est découpée en plusieurs sec
:maxdepth: 2 :maxdepth: 2
:caption: Documentation développeur :caption: Documentation développeur
developer/api
developer/docker developer/docker
developer/translate developer/translate
developer/maintenance developer/maintenance

View File

@ -12,9 +12,9 @@ Il peut y avoir plusieurs raisons :
Comment puis-je aider pour réparer ça ? Comment puis-je aider pour réparer ça ?
--------------------------------------- ---------------------------------------
- `en nous envoyant un email avec l'URL de l'article <mailto:hello@wallabag.org>`_ - `en nous envoyant un email avec l'URL de l'article <mailto:hello\@wallabag.org>`_
- en essayant de réparer cet article par vous-même :) en créant un fichier pour l'article. - en essayant de réparer cet article par vous-même :) en créant un fichier pour l'article.
Vous pouvez utiliser cet outil http://siteconfig.fivefilters.org/. Vous pouvez utiliser `cet outil <http://siteconfig.fivefilters.org/>`__.
Comment puis-je réessayer de récupérer le contenu ? Comment puis-je réessayer de récupérer le contenu ?
--------------------------------------------------- ---------------------------------------------------

View File

@ -40,7 +40,7 @@ Installation de Composer :
curl -s http://getcomposer.org/installer | php curl -s http://getcomposer.org/installer | php
Vous pouvez trouver des instructions spécifiques ici (en anglais) : __ https://getcomposer.org/doc/00-intro.md Vous pouvez trouver des instructions spécifiques `ici (en anglais) <https://getcomposer.org/doc/00-intro.md>`__ :
Pour installer wallabag, vous devez exécuter ces deux commandes : Pour installer wallabag, vous devez exécuter ces deux commandes :
@ -48,7 +48,7 @@ Pour installer wallabag, vous devez exécuter ces deux commandes :
git clone https://github.com/wallabag/wallabag.git git clone https://github.com/wallabag/wallabag.git
cd wallabag cd wallabag
git checkout 2.0.0 git checkout 2.0.3
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
php bin/console wallabag:install --env=prod php bin/console wallabag:install --env=prod
@ -60,6 +60,9 @@ Pour démarrer le serveur interne à php et vérifier que tout s'est installé c
Et accéder wallabag à l'adresse http://lipdevotreserveur:8000 Et accéder wallabag à l'adresse http://lipdevotreserveur:8000
.. note::
Pour définir des paramètres via des variables d'environnement, vous pouvez les spécifier avec le préfixe ``SYMFONY__``. Par exemple, ``SYMFONY__DATABASE_DRIVER``. Vous pouvez lire `documentation Symfony <http://symfony.com/doc/current/cookbook/configuration/external_parameters.html>`__ pour en savoir plus.
Installation avec Apache Installation avec Apache
------------------------ ------------------------
@ -144,3 +147,7 @@ En imaginant que vous vouliez installer wallabag dans le dossier /var/www/wallab
} }
Après que vous ayez rechargé/redémarré Nginx, vous devriez pouvoir avoir accès à wallabag à l'adresse http://domain.tld. Après que vous ayez rechargé/redémarré Nginx, vous devriez pouvoir avoir accès à wallabag à l'adresse http://domain.tld.
.. note::
Si vous voulez importer un fichier important dans wallabag, vous devez ajouter cette ligne dans votre configuration nginx ``client_max_body_size XM; # allows file uploads up to X megabytes``.

View File

@ -24,6 +24,28 @@ Une fois que vous avez créé un compte utilisateur sur votre nouvelle instance
:alt: Import depuis wallabag v1 :alt: Import depuis wallabag v1
:align: center :align: center
Import via via la ligne de commande (CLI)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Si vous avez accès à la ligne de commandes de votre serveur web, vous pouvez exécuter cette commande pour import votre fichier wallabag v1 :
::
bin/console wallabag:import-v1 1 ~/Downloads/wallabag-export-1-2016-04-05.json --env=prod
Remplacez les valeurs :
* ``1`` est l'identifiant de votre utilisateur en base (l'ID de votre premier utilisateur créé sur wallabag est 1)
* ``~/Downloads/wallabag-export-1-2016-04-05.json`` est le chemin de votre export wallabag v1
Vous obtiendrez :
::
Start : 05-04-2016 11:36:07 ---
403 imported
0 already saved
End : 05-04-2016 11:36:09 ---
Depuis wallabag 2.x Depuis wallabag 2.x
------------------- -------------------

View File

@ -1,55 +0,0 @@
# -*- coding: utf-8 -*-
#
# wallabag documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 16 06:47:23 2015.
import sys
import os
extensions = []
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'wallabag-pt'
copyright = u'2013-2016, Nicolas Lœuillet - MIT Licence'
version = '2.0.0'
release = version
exclude_patterns = ['_build']
pygments_style = 'sphinx'
html_theme = 'default'
html_static_path = ['_static']
htmlhelp_basename = 'wallabagfrdoc'
latex_elements = {
}
latex_documents = [
('index', 'wallabag-pt.tex', u'wallabag Documentation',
u'Nicolas Lœuillet', 'manual'),
]
man_pages = [
('index', 'wallabagpt', u'wallabag Documentation',
[u'Nicolas Lœuillet'], 1)
]
texinfo_documents = [
('index', 'wallabag', u'wallabag Documentation',
u'Nicolas Lœuillet', 'wallabag', 'wallabag is an opensource read-it-later.',
'Miscellaneous'),
]
##### Guzzle sphinx theme
import guzzle_sphinx_theme
html_translator_class = 'guzzle_sphinx_theme.HTMLTranslator'
html_theme_path = guzzle_sphinx_theme.html_theme_path()
html_theme = 'guzzle_sphinx_theme'
# Custom sidebar templates, maps document names to template names.
html_sidebars = {
'**': ['logo-text.html', 'globaltoc.html', 'searchbox.html']
}
# Register the theme as an extension to generate a sitemap.xml
extensions.append("guzzle_sphinx_theme")

View File

@ -1,36 +0,0 @@
wallabag documentation
======================
.. image:: ../img/wallabag.png
:alt: wallabag logo
:align: center
**wallabag** É uma aplicação "leia mais tarde": Ele salva páginas da web mantendo apenas o conteúdo. Elementos como ícones de navegação ou propaganda são deletedos.
A documentação principal desta aplicação é organizada em duas seções:
* :ref:`doc-usuario`
* :ref:`doc-desenvolvedor`
.. _user-docs:
.. toctree::
:maxdepth: 2
:caption: Documentação do usuário
user/criar_conta
user/login
user/configuração
user/primeiro_artigo
user/importar
user/baixar_artigos
user/filtros
user/tags
.. _dev-docs:
.. toctree::
:maxdepth: 2
:caption: Documentação do desenvolvedor
developer/docker

View File

@ -1,2 +0,0 @@
Sphinx>=1.3.0,<1.4.0
guzzle_sphinx_theme>=0.7.0,<0.8.0

View File

@ -30,7 +30,7 @@ class WallabagAnnotationController extends FOSRestController
->getRepository('WallabagAnnotationBundle:Annotation') ->getRepository('WallabagAnnotationBundle:Annotation')
->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId());
$total = count($annotationRows); $total = count($annotationRows);
$annotations = array('total' => $total, 'rows' => $annotationRows); $annotations = ['total' => $total, 'rows' => $annotationRows];
$json = $this->get('serializer')->serialize($annotations, 'json'); $json = $this->get('serializer')->serialize($annotations, 'json');
@ -141,6 +141,6 @@ class WallabagAnnotationController extends FOSRestController
*/ */
private function renderJsonResponse($json, $code = 200) private function renderJsonResponse($json, $code = 200)
{ {
return new Response($json, $code, array('application/json')); return new Response($json, $code, ['application/json']);
} }
} }

View File

@ -35,13 +35,13 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->findOneByUsernameAndNotArchived('admin'); ->findOneByUsernameAndNotArchived('admin');
$headers = array('CONTENT_TYPE' => 'application/json'); $headers = ['CONTENT_TYPE' => 'application/json'];
$content = json_encode(array( $content = json_encode([
'text' => 'my annotation', 'text' => 'my annotation',
'quote' => 'my quote', 'quote' => 'my quote',
'ranges' => array('start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31), 'ranges' => ['start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31],
)); ]);
$crawler = $this->client->request('POST', 'annotations/'.$entry->getId().'.json', array(), array(), $headers, $content); $crawler = $this->client->request('POST', 'annotations/'.$entry->getId().'.json', [], [], $headers, $content);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -69,11 +69,11 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
$this->logInAs('admin'); $this->logInAs('admin');
$headers = array('CONTENT_TYPE' => 'application/json'); $headers = ['CONTENT_TYPE' => 'application/json'];
$content = json_encode(array( $content = json_encode([
'text' => 'a modified annotation', 'text' => 'a modified annotation',
)); ]);
$crawler = $this->client->request('PUT', 'annotations/'.$annotation->getId().'.json', array(), array(), $headers, $content); $crawler = $this->client->request('PUT', 'annotations/'.$annotation->getId().'.json', [], [], $headers, $content);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
$content = json_decode($this->client->getResponse()->getContent(), true); $content = json_decode($this->client->getResponse()->getContent(), true);
@ -99,11 +99,11 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
$this->logInAs('admin'); $this->logInAs('admin');
$headers = array('CONTENT_TYPE' => 'application/json'); $headers = ['CONTENT_TYPE' => 'application/json'];
$content = json_encode(array( $content = json_encode([
'text' => 'a modified annotation', 'text' => 'a modified annotation',
)); ]);
$crawler = $this->client->request('DELETE', 'annotations/'.$annotation->getId().'.json', array(), array(), $headers, $content); $crawler = $this->client->request('DELETE', 'annotations/'.$annotation->getId().'.json', [], [], $headers, $content);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
$content = json_decode($this->client->getResponse()->getContent(), true); $content = json_decode($this->client->getResponse()->getContent(), true);

View File

@ -26,10 +26,10 @@ abstract class WallabagAnnotationTestCase extends WebTestCase
{ {
$crawler = $this->client->request('GET', '/login'); $crawler = $this->client->request('GET', '/login');
$form = $crawler->filter('button[type=submit]')->form(); $form = $crawler->filter('button[type=submit]')->form();
$data = array( $data = [
'_username' => $username, '_username' => $username,
'_password' => 'mypassword', '_password' => 'mypassword',
); ];
$this->client->submit($form, $data); $this->client->submit($form, $data);
} }
@ -48,7 +48,7 @@ abstract class WallabagAnnotationTestCase extends WebTestCase
$loginManager = $container->get('fos_user.security.login_manager'); $loginManager = $container->get('fos_user.security.login_manager');
$firewallName = $container->getParameter('fos_user.firewall_name'); $firewallName = $container->getParameter('fos_user.firewall_name');
$this->user = $userManager->findUserBy(array('username' => 'admin')); $this->user = $userManager->findUserBy(['username' => 'admin']);
$loginManager->loginUser($firewallName, $this->user); $loginManager->loginUser($firewallName, $this->user);
// save the login token into the session and put it in a cookie // save the login token into the session and put it in a cookie

View File

@ -43,8 +43,8 @@ class WallabagRestController extends FOSRestController
{ {
$this->validateAuthentication(); $this->validateAuthentication();
$isArchived = (int) $request->query->get('archive'); $isArchived = (null === $request->query->get('archive')) ? null : (bool) $request->query->get('archive');
$isStarred = (int) $request->query->get('starred'); $isStarred = (null === $request->query->get('starred')) ? null : (bool) $request->query->get('starred');
$sort = $request->query->get('sort', 'created'); $sort = $request->query->get('sort', 'created');
$order = $request->query->get('order', 'desc'); $order = $request->query->get('order', 'desc');
$page = (int) $request->query->get('page', 1); $page = (int) $request->query->get('page', 1);
@ -52,7 +52,7 @@ class WallabagRestController extends FOSRestController
$pager = $this->getDoctrine() $pager = $this->getDoctrine()
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->findEntries($this->getUser()->getId(), (bool) $isArchived, (bool) $isStarred, $sort, $order); ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order);
$pager->setCurrentPage($page); $pager->setCurrentPage($page);
$pager->setMaxPerPage($perPage); $pager->setMaxPerPage($perPage);
@ -384,6 +384,6 @@ class WallabagRestController extends FOSRestController
*/ */
private function renderJsonResponse($json) private function renderJsonResponse($json)
{ {
return new Response($json, 200, array('application/json')); return new Response($json, 200, ['application/json']);
} }
} }

View File

@ -13,7 +13,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
$entry = $this->client->getContainer() $entry = $this->client->getContainer()
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->findOneBy(array('user' => 1, 'isArchived' => false)); ->findOneBy(['user' => 1, 'isArchived' => false]);
if (!$entry) { if (!$entry) {
$this->markTestSkipped('No content found in db.'); $this->markTestSkipped('No content found in db.');
@ -44,7 +44,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
$entry = $this->client->getContainer() $entry = $this->client->getContainer()
->get('doctrine.orm.entity_manager') ->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->findOneBy(array('user' => 2, 'isArchived' => false)); ->findOneBy(['user' => 2, 'isArchived' => false]);
if (!$entry) { if (!$entry) {
$this->markTestSkipped('No content found in db.'); $this->markTestSkipped('No content found in db.');
@ -79,7 +79,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
public function testGetStarredEntries() public function testGetStarredEntries()
{ {
$this->client->request('GET', '/api/entries', array('star' => 1, 'sort' => 'updated')); $this->client->request('GET', '/api/entries', ['star' => 1, 'sort' => 'updated']);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -101,7 +101,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
public function testGetArchiveEntries() public function testGetArchiveEntries()
{ {
$this->client->request('GET', '/api/entries', array('archive' => 1)); $this->client->request('GET', '/api/entries', ['archive' => 1]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -149,10 +149,10 @@ class WallabagRestControllerTest extends WallabagApiTestCase
public function testPostEntry() public function testPostEntry()
{ {
$this->client->request('POST', '/api/entries.json', array( $this->client->request('POST', '/api/entries.json', [
'url' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', 'url' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html',
'tags' => 'google', 'tags' => 'google',
)); ]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -168,11 +168,11 @@ class WallabagRestControllerTest extends WallabagApiTestCase
public function testPostSameEntry() public function testPostSameEntry()
{ {
$this->client->request('POST', '/api/entries.json', array( $this->client->request('POST', '/api/entries.json', [
'url' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', 'url' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html',
'archive' => '1', 'archive' => '1',
'tags' => 'google, apple', 'tags' => 'google, apple',
)); ]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -187,11 +187,11 @@ class WallabagRestControllerTest extends WallabagApiTestCase
public function testPostArchivedAndStarredEntry() public function testPostArchivedAndStarredEntry()
{ {
$this->client->request('POST', '/api/entries.json', array( $this->client->request('POST', '/api/entries.json', [
'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html', 'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html',
'archive' => '1', 'archive' => '1',
'starred' => '1', 'starred' => '1',
)); ]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -206,11 +206,11 @@ class WallabagRestControllerTest extends WallabagApiTestCase
public function testPostArchivedAndStarredEntryWithoutQuotes() public function testPostArchivedAndStarredEntryWithoutQuotes()
{ {
$this->client->request('POST', '/api/entries.json', array( $this->client->request('POST', '/api/entries.json', [
'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html', 'url' => 'http://www.lemonde.fr/idees/article/2016/02/08/preserver-la-liberte-d-expression-sur-les-reseaux-sociaux_4861503_3232.html',
'archive' => 0, 'archive' => 0,
'starred' => 1, 'starred' => 1,
)); ]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -236,12 +236,12 @@ class WallabagRestControllerTest extends WallabagApiTestCase
// hydrate the tags relations // hydrate the tags relations
$nbTags = count($entry->getTags()); $nbTags = count($entry->getTags());
$this->client->request('PATCH', '/api/entries/'.$entry->getId().'.json', array( $this->client->request('PATCH', '/api/entries/'.$entry->getId().'.json', [
'title' => 'New awesome title', 'title' => 'New awesome title',
'tags' => 'new tag '.uniqid(), 'tags' => 'new tag '.uniqid(),
'starred' => '1', 'starred' => '1',
'archive' => '0', 'archive' => '0',
)); ]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -268,12 +268,12 @@ class WallabagRestControllerTest extends WallabagApiTestCase
// hydrate the tags relations // hydrate the tags relations
$nbTags = count($entry->getTags()); $nbTags = count($entry->getTags());
$this->client->request('PATCH', '/api/entries/'.$entry->getId().'.json', array( $this->client->request('PATCH', '/api/entries/'.$entry->getId().'.json', [
'title' => 'New awesome title', 'title' => 'New awesome title',
'tags' => 'new tag '.uniqid(), 'tags' => 'new tag '.uniqid(),
'starred' => 1, 'starred' => 1,
'archive' => 0, 'archive' => 0,
)); ]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -298,9 +298,9 @@ class WallabagRestControllerTest extends WallabagApiTestCase
$this->markTestSkipped('No content found in db.'); $this->markTestSkipped('No content found in db.');
} }
$tags = array(); $tags = [];
foreach ($entry->getTags() as $tag) { foreach ($entry->getTags() as $tag) {
$tags[] = array('id' => $tag->getId(), 'label' => $tag->getLabel(), 'slug' => $tag->getSlug()); $tags[] = ['id' => $tag->getId(), 'label' => $tag->getLabel(), 'slug' => $tag->getSlug()];
} }
$this->client->request('GET', '/api/entries/'.$entry->getId().'/tags'); $this->client->request('GET', '/api/entries/'.$entry->getId().'/tags');
@ -323,7 +323,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
$newTags = 'tag1,tag2,tag3'; $newTags = 'tag1,tag2,tag3';
$this->client->request('POST', '/api/entries/'.$entry->getId().'/tags', array('tags' => $newTags)); $this->client->request('POST', '/api/entries/'.$entry->getId().'/tags', ['tags' => $newTags]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode()); $this->assertEquals(200, $this->client->getResponse()->getStatusCode());
@ -337,7 +337,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
->getRepository('WallabagCoreBundle:Entry') ->getRepository('WallabagCoreBundle:Entry')
->find($entry->getId()); ->find($entry->getId());
$tagsInDB = array(); $tagsInDB = [];
foreach ($entryDB->getTags()->toArray() as $tag) { foreach ($entryDB->getTags()->toArray() as $tag) {
$tagsInDB[$tag->getId()] = $tag->getLabel(); $tagsInDB[$tag->getId()] = $tag->getLabel();
} }

View File

@ -36,7 +36,7 @@ abstract class WallabagApiTestCase extends WebTestCase
$loginManager = $container->get('fos_user.security.login_manager'); $loginManager = $container->get('fos_user.security.login_manager');
$firewallName = $container->getParameter('fos_user.firewall_name'); $firewallName = $container->getParameter('fos_user.firewall_name');
$this->user = $userManager->findUserBy(array('username' => 'admin')); $this->user = $userManager->findUserBy(['username' => 'admin']);
$loginManager->loginUser($firewallName, $this->user); $loginManager->loginUser($firewallName, $this->user);
// save the login token into the session and put it in a cookie // save the login token into the session and put it in a cookie

View File

@ -60,6 +60,7 @@ class InstallCommand extends ContainerAwareCommand
->checkRequirements() ->checkRequirements()
->setupDatabase() ->setupDatabase()
->setupAdmin() ->setupAdmin()
->setupConfig()
->setupAsset() ->setupAsset()
; ;
@ -69,7 +70,7 @@ class InstallCommand extends ContainerAwareCommand
protected function checkRequirements() protected function checkRequirements()
{ {
$this->defaultOutput->writeln('<info><comment>Step 1 of 4.</comment> Checking system requirements.</info>'); $this->defaultOutput->writeln('<info><comment>Step 1 of 5.</comment> Checking system requirements.</info>');
$fulfilled = true; $fulfilled = true;
@ -119,7 +120,7 @@ class InstallCommand extends ContainerAwareCommand
protected function setupDatabase() protected function setupDatabase()
{ {
$this->defaultOutput->writeln('<info><comment>Step 2 of 4.</comment> Setting up database.</info>'); $this->defaultOutput->writeln('<info><comment>Step 2 of 5.</comment> Setting up database.</info>');
// user want to reset everything? Don't care about what is already here // user want to reset everything? Don't care about what is already here
if (true === $this->defaultInput->getOption('reset')) { if (true === $this->defaultInput->getOption('reset')) {
@ -190,7 +191,7 @@ class InstallCommand extends ContainerAwareCommand
protected function setupAdmin() protected function setupAdmin()
{ {
$this->defaultOutput->writeln('<info><comment>Step 3 of 4.</comment> Administration setup.</info>'); $this->defaultOutput->writeln('<info><comment>Step 3 of 5.</comment> Administration setup.</info>');
$questionHelper = $this->getHelperSet()->get('question'); $questionHelper = $this->getHelperSet()->get('question');
$question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true); $question = new ConfirmationQuestion('Would you like to create a new admin user (recommended) ? (Y/n)', true);
@ -227,15 +228,20 @@ class InstallCommand extends ContainerAwareCommand
$em->persist($config); $em->persist($config);
$this->defaultOutput->writeln('');
return $this;
}
protected function setupConfig()
{
$this->defaultOutput->writeln('<info><comment>Step 4 of 5.</comment> Config setup.</info>');
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
// cleanup before insert new stuff // cleanup before insert new stuff
$em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute(); $em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute();
$settings = [ $settings = [
[
'name' => 'download_pictures',
'value' => '1',
'section' => 'entry',
],
[ [
'name' => 'carrot', 'name' => 'carrot',
'value' => '1', 'value' => '1',
@ -370,7 +376,7 @@ class InstallCommand extends ContainerAwareCommand
protected function setupAsset() protected function setupAsset()
{ {
$this->defaultOutput->writeln('<info><comment>Step 4 of 4.</comment> Installing assets.</info>'); $this->defaultOutput->writeln('<info><comment>Step 5 of 5.</comment> Installing assets.</info>');
$this $this
->runCommand('assets:install') ->runCommand('assets:install')
@ -460,7 +466,13 @@ class InstallCommand extends ContainerAwareCommand
return false; return false;
} }
return in_array($databaseName, $schemaManager->listDatabases()); try {
return in_array($databaseName, $schemaManager->listDatabases());
} catch (\Doctrine\DBAL\Exception\DriverException $e) {
// it means we weren't able to get database list, assume the database doesn't exist
return false;
}
} }
/** /**

View File

@ -32,7 +32,7 @@ class ConfigController extends Controller
$user = $this->getUser(); $user = $this->getUser();
// handle basic config detail (this form is defined as a service) // handle basic config detail (this form is defined as a service)
$configForm = $this->createForm(ConfigType::class, $config, array('action' => $this->generateUrl('config'))); $configForm = $this->createForm(ConfigType::class, $config, ['action' => $this->generateUrl('config')]);
$configForm->handleRequest($request); $configForm->handleRequest($request);
if ($configForm->isValid()) { if ($configForm->isValid()) {
@ -52,7 +52,7 @@ class ConfigController extends Controller
} }
// handle changing password // handle changing password
$pwdForm = $this->createForm(ChangePasswordType::class, null, array('action' => $this->generateUrl('config').'#set4')); $pwdForm = $this->createForm(ChangePasswordType::class, null, ['action' => $this->generateUrl('config').'#set4']);
$pwdForm->handleRequest($request); $pwdForm->handleRequest($request);
if ($pwdForm->isValid()) { if ($pwdForm->isValid()) {
@ -71,10 +71,10 @@ class ConfigController extends Controller
} }
// handle changing user information // handle changing user information
$userForm = $this->createForm(UserInformationType::class, $user, array( $userForm = $this->createForm(UserInformationType::class, $user, [
'validation_groups' => array('Profile'), 'validation_groups' => ['Profile'],
'action' => $this->generateUrl('config').'#set3', 'action' => $this->generateUrl('config').'#set3',
)); ]);
$userForm->handleRequest($request); $userForm->handleRequest($request);
if ($userForm->isValid()) { if ($userForm->isValid()) {
@ -89,7 +89,7 @@ class ConfigController extends Controller
} }
// handle rss information // handle rss information
$rssForm = $this->createForm(RssType::class, $config, array('action' => $this->generateUrl('config').'#set2')); $rssForm = $this->createForm(RssType::class, $config, ['action' => $this->generateUrl('config').'#set2']);
$rssForm->handleRequest($request); $rssForm->handleRequest($request);
if ($rssForm->isValid()) { if ($rssForm->isValid()) {
@ -106,7 +106,7 @@ class ConfigController extends Controller
// handle tagging rule // handle tagging rule
$taggingRule = new TaggingRule(); $taggingRule = new TaggingRule();
$newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, array('action' => $this->generateUrl('config').'#set5')); $newTaggingRule = $this->createForm(TaggingRuleType::class, $taggingRule, ['action' => $this->generateUrl('config').'#set5']);
$newTaggingRule->handleRequest($request); $newTaggingRule->handleRequest($request);
if ($newTaggingRule->isValid()) { if ($newTaggingRule->isValid()) {
@ -126,10 +126,10 @@ class ConfigController extends Controller
$newUser = $userManager->createUser(); $newUser = $userManager->createUser();
// enable created user by default // enable created user by default
$newUser->setEnabled(true); $newUser->setEnabled(true);
$newUserForm = $this->createForm(NewUserType::class, $newUser, array( $newUserForm = $this->createForm(NewUserType::class, $newUser, [
'validation_groups' => array('Profile'), 'validation_groups' => ['Profile'],
'action' => $this->generateUrl('config').'#set6', 'action' => $this->generateUrl('config').'#set6',
)); ]);
$newUserForm->handleRequest($request); $newUserForm->handleRequest($request);
if ($newUserForm->isValid() && $this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { if ($newUserForm->isValid() && $this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) {
@ -147,27 +147,27 @@ class ConfigController extends Controller
$this->get('session')->getFlashBag()->add( $this->get('session')->getFlashBag()->add(
'notice', 'notice',
$this->get('translator')->trans('flashes.config.notice.user_added', array('%username%' => $newUser->getUsername())) $this->get('translator')->trans('flashes.config.notice.user_added', ['%username%' => $newUser->getUsername()])
); );
return $this->redirect($this->generateUrl('config').'#set6'); return $this->redirect($this->generateUrl('config').'#set6');
} }
return $this->render('WallabagCoreBundle:Config:index.html.twig', array( return $this->render('WallabagCoreBundle:Config:index.html.twig', [
'form' => array( 'form' => [
'config' => $configForm->createView(), 'config' => $configForm->createView(),
'rss' => $rssForm->createView(), 'rss' => $rssForm->createView(),
'pwd' => $pwdForm->createView(), 'pwd' => $pwdForm->createView(),
'user' => $userForm->createView(), 'user' => $userForm->createView(),
'new_user' => $newUserForm->createView(), 'new_user' => $newUserForm->createView(),
'new_tagging_rule' => $newTaggingRule->createView(), 'new_tagging_rule' => $newTaggingRule->createView(),
), ],
'rss' => array( 'rss' => [
'username' => $user->getUsername(), 'username' => $user->getUsername(),
'token' => $config->getRssToken(), 'token' => $config->getRssToken(),
), ],
'twofactor_auth' => $this->getParameter('twofactor_auth'), 'twofactor_auth' => $this->getParameter('twofactor_auth'),
)); ]);
} }
/** /**
@ -187,7 +187,7 @@ class ConfigController extends Controller
$em->flush(); $em->flush();
if ($request->isXmlHttpRequest()) { if ($request->isXmlHttpRequest()) {
return new JsonResponse(array('token' => $config->getRssToken())); return new JsonResponse(['token' => $config->getRssToken()]);
} }
$this->get('session')->getFlashBag()->add( $this->get('session')->getFlashBag()->add(
@ -229,7 +229,7 @@ class ConfigController extends Controller
* Retrieve config for the current user. * Retrieve config for the current user.
* If no config were found, create a new one. * If no config were found, create a new one.
* *
* @return Wallabag\CoreBundle\Entity\Config * @return Config
*/ */
private function getConfig() private function getConfig()
{ {

View File

@ -21,9 +21,9 @@ class DeveloperController extends Controller
{ {
$clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findAll(); $clients = $this->getDoctrine()->getRepository('WallabagApiBundle:Client')->findAll();
return $this->render('WallabagCoreBundle:Developer:index.html.twig', array( return $this->render('WallabagCoreBundle:Developer:index.html.twig', [
'clients' => $clients, 'clients' => $clients,
)); ]);
} }
/** /**
@ -43,7 +43,7 @@ class DeveloperController extends Controller
$clientForm->handleRequest($request); $clientForm->handleRequest($request);
if ($clientForm->isValid()) { if ($clientForm->isValid()) {
$client->setAllowedGrantTypes(array('token', 'authorization_code', 'password', 'refresh_token')); $client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']);
$em->persist($client); $em->persist($client);
$em->flush(); $em->flush();
@ -52,15 +52,15 @@ class DeveloperController extends Controller
'flashes.developer.notice.client_created' 'flashes.developer.notice.client_created'
); );
return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', array( return $this->render('WallabagCoreBundle:Developer:client_parameters.html.twig', [
'client_id' => $client->getPublicId(), 'client_id' => $client->getPublicId(),
'client_secret' => $client->getSecret(), 'client_secret' => $client->getSecret(),
)); ]);
} }
return $this->render('WallabagCoreBundle:Developer:client.html.twig', array( return $this->render('WallabagCoreBundle:Developer:client.html.twig', [
'form' => $clientForm->createView(), 'form' => $clientForm->createView(),
)); ]);
} }
/** /**

View File

@ -49,16 +49,15 @@ class EntryController extends Controller
$form->handleRequest($request); $form->handleRequest($request);
if ($form->isValid()) { if ($form->isValid()) {
// check for existing entry, if it exists, redirect to it with a message $existingEntry = $this->checkIfEntryAlreadyExists($entry);
$existingEntry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
if (false !== $existingEntry) { if (false !== $existingEntry) {
$this->get('session')->getFlashBag()->add( $this->get('session')->getFlashBag()->add(
'notice', 'notice',
$this->get('translator')->trans('flashes.entry.notice.entry_already_saved', array('%date%' => $existingEntry->getCreatedAt()->format('d-m-Y'))) $this->get('translator')->trans('flashes.entry.notice.entry_already_saved', ['%date%' => $existingEntry->getCreatedAt()->format('d-m-Y')])
); );
return $this->redirect($this->generateUrl('view', array('id' => $existingEntry->getId()))); return $this->redirect($this->generateUrl('view', ['id' => $existingEntry->getId()]));
} }
$this->updateEntry($entry); $this->updateEntry($entry);
@ -70,9 +69,9 @@ class EntryController extends Controller
return $this->redirect($this->generateUrl('homepage')); return $this->redirect($this->generateUrl('homepage'));
} }
return $this->render('WallabagCoreBundle:Entry:new_form.html.twig', array( return $this->render('WallabagCoreBundle:Entry:new_form.html.twig', [
'form' => $form->createView(), 'form' => $form->createView(),
)); ]);
} }
/** /**
@ -86,7 +85,10 @@ class EntryController extends Controller
{ {
$entry = new Entry($this->getUser()); $entry = new Entry($this->getUser());
$entry->setUrl($request->get('url')); $entry->setUrl($request->get('url'));
$this->updateEntry($entry);
if (false === $this->checkIfEntryAlreadyExists($entry)) {
$this->updateEntry($entry);
}
return $this->redirect($this->generateUrl('homepage')); return $this->redirect($this->generateUrl('homepage'));
} }
@ -129,12 +131,12 @@ class EntryController extends Controller
'flashes.entry.notice.entry_updated' 'flashes.entry.notice.entry_updated'
); );
return $this->redirect($this->generateUrl('view', array('id' => $entry->getId()))); return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()]));
} }
return $this->render('WallabagCoreBundle:Entry:edit.html.twig', array( return $this->render('WallabagCoreBundle:Entry:edit.html.twig', [
'form' => $form->createView(), 'form' => $form->createView(),
)); ]);
} }
/** /**
@ -255,17 +257,17 @@ class EntryController extends Controller
$entries->setCurrentPage($page); $entries->setCurrentPage($page);
} catch (OutOfRangeCurrentPageException $e) { } catch (OutOfRangeCurrentPageException $e) {
if ($page > 1) { if ($page > 1) {
return $this->redirect($this->generateUrl($type, array('page' => $entries->getNbPages())), 302); return $this->redirect($this->generateUrl($type, ['page' => $entries->getNbPages()]), 302);
} }
} }
return $this->render( return $this->render(
'WallabagCoreBundle:Entry:entries.html.twig', 'WallabagCoreBundle:Entry:entries.html.twig',
array( [
'form' => $form->createView(), 'form' => $form->createView(),
'entries' => $entries, 'entries' => $entries,
'currentPage' => $page, 'currentPage' => $page,
) ]
); );
} }
@ -284,7 +286,7 @@ class EntryController extends Controller
return $this->render( return $this->render(
'WallabagCoreBundle:Entry:entry.html.twig', 'WallabagCoreBundle:Entry:entry.html.twig',
array('entry' => $entry) ['entry' => $entry]
); );
} }
@ -312,7 +314,7 @@ class EntryController extends Controller
$message $message
); );
return $this->redirect($this->generateUrl('view', array('id' => $entry->getId()))); return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()]));
} }
/** /**
@ -342,7 +344,9 @@ class EntryController extends Controller
$message $message
); );
return $this->redirect($request->headers->get('referer')); $redirectUrl = $this->get('wallabag_core.helper.redirect')->to($request->headers->get('referer'));
return $this->redirect($redirectUrl);
} }
/** /**
@ -372,7 +376,9 @@ class EntryController extends Controller
$message $message
); );
return $this->redirect($request->headers->get('referer')); $redirectUrl = $this->get('wallabag_core.helper.redirect')->to($request->headers->get('referer'));
return $this->redirect($redirectUrl);
} }
/** /**
@ -392,7 +398,7 @@ class EntryController extends Controller
// to avoid redirecting to the deleted entry. Ugh. // to avoid redirecting to the deleted entry. Ugh.
$url = $this->generateUrl( $url = $this->generateUrl(
'view', 'view',
array('id' => $entry->getId()), ['id' => $entry->getId()],
UrlGeneratorInterface::ABSOLUTE_URL UrlGeneratorInterface::ABSOLUTE_URL
); );
@ -406,7 +412,11 @@ class EntryController extends Controller
); );
// don't redirect user to the deleted entry // don't redirect user to the deleted entry
return $this->redirect($url !== $request->headers->get('referer') ? $request->headers->get('referer') : $this->generateUrl('homepage')); $to = ($url !== $request->headers->get('referer') ? $request->headers->get('referer') : null);
$redirectUrl = $this->get('wallabag_core.helper.redirect')->to($to);
return $this->redirect($redirectUrl);
} }
/** /**
@ -420,4 +430,16 @@ class EntryController extends Controller
throw $this->createAccessDeniedException('You can not access this entry.'); throw $this->createAccessDeniedException('You can not access this entry.');
} }
} }
/**
* Check for existing entry, if it exists, redirect to it with a message.
*
* @param Entry $entry
*
* @return Entry|bool
*/
private function checkIfEntryAlreadyExists(Entry $entry)
{
return $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
}
} }

View File

@ -16,12 +16,15 @@ class ExportController extends Controller
/** /**
* Gets one entry content. * Gets one entry content.
* *
* @param Entry $entry * @param Entry $entry
* @param string $format
* *
* @Route("/export/{id}.{format}", name="export_entry", requirements={ * @Route("/export/{id}.{format}", name="export_entry", requirements={
* "format": "epub|mobi|pdf|json|xml|txt|csv", * "format": "epub|mobi|pdf|json|xml|txt|csv",
* "id": "\d+" * "id": "\d+"
* }) * })
*
* @return \Symfony\Component\HttpFoundation\Response
*/ */
public function downloadEntryAction(Entry $entry, $format) public function downloadEntryAction(Entry $entry, $format)
{ {
@ -38,10 +41,15 @@ class ExportController extends Controller
/** /**
* Export all entries for current user. * Export all entries for current user.
* *
* @param string $format
* @param string $category
*
* @Route("/export/{category}.{format}", name="export_entries", requirements={ * @Route("/export/{category}.{format}", name="export_entries", requirements={
* "format": "epub|mobi|pdf|json|xml|txt|csv", * "format": "epub|mobi|pdf|json|xml|txt|csv",
* "category": "all|unread|starred|archive" * "category": "all|unread|starred|archive"
* }) * })
*
* @return \Symfony\Component\HttpFoundation\Response
*/ */
public function downloadEntriesAction($format, $category) public function downloadEntriesAction($format, $category)
{ {

View File

@ -87,9 +87,9 @@ class RssController extends Controller
$perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit');
$entries->setMaxPerPage($perPage); $entries->setMaxPerPage($perPage);
return $this->render('WallabagCoreBundle:Entry:entries.xml.twig', array( return $this->render('WallabagCoreBundle:Entry:entries.xml.twig', [
'type' => $type, 'type' => $type,
'entries' => $entries, 'entries' => $entries,
)); ]);
} }
} }

View File

@ -14,7 +14,7 @@ class StaticController extends Controller
{ {
return $this->render( return $this->render(
'WallabagCoreBundle:Static:howto.html.twig', 'WallabagCoreBundle:Static:howto.html.twig',
array() []
); );
} }
@ -25,10 +25,10 @@ class StaticController extends Controller
{ {
return $this->render( return $this->render(
'WallabagCoreBundle:Static:about.html.twig', 'WallabagCoreBundle:Static:about.html.twig',
array( [
'version' => $this->getParameter('wallabag_core.version'), 'version' => $this->getParameter('wallabag_core.version'),
'paypal_url' => $this->getParameter('wallabag_core.paypal_url'), 'paypal_url' => $this->getParameter('wallabag_core.paypal_url'),
) ]
); );
} }
@ -39,7 +39,7 @@ class StaticController extends Controller
{ {
return $this->render( return $this->render(
'WallabagCoreBundle:Static:quickstart.html.twig', 'WallabagCoreBundle:Static:quickstart.html.twig',
array() []
); );
} }
} }

View File

@ -13,6 +13,7 @@ class TagController extends Controller
{ {
/** /**
* @param Request $request * @param Request $request
* @param Entry $entry
* *
* @Route("/new-tag/{entry}", requirements={"entry" = "\d+"}, name="new_tag") * @Route("/new-tag/{entry}", requirements={"entry" = "\d+"}, name="new_tag")
* *
@ -38,13 +39,13 @@ class TagController extends Controller
'flashes.tag.notice.tag_added' 'flashes.tag.notice.tag_added'
); );
return $this->redirect($this->generateUrl('view', array('id' => $entry->getId()))); return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()]));
} }
return $this->render('WallabagCoreBundle:Tag:new_form.html.twig', array( return $this->render('WallabagCoreBundle:Tag:new_form.html.twig', [
'form' => $form->createView(), 'form' => $form->createView(),
'entry' => $entry, 'entry' => $entry,
)); ]);
} }
/** /**
@ -64,7 +65,9 @@ class TagController extends Controller
} }
$em->flush(); $em->flush();
return $this->redirect($request->headers->get('referer')); $redirectUrl = $this->get('wallabag_core.helper.redirect')->to($request->headers->get('referer'));
return $this->redirect($redirectUrl);
} }
/** /**
@ -82,9 +85,9 @@ class TagController extends Controller
return $this->render( return $this->render(
'WallabagCoreBundle:Tag:tags.html.twig', 'WallabagCoreBundle:Tag:tags.html.twig',
array( [
'tags' => $tags, 'tags' => $tags,
) ]
); );
} }
} }

View File

@ -15,11 +15,6 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
public function load(ObjectManager $manager) public function load(ObjectManager $manager)
{ {
$settings = [ $settings = [
[
'name' => 'download_pictures',
'value' => '1',
'section' => 'entry',
],
[ [
'name' => 'carrot', 'name' => 'carrot',
'value' => '1', 'value' => '1',

View File

@ -16,14 +16,14 @@ class LoadTaggingRuleData extends AbstractFixture implements OrderedFixtureInter
{ {
$tr1 = new TaggingRule(); $tr1 = new TaggingRule();
$tr1->setRule('content matches "spurs"'); $tr1->setRule('content matches "spurs"');
$tr1->setTags(array('sport')); $tr1->setTags(['sport']);
$tr1->setConfig($this->getReference('admin-config')); $tr1->setConfig($this->getReference('admin-config'));
$manager->persist($tr1); $manager->persist($tr1);
$tr2 = new TaggingRule(); $tr2 = new TaggingRule();
$tr2->setRule('content matches "basket"'); $tr2->setRule('content matches "basket"');
$tr2->setTags(array('sport')); $tr2->setTags(['sport']);
$tr2->setConfig($this->getReference('admin-config')); $tr2->setConfig($this->getReference('admin-config'));
$manager->persist($tr2); $manager->persist($tr2);

View File

@ -36,9 +36,9 @@ class LocaleListener implements EventSubscriberInterface
public static function getSubscribedEvents() public static function getSubscribedEvents()
{ {
return array( return [
// must be registered before the default Locale listener // must be registered before the default Locale listener
KernelEvents::REQUEST => array(array('onKernelRequest', 17)), KernelEvents::REQUEST => [['onKernelRequest', 17]],
); ];
} }
} }

View File

@ -28,9 +28,9 @@ class RegistrationConfirmedListener implements EventSubscriberInterface
public static function getSubscribedEvents() public static function getSubscribedEvents()
{ {
return array( return [
FOSUserEvents::REGISTRATION_CONFIRMED => 'authenticate', FOSUserEvents::REGISTRATION_CONFIRMED => 'authenticate',
); ];
} }
public function authenticate(FilterUserResponseEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null) public function authenticate(FilterUserResponseEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null)

View File

@ -15,28 +15,28 @@ class ChangePasswordType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('old_password', PasswordType::class, array( ->add('old_password', PasswordType::class, [
'constraints' => new UserPassword(array('message' => 'validator.password_wrong_value')), 'constraints' => new UserPassword(['message' => 'validator.password_wrong_value']),
'label' => 'config.form_password.old_password_label', 'label' => 'config.form_password.old_password_label',
)) ])
->add('new_password', RepeatedType::class, array( ->add('new_password', RepeatedType::class, [
'type' => PasswordType::class, 'type' => PasswordType::class,
'invalid_message' => 'validator.password_must_match', 'invalid_message' => 'validator.password_must_match',
'required' => true, 'required' => true,
'first_options' => array('label' => 'config.form_password.new_password_label'), 'first_options' => ['label' => 'config.form_password.new_password_label'],
'second_options' => array('label' => 'config.form_password.repeat_new_password_label'), 'second_options' => ['label' => 'config.form_password.repeat_new_password_label'],
'constraints' => array( 'constraints' => [
new Constraints\Length(array( new Constraints\Length([
'min' => 8, 'min' => 8,
'minMessage' => 'validator.password_too_short', 'minMessage' => 'validator.password_too_short',
)), ]),
new Constraints\NotBlank(), new Constraints\NotBlank(),
), ],
'label' => 'config.form_password.new_password_label', 'label' => 'config.form_password.new_password_label',
)) ])
->add('save', SubmitType::class, array( ->add('save', SubmitType::class, [
'label' => 'config.form.save', 'label' => 'config.form.save',
)) ])
; ;
} }

View File

@ -14,8 +14,8 @@ class ClientType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('redirect_uris', UrlType::class, array('required' => true, 'label' => 'developer.client.form.redirect_uris_label')) ->add('redirect_uris', UrlType::class, ['required' => true, 'label' => 'developer.client.form.redirect_uris_label'])
->add('save', SubmitType::class, array('label' => 'developer.client.form.save_label')) ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label'])
; ;
$builder->get('redirect_uris') $builder->get('redirect_uris')
@ -24,7 +24,7 @@ class ClientType extends AbstractType
return $originalUri; return $originalUri;
}, },
function ($submittedUri) { function ($submittedUri) {
return array($submittedUri); return [$submittedUri];
} }
)) ))
; ;
@ -32,9 +32,9 @@ class ClientType extends AbstractType
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\ApiBundle\Entity\Client', 'data_class' => 'Wallabag\ApiBundle\Entity\Client',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -10,8 +10,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ConfigType extends AbstractType class ConfigType extends AbstractType
{ {
private $themes = array(); private $themes = [];
private $languages = array(); private $languages = [];
/** /**
* @param array $themes Themes come from the LiipThemeBundle (liip_theme.themes) * @param array $themes Themes come from the LiipThemeBundle (liip_theme.themes)
@ -30,39 +30,39 @@ class ConfigType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('theme', ChoiceType::class, array( ->add('theme', ChoiceType::class, [
'choices' => array_flip($this->themes), 'choices' => array_flip($this->themes),
'choices_as_values' => true, 'choices_as_values' => true,
'label' => 'config.form_settings.theme_label', 'label' => 'config.form_settings.theme_label',
)) ])
->add('items_per_page', null, array( ->add('items_per_page', null, [
'label' => 'config.form_settings.items_per_page_label', 'label' => 'config.form_settings.items_per_page_label',
)) ])
->add('reading_speed', ChoiceType::class, array( ->add('reading_speed', ChoiceType::class, [
'label' => 'config.form_settings.reading_speed.label', 'label' => 'config.form_settings.reading_speed.label',
'choices' => array( 'choices' => [
'config.form_settings.reading_speed.100_word' => '0.5', 'config.form_settings.reading_speed.100_word' => '0.5',
'config.form_settings.reading_speed.200_word' => '1', 'config.form_settings.reading_speed.200_word' => '1',
'config.form_settings.reading_speed.300_word' => '1.5', 'config.form_settings.reading_speed.300_word' => '1.5',
'config.form_settings.reading_speed.400_word' => '2', 'config.form_settings.reading_speed.400_word' => '2',
), ],
)) ])
->add('language', ChoiceType::class, array( ->add('language', ChoiceType::class, [
'choices' => array_flip($this->languages), 'choices' => array_flip($this->languages),
'choices_as_values' => true, 'choices_as_values' => true,
'label' => 'config.form_settings.language_label', 'label' => 'config.form_settings.language_label',
)) ])
->add('save', SubmitType::class, array( ->add('save', SubmitType::class, [
'label' => 'config.form.save', 'label' => 'config.form.save',
)) ])
; ;
} }
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\CoreBundle\Entity\Config', 'data_class' => 'Wallabag\CoreBundle\Entity\Config',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -14,30 +14,30 @@ class EditEntryType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('title', TextType::class, array( ->add('title', TextType::class, [
'required' => true, 'required' => true,
'label' => 'entry.edit.title_label', 'label' => 'entry.edit.title_label',
)) ])
->add('is_public', CheckboxType::class, array( ->add('is_public', CheckboxType::class, [
'required' => false, 'required' => false,
'label' => 'entry.edit.is_public_label', 'label' => 'entry.edit.is_public_label',
)) ])
->add('url', TextType::class, array( ->add('url', TextType::class, [
'disabled' => true, 'disabled' => true,
'required' => false, 'required' => false,
'label' => 'entry.edit.url_label', 'label' => 'entry.edit.url_label',
)) ])
->add('save', SubmitType::class, array( ->add('save', SubmitType::class, [
'label' => 'entry.edit.save_label', 'label' => 'entry.edit.save_label',
)) ])
; ;
} }
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\CoreBundle\Entity\Entry', 'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -34,28 +34,28 @@ class EntryFilterType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('readingTime', NumberRangeFilterType::class, array( ->add('readingTime', NumberRangeFilterType::class, [
'label' => 'entry.filters.reading_time.label', 'label' => 'entry.filters.reading_time.label',
)) ])
->add('createdAt', DateRangeFilterType::class, array( ->add('createdAt', DateRangeFilterType::class, [
'left_date_options' => array( 'left_date_options' => [
'attr' => array( 'attr' => [
'placeholder' => 'dd/mm/yyyy', 'placeholder' => 'dd/mm/yyyy',
), ],
'format' => 'dd/MM/yyyy', 'format' => 'dd/MM/yyyy',
'widget' => 'single_text', 'widget' => 'single_text',
), ],
'right_date_options' => array( 'right_date_options' => [
'attr' => array( 'attr' => [
'placeholder' => 'dd/mm/yyyy', 'placeholder' => 'dd/mm/yyyy',
), ],
'format' => 'dd/MM/yyyy', 'format' => 'dd/MM/yyyy',
'widget' => 'single_text', 'widget' => 'single_text',
), ],
'label' => 'entry.filters.created_at.label', 'label' => 'entry.filters.created_at.label',
) ]
) )
->add('domainName', TextFilterType::class, array( ->add('domainName', TextFilterType::class, [
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
$value = $values['value']; $value = $values['value'];
if (strlen($value) <= 2 || empty($value)) { if (strlen($value) <= 2 || empty($value)) {
@ -66,14 +66,14 @@ class EntryFilterType extends AbstractType
return $filterQuery->createCondition($expression); return $filterQuery->createCondition($expression);
}, },
'label' => 'entry.filters.domain_label', 'label' => 'entry.filters.domain_label',
)) ])
->add('isArchived', CheckboxFilterType::class, array( ->add('isArchived', CheckboxFilterType::class, [
'label' => 'entry.filters.archived_label', 'label' => 'entry.filters.archived_label',
)) ])
->add('isStarred', CheckboxFilterType::class, array( ->add('isStarred', CheckboxFilterType::class, [
'label' => 'entry.filters.starred_label', 'label' => 'entry.filters.starred_label',
)) ])
->add('previewPicture', CheckboxFilterType::class, array( ->add('previewPicture', CheckboxFilterType::class, [
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
if (false === $values['value']) { if (false === $values['value']) {
return; return;
@ -84,12 +84,12 @@ class EntryFilterType extends AbstractType
return $filterQuery->createCondition($expression); return $filterQuery->createCondition($expression);
}, },
'label' => 'entry.filters.preview_picture_label', 'label' => 'entry.filters.preview_picture_label',
)) ])
->add('language', ChoiceFilterType::class, array( ->add('language', ChoiceFilterType::class, [
'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())), 'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())),
'choices_as_values' => true, 'choices_as_values' => true,
'label' => 'entry.filters.language_label', 'label' => 'entry.filters.language_label',
)) ])
; ;
} }
@ -100,9 +100,9 @@ class EntryFilterType extends AbstractType
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'csrf_protection' => false, 'csrf_protection' => false,
'validation_groups' => array('filtering'), 'validation_groups' => ['filtering'],
)); ]);
} }
} }

View File

@ -12,18 +12,18 @@ class NewEntryType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('url', UrlType::class, array( ->add('url', UrlType::class, [
'required' => true, 'required' => true,
'label' => 'entry.new.form_new.url_label', 'label' => 'entry.new.form_new.url_label',
)) ])
; ;
} }
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\CoreBundle\Entity\Entry', 'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -12,15 +12,15 @@ class NewTagType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('label', TextType::class, array('required' => true)) ->add('label', TextType::class, ['required' => true])
; ;
} }
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\CoreBundle\Entity\Tag', 'data_class' => 'Wallabag\CoreBundle\Entity\Tag',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -17,38 +17,38 @@ class NewUserType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('username', TextType::class, array( ->add('username', TextType::class, [
'required' => true, 'required' => true,
'label' => 'config.form_new_user.username_label', 'label' => 'config.form_new_user.username_label',
)) ])
->add('plainPassword', RepeatedType::class, array( ->add('plainPassword', RepeatedType::class, [
'type' => PasswordType::class, 'type' => PasswordType::class,
'invalid_message' => 'validator.password_must_match', 'invalid_message' => 'validator.password_must_match',
'first_options' => array('label' => 'config.form_new_user.password_label'), 'first_options' => ['label' => 'config.form_new_user.password_label'],
'second_options' => array('label' => 'config.form_new_user.repeat_new_password_label'), 'second_options' => ['label' => 'config.form_new_user.repeat_new_password_label'],
'constraints' => array( 'constraints' => [
new Constraints\Length(array( new Constraints\Length([
'min' => 8, 'min' => 8,
'minMessage' => 'validator.password_too_short', 'minMessage' => 'validator.password_too_short',
)), ]),
new Constraints\NotBlank(), new Constraints\NotBlank(),
), ],
'label' => 'config.form_new_user.plain_password_label', 'label' => 'config.form_new_user.plain_password_label',
)) ])
->add('email', EmailType::class, array( ->add('email', EmailType::class, [
'label' => 'config.form_new_user.email_label', 'label' => 'config.form_new_user.email_label',
)) ])
->add('save', SubmitType::class, array( ->add('save', SubmitType::class, [
'label' => 'config.form.save', 'label' => 'config.form.save',
)) ])
; ;
} }
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\UserBundle\Entity\User', 'data_class' => 'Wallabag\UserBundle\Entity\User',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -12,20 +12,20 @@ class RssType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('rss_limit', null, array( ->add('rss_limit', null, [
'label' => 'config.form_rss.rss_limit', 'label' => 'config.form_rss.rss_limit',
)) ])
->add('save', SubmitType::class, array( ->add('save', SubmitType::class, [
'label' => 'config.form.save', 'label' => 'config.form.save',
)) ])
; ;
} }
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\CoreBundle\Entity\Config', 'data_class' => 'Wallabag\CoreBundle\Entity\Config',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -14,19 +14,19 @@ class TaggingRuleType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('rule', TextType::class, array( ->add('rule', TextType::class, [
'required' => true, 'required' => true,
'label' => 'config.form_rules.rule_label', 'label' => 'config.form_rules.rule_label',
)) ])
->add('save', SubmitType::class, array( ->add('save', SubmitType::class, [
'label' => 'config.form.save', 'label' => 'config.form.save',
)) ])
; ;
$tagsField = $builder $tagsField = $builder
->create('tags', TextType::class, array( ->create('tags', TextType::class, [
'label' => 'config.form_rules.tags_label', 'label' => 'config.form_rules.tags_label',
)) ])
->addModelTransformer(new StringToListTransformer(',')); ->addModelTransformer(new StringToListTransformer(','));
$builder->add($tagsField); $builder->add($tagsField);
@ -34,9 +34,9 @@ class TaggingRuleType extends AbstractType
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\CoreBundle\Entity\TaggingRule', 'data_class' => 'Wallabag\CoreBundle\Entity\TaggingRule',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -15,19 +15,19 @@ class UserInformationType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {
$builder $builder
->add('name', TextType::class, array( ->add('name', TextType::class, [
'label' => 'config.form_user.name_label', 'label' => 'config.form_user.name_label',
)) ])
->add('email', EmailType::class, array( ->add('email', EmailType::class, [
'label' => 'config.form_user.email_label', 'label' => 'config.form_user.email_label',
)) ])
->add('twoFactorAuthentication', CheckboxType::class, array( ->add('twoFactorAuthentication', CheckboxType::class, [
'required' => false, 'required' => false,
'label' => 'config.form_user.twoFactorAuthentication_label', 'label' => 'config.form_user.twoFactorAuthentication_label',
)) ])
->add('save', SubmitType::class, array( ->add('save', SubmitType::class, [
'label' => 'config.form.save', 'label' => 'config.form.save',
)) ])
->remove('username') ->remove('username')
->remove('plainPassword') ->remove('plainPassword')
; ;
@ -40,9 +40,9 @@ class UserInformationType extends AbstractType
public function configureOptions(OptionsResolver $resolver) public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults(array( $resolver->setDefaults([
'data_class' => 'Wallabag\UserBundle\Entity\User', 'data_class' => 'Wallabag\UserBundle\Entity\User',
)); ]);
} }
public function getBlockPrefix() public function getBlockPrefix()

View File

@ -82,10 +82,10 @@ class ContentProxy
try { try {
$this->tagger->tag($entry); $this->tagger->tag($entry);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->logger->error('Error while trying to automatically tag an entry.', array( $this->logger->error('Error while trying to automatically tag an entry.', [
'entry_url' => $url, 'entry_url' => $url,
'error_msg' => $e->getMessage(), 'error_msg' => $e->getMessage(),
)); ]);
} }
return $entry; return $entry;

View File

@ -18,10 +18,10 @@ class EntriesExport
private $wallabagUrl; private $wallabagUrl;
private $logoPath; private $logoPath;
private $title = ''; private $title = '';
private $entries = array(); private $entries = [];
private $authors = array('wallabag'); private $authors = ['wallabag'];
private $language = ''; private $language = '';
private $tags = array(); private $tags = [];
private $footerTemplate = '<div style="text-align:center;"> private $footerTemplate = '<div style="text-align:center;">
<p>Produced by wallabag with %EXPORT_METHOD%</p> <p>Produced by wallabag with %EXPORT_METHOD%</p>
<p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p> <p>Please open <a href="https://github.com/wallabag/wallabag/issues">an issue</a> if you have trouble with the display of this E-Book on your device.</p>
@ -41,12 +41,14 @@ class EntriesExport
* Define entries. * Define entries.
* *
* @param array|Entry $entries An array of entries or one entry * @param array|Entry $entries An array of entries or one entry
*
* @return EntriesExport
*/ */
public function setEntries($entries) public function setEntries($entries)
{ {
if (!is_array($entries)) { if (!is_array($entries)) {
$this->language = $entries->getLanguage(); $this->language = $entries->getLanguage();
$entries = array($entries); $entries = [$entries];
} }
$this->entries = $entries; $this->entries = $entries;
@ -62,6 +64,8 @@ class EntriesExport
* Sets the category of which we want to get articles, or just one entry. * Sets the category of which we want to get articles, or just one entry.
* *
* @param string $method Method to get articles * @param string $method Method to get articles
*
* @return EntriesExport
*/ */
public function updateTitle($method) public function updateTitle($method)
{ {
@ -78,6 +82,8 @@ class EntriesExport
* Sets the output format. * Sets the output format.
* *
* @param string $format * @param string $format
*
* @return Response
*/ */
public function exportAs($format) public function exportAs($format)
{ {
@ -91,6 +97,8 @@ class EntriesExport
/** /**
* Use PHPePub to dump a .epub file. * Use PHPePub to dump a .epub file.
*
* @return Response
*/ */
private function produceEpub() private function produceEpub()
{ {
@ -162,17 +170,19 @@ class EntriesExport
return Response::create( return Response::create(
$book->getBook(), $book->getBook(),
200, 200,
array( [
'Content-Description' => 'File Transfer', 'Content-Description' => 'File Transfer',
'Content-type' => 'application/epub+zip', 'Content-type' => 'application/epub+zip',
'Content-Disposition' => 'attachment; filename="'.$this->title.'.epub"', 'Content-Disposition' => 'attachment; filename="'.$this->title.'.epub"',
'Content-Transfer-Encoding' => 'binary', 'Content-Transfer-Encoding' => 'binary',
) ]
); );
} }
/** /**
* Use PHPMobi to dump a .mobi file. * Use PHPMobi to dump a .mobi file.
*
* @return Response
*/ */
private function produceMobi() private function produceMobi()
{ {
@ -211,18 +221,20 @@ class EntriesExport
return Response::create( return Response::create(
$mobi->toString(), $mobi->toString(),
200, 200,
array( [
'Accept-Ranges' => 'bytes', 'Accept-Ranges' => 'bytes',
'Content-Description' => 'File Transfer', 'Content-Description' => 'File Transfer',
'Content-type' => 'application/x-mobipocket-ebook', 'Content-type' => 'application/x-mobipocket-ebook',
'Content-Disposition' => 'attachment; filename="'.$this->title.'.mobi"', 'Content-Disposition' => 'attachment; filename="'.$this->title.'.mobi"',
'Content-Transfer-Encoding' => 'binary', 'Content-Transfer-Encoding' => 'binary',
) ]
); );
} }
/** /**
* Use TCPDF to dump a .pdf file. * Use TCPDF to dump a .pdf file.
*
* @return Response
*/ */
private function producePdf() private function producePdf()
{ {
@ -266,17 +278,19 @@ class EntriesExport
return Response::create( return Response::create(
$pdf->Output('', 'S'), $pdf->Output('', 'S'),
200, 200,
array( [
'Content-Description' => 'File Transfer', 'Content-Description' => 'File Transfer',
'Content-type' => 'application/pdf', 'Content-type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="'.$this->title.'.pdf"', 'Content-Disposition' => 'attachment; filename="'.$this->title.'.pdf"',
'Content-Transfer-Encoding' => 'binary', 'Content-Transfer-Encoding' => 'binary',
) ]
); );
} }
/** /**
* Inspired from CsvFileDumper. * Inspired from CsvFileDumper.
*
* @return Response
*/ */
private function produceCsv() private function produceCsv()
{ {
@ -284,20 +298,20 @@ class EntriesExport
$enclosure = '"'; $enclosure = '"';
$handle = fopen('php://memory', 'rb+'); $handle = fopen('php://memory', 'rb+');
fputcsv($handle, array('Title', 'URL', 'Content', 'Tags', 'MIME Type', 'Language'), $delimiter, $enclosure); fputcsv($handle, ['Title', 'URL', 'Content', 'Tags', 'MIME Type', 'Language'], $delimiter, $enclosure);
foreach ($this->entries as $entry) { foreach ($this->entries as $entry) {
fputcsv( fputcsv(
$handle, $handle,
array( [
$entry->getTitle(), $entry->getTitle(),
$entry->getURL(), $entry->getURL(),
// remove new line to avoid crazy results // remove new line to avoid crazy results
str_replace(array("\r\n", "\r", "\n"), '', $entry->getContent()), str_replace(["\r\n", "\r", "\n"], '', $entry->getContent()),
implode(', ', $entry->getTags()->toArray()), implode(', ', $entry->getTags()->toArray()),
$entry->getMimetype(), $entry->getMimetype(),
$entry->getLanguage(), $entry->getLanguage(),
), ],
$delimiter, $delimiter,
$enclosure $enclosure
); );
@ -310,40 +324,55 @@ class EntriesExport
return Response::create( return Response::create(
$output, $output,
200, 200,
array( [
'Content-type' => 'application/csv', 'Content-type' => 'application/csv',
'Content-Disposition' => 'attachment; filename="'.$this->title.'.csv"', 'Content-Disposition' => 'attachment; filename="'.$this->title.'.csv"',
'Content-Transfer-Encoding' => 'UTF-8', 'Content-Transfer-Encoding' => 'UTF-8',
) ]
); );
} }
/**
* Dump a JSON file.
*
* @return Response
*/
private function produceJson() private function produceJson()
{ {
return Response::create( return Response::create(
$this->prepareSerializingContent('json'), $this->prepareSerializingContent('json'),
200, 200,
array( [
'Content-type' => 'application/json', 'Content-type' => 'application/json',
'Content-Disposition' => 'attachment; filename="'.$this->title.'.json"', 'Content-Disposition' => 'attachment; filename="'.$this->title.'.json"',
'Content-Transfer-Encoding' => 'UTF-8', 'Content-Transfer-Encoding' => 'UTF-8',
) ]
); );
} }
/**
* Dump a XML file.
*
* @return Response
*/
private function produceXml() private function produceXml()
{ {
return Response::create( return Response::create(
$this->prepareSerializingContent('xml'), $this->prepareSerializingContent('xml'),
200, 200,
array( [
'Content-type' => 'application/xml', 'Content-type' => 'application/xml',
'Content-Disposition' => 'attachment; filename="'.$this->title.'.xml"', 'Content-Disposition' => 'attachment; filename="'.$this->title.'.xml"',
'Content-Transfer-Encoding' => 'UTF-8', 'Content-Transfer-Encoding' => 'UTF-8',
) ]
); );
} }
/**
* Dump a TXT file.
*
* @return Response
*/
private function produceTxt() private function produceTxt()
{ {
$content = ''; $content = '';
@ -356,11 +385,11 @@ class EntriesExport
return Response::create( return Response::create(
$content, $content,
200, 200,
array( [
'Content-type' => 'text/plain', 'Content-type' => 'text/plain',
'Content-Disposition' => 'attachment; filename="'.$this->title.'.txt"', 'Content-Disposition' => 'attachment; filename="'.$this->title.'.txt"',
'Content-Transfer-Encoding' => 'UTF-8', 'Content-Transfer-Encoding' => 'UTF-8',
) ]
); );
} }
@ -378,7 +407,7 @@ class EntriesExport
return $serializer->serialize( return $serializer->serialize(
$this->entries, $this->entries,
$format, $format,
SerializationContext::create()->setGroups(array('entries_for_user')) SerializationContext::create()->setGroups(['entries_for_user'])
); );
} }

View File

@ -0,0 +1,37 @@
<?php
namespace Wallabag\CoreBundle\Helper;
use Symfony\Component\Routing\Router;
/**
* Manage redirections to avoid redirecting to empty routes.
*/
class Redirect
{
private $router;
public function __construct(Router $router)
{
$this->router = $router;
}
/**
* @param string $url URL to redirect
* @param string $fallback Fallback URL if $url is null
*
* @return string
*/
public function to($url, $fallback = '')
{
if (null !== $url) {
return $url;
}
if ('' === $fallback) {
return $this->router->generate('homepage');
}
return $fallback;
}
}

View File

@ -54,7 +54,7 @@ class RuleBasedTagger
public function tagAllForUser(User $user) public function tagAllForUser(User $user)
{ {
$rules = $this->getRulesForUser($user); $rules = $this->getRulesForUser($user);
$entries = array(); $entries = [];
foreach ($rules as $rule) { foreach ($rules as $rule) {
$qb = $this->entryRepository->getBuilderForAllByUser($user->getId()); $qb = $this->entryRepository->getBuilderForAllByUser($user->getId());

View File

@ -157,7 +157,7 @@ class EntryRepository extends EntityRepository
->getQuery() ->getQuery()
->getResult(); ->getResult();
$languages = array(); $languages = [];
foreach ($results as $result) { foreach ($results as $result) {
$languages[$result['language']] = $result['language']; $languages[$result['language']] = $result['language'];
} }
@ -233,7 +233,7 @@ class EntryRepository extends EntityRepository
* @param $url * @param $url
* @param $userId * @param $userId
* *
* @return array|bool * @return Entry|bool
*/ */
public function findByUrlAndUserId($url, $userId) public function findByUrlAndUserId($url, $userId)
{ {

View File

@ -3,14 +3,14 @@ services:
class: Wallabag\CoreBundle\Helper\DetectActiveTheme class: Wallabag\CoreBundle\Helper\DetectActiveTheme
arguments: arguments:
- "@security.token_storage" - "@security.token_storage"
- %wallabag_core.theme% - "%wallabag_core.theme%"
# custom form type # custom form type
wallabag_core.form.type.config: wallabag_core.form.type.config:
class: Wallabag\CoreBundle\Form\Type\ConfigType class: Wallabag\CoreBundle\Form\Type\ConfigType
arguments: arguments:
- %liip_theme.themes% - "%liip_theme.themes%"
- %wallabag_core.languages% - "%wallabag_core.languages%"
tags: tags:
- { name: form.type } - { name: form.type }
@ -32,14 +32,29 @@ services:
wallabag_core.table_prefix_subscriber: wallabag_core.table_prefix_subscriber:
class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber
arguments: arguments:
- %database_table_prefix% - "%database_table_prefix%"
tags: tags:
- { name: doctrine.event_subscriber } - { name: doctrine.event_subscriber }
wallabag_core.graby: wallabag_core.graby:
class: Graby\Graby class: Graby\Graby
arguments: arguments:
- { error_message: "wallabag can't retrieve contents for this article. Please report this issue to us." } -
error_message: "wallabag can't retrieve contents for this article. Please report this issue to us."
http_client:
user_agents:
'lifehacker.com': 'PHP/5.2'
'gawker.com': 'PHP/5.2'
'deadspin.com': 'PHP/5.2'
'kotaku.com': 'PHP/5.2'
'jezebel.com': 'PHP/5.2'
'io9.com': 'PHP/5.2'
'jalopnik.com': 'PHP/5.2'
'gizmodo.com': 'PHP/5.2'
'.wikipedia.org': 'Mozilla/5.2'
'.fok.nl': 'Googlebot/2.1'
'getpocket.com': 'PHP/5.2'
'iansommerville.com': 'PHP/5.2'
calls: calls:
- [ setLogger, [ "@logger" ] ] - [ setLogger, [ "@logger" ] ]
tags: tags:
@ -77,10 +92,10 @@ services:
class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener
arguments: arguments:
- "@doctrine.orm.entity_manager" - "@doctrine.orm.entity_manager"
- %wallabag_core.theme% - "%wallabag_core.theme%"
- %wallabag_core.items_on_page% - "%wallabag_core.items_on_page%"
- %wallabag_core.rss_limit% - "%wallabag_core.rss_limit%"
- %wallabag_core.language% - "%wallabag_core.language%"
tags: tags:
- { name: kernel.event_subscriber } - { name: kernel.event_subscriber }
@ -99,3 +114,8 @@ services:
class: Wallabag\CoreBundle\Operator\Doctrine\Matches class: Wallabag\CoreBundle\Operator\Doctrine\Matches
tags: tags:
- { name: rulerz.operator, executor: rulerz.executor.doctrine, operator: matches, inline: true } - { name: rulerz.operator, executor: rulerz.executor.doctrine, operator: matches, inline: true }
wallabag_core.helper.redirect:
class: Wallabag\CoreBundle\Helper\Redirect
arguments:
- "@router"

View File

@ -512,7 +512,7 @@ img.preview {
width: 50%; width: 50%;
} }
.pagination { div.pagination ul {
text-align: right; text-align: right;
margin-bottom:50px; margin-bottom:50px;
} }
@ -523,25 +523,25 @@ img.preview {
color: #999; color: #999;
} }
.pagination > * { div.pagination ul > * {
display: inline-block; display: inline-block;
margin-left: 0.5em; margin-left: 0.5em;
} }
.pagination a { div.pagination ul a {
color: #999; color: #999;
text-decoration: none; text-decoration: none;
} }
.pagination a:hover, .pagination a:focus { div.pagination ul a:hover, div.pagination ul a:focus {
text-decoration: underline; text-decoration: underline;
} }
.pagination .disabled { div.pagination ul .disabled {
display: none; display: none;
} }
.pagination .current { div.pagination ul .current {
height: 25px; height: 25px;
padding: 4px 8px; padding: 4px 8px;
border: 1px solid #d5d5d5; border: 1px solid #d5d5d5;

View File

@ -78,19 +78,6 @@ $.fn.ready(function() {
event.preventDefault(); event.preventDefault();
}); });
/* ==========================================================================
Keyboard gestion
========================================================================== */
$(window).keydown(function(e){
if ( ( e.target.tagName.toLowerCase() !== 'input' && e.keyCode == 83 ) || (e.keyCode == 27 && $bagitForm.is(':visible') ) ) {
$bagit.removeClass("current");
$("#bagit-arrow").removeClass("arrow-down");
toggleSaveLinkForm();
return false;
}
});
/* ========================================================================== /* ==========================================================================
Process all links inside an article Process all links inside an article
========================================================================== */ ========================================================================== */

View File

@ -80,6 +80,14 @@ main, #content, .valign-wrapper {
margin-bottom: 0; margin-bottom: 0;
} }
.pagination {
float: right;
}
.pagination ul {
margin: 0 !important;
}
.pagination li { .pagination li {
padding: 0; padding: 0;
} }
@ -90,6 +98,18 @@ main, #content, .valign-wrapper {
display: block; display: block;
} }
.pagination li.active span {
padding: 0px 10px;
height: 30px;
display: block;
color: #fff;
}
.pagination .disabled {
margin-right: 10px;
margin-left: 10px;
}
.page-footer .footer-copyright p { .page-footer .footer-copyright p {
display: inline; display: inline;
} }

View File

@ -137,7 +137,7 @@ entry:
page_titles: page_titles:
# unread: 'Unread entries' # unread: 'Unread entries'
# starred: 'Starred entries' # starred: 'Starred entries'
# archive: 'Archived entries' # archived: 'Archived entries'
# filtered: 'Filtered entries' # filtered: 'Filtered entries'
list: list:
# number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.'
@ -338,6 +338,7 @@ developer:
# documentation: 'Documentation' # documentation: 'Documentation'
# how_to_first_app: 'How to create my first application' # how_to_first_app: 'How to create my first application'
# full_documentation: 'View full API documentation' # full_documentation: 'View full API documentation'
# list_methods: 'List API methods'
# clients: # clients:
# title: 'Clients' # title: 'Clients'
# create_new: 'Create a new client' # create_new: 'Create a new client'

View File

@ -137,7 +137,7 @@ entry:
page_titles: page_titles:
unread: 'Ungelesene Einträge' unread: 'Ungelesene Einträge'
starred: 'Favorisierte Einträge' starred: 'Favorisierte Einträge'
archive: 'Archivierte Einträge' archived: 'Archivierte Einträge'
filtered: 'Gefilterte Einträge' filtered: 'Gefilterte Einträge'
list: list:
number_on_the_page: '{0} Es gibt keine Einträge.|{1} Es gibt einen Eintrag.|]1,Inf[ Es gibt %count% Einträge.' number_on_the_page: '{0} Es gibt keine Einträge.|{1} Es gibt einen Eintrag.|]1,Inf[ Es gibt %count% Einträge.'
@ -338,6 +338,7 @@ developer:
documentation: 'Dokumentation' documentation: 'Dokumentation'
how_to_first_app: 'Wie erstelle ich meine erste Anwendung' how_to_first_app: 'Wie erstelle ich meine erste Anwendung'
full_documentation: 'Komplette API-Dokumentation einsehen' full_documentation: 'Komplette API-Dokumentation einsehen'
# list_methods: 'List API methods'
clients: clients:
title: 'Clients' title: 'Clients'
create_new: 'Neuen Client erstellen' create_new: 'Neuen Client erstellen'

View File

@ -137,7 +137,7 @@ entry:
page_titles: page_titles:
unread: 'Unread entries' unread: 'Unread entries'
starred: 'Starred entries' starred: 'Starred entries'
archive: 'Archived entries' archived: 'Archived entries'
filtered: 'Filtered entries' filtered: 'Filtered entries'
list: list:
number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.'
@ -176,7 +176,7 @@ entry:
set_as_read: 'Mark as read' set_as_read: 'Mark as read'
set_as_unread: 'Mark as unread' set_as_unread: 'Mark as unread'
set_as_favorite: 'Favorite' set_as_favorite: 'Favorite'
view_original_article: 'Orignal article' view_original_article: 'Original article'
re_fetch_content: 'Re-fetch content' re_fetch_content: 'Re-fetch content'
delete: 'Delete' delete: 'Delete'
add_a_tag: 'Add a tag' add_a_tag: 'Add a tag'
@ -338,6 +338,7 @@ developer:
documentation: 'Documentation' documentation: 'Documentation'
how_to_first_app: 'How to create my first application' how_to_first_app: 'How to create my first application'
full_documentation: 'View full API documentation' full_documentation: 'View full API documentation'
list_methods: 'List API methods'
clients: clients:
title: 'Clients' title: 'Clients'
create_new: 'Create a new client' create_new: 'Create a new client'

View File

@ -19,9 +19,9 @@ menu:
unread: 'Sin leer' unread: 'Sin leer'
starred: 'Favoritos' starred: 'Favoritos'
archive: 'Archivo' archive: 'Archivo'
all_articles: 'Todos los artículos' all_articles: 'Todos artículos'
config: 'Configuración' config: 'Configuración'
tags: 'Tags' tags: 'Etiquetas'
internal_settings: 'Configuración interna' internal_settings: 'Configuración interna'
import: 'Importar' import: 'Importar'
howto: 'Ayuda' howto: 'Ayuda'
@ -62,18 +62,18 @@ config:
items_per_page_label: 'Número de artículos por página' items_per_page_label: 'Número de artículos por página'
language_label: 'Idioma' language_label: 'Idioma'
reading_speed: reading_speed:
# label: 'Reading speed' label: 'Velocidad de leer'
# help_message: 'You can use online tools to estimate your reading speed:' help_message: 'Se puede usar las técnicas para calcular su velocidad de leer:'
# 100_word: 'I read ~100 words per minute' 100_word: 'Leo ~100 palabras por minuto'
# 200_word: 'I read ~200 words per minute' 200_word: 'Leo ~200 palabras por minuto'
# 300_word: 'I read ~300 words per minute' 300_word: 'Leo ~300 palabras por minuto'
# 400_word: 'I read ~400 words per minute' 400_word: 'Leo ~400 palabras por minuto'
form_rss: form_rss:
description: 'Los feeds RSS de wallabag permiten leer los artículos guardados con su lector RSS favorito. Necesita generar un token primero' description: 'Los feeds RSS de wallabag permiten leer los artículos guardados con su lector RSS favorito. Necesita generar un token primero'
token_label: 'RSS token' token_label: 'RSS token'
# no_token: 'No token' # no_token: 'No token'
token_create: 'Crear token' token_create: 'Crear token'
token_reset: 'Resetear token' token_reset: 'Reiniciar token'
rss_links: 'URL de su feed RSS' rss_links: 'URL de su feed RSS'
rss_link: rss_link:
unread: 'sin leer' unread: 'sin leer'
@ -90,17 +90,17 @@ config:
new_password_label: 'Nueva contraseña' new_password_label: 'Nueva contraseña'
repeat_new_password_label: 'Confirmar la nueva contraseña' repeat_new_password_label: 'Confirmar la nueva contraseña'
form_rules: form_rules:
# if_label: 'if' if_label: 'si'
# then_tag_as_label: 'then tag as' then_tag_as_label: 'Etiquete como'
# delete_rule_label: 'delete' delete_rule_label: 'Borre'
rule_label: 'Regla' rule_label: 'Regla'
tags_label: 'Tags' tags_label: 'Etiquetas'
faq: faq:
title: 'FAQ' title: 'FAQ'
tagging_rules_definition_title: '¿Qué significa reglas de etiquetado autómaticas?' tagging_rules_definition_title: '¿Qué significa reglas de etiquetado autómaticas?'
tagging_rules_definition_description: 'Son las reglas usadas por Wallabag para etiquetar automáticamente los nuevos artículos.<br />Cáda vez que un nuevo artículo es añadido, todas las reglas de etiquetado automáticas serán usadas para etiquetarlo, ayudandote a clasificar automáticamente los artículos.' tagging_rules_definition_description: 'Son las reglas usadas por Wallabag para etiquetar automáticamente los nuevos artículos.<br />Cada vez que un nuevo artículo sea añadido, todas las reglas de etiquetado automáticas serán usadas para etiquetarlo, ayudándole a clasificar automáticamente los artículos.'
how_to_use_them_title: '¿Cómo se utilizan?' how_to_use_them_title: '¿Cómo se utilizan?'
# how_to_use_them_description: 'Let assume you want to tag new entries as « <i>short reading</i> » when the reading time is inferior to 3 minutes.<br />In that case, you should put « readingTime &lt;= 3 » in the <i>Rule</i> field and « <i>short reading</i> » in the <i>Tags</i> field.<br />Several tags can added simultaneously by separating them by a comma: « <i>short reading, must read</i> »<br />Complex rules can be written by using predefined operators: if « <i>readingTime &gt;= 5 AND domainName = "github.com"</i> » then tag as « <i>long reading, github </i> »' how_to_use_them_description: 'Supongamos que quiere etiquetar nuevos artículos como « <i>lectura corta</i> » cuando el tiempo de leer sea menos de 3 minutos. <br /> En ese caso, debe poner « tiempo de leer &lt;= 3 » en el <i>Regla</i> campo y « <i>lectura corta</i> » en el <i>Etiquetas</i> campo.<br />Algunas etiquetas se pueden ser añadidas al mismo tiempo por separarlas con una coma: « <i>lectura corta, debe leer</i> »<br />Reglas complejas se pueden ser escritas por usar operadores predefinidos: si « <i>tiempo de leer &gt;= 5 Y nombre del dominio = "github.com"</i> » entonces etiquete como « <i>lectura larga, github </i> »'
variables_available_title: '¿Qué variables y operadores se pueden utilizar para escribir las reglas?' variables_available_title: '¿Qué variables y operadores se pueden utilizar para escribir las reglas?'
variables_available_description: 'Las siguientes variables y operadores se pueden utilizar para crear las reglas de etiquetado automáticas:' variables_available_description: 'Las siguientes variables y operadores se pueden utilizar para crear las reglas de etiquetado automáticas:'
meaning: 'Significado' meaning: 'Significado'
@ -111,7 +111,7 @@ config:
isArchived: 'El artículo está guardado o no' isArchived: 'El artículo está guardado o no'
isStarred: 'Si el artículo es un favorito o no' isStarred: 'Si el artículo es un favorito o no'
content: "El contenido del artículo" content: "El contenido del artículo"
language: "El idoma del artículo" language: "El idioma del artículo"
mimetype: "Tipo MIME del artículo" mimetype: "Tipo MIME del artículo"
readingTime: "El tiempo estimado de lectura del artículo, en minutos" readingTime: "El tiempo estimado de lectura del artículo, en minutos"
domainName: 'El dominio del artículo' domainName: 'El dominio del artículo'
@ -123,9 +123,9 @@ config:
strictly_greater_than: 'Estrictámente mas que…' strictly_greater_than: 'Estrictámente mas que…'
equal_to: 'Egual a…' equal_to: 'Egual a…'
not_equal_to: 'Diferente de…' not_equal_to: 'Diferente de…'
or: 'Una regla O otra' or: 'Una regla U otra'
and: 'Una regla Y la otra' and: 'Una regla Y la otra'
matches: 'Prueba si un <i>sujeto</i> corresponde a una <i>busqueda</i> (insensible a mayusculas).<br />Ejemplo : <code>título coincide "football"</code>' matches: 'Pruebe si un <i>sujeto</i> corresponde a una <i>búsqueda</i> (insensible a mayusculas).<br />Ejemplo : <code>título coincide "football"</code>'
form_new_user: form_new_user:
username_label: 'Nombre de usuario' username_label: 'Nombre de usuario'
password_label: 'Contraseña' password_label: 'Contraseña'
@ -135,18 +135,18 @@ config:
entry: entry:
page_titles: page_titles:
# unread: 'Unread entries' unread: 'Artúclos no leídos'
# starred: 'Starred entries' starred: 'Artículos favoritos'
# archive: 'Archived entries' archived: 'Artículos archivados'
# filtered: 'Filtered entries' filtered: 'Artículos filtrados'
list: list:
number_on_the_page: '{0} No hay artículos.|{1} Hay un artículo.|]1,Inf[ Hay %count% artículos.' number_on_the_page: '{0} No hay artículos.|{1} Hay un artículo.|]1,Inf[ Hay %count% artículos.'
reading_time: 'tiempo estimado de lectura' reading_time: 'tiempo estimado de lectura'
reading_time_minutes: 'tiempo estimado de lectura: %readingTime% min' reading_time_minutes: 'tiempo estimado de lectura: %readingTime% min'
reading_time_less_one_minute: 'tiempo estimado de lectura: <small class="inferieur">&lt;</small> 1 min' reading_time_less_one_minute: 'tiempo estimado de lectura: <small class="inferieur">&lt;</small> 1 min'
original_article: 'original' original_article: 'original'
toogle_as_read: 'Marcar cómo leído/ no leído' toogle_as_read: 'Marcar como leído/ no leído'
toogle_as_star: 'Marcar cómo favorito/ no favorito' toogle_as_star: 'Marcar como favorito/ no favorito'
delete: 'Suprimir' delete: 'Suprimir'
export_title: 'Exportar' export_title: 'Exportar'
filters: filters:
@ -158,7 +158,7 @@ entry:
preview_picture_help: 'Foto de preview' preview_picture_help: 'Foto de preview'
language_label: 'Idioma' language_label: 'Idioma'
reading_time: reading_time:
label: 'Duración de lectura en minutos' label: 'Duración de lectura en minutos'
from: 'de' from: 'de'
to: 'a' to: 'a'
domain_label: 'Nombre de dominio' domain_label: 'Nombre de dominio'
@ -175,7 +175,7 @@ entry:
back_to_homepage: 'Volver' back_to_homepage: 'Volver'
set_as_read: 'Marcar como leído' set_as_read: 'Marcar como leído'
# set_as_unread: 'Mark as unread' # set_as_unread: 'Mark as unread'
set_as_favorite: 'Marcar cómo favorito' set_as_favorite: 'Marcar como favorito'
view_original_article: 'Artículo original' view_original_article: 'Artículo original'
re_fetch_content: 'Redescargar el contenido' re_fetch_content: 'Redescargar el contenido'
delete: 'Suprimir' delete: 'Suprimir'
@ -205,18 +205,18 @@ entry:
about: about:
page_title: 'Acerca de' page_title: 'Acerca de'
top_menu: top_menu:
who_behind_wallabag: 'Equipo de desarrollo de wallabag' who_behind_wallabag: 'Equipo del desarrollo de wallabag'
getting_help: 'Conseguir ayuda' getting_help: 'Pedir ayuda'
helping: 'Ayudar a wallabag' helping: 'Ayudar a wallabag'
contributors: 'Contribuidores' contributors: 'Colaboradores'
third_party: 'Librerías de terceeros' third_party: 'Librerías de terceros'
who_behind_wallabag: who_behind_wallabag:
developped_by: 'Desarrollado por' developped_by: 'Desarrollado por'
website: 'Sitio web' website: 'Sitio web'
many_contributors: 'Y muchos otros contribuidores ♥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">en Github</a>' many_contributors: 'Y muchos otros colaboradores ♥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">en Github</a>'
project_website: 'Web del proyecto' project_website: 'Sitio web del proyecto'
license: 'Licencia' license: 'Licencia'
version: 'Version' version: 'Versión'
getting_help: getting_help:
documentation: 'Documentación' documentation: 'Documentación'
bug_reports: 'Reporte de errores' bug_reports: 'Reporte de errores'
@ -227,7 +227,7 @@ about:
by_contributing_2: 'nuestras necesidades están en un ticket' by_contributing_2: 'nuestras necesidades están en un ticket'
by_paypal: 'via Paypal' by_paypal: 'via Paypal'
contributors: contributors:
description: 'Gradias a los contribuidores de la aplicación web de wallabag' description: 'Gradias a los colaboradores de la aplicación web de wallabag'
third_party: third_party:
description: 'Aquí está la lista de las dependencias utilizadas por wallabag (con sus licencias) :' description: 'Aquí está la lista de las dependencias utilizadas por wallabag (con sus licencias) :'
package: 'Paquete' package: 'Paquete'
@ -235,10 +235,10 @@ about:
howto: howto:
page_title: 'Ayuda' page_title: 'Ayuda'
# page_description: 'There are several ways to save an article:' page_description: 'Hay muchas maneras para guardar un artículo:'
top_menu: top_menu:
browser_addons: 'Extensiones de navigador' browser_addons: 'Extensiones de navigador'
mobile_apps: 'Applicaciones para smartphone' mobile_apps: 'Aplicaciones para smartphone'
bookmarklet: 'Bookmarklet' bookmarklet: 'Bookmarklet'
form: form:
description: 'Gracias a este formulario' description: 'Gracias a este formulario'
@ -249,8 +249,8 @@ howto:
android: android:
via_f_droid: 'via F-Droid' via_f_droid: 'via F-Droid'
via_google_play: 'via Google Play' via_google_play: 'via Google Play'
# ios: 'on the iTunes Store' ios: 'por la tienda de iTunes'
# windows: 'on the Microsoft Store' windows: 'por la tienda de Microsoft'
bookmarklet: bookmarklet:
description: 'Desplazar y soltar este link en la barra de marcadores :' description: 'Desplazar y soltar este link en la barra de marcadores :'
@ -301,9 +301,9 @@ quickstart:
gitter: 'En Gitter' gitter: 'En Gitter'
tag: tag:
page_title: 'Tags' page_title: 'Etiquetas'
list: list:
number_on_the_page: '{0} No hay ningun tag.|{1} Hay un tag.|]1,Inf[ Hay %count% tags.' number_on_the_page: '{0} No hay ningun etiqueta.|{1} Hay un etiqueta.|]1,Inf[ Hay %count% etiquetas.'
import: import:
page_title: 'Importar' page_title: 'Importar'
@ -338,6 +338,7 @@ developer:
# documentation: 'Documentation' # documentation: 'Documentation'
# how_to_first_app: 'How to create my first application' # how_to_first_app: 'How to create my first application'
# full_documentation: 'View full API documentation' # full_documentation: 'View full API documentation'
# list_methods: 'List API methods'
# clients: # clients:
# title: 'Clients' # title: 'Clients'
# create_new: 'Create a new client' # create_new: 'Create a new client'

View File

@ -1,18 +1,18 @@
security: security:
login: login:
# page_title: 'Welcome to wallabag!' page_title: 'به wallabag خوش آمدید!'
keep_logged_in: 'مرا به خاطر بسپار' keep_logged_in: 'مرا به خاطر بسپار'
forgot_password: ' رمزتان را گم کرده‌اید؟' forgot_password: ' رمزتان را گم کرده‌اید؟'
submit: 'ورود' submit: 'ورود'
# register: 'Register' register: 'نام‌نویسی'
username: 'نام کاربری' username: 'نام کاربری'
password: 'رمز' password: 'رمز'
# cancel: 'Cancel' cancel: 'لغو'
resetting: resetting:
description: "نشانی ایمیل خود را بنویسید تا راهنمای تغییر رمز را برایتان بفرستیم." description: "نشانی ایمیل خود را بنویسید تا راهنمای تغییر رمز را برایتان بفرستیم."
register: register:
# page_title: 'Create an account' page_title: 'حساب بسازید'
# go_to_account: 'Go to your account' go_to_account: 'حساب خود را ببینید'
menu: menu:
left: left:
@ -22,28 +22,28 @@ menu:
all_articles: 'همه' all_articles: 'همه'
config: 'پیکربندی' config: 'پیکربندی'
tags: 'برچسب‌ها' tags: 'برچسب‌ها'
# internal_settings: 'Internal Settings' internal_settings: 'تنظیمات درونی'
# import: 'Import' import: 'درون‌ریزی'
howto: 'خودآموز' howto: 'خودآموز'
# developer: 'Developer' developer: 'سازندگان'
logout: 'خروج' logout: 'خروج'
about: 'درباره' about: 'درباره'
search: 'جستجو' search: 'جستجو'
# save_link: 'Save a link' save_link: 'ذخیرهٔ یک پیوند'
back_to_unread: 'بازگشت به خوانده‌نشده‌ها' back_to_unread: 'بازگشت به خوانده‌نشده‌ها'
top: top:
add_new_entry: 'افزودن مقالهٔ تازه' add_new_entry: 'افزودن مقالهٔ تازه'
search: 'جستجو' search: 'جستجو'
filter_entries: 'فیلترکردن مقاله‌ها' filter_entries: 'فیلترکردن مقاله‌ها'
# export: 'Export' export: 'برون‌بری'
search_form: search_form:
input_label: 'جستجوی خود را این‌جا بنویسید:' input_label: 'جستجوی خود را این‌جا بنویسید:'
footer: footer:
wallabag: wallabag:
# elsewhere: 'Take wallabag with you' elsewhere: 'wallabag همراه شما'
# social: 'Social' social: 'شبکه‌های اجتماعی'
# powered_by: 'powered by' powered_by: 'توانمند با'
about: 'درباره' about: 'درباره'
config: config:
@ -53,7 +53,7 @@ config:
rss: 'آر-اس-اس' rss: 'آر-اس-اس'
user_info: 'اطلاعات کاربر' user_info: 'اطلاعات کاربر'
password: 'رمز' password: 'رمز'
# rules: 'Tagging rules' rules: 'برچسب‌گذاری خودکار'
new_user: 'افزودن کاربر' new_user: 'افزودن کاربر'
form: form:
save: 'ذخیره' save: 'ذخیره'
@ -62,12 +62,12 @@ config:
items_per_page_label: 'تعداد مقاله در هر صفحه' items_per_page_label: 'تعداد مقاله در هر صفحه'
language_label: 'زبان' language_label: 'زبان'
reading_speed: reading_speed:
# label: 'Reading speed' label: 'سرعت خواندن'
# help_message: 'You can use online tools to estimate your reading speed:' help_message: 'سرعت خواندن‌تان را با ابزارهای آنلاین تخمین بزنید:'
# 100_word: 'I read ~100 words per minute' 100_word: 'من تقریباً ۱۰۰ واژه را در دقیقه می‌خوانم'
# 200_word: 'I read ~200 words per minute' 200_word: 'من تقریباً ۲۰۰ واژه را در دقیقه می‌خوانم'
# 300_word: 'I read ~300 words per minute' 300_word: 'من تقریباً ۳۰۰ واژه را در دقیقه می‌خوانم'
# 400_word: 'I read ~400 words per minute' 400_word: 'من تقریباً ۴۰۰ واژه را در دقیقه می‌خوانم'
form_rss: form_rss:
description: 'با خوراک آر-اس-اس که wallabag در اختیارتان می‌گذارد، می‌توانید مقاله‌های ذخیره‌شده را در نرم‌افزار آر-اس-اس دلخواه خود بخوانید. برای این کار نخست باید یک کد بسازید.' description: 'با خوراک آر-اس-اس که wallabag در اختیارتان می‌گذارد، می‌توانید مقاله‌های ذخیره‌شده را در نرم‌افزار آر-اس-اس دلخواه خود بخوانید. برای این کار نخست باید یک کد بسازید.'
token_label: 'کد آر-اس-اس' token_label: 'کد آر-اس-اس'
@ -81,23 +81,23 @@ config:
archive: 'بایگانی' archive: 'بایگانی'
rss_limit: 'محدودیت آر-اس-اس' rss_limit: 'محدودیت آر-اس-اس'
form_user: form_user:
# two_factor_description: "Enabling two factor authentication means you'll receive an email with a code on every new untrusted connexion" two_factor_description: "با فعال‌کردن تأیید ۲مرحله‌ای هر بار که اتصال تأییدنشده‌ای برقرار شد، به شما یک کد از راه ایمیل فرستاده می‌شود"
name_label: 'نام' name_label: 'نام'
email_label: 'نشانی ایمیل' email_label: 'نشانی ایمیل'
# twoFactorAuthentication_label: 'Two factor authentication' twoFactorAuthentication_label: 'تأیید ۲مرحله‌ای'
form_password: form_password:
old_password_label: 'رمز قدیمی' old_password_label: 'رمز قدیمی'
new_password_label: 'رمز تازه' new_password_label: 'رمز تازه'
repeat_new_password_label: 'رمز تازه را دوباره بنویسید' repeat_new_password_label: 'رمز تازه را دوباره بنویسید'
form_rules: form_rules:
# if_label: 'if' if_label: 'اگر'
# then_tag_as_label: 'then tag as' then_tag_as_label: 'این برچسب را بزن'
# delete_rule_label: 'delete' delete_rule_label: 'پاک کن'
# rule_label: 'Rule' rule_label: 'قانون'
# tags_label: 'Tags' tags_label: 'برچسب‌ها'
# faq: faq:
# title: 'FAQ' title: 'پرسش‌های متداول'
# tagging_rules_definition_title: 'What does « tagging rules » mean?' tagging_rules_definition_title: 'برچسب‌گذاری خودکار یعنی چه؟'
# tagging_rules_definition_description: 'They are rules used by Wallabag to automatically tag new entries.<br />Each time a new entry is added, all the tagging rules will be used to add the tags you configured, thus saving you the trouble to manually classify your entries.' # tagging_rules_definition_description: 'They are rules used by Wallabag to automatically tag new entries.<br />Each time a new entry is added, all the tagging rules will be used to add the tags you configured, thus saving you the trouble to manually classify your entries.'
# how_to_use_them_title: 'How do I use them?' # how_to_use_them_title: 'How do I use them?'
# how_to_use_them_description: 'Let assume you want to tag new entries as « <i>short reading</i> » when the reading time is inferior to 3 minutes.<br />In that case, you should put « readingTime &lt;= 3 » in the <i>Rule</i> field and « <i>short reading</i> » in the <i>Tags</i> field.<br />Several tags can added simultaneously by separating them by a comma: « <i>short reading, must read</i> »<br />Complex rules can be written by using predefined operators: if « <i>readingTime &gt;= 5 AND domainName = "github.com"</i> » then tag as « <i>long reading, github </i> »' # how_to_use_them_description: 'Let assume you want to tag new entries as « <i>short reading</i> » when the reading time is inferior to 3 minutes.<br />In that case, you should put « readingTime &lt;= 3 » in the <i>Rule</i> field and « <i>short reading</i> » in the <i>Tags</i> field.<br />Several tags can added simultaneously by separating them by a comma: « <i>short reading, must read</i> »<br />Complex rules can be written by using predefined operators: if « <i>readingTime &gt;= 5 AND domainName = "github.com"</i> » then tag as « <i>long reading, github </i> »'
@ -135,12 +135,12 @@ config:
entry: entry:
page_titles: page_titles:
# unread: 'Unread entries' unread: 'مقاله‌های خوانده‌نشده'
# starred: 'Starred entries' starred: 'مقاله‌های برگزیده'
# archive: 'Archived entries' archived: 'مقاله‌های بایگانی‌شده'
# filtered: 'Filtered entries' filtered: 'مقاله‌های فیلترشده'
list: list:
# number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' number_on_the_page: '{0} هیج مقاله‌ای نیست.|{1} یک مقاله هست.|]1,Inf[ %count% مقاله هست.'
reading_time: 'زمان تخمینی برای خواندن' reading_time: 'زمان تخمینی برای خواندن'
reading_time_minutes: 'زمان تخمینی برای خواندن: %readingTime% min' reading_time_minutes: 'زمان تخمینی برای خواندن: %readingTime% min'
reading_time_less_one_minute: 'زمان تخمینی برای خواندن: <small class="inferieur">&lt;</small> 1 min' reading_time_less_one_minute: 'زمان تخمینی برای خواندن: <small class="inferieur">&lt;</small> 1 min'
@ -148,7 +148,7 @@ entry:
toogle_as_read: 'خوانده‌شده/خوانده‌نشده' toogle_as_read: 'خوانده‌شده/خوانده‌نشده'
toogle_as_star: 'برگزیده/نابرگزیده' toogle_as_star: 'برگزیده/نابرگزیده'
delete: 'پاک کردن' delete: 'پاک کردن'
# export_title: 'Export' export_title: 'برون‌بری'
filters: filters:
title: 'فیلتر' title: 'فیلتر'
status_label: 'وضعیت' status_label: 'وضعیت'
@ -171,35 +171,35 @@ entry:
filter: 'فیلتر' filter: 'فیلتر'
view: view:
left_menu: left_menu:
# back_to_top: 'Back to top' back_to_top: 'بازگشت به بالای صفحه'
back_to_homepage: 'بازگشت' back_to_homepage: 'بازگشت'
set_as_read: 'خوانده‌شده' set_as_read: 'خوانده‌شده'
# set_as_unread: 'Mark as unread' set_as_unread: 'به عنوان خوانده‌نشده علامت بزن'
set_as_favorite: 'برگزیده' set_as_favorite: 'برگزیده'
view_original_article: 'مقالهٔ اصلی' view_original_article: 'مقالهٔ اصلی'
# re_fetch_content: 'Re-fetch content' re_fetch_content: 'مقاله‌ها را دوباره دریافت کن'
delete: 'پاک کردن' delete: 'پاک کردن'
add_a_tag: 'افزودن برچسب' add_a_tag: 'افزودن برچسب'
share_content: 'هم‌رسانی' share_content: 'هم‌رسانی'
share_email_label: 'نشانی ایمیل' share_email_label: 'نشانی ایمیل'
download: 'بارگیری' download: 'بارگیری'
# print: 'Print' print: 'چاپ'
problem: problem:
label: 'مشکلات؟' label: 'مشکلات؟'
description: 'آیا مقاله نادرست نشان داده شده؟' description: 'آیا مقاله نادرست نشان داده شده؟'
edit_title: 'ویرایش عنوان' edit_title: 'ویرایش عنوان'
original_article: 'original' original_article: 'اصلی'
# annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations' annotations_on_the_entry: '{0} بدون حاشیه|{1} یک حاشیه|]1,Inf[ %nbحاشیه% annotations'
new: new:
page_title: 'ذخیرهٔ مقالهٔ تازه' page_title: 'ذخیرهٔ مقالهٔ تازه'
placeholder: 'http://website.com' placeholder: 'http://website.com'
form_new: form_new:
# url_label: Url url_label: نشانی
edit: edit:
# page_title: 'Edit an entry' page_title: 'ویرایش مقاله'
# title_label: 'Title' title_label: 'عنوان'
# url_label: 'Url' url_label: 'نشانی'
# is_public_label: 'Public' is_public_label: 'عمومی'
save_label: 'ذخیره' save_label: 'ذخیره'
about: about:
@ -208,8 +208,8 @@ about:
who_behind_wallabag: 'سازندگان wallabag' who_behind_wallabag: 'سازندگان wallabag'
getting_help: 'گرفتن کمک' getting_help: 'گرفتن کمک'
helping: 'کمک‌کردن به wallabag' helping: 'کمک‌کردن به wallabag'
# contributors: 'Contributors' contributors: 'مشارکت‌کنندگان'
# third_party: 'Third-party libraries' third_party: 'کتابخانه‌های نرم‌افزاری'
who_behind_wallabag: who_behind_wallabag:
developped_by: 'ساختهٔ' developped_by: 'ساختهٔ'
website: 'وب‌گاه' website: 'وب‌گاه'
@ -227,15 +227,15 @@ about:
by_contributing_2: 'فهرست نیازمندی‌های ما در این صفحه است:' by_contributing_2: 'فهرست نیازمندی‌های ما در این صفحه است:'
by_paypal: 'از راه Paypal' by_paypal: 'از راه Paypal'
contributors: contributors:
# description: 'Thank you to contributors on wallabag web application' description: 'از مشارکت شما در برنامهٔ وب wallabag ممنونیم.'
third_party: third_party:
# description: 'Here are the list of third-party libraries used in wallabag (with their licenses):' description: 'فهرست کتابخانه‌های نرم‌افزاری که در wallabag به کار رفته‌اند (به همراه پروانهٔ آن‌ها) :'
# package: 'Package' package: 'بسته'
license: 'پروانه' license: 'پروانه'
howto: howto:
page_title: 'خودآموز' page_title: 'خودآموز'
# page_description: 'There are several ways to save an article:' page_description: 'راه‌های زیادی برای ذخیرهٔ مقاله‌ها هست:'
top_menu: top_menu:
browser_addons: 'افزونه برای مرورگرها' browser_addons: 'افزونه برای مرورگرها'
mobile_apps: 'برنامه‌های موبایل' mobile_apps: 'برنامه‌های موبایل'
@ -255,82 +255,82 @@ howto:
description: 'این پیوند را به نوار بوک‌مارک مرورگرتان بکشید:' description: 'این پیوند را به نوار بوک‌مارک مرورگرتان بکشید:'
quickstart: quickstart:
# page_title: 'Quickstart' page_title: 'Quickstart'
# intro: intro:
# title: 'Welcome to wallabag!' title: 'به wallabag خوش آمدید!!'
# paragraph_1: "We'll accompany you to visit wallabag and show you some features which can interest you." paragraph_1: "به شما کمک خواهیم کرد تا wallabag را بشناسید و با برخی از ویژگی‌های جالبش آشنا شوید"
# paragraph_2: 'Follow us!' paragraph_2: 'ادامه دهید!'
# configure: configure:
# title: 'Configure the application' title: 'برنامه را تنظیم کنید'
# language: 'Change language and design' language: 'زبان و نمای برنامه را تغییر دهید'
# rss: 'Enable RSS feeds' rss: 'خوراک آر-اس-اس را فعال کنید'
# tagging_rules: 'Write rules to automatically tag your articles' tagging_rules: 'قانون‌های برچسب‌گذاری خودکار مقاله‌هایتان را تعریف کنید'
# admin: admin:
# title: 'Administration' title: 'مدیریت'
# description: 'As an administrator, you have privileges on wallabag. You can:' description: 'به عنوان مدیر، شما دسترسی‌های بیشتری به wallabag دارید. شما می‌توانید:'
# new_user: 'Create a new user' new_user: 'کاربر تازه‌ای بسازید'
# analytics: 'Configure analytics' analytics: 'تحلیل‌های آماری را تنظیم کنید'
# sharing: 'Enable some parameters about article sharing' sharing: 'گزینه‌های مربوط به هم‌رسانی مقاله‌ها را فعال کنید'
# export: 'Configure export' export: 'برون‌سپاری را تنظیم کنید'
# import: 'Configure import' import: 'درون‌ریزی را تنظیم کنید'
# first_steps: first_steps:
# title: 'First steps' title: 'گام نخست'
# new_article: 'Save your first article' new_article: 'نخستین مقالهٔ خود را ذخیره کنید'
# unread_articles: 'And classify it!' unread_articles: 'و آن را طبقه‌بندی کنید!'
# migrate: migrate:
# title: 'Migrate from an existing service' title: 'از سرویس قبلی خود به این‌جا مهاجرت کنید'
# description: "Are you using another service? We'll help you to retrieve your data on wallabag." description: "آیا سرویس دیگری را به‌کار می‌برید؟ داده‌هایتان را به wallabag بیاورید.."
# pocket: 'Migrate from Pocket' pocket: 'مهاجرت از Pocket'
# wallabag_v1: 'Migrate from wallabag v1' wallabag_v1: 'مهاجرت از نسخهٔ یکم wallabag'
# wallabag_v2: 'Migrate from wallabag v2' wallabag_v2: 'مهاجرت از نسخهٔ دوم wallabag'
# developer: developer:
# title: 'Developers' title: 'برنامه‌نویسان'
# create_application: 'Create your third application' create_application: 'برنامهٔ wallabag خود را بسازید'
# docs: docs:
# title: 'Full documentation' title: 'راهنمای کامل'
# annotate: 'Annotate your article' annotate: 'روی مقاله‌هایتان یادداشت بگذارید'
# export: 'Convert your articles into ePUB or PDF' export: 'مقاله‌هایتان را به قالب ePUB یا PDF دربیاورید'
# search_filters: 'See how you can look for an article by using search engine and filters' search_filters: 'به کمک موتور جستجو و فیلترها به دنبال مقاله‌هایتان بگردید'
# fetching_errors: 'What can I do if an article encounters errors during fetching?' fetching_errors: 'اگر مقاله‌ای هنگام ذخیره‌ شدن به مشکل برخورد چه کار کنید؟'
# all_docs: 'And so many other articles!' all_docs: 'و بسیاری از موضوعات دیگر'
# support: support:
# title: 'Support' title: 'پشتیبانی'
# description: 'If you need some help, we are here for you.' description: 'به کمک نیاز دارید؟ ما پشتیبان شما هستیم!'
# github: 'On GitHub' github: 'روی گیت‌هاب'
# email: 'By email' email: 'با ایمیل'
# gitter: 'On Gitter' gitter: 'روی گیتر'
tag: tag:
page_title: 'برچسب‌ها' page_title: 'برچسب‌ها'
list: list:
# number_on_the_page: '{0} There is no tag.|{1} There is one tag.|]1,Inf[ There are %count% tags.' number_on_the_page: '{0} هیچ برچسبی نیست.|{1} یک برچسب هست.|]1,Inf[ %count% برچسب هست.'
import: import:
# page_title: 'Import' page_title: 'درون‌ریزی'
# page_description: 'Welcome to wallabag importer. Please select your previous service that you want to migrate.' page_description: 'به درون‌ریز wallabag خوش آمدید. لطفاً سرویس قبلی خود را که می‌خواهید از آن مهاجرت کنید انتخاب کنید.'
# action: action:
# import_contents: 'Import contents' import_contents: 'درون‌ریزی مقاله‌ها'
# form: form:
# mark_as_read_title: 'Mark all as read?' mark_as_read_title: 'علامت‌زدن همه به عنوان خوانده‌شده؟'
# mark_as_read_label: 'Mark all imported entries as read' mark_as_read_label: 'همهٔ مقاله‌های درون‌ریزی شده را به عنوان خوانده‌شده علامت بزن'
# file_label: 'File' file_label: 'پرونده'
# save_label: 'Upload file' save_label: 'بارگذاری پرونده'
# pocket: pocket:
# page_title: 'Import > Pocket' page_title: 'درون‌ریزی > Pocket'
# description: "This importer will import all your Pocket data. Pocket doesn't allow us to retrieve content from their service, so the readable content of each article will be re-fetched by wallabag." description: "این برنامه همهٔ داده‌های Pocket شما را درون‌ریزی می‌کند. سرویس Pocket اجازه نمی‌دهد که متن مقاله‌ها را درون‌ریزی کنیم، بنابراین wallabag متن مقاله‌ها را دوباره از اینترنت دریافت می‌کند."
# config_missing: config_missing:
# description: "Pocket import isn't configured." description: "درون‌ریزی از Pocket تنظیم نشده است."
# admin_message: 'You need to define %keyurls%a pocket_consumer_key%keyurle%.' admin_message: 'شما باید %keyurls%یک pocket_consumer_key%keyurle% تعریف کنید.'
# user_message: 'Your server admin needs to define an API Key for Pocket.' user_message: 'مدیر سرور شما باید یک API Key برای Pocket تعریف کند.'
# authorize_message: 'You can import your data from your Pocket account. You just have to click on the below button and authorize the application to connect to getpocket.com.' authorize_message: 'شما می‌توانید داده‌هایتان را از حساب Pocket خود درون‌ریزی کنید. روی دکمهٔ زیر کلیک کنید و به برنامه اجازه دهید تا به getpocket.com وصل شود.'
# connect_to_pocket: 'Connect to Pocket and import data' connect_to_pocket: 'به Pocket وصل شو و داده‌ها را دریافت کن'
# wallabag_v1: wallabag_v1:
# page_title: 'Import > Wallabag v1' page_title: 'درون‌ریزی > Wallabag v1'
# description: 'This importer will import all your wallabag v1 articles. On your config page, click on "JSON export" in the "Export your wallabag data" section. You will have a "wallabag-export-1-xxxx-xx-xx.json" file.' description: 'این برنامه همهٔ داده‌های شما را در نسخهٔ ۱ wallabag درون‌ریزی می‌کند. در صفحهٔ تنظیمات، روی "JSON export" در بخش "Export your wallabag data" کلیک کنید. با این کار شما پرونده‌ای به شکل "wallabag-export-1-xxxx-xx-xx.json" دریافت خواهید کرد.'
# how_to: 'Please select your wallabag export and click on the below button to upload and import it.' how_to: 'لطفاً پرونده را انتخاب کنید و روی دکمهٔ زیر کلیک کنید تا بارگذاری و درون‌ریزی شود.'
# wallabag_v2: wallabag_v2:
# page_title: 'Import > Wallabag v2' page_title: 'درون‌ریزی > Wallabag v2'
# description: 'This importer will import all your wallabag v2 articles. Go to All articles, then, on the export sidebar, click on "JSON". You will have a "All articles.json" file.' description: 'این برنامه همهٔ داده‌های شما را در نسخهٔ ۲ wallabag درون‌ریزی می‌کند. به بخش «همهٔ مقاله‌ها» بروید و در بخش «برون‌ریزی» روی "JSON" کلیک کنید. با این کار شما پرونده‌ای به شکل "All articles.json" دریافت خواهید کرد.'
developer: developer:
# page_title: 'Developer' # page_title: 'Developer'
@ -338,6 +338,7 @@ developer:
# documentation: 'Documentation' # documentation: 'Documentation'
# how_to_first_app: 'How to create my first application' # how_to_first_app: 'How to create my first application'
# full_documentation: 'View full API documentation' # full_documentation: 'View full API documentation'
# list_methods: 'List API methods'
# clients: # clients:
# title: 'Clients' # title: 'Clients'
# create_new: 'Create a new client' # create_new: 'Create a new client'
@ -382,42 +383,42 @@ developer:
validator: validator:
password_must_match: 'رمزها باید یکی باشند' password_must_match: 'رمزها باید یکی باشند'
password_too_short: 'رمز شما باید ۸ حرف یا بیشتر باشد' password_too_short: 'رمز شما باید ۸ حرف یا بیشتر باشد'
# password_wrong_value: 'Wrong value for your current password' password_wrong_value: 'رمز فعلی را اشتباه وارد کرده‌اید'
# item_per_page_too_high: 'This will certainly kill the app' item_per_page_too_high: 'با این تعداد برنامه به فنا می‌رود'
# rss_limit_too_hight: 'This will certainly kill the app' rss_limit_too_hight: 'با این تعداد برنامه به فنا می‌رود'
flashes: flashes:
config: config:
notice: notice:
config_saved: 'پیکربندی ذخیره شد. برخی از تنظیمات پس از این که قطع شدید اعمال می‌شود.' config_saved: 'پیکربندی ذخیره شد. برخی از تنظیمات پس از این که قطع شدید اعمال می‌شود.'
password_updated: 'رمز به‌روز شد' password_updated: 'رمز به‌روز شد'
# password_not_updated_demo: "In demonstration mode, you can't change password for this user." password_not_updated_demo: "در حالت نمایشی نمی‌توانید رمز کاربر را عوض کنید."
user_updated: 'اطلاعات به‌روز شد' user_updated: 'اطلاعات به‌روز شد'
rss_updated: 'اطلاعات آر-اس-اس به‌روز شد' rss_updated: 'اطلاعات آر-اس-اس به‌روز شد'
# tagging_rules_updated: 'Tagging rules updated' tagging_rules_updated: 'برچسب‌گذاری خودکار به‌روز شد'
# tagging_rules_deleted: 'Tagging rule deleted' tagging_rules_deleted: 'قانون برچسب‌گذاری پاک شد'
# user_added: 'User "%username%" added' user_added: 'کابر "%username%" افزوده شد'
# rss_token_updated: 'RSS token updated' rss_token_updated: 'کد آر-اس-اس به‌روز شد'
entry: entry:
notice: notice:
# entry_already_saved: 'Entry already saved on %date%' entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود'
# entry_saved: 'Entry saved' entry_saved: 'مقاله ذخیره شد'
# entry_updated: 'Entry updated' entry_updated: 'مقاله به‌روز شد'
# entry_reloaded: 'Entry reloaded' entry_reloaded: 'مقاله به‌روز شد'
# entry_reload_failed: 'Failed to reload entry' entry_reload_failed: 'به‌روزرسانی مقاله شکست خورد'
entry_archived: 'مقاله بایگانی شد' entry_archived: 'مقاله بایگانی شد'
entry_unarchived: 'مقاله از بایگانی درآمد' entry_unarchived: 'مقاله از بایگانی درآمد'
entry_starred: 'مقاله برگزیده شد' entry_starred: 'مقاله برگزیده شد'
entry_unstarred: 'مقاله نابرگزیده شد' entry_unstarred: 'مقاله نابرگزیده شد'
entry_deleted: 'مقاله پاک شد' entry_deleted: 'مقاله پاک شد'
tag: tag:
notice: notice:
# tag_added: 'Tag added' tag_added: 'برچسب افزوده شد'
import: import:
notice: notice:
# failed: 'Import failed, please try again.' failed: 'درون‌ریزی شکست خورد. لطفاً دوباره تلاش کنید.'
# failed_on_file: 'Error while processing import. Please verify your import file.' failed_on_file: 'خطا هنگام پردازش پروندهٔ ورودی. آیا پروندهٔ درون‌ریزی شده سالم است؟'
# summary: 'Import summary: %imported% imported, %skipped% already saved.' summary: 'گزارش درون‌ریزی: %imported% وارد شد, %skipped% از قبل ذخیره شده بود.'
developer: developer:
notice: notice:
# client_created: 'New client created.' # client_created: 'New client created.'

View File

@ -137,7 +137,7 @@ entry:
page_titles: page_titles:
unread: 'Articles non lus' unread: 'Articles non lus'
starred: 'Articles favoris' starred: 'Articles favoris'
archive: 'Articles lus' archived: 'Articles lus'
filtered: 'Articles filtrés' filtered: 'Articles filtrés'
list: list:
number_on_the_page: "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." number_on_the_page: "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles."
@ -338,6 +338,7 @@ developer:
documentation: 'Documentation' documentation: 'Documentation'
how_to_first_app: 'Comment créer votre première application' how_to_first_app: 'Comment créer votre première application'
full_documentation: "Voir la documentation complète de l'API" full_documentation: "Voir la documentation complète de l'API"
list_methods: "Lister toutes les méthodes de l'API"
clients: clients:
title: 'Clients' title: 'Clients'
create_new: 'Créer une nouveau client' create_new: 'Créer une nouveau client'

View File

@ -137,7 +137,7 @@ entry:
page_titles: page_titles:
unread: 'Articles pas legits' unread: 'Articles pas legits'
starred: 'Articles favorits' starred: 'Articles favorits'
archive: 'Articles legits' archived: 'Articles legits'
filtered: 'Articles filtrats' filtered: 'Articles filtrats'
list: list:
number_on_the_page: "{0} I a pas cap d'article.|{1} I a un article.|]1,Inf[ I a %count% articles." number_on_the_page: "{0} I a pas cap d'article.|{1} I a un article.|]1,Inf[ I a %count% articles."
@ -338,6 +338,7 @@ developer:
documentation: 'Documentacion' documentation: 'Documentacion'
how_to_first_app: 'Cossí crear vòstra primièra aplicacion' how_to_first_app: 'Cossí crear vòstra primièra aplicacion'
full_documentation: "Veire la documentacion completa de l'API" full_documentation: "Veire la documentacion completa de l'API"
# list_methods: 'List API methods'
clients: clients:
title: 'Clients' title: 'Clients'
create_new: 'Crear un novèl client' create_new: 'Crear un novèl client'

View File

@ -137,7 +137,7 @@ entry:
page_titles: page_titles:
unread: 'Nieprzeczytane wpisy' unread: 'Nieprzeczytane wpisy'
starred: 'Wpisy oznaczone gwiazdką' starred: 'Wpisy oznaczone gwiazdką'
archive: 'Zarchiwizowane wpisy' archived: 'Zarchiwizowane wpisy'
filtered: 'Odfiltrowane wpisy' filtered: 'Odfiltrowane wpisy'
list: list:
number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.' number_on_the_page: '{0} Nie ma wpisów.|{1} Jest jeden wpis.|]1,Inf[ Są %count% wpisy.'
@ -338,6 +338,7 @@ developer:
documentation: 'Dokumentacja' documentation: 'Dokumentacja'
how_to_first_app: 'Jak stworzyć moją pierwszą aplikację' how_to_first_app: 'Jak stworzyć moją pierwszą aplikację'
full_documentation: 'Pokaż pełne API' full_documentation: 'Pokaż pełne API'
# list_methods: 'List API methods'
clients: clients:
title: 'Klienci' title: 'Klienci'
create_new: 'Utwórz nowego klienta' create_new: 'Utwórz nowego klienta'

View File

@ -137,7 +137,7 @@ entry:
page_titles: page_titles:
# unread: 'Unread entries' # unread: 'Unread entries'
# starred: 'Starred entries' # starred: 'Starred entries'
# archive: 'Archived entries' # archived: 'Archived entries'
# filtered: 'Filtered entries' # filtered: 'Filtered entries'
list: list:
# number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.' # number_on_the_page: '{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.'
@ -338,6 +338,7 @@ developer:
# documentation: 'Documentation' # documentation: 'Documentation'
# how_to_first_app: 'How to create my first application' # how_to_first_app: 'How to create my first application'
# full_documentation: 'View full API documentation' # full_documentation: 'View full API documentation'
# list_methods: 'List API methods'
# clients: # clients:
# title: 'Clients' # title: 'Clients'
# create_new: 'Create a new client' # create_new: 'Create a new client'

View File

@ -137,7 +137,7 @@ entry:
page_titles: page_titles:
# unread: 'Unread entries' # unread: 'Unread entries'
# starred: 'Starred entries' # starred: 'Starred entries'
# archive: 'Archived entries' # archived: 'Archived entries'
# filtered: 'Filtered entries' # filtered: 'Filtered entries'
list: list:
number_on_the_page: '{0} Herhangi bir makale yok.|{1} Burada bir adet makale var.|]1,Inf[ Burada %count% adet makale var.' number_on_the_page: '{0} Herhangi bir makale yok.|{1} Burada bir adet makale var.|]1,Inf[ Burada %count% adet makale var.'
@ -338,6 +338,7 @@ developer:
# documentation: 'Documentation' # documentation: 'Documentation'
# how_to_first_app: 'How to create my first application' # how_to_first_app: 'How to create my first application'
# full_documentation: 'View full API documentation' # full_documentation: 'View full API documentation'
# list_methods: 'List API methods'
# clients: # clients:
# title: 'Clients' # title: 'Clients'
# create_new: 'Create a new client' # create_new: 'Create a new client'

View File

@ -49,7 +49,7 @@
<h2>{{ 'config.tab_menu.rss'|trans }}</h2> <h2>{{ 'config.tab_menu.rss'|trans }}</h2>
{{ form_start(form.rss) }} {{ form_start(form.rss) }}
{{ form_errors(form.rss) }} {{ form_errors(form.rss) }}
<div class="row"> <div class="row">
@ -169,7 +169,7 @@
{{ form_rest(form.pwd) }} {{ form_rest(form.pwd) }}
</form> </form>
<h2>{{ 'config.tab_menu.rules'|trans }}}</h2> <h2>{{ 'config.tab_menu.rules'|trans }}</h2>
<ul> <ul>
{% for tagging_rule in app.user.config.taggingRules %} {% for tagging_rule in app.user.config.taggingRules %}
@ -183,7 +183,7 @@
{% endfor %} {% endfor %}
</ul> </ul>
{{ form_start(form.new_tagging_rule) }} {{ form_start(form.new_tagging_rule) }}
{{ form_errors(form.new_tagging_rule) }} {{ form_errors(form.new_tagging_rule) }}
<fieldset class="w500p inline"> <fieldset class="w500p inline">
@ -205,6 +205,91 @@
{{ form_rest(form.new_tagging_rule) }} {{ form_rest(form.new_tagging_rule) }}
</form> </form>
<div class="row">
<div class="input-field col s12">
<h3>{{ 'config.form_rules.faq.title'|trans }}</h3>
<h4>{{ 'config.form_rules.faq.tagging_rules_definition_title'|trans }}</h4>
<p class="help">{{ 'config.form_rules.faq.tagging_rules_definition_description'|trans|raw }}</p>
<h4>{{ 'config.form_rules.faq.how_to_use_them_title'|trans }}</h4>
<p class="help">{{ 'config.form_rules.faq.how_to_use_them_description'|trans|raw }}</p>
<h4>{{ 'config.form_rules.faq.variables_available_title'|trans }}</h4>
<p class="help">
{{ 'config.form_rules.faq.variables_available_description'|trans }}
</p>
<table class="bordered">
<thead>
<tr>
<th>{{ 'config.form_rules.faq.variable_description.label'|trans }}</th>
<th>{{ 'config.form_rules.faq.meaning'|trans }}</th>
<th>{{ 'config.form_rules.faq.operator_description.label'|trans }}</th>
<th>{{ 'config.form_rules.faq.meaning'|trans }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>title</td>
<td>{{ 'config.form_rules.faq.variable_description.title'|trans }}</td>
<td>&lt;=</td>
<td>{{ 'config.form_rules.faq.operator_description.less_than'|trans }}</td>
</tr>
<tr>
<td>url</td>
<td>{{ 'config.form_rules.faq.variable_description.url'|trans }}</td>
<td>&lt;</td>
<td>{{ 'config.form_rules.faq.operator_description.strictly_less_than'|trans }}</td>
</tr>
<tr>
<td>isArchived</td>
<td>{{ 'config.form_rules.faq.variable_description.isArchived'|trans }}</td>
<td>&gt;=</td>
<td>{{ 'config.form_rules.faq.operator_description.greater_than'|trans }}</td>
</tr>
<tr>
<td>isStarred</td>
<td>{{ 'config.form_rules.faq.variable_description.isStarred'|trans }}</td>
<td>&gt;</td>
<td>{{ 'config.form_rules.faq.operator_description.strictly_greater_than'|trans }}</td>
</tr>
<tr>
<td>content</td>
<td>{{ 'config.form_rules.faq.variable_description.content'|trans }}</td>
<td>=</td>
<td>{{ 'config.form_rules.faq.operator_description.equal_to'|trans }}</td>
</tr>
<tr>
<td>language</td>
<td>{{ 'config.form_rules.faq.variable_description.language'|trans }}</td>
<td>!=</td>
<td>{{ 'config.form_rules.faq.operator_description.not_equal_to'|trans }}</td>
</tr>
<tr>
<td>mimetype</td>
<td>{{ 'config.form_rules.faq.variable_description.mimetype'|trans }}</td>
<td>OR</td>
<td>{{ 'config.form_rules.faq.operator_description.or'|trans }}</td>
</tr>
<tr>
<td>readingTime</td>
<td>{{ 'config.form_rules.faq.variable_description.readingTime'|trans }}</td>
<td>AND</td>
<td>{{ 'config.form_rules.faq.operator_description.and'|trans }}</td>
</tr>
<tr>
<td>domainName</td>
<td>{{ 'config.form_rules.faq.variable_description.domainName'|trans }}</td>
<td>matches</td>
<td>{{ 'config.form_rules.faq.operator_description.matches'|trans|raw }}</td>
</tr>
</tbody>
</table>
</div>
</div>
{% if is_granted('ROLE_SUPER_ADMIN') %} {% if is_granted('ROLE_SUPER_ADMIN') %}
<h2>{{ 'config.tab_menu.new_user'|trans }}</h2> <h2>{{ 'config.tab_menu.new_user'|trans }}</h2>

View File

@ -14,7 +14,8 @@
<ul> <ul>
<li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li> <li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li>
<li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'developer.full_documentation'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/developer/api.html">{{ 'developer.full_documentation'|trans }}</a></li>
<li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'developer.list_methods'|trans }}</a></li>
</ul> </ul>
<h4>{{ 'developer.clients.title'|trans }}</h4> <h4>{{ 'developer.clients.title'|trans }}</h4>

View File

@ -6,15 +6,10 @@
{% block pager %} {% block pager %}
<div class="results"> <div class="results">
<div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div> <div class="nb-results">{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}</div>
<div class="pagination"> <div class="pagination">
<a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a> <a href="#" id="filter">{{ 'entry.filters.title'|trans }}</a>
{% if entries is not empty %} {% if entries.getNbPages > 1 %}
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
{% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
<li>
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}" class="{{ currentPage == p ? 'current':''}}" >{{ p }}</a>
</li>
{% endfor %}
{% endif %} {% endif %}
</div> </div>
</div> </div>
@ -22,20 +17,18 @@
{% for entry in entries %} {% for entry in entries %}
<div id="entry-{{ entry.id|e }}" class="entry"> <div id="entry-{{ entry.id|e }}" class="entry">
<h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2> <h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|raw }}</a></h2>
{% if entry.readingTime > 0 %}
<div class="estimatedTime"> {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
<div class="estimatedTime">
<span class="tool reading-time"> <span class="tool reading-time">
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }} {% if readingTime > 0 %}
</span> {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
</div>
{% else %} {% else %}
<div class="estimatedTime"> {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
<span class="tool reading-time">
{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
</span>
</div>
{% endif %} {% endif %}
</span>
</div>
<ul class="tools links"> <ul class="tools links">
<li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li> <li><a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool icon-check icon {% if entry.isArchived == 0 %}archive-off{% else %}archive{% endif %}" href="{{ path('archive_entry', { 'id': entry.id }) }}"><span>{{ 'entry.list.toogle_as_read'|trans }}</span></a></li>

View File

@ -12,8 +12,8 @@
<item> <item>
<title><![CDATA[{{ entry.title }}]]></title> <title><![CDATA[{{ entry.title }}]]></title>
<source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source> <source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
<link>{{ url('view', { 'id': entry.id }) }}</link> <link>{{ entry.url }}</link>
<guid>{{ url('view', { 'id': entry.id }) }}</guid> <guid>{{ entry.url }}</guid>
<pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate> <pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate>
<description> <description>
<![CDATA[ <![CDATA[

View File

@ -22,7 +22,7 @@
{% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %} {% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&amp;title={{ entry.title|url_encode }}" target="_blank" class="tool shaarli" title="shaarli"><span>shaarli</span></a></li>{% endif %}
{% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %} {% if craue_setting('share_diaspora') %}<li><a href="{{ craue_setting('diaspora_url') }}/bookmarklet?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}&notes=&v=1&noui=1&jump=doclose" target="_blank" class="tool diaspora icon-image icon-image--diaspora" title="diaspora"><span>diaspora</span></a></li>{% endif %}
{% if craue_setting('carrot') %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="carrot"><span>Carrot</span></a></li>{% endif %} {% if craue_setting('carrot') %}<li><a href="https://secure.carrot.org/GiveAndGetBack.do?url={{ entry.url|url_encode }}&title={{ entry.title|url_encode }}" class="tool carrot icon-image icon-image--carrot" target="_blank" title="carrot"><span>Carrot</span></a></li>{% endif %}
{% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.re_fetch_content'|trans }}</span></a></li>{% endif %} {% if craue_setting('show_printlink') %}<li><a title="{{ 'entry.view.left_menu.print'|trans }}" class="tool icon icon-print" href="javascript: window.print();"><span>{{ 'entry.view.left_menu.print'|trans }}</span></a></li>{% endif %}
{% if craue_setting('export_epub') %}<li><a href="?epub&amp;method=id&amp;value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %} {% if craue_setting('export_epub') %}<li><a href="?epub&amp;method=id&amp;value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %}
{% if craue_setting('export_mobi') %}<li><a href="?mobi&amp;method=id&amp;value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %} {% if craue_setting('export_mobi') %}<li><a href="?mobi&amp;method=id&amp;value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
{% if craue_setting('export_pdf') %}<li><a href="?pdf&amp;method=id&amp;value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %} {% if craue_setting('export_pdf') %}<li><a href="?pdf&amp;method=id&amp;value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %}

View File

@ -25,8 +25,8 @@
<dl> <dl>
<dt>{{ 'about.getting_help.documentation'|trans }}</dt> <dt>{{ 'about.getting_help.documentation'|trans }}</dt>
<dd><a href="http://doc.wallabag.org/en/v2/">english</a></dd> <dd><a href="http://doc.wallabag.org/en/master/">english</a></dd>
<dd><a href="http://doc.wallabag.org/fr/v2/">français</a></dd> <dd><a href="http://doc.wallabag.org/fr/master/">français</a></dd>
<dt>{{ 'about.getting_help.bug_reports'|trans }}</dt> <dt>{{ 'about.getting_help.bug_reports'|trans }}</dt>
<dd>{{ 'about.getting_help.support'|trans|raw }}</dd> <dd>{{ 'about.getting_help.support'|trans|raw }}</dd>
@ -67,7 +67,6 @@
<tr><td>doctrine/lexer</td><td>MIT</td></tr> <tr><td>doctrine/lexer</td><td>MIT</td></tr>
<tr><td>doctrine/migrations</td><td>LGPL-2.1</td></tr> <tr><td>doctrine/migrations</td><td>LGPL-2.1</td></tr>
<tr><td>doctrine/orm</td><td>MIT</td></tr> <tr><td>doctrine/orm</td><td>MIT</td></tr>
<tr><td>ezyang/htmlpurifier</td><td>LGPL</td></tr>
<tr><td>friendsofsymfony/oauth-server-bundle</td><td>MIT</td></tr> <tr><td>friendsofsymfony/oauth-server-bundle</td><td>MIT</td></tr>
<tr><td>friendsofsymfony/oauth2-php</td><td>MIT</td></tr> <tr><td>friendsofsymfony/oauth2-php</td><td>MIT</td></tr>
<tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr> <tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr>

View File

@ -48,10 +48,10 @@
<h4>{{ 'quickstart.docs.title'|trans }}</h4> <h4>{{ 'quickstart.docs.title'|trans }}</h4>
<ul> <ul>
<li><a href="http://doc.wallabag.org/en/v2/user/annotations.html">{{ 'quickstart.docs.annotate'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/user/annotations.html">{{ 'quickstart.docs.annotate'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/v2/user/download_articles.html">{{ 'quickstart.docs.export'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/user/download_articles.html">{{ 'quickstart.docs.export'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/v2/user/filters.html">{{ 'quickstart.docs.search_filters'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/user/filters.html">{{ 'quickstart.docs.search_filters'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/v2/user/errors_during_fetching.html">{{ 'quickstart.docs.fetching_errors'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/user/errors_during_fetching.html">{{ 'quickstart.docs.fetching_errors'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/">{{ 'quickstart.docs.all_docs'|trans }}</a></li> <li><a href="http://doc.wallabag.org/">{{ 'quickstart.docs.all_docs'|trans }}</a></li>
</ul> </ul>

View File

@ -250,75 +250,75 @@
<h5>{{ 'config.form_rules.faq.variables_available_title'|trans }}</h5> <h5>{{ 'config.form_rules.faq.variables_available_title'|trans }}</h5>
<p class="help"> <p class="help">
{{ 'config.form_rules.faq.variables_available_description'|trans }} {{ 'config.form_rules.faq.variables_available_description'|trans }}
<table class="bordered">
<thead>
<tr>
<th>{{ 'config.form_rules.faq.variable_description.label'|trans }}</th>
<th>{{ 'config.form_rules.faq.meaning'|trans }}</th>
<th>{{ 'config.form_rules.faq.operator_description.label'|trans }}</th>
<th>{{ 'config.form_rules.faq.meaning'|trans }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>title</td>
<td>{{ 'config.form_rules.faq.variable_description.title'|trans }}</td>
<td>&lt;=</td>
<td>{{ 'config.form_rules.faq.operator_description.less_than'|trans }}</td>
</tr>
<tr>
<td>url</td>
<td>{{ 'config.form_rules.faq.variable_description.url'|trans }}</td>
<td>&lt;</td>
<td>{{ 'config.form_rules.faq.operator_description.strictly_less_than'|trans }}</td>
</tr>
<tr>
<td>isArchived</td>
<td>{{ 'config.form_rules.faq.variable_description.isArchived'|trans }}</td>
<td>=&gt;</td>
<td>{{ 'config.form_rules.faq.operator_description.greater_than'|trans }}</td>
</tr>
<tr>
<td>isStarred</td>
<td>{{ 'config.form_rules.faq.variable_description.isStarred'|trans }}</td>
<td>&gt;</td>
<td>{{ 'config.form_rules.faq.operator_description.strictly_greater_than'|trans }}</td>
</tr>
<tr>
<td>content</td>
<td>{{ 'config.form_rules.faq.variable_description.content'|trans }}</td>
<td>=</td>
<td>{{ 'config.form_rules.faq.operator_description.equal_to'|trans }}</td>
</tr>
<tr>
<td>language</td>
<td>{{ 'config.form_rules.faq.variable_description.language'|trans }}</td>
<td>!=</td>
<td>{{ 'config.form_rules.faq.operator_description.not_equal_to'|trans }}</td>
</tr>
<tr>
<td>mimetype</td>
<td>{{ 'config.form_rules.faq.variable_description.mimetype'|trans }}</td>
<td>OR</td>
<td>{{ 'config.form_rules.faq.operator_description.or'|trans }}</td>
</tr>
<tr>
<td>readingTime</td>
<td>{{ 'config.form_rules.faq.variable_description.readingTime'|trans }}</td>
<td>AND</td>
<td>{{ 'config.form_rules.faq.operator_description.and'|trans }}</td>
</tr>
<tr>
<td>domainName</td>
<td>{{ 'config.form_rules.faq.variable_description.domainName'|trans }}</td>
<td>matches</td>
<td>{{ 'config.form_rules.faq.operator_description.matches'|trans|raw }}</td>
</tr>
</tbody>
</table>
</p> </p>
<table class="bordered">
<thead>
<tr>
<th>{{ 'config.form_rules.faq.variable_description.label'|trans }}</th>
<th>{{ 'config.form_rules.faq.meaning'|trans }}</th>
<th>{{ 'config.form_rules.faq.operator_description.label'|trans }}</th>
<th>{{ 'config.form_rules.faq.meaning'|trans }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>title</td>
<td>{{ 'config.form_rules.faq.variable_description.title'|trans }}</td>
<td>&lt;=</td>
<td>{{ 'config.form_rules.faq.operator_description.less_than'|trans }}</td>
</tr>
<tr>
<td>url</td>
<td>{{ 'config.form_rules.faq.variable_description.url'|trans }}</td>
<td>&lt;</td>
<td>{{ 'config.form_rules.faq.operator_description.strictly_less_than'|trans }}</td>
</tr>
<tr>
<td>isArchived</td>
<td>{{ 'config.form_rules.faq.variable_description.isArchived'|trans }}</td>
<td>&gt;=</td>
<td>{{ 'config.form_rules.faq.operator_description.greater_than'|trans }}</td>
</tr>
<tr>
<td>isStarred</td>
<td>{{ 'config.form_rules.faq.variable_description.isStarred'|trans }}</td>
<td>&gt;</td>
<td>{{ 'config.form_rules.faq.operator_description.strictly_greater_than'|trans }}</td>
</tr>
<tr>
<td>content</td>
<td>{{ 'config.form_rules.faq.variable_description.content'|trans }}</td>
<td>=</td>
<td>{{ 'config.form_rules.faq.operator_description.equal_to'|trans }}</td>
</tr>
<tr>
<td>language</td>
<td>{{ 'config.form_rules.faq.variable_description.language'|trans }}</td>
<td>!=</td>
<td>{{ 'config.form_rules.faq.operator_description.not_equal_to'|trans }}</td>
</tr>
<tr>
<td>mimetype</td>
<td>{{ 'config.form_rules.faq.variable_description.mimetype'|trans }}</td>
<td>OR</td>
<td>{{ 'config.form_rules.faq.operator_description.or'|trans }}</td>
</tr>
<tr>
<td>readingTime</td>
<td>{{ 'config.form_rules.faq.variable_description.readingTime'|trans }}</td>
<td>AND</td>
<td>{{ 'config.form_rules.faq.operator_description.and'|trans }}</td>
</tr>
<tr>
<td>domainName</td>
<td>{{ 'config.form_rules.faq.variable_description.domainName'|trans }}</td>
<td>matches</td>
<td>{{ 'config.form_rules.faq.operator_description.matches'|trans|raw }}</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
</div> </div>

View File

@ -14,7 +14,8 @@
<ul> <ul>
<li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li> <li><a href="{{ path('developer_howto_firstapp') }}">{{ 'developer.how_to_first_app'|trans }}</a></li>
<li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'developer.full_documentation'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/developer/api.html">{{ 'developer.full_documentation'|trans }}</a></li>
<li><a href="{{ path('nelmio_api_doc_index') }}">{{ 'developer.list_methods'|trans }}</a></li>
</ul> </ul>
<h4>{{ 'developer.clients.title'|trans }}</h4> <h4>{{ 'developer.clients.title'|trans }}</h4>

View File

@ -21,13 +21,9 @@
<div class="nb-results left"> <div class="nb-results left">
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }} {{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
</div> </div>
<ul class="pagination right"> {% if entries.getNbPages > 1 %}
{% for p in range(1, entries.nbPages) if entries.nbPages > 1 %} {{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
<li class="{{ currentPage == p ? 'active':'waves-effect'}}"> {% endif %}
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a>
</li>
{% endfor %}
</ul>
</div> </div>
{% endblock %} {% endblock %}
<br /> <br />
@ -48,13 +44,13 @@
<i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i> <i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i>
{% endif %} {% endif %}
<span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span> <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span>
<div class="estimatedTime grey-text"> <div class="estimatedTime grey-text">
<span class="tool reading-time"> <span class="tool reading-time">
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %} {% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
{% if readingTime > 0 %} {% if readingTime > 0 %}
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime}) }} {{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
{% else %} {% else %}
{{ 'entry.list.reading_time_less_one_minute'|trans|raw }} {{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
{% endif %} {% endif %}
@ -74,8 +70,7 @@
<div class="estimatedTime grey-text"> <div class="estimatedTime grey-text">
<span class="tool reading-time"> <span class="tool reading-time">
{{ 'entry.list.reading_time'|trans }} {% if readingTime > 0 %}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}{% else %}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{% endif %}
{% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur">&lt;</small> 1{% endif %} min
</span> </span>
</div> </div>

View File

@ -12,8 +12,8 @@
<item> <item>
<title><![CDATA[{{ entry.title }}]]></title> <title><![CDATA[{{ entry.title }}]]></title>
<source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source> <source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
<link>{{ url('view', { 'id': entry.id }) }}</link> <link>{{ entry.url }}</link>
<guid>{{ url('view', { 'id': entry.id }) }}</guid> <guid>{{ entry.url }}</guid>
<pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate> <pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate>
<description> <description>
<![CDATA[ <![CDATA[

View File

@ -138,6 +138,17 @@
</div> </div>
</li> </li>
{% if craue_setting('show_printlink') %}
<li class="bold border-bottom hide-on-med-and-down">
<a class="waves-effect collapsible-header" title="{{ 'entry.view.left_menu.print'|trans }}" href="javascript: window.print();">
<i class="mdi-action-print small"></i>
<span>{{ 'entry.view.left_menu.print'|trans }}</span>
</a>
<div class="collapsible-body"></div>
</li>
{% endif %}
<li class="bold"> <li class="bold">
<a class="waves-effect collapsible-header"> <a class="waves-effect collapsible-header">
<i class="mdi-file-file-download small"></i> <i class="mdi-file-file-download small"></i>
@ -192,14 +203,14 @@
{% endfor %} {% endfor %}
</div> </div>
{% if entry.previewPicture is not null %}
<div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div>
{% endif %}
<div class="input-field nav-panel-add-tag" style="display: none"> <div class="input-field nav-panel-add-tag" style="display: none">
{{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }} {{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
</div> </div>
{% if entry.previewPicture is not null %}
<div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div>
{% endif %}
</aside> </aside>
<article> <article>
{{ entry.content | raw }} {{ entry.content | raw }}

View File

@ -34,8 +34,8 @@
<div id="set2" class="col s12"> <div id="set2" class="col s12">
<dl> <dl>
<dt>{{ 'about.getting_help.documentation'|trans }}</dt> <dt>{{ 'about.getting_help.documentation'|trans }}</dt>
<dd><a href="http://doc.wallabag.org/en/v2/">english</a></dd> <dd><a href="http://doc.wallabag.org/en/master/">english</a></dd>
<dd><a href="http://doc.wallabag.org/fr/v2/">français</a></dd> <dd><a href="http://doc.wallabag.org/fr/master/">français</a></dd>
<dt>{{ 'about.getting_help.bug_reports'|trans }}</dt> <dt>{{ 'about.getting_help.bug_reports'|trans }}</dt>
<dd>{{ 'about.getting_help.support'|trans|raw }}</dd> <dd>{{ 'about.getting_help.support'|trans|raw }}</dd>
@ -76,7 +76,6 @@
<tr><td>doctrine/lexer</td><td>MIT</td></tr> <tr><td>doctrine/lexer</td><td>MIT</td></tr>
<tr><td>doctrine/migrations</td><td>LGPL-2.1</td></tr> <tr><td>doctrine/migrations</td><td>LGPL-2.1</td></tr>
<tr><td>doctrine/orm</td><td>MIT</td></tr> <tr><td>doctrine/orm</td><td>MIT</td></tr>
<tr><td>ezyang/htmlpurifier</td><td>LGPL</td></tr>
<tr><td>friendsofsymfony/oauth-server-bundle</td><td>MIT</td></tr> <tr><td>friendsofsymfony/oauth-server-bundle</td><td>MIT</td></tr>
<tr><td>friendsofsymfony/oauth2-php</td><td>MIT</td></tr> <tr><td>friendsofsymfony/oauth2-php</td><td>MIT</td></tr>
<tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr> <tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr>

View File

@ -53,10 +53,10 @@
<h4>{{ 'quickstart.docs.title'|trans }}</h4> <h4>{{ 'quickstart.docs.title'|trans }}</h4>
<ul> <ul>
<li><a href="http://doc.wallabag.org/en/v2/user/annotations.html">{{ 'quickstart.docs.annotate'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/user/annotations.html">{{ 'quickstart.docs.annotate'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/v2/user/download_articles.html">{{ 'quickstart.docs.export'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/user/download_articles.html">{{ 'quickstart.docs.export'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/v2/user/filters.html">{{ 'quickstart.docs.search_filters'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/user/filters.html">{{ 'quickstart.docs.search_filters'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/en/v2/user/errors_during_fetching.html">{{ 'quickstart.docs.fetching_errors'|trans }}</a></li> <li><a href="http://doc.wallabag.org/en/master/user/errors_during_fetching.html">{{ 'quickstart.docs.fetching_errors'|trans }}</a></li>
<li><a href="http://doc.wallabag.org/">{{ 'quickstart.docs.all_docs'|trans }}</a></li> <li><a href="http://doc.wallabag.org/">{{ 'quickstart.docs.all_docs'|trans }}</a></li>
</ul> </ul>

View File

@ -27,7 +27,7 @@ class TablePrefixSubscriber implements EventSubscriber
public function getSubscribedEvents() public function getSubscribedEvents()
{ {
return array('loadClassMetadata'); return ['loadClassMetadata'];
} }
public function loadClassMetadata(LoadClassMetadataEventArgs $args) public function loadClassMetadata(LoadClassMetadataEventArgs $args)

View File

@ -37,11 +37,11 @@ class InstallCommandTest extends WallabagCoreTestCase
$application = new Application(static::$kernel); $application = new Application(static::$kernel);
$application->setAutoExit(false); $application->setAutoExit(false);
$code = $application->run(new ArrayInput(array( $code = $application->run(new ArrayInput([
'command' => 'doctrine:fixtures:load', 'command' => 'doctrine:fixtures:load',
'--no-interaction' => true, '--no-interaction' => true,
'--env' => 'test', '--env' => 'test',
)), new NullOutput()); ]), new NullOutput());
} }
public function testRunInstallCommand() public function testRunInstallCommand()
@ -63,14 +63,15 @@ class InstallCommandTest extends WallabagCoreTestCase
$command->getHelperSet()->set($question, 'question'); $command->getHelperSet()->set($question, 'question');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
)); ]);
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); $this->assertContains('Checking system requirements.', $tester->getDisplay());
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); $this->assertContains('Setting up database.', $tester->getDisplay());
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay());
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay());
$this->assertContains('Installing assets.', $tester->getDisplay());
} }
public function testRunInstallCommandWithReset() public function testRunInstallCommandWithReset()
@ -92,16 +93,17 @@ class InstallCommandTest extends WallabagCoreTestCase
$command->getHelperSet()->set($question, 'question'); $command->getHelperSet()->set($question, 'question');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
'--reset' => true, '--reset' => true,
)); ]);
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); $this->assertContains('Checking system requirements.', $tester->getDisplay());
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); $this->assertContains('Setting up database.', $tester->getDisplay());
$this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay());
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay());
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay());
$this->assertContains('Installing assets.', $tester->getDisplay());
// we force to reset everything // we force to reset everything
$this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay()); $this->assertContains('Droping database, creating database and schema, clearing the cache', $tester->getDisplay());
@ -114,10 +116,10 @@ class InstallCommandTest extends WallabagCoreTestCase
// drop database first, so the install command won't ask to reset things // drop database first, so the install command won't ask to reset things
$command = $application->find('doctrine:database:drop'); $command = $application->find('doctrine:database:drop');
$command->run(new ArrayInput(array( $command->run(new ArrayInput([
'command' => 'doctrine:database:drop', 'command' => 'doctrine:database:drop',
'--force' => true, '--force' => true,
)), new NullOutput()); ]), new NullOutput());
// start a new application to avoid lagging connexion to pgsql // start a new application to avoid lagging connexion to pgsql
$client = static::createClient(); $client = static::createClient();
@ -138,14 +140,15 @@ class InstallCommandTest extends WallabagCoreTestCase
$command->getHelperSet()->set($question, 'question'); $command->getHelperSet()->set($question, 'question');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
)); ]);
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); $this->assertContains('Checking system requirements.', $tester->getDisplay());
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); $this->assertContains('Setting up database.', $tester->getDisplay());
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay());
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay());
$this->assertContains('Installing assets.', $tester->getDisplay());
// the current database doesn't already exist // the current database doesn't already exist
$this->assertContains('Creating database and schema, clearing the cache', $tester->getDisplay()); $this->assertContains('Creating database and schema, clearing the cache', $tester->getDisplay());
@ -175,14 +178,15 @@ class InstallCommandTest extends WallabagCoreTestCase
$command->getHelperSet()->set($question, 'question'); $command->getHelperSet()->set($question, 'question');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
)); ]);
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); $this->assertContains('Checking system requirements.', $tester->getDisplay());
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); $this->assertContains('Setting up database.', $tester->getDisplay());
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay());
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay());
$this->assertContains('Installing assets.', $tester->getDisplay());
$this->assertContains('Droping schema and creating schema', $tester->getDisplay()); $this->assertContains('Droping schema and creating schema', $tester->getDisplay());
} }
@ -197,19 +201,19 @@ class InstallCommandTest extends WallabagCoreTestCase
// drop database first, so the install command won't ask to reset things // drop database first, so the install command won't ask to reset things
$command = new DropDatabaseDoctrineCommand(); $command = new DropDatabaseDoctrineCommand();
$command->setApplication($application); $command->setApplication($application);
$command->run(new ArrayInput(array( $command->run(new ArrayInput([
'command' => 'doctrine:database:drop', 'command' => 'doctrine:database:drop',
'--force' => true, '--force' => true,
)), new NullOutput()); ]), new NullOutput());
$this->getClient()->getContainer()->get('doctrine')->getConnection()->close(); $this->getClient()->getContainer()->get('doctrine')->getConnection()->close();
$command = new CreateDatabaseDoctrineCommand(); $command = new CreateDatabaseDoctrineCommand();
$command->setApplication($application); $command->setApplication($application);
$command->run(new ArrayInput(array( $command->run(new ArrayInput([
'command' => 'doctrine:database:create', 'command' => 'doctrine:database:create',
'--env' => 'test', '--env' => 'test',
)), new NullOutput()); ]), new NullOutput());
$command = $application->find('wallabag:install'); $command = $application->find('wallabag:install');
@ -229,14 +233,15 @@ class InstallCommandTest extends WallabagCoreTestCase
$command->getHelperSet()->set($question, 'question'); $command->getHelperSet()->set($question, 'question');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
)); ]);
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); $this->assertContains('Checking system requirements.', $tester->getDisplay());
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); $this->assertContains('Setting up database.', $tester->getDisplay());
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay());
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay());
$this->assertContains('Installing assets.', $tester->getDisplay());
$this->assertContains('Creating schema', $tester->getDisplay()); $this->assertContains('Creating schema', $tester->getDisplay());
} }
@ -260,14 +265,15 @@ class InstallCommandTest extends WallabagCoreTestCase
$command->getHelperSet()->set($question, 'question'); $command->getHelperSet()->set($question, 'question');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
'--no-interaction' => true, '--no-interaction' => true,
)); ]);
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay()); $this->assertContains('Checking system requirements.', $tester->getDisplay());
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay()); $this->assertContains('Setting up database.', $tester->getDisplay());
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay()); $this->assertContains('Administration setup.', $tester->getDisplay());
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay()); $this->assertContains('Config setup.', $tester->getDisplay());
$this->assertContains('Installing assets.', $tester->getDisplay());
} }
} }

View File

@ -21,9 +21,9 @@ class TagAllCommandTest extends WallabagCoreTestCase
$command = $application->find('wallabag:tag:all'); $command = $application->find('wallabag:tag:all');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
)); ]);
} }
public function testRunTagAllCommandWithBadUsername() public function testRunTagAllCommandWithBadUsername()
@ -34,10 +34,10 @@ class TagAllCommandTest extends WallabagCoreTestCase
$command = $application->find('wallabag:tag:all'); $command = $application->find('wallabag:tag:all');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
'username' => 'unknown', 'username' => 'unknown',
)); ]);
$this->assertContains('User "unknown" not found', $tester->getDisplay()); $this->assertContains('User "unknown" not found', $tester->getDisplay());
} }
@ -50,10 +50,10 @@ class TagAllCommandTest extends WallabagCoreTestCase
$command = $application->find('wallabag:tag:all'); $command = $application->find('wallabag:tag:all');
$tester = new CommandTester($command); $tester = new CommandTester($command);
$tester->execute(array( $tester->execute([
'command' => $command->getName(), 'command' => $command->getName(),
'username' => 'admin', 'username' => 'admin',
)); ]);
$this->assertContains('Tagging entries for user « admin »... Done', $tester->getDisplay()); $this->assertContains('Tagging entries for user « admin »... Done', $tester->getDisplay());
} }

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