forked from wallabag/wallabag
Compare commits
104 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d5b4631d0 | |||
| 9f151b469f | |||
| 45919a295e | |||
| 2499cdbf29 | |||
| 868e76af10 | |||
| f88530de68 | |||
| 4a25bef077 | |||
| 24f65a838c | |||
| 89bafa95ed | |||
| 18bb5a90d5 | |||
| 938a16c0f6 | |||
| ca8d61b958 | |||
| 23feba63bb | |||
| 3320d39418 | |||
| 23d24b1750 | |||
| dc12084d93 | |||
| 0907a72c64 | |||
| 188b74b6df | |||
| 71601c171f | |||
| 5c2c1a6434 | |||
| 7fdecbb73c | |||
| 1f034a3316 | |||
| d1f4996b77 | |||
| 5180302650 | |||
| 2d899e8d30 | |||
| 345d74268b | |||
| 4086e0782e | |||
| af497a641c | |||
| f2e5fdc366 | |||
| a417b86923 | |||
| 18078ded12 | |||
| 245e2e2cae | |||
| 86732aa01c | |||
| c31ea8a409 | |||
| c95e39c51a | |||
| 63995be5ee | |||
| 1880da7420 | |||
| 76cd8dbb05 | |||
| 624a7c6df1 | |||
| 80bd17f00d | |||
| 1b8b3859c0 | |||
| 443cff9840 | |||
| 4094ea4771 | |||
| 7eccbda99f | |||
| 8846ad0a90 | |||
| 41e79f9792 | |||
| 637dc4bb21 | |||
| a83fbf4504 | |||
| d098cb04a8 | |||
| 574d101561 | |||
| 386d1120c3 | |||
| 15e9483323 | |||
| c5dede8445 | |||
| e9497f6fc0 | |||
| c71d83b60c | |||
| f642863ff2 | |||
| 69c21157ba | |||
| 9b2fe57eb6 | |||
| b351d0494b | |||
| 6d0db75328 | |||
| 615fc1d237 | |||
| 61fcbe9f57 | |||
| eaec84fcd3 | |||
| 834efe84ac | |||
| 466c0c6684 | |||
| 661d5ae0cf | |||
| dd4997d705 | |||
| c29747357a | |||
| 0135c98b24 | |||
| cea846d407 | |||
| 54ecbb41d6 | |||
| 19a7ea2a44 | |||
| 2504fe46ed | |||
| 82dbd47391 | |||
| 7ead8a0d9d | |||
| cb48a569e0 | |||
| 5c3ca4fe9e | |||
| 808f541ea9 | |||
| 7a2157b8d7 | |||
| b00a89e08f | |||
| 015e4284f0 | |||
| f652f41dab | |||
| 7704ef5d3f | |||
| e969c2a7ef | |||
| 5b732257db | |||
| 0c608f1183 | |||
| 77b9db87b8 | |||
| 6a986910b6 | |||
| c6cbe75b2e | |||
| 9479ae834c | |||
| c802181126 | |||
| 8687bcd0c9 | |||
| 4b0b77e4d7 | |||
| e543d03fd7 | |||
| 6d3a3cfcda | |||
| 4a749cad8d | |||
| 3a7df76013 | |||
| af47742dd0 | |||
| 52d806ea6b | |||
| 48bb9675c1 | |||
| 6b82630838 | |||
| b5cf84bdf6 | |||
| 0bb5669cf6 | |||
| e71c376db9 |
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@ -6,7 +6,7 @@ Remember, this is _not_ a place to ask questions. For that, go to http://gitter.
|
||||
### Environment
|
||||
|
||||
* 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):
|
||||
* php version:
|
||||
* OS:
|
||||
|
||||
@ -41,8 +41,7 @@ matrix:
|
||||
# exclude v1 branches
|
||||
branches:
|
||||
except:
|
||||
- master
|
||||
- dev
|
||||
- legacy
|
||||
|
||||
before_script:
|
||||
- if [[ $TRAVIS_PHP_VERSION != hhvm ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
|
||||
@ -58,4 +57,4 @@ script:
|
||||
- ant prepare-$DB
|
||||
- bin/phpunit -v
|
||||
- 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;
|
||||
|
||||
86
CHANGELOG.md
Normal file
86
CHANGELOG.md
Normal file
@ -0,0 +1,86 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [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
|
||||
@ -16,7 +16,7 @@ Then you can install wallabag by executing the following commands:
|
||||
```
|
||||
git clone https://github.com/wallabag/wallabag.git
|
||||
cd wallabag
|
||||
git checkout 2.0.0
|
||||
git checkout 2.0.2
|
||||
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
||||
php bin/console wallabag:install --env=prod
|
||||
php bin/console server:run --env=prod
|
||||
|
||||
@ -22,19 +22,22 @@ class AppKernel extends Kernel
|
||||
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
|
||||
new Nelmio\CorsBundle\NelmioCorsBundle(),
|
||||
new Liip\ThemeBundle\LiipThemeBundle(),
|
||||
new Wallabag\CoreBundle\WallabagCoreBundle(),
|
||||
new Wallabag\ApiBundle\WallabagApiBundle(),
|
||||
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
|
||||
new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
|
||||
new FOS\OAuthServerBundle\FOSOAuthServerBundle(),
|
||||
new Wallabag\UserBundle\WallabagUserBundle(),
|
||||
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
|
||||
new Scheb\TwoFactorBundle\SchebTwoFactorBundle(),
|
||||
new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
|
||||
new Wallabag\ImportBundle\WallabagImportBundle(),
|
||||
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
|
||||
new Craue\ConfigBundle\CraueConfigBundle(),
|
||||
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(),
|
||||
];
|
||||
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
set :branch, 'v2'
|
||||
set :branch, 'master'
|
||||
set :deploy_to, '/var/www/v2.wallabag.org/web/'
|
||||
|
||||
@ -28,7 +28,7 @@ framework:
|
||||
assets: ~
|
||||
|
||||
wallabag_core:
|
||||
version: 2.0.0
|
||||
version: 2.0.2
|
||||
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
|
||||
languages:
|
||||
en: 'English'
|
||||
@ -82,6 +82,7 @@ doctrine:
|
||||
password: "%database_password%"
|
||||
charset: UTF8
|
||||
path: "%database_path%"
|
||||
server_version: 5.6
|
||||
|
||||
orm:
|
||||
auto_generate_proxy_classes: "%kernel.debug%"
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
imports:
|
||||
- { resource: config_dev.yml }
|
||||
- { resource: parameters_test.yml }
|
||||
|
||||
framework:
|
||||
test: ~
|
||||
|
||||
@ -19,14 +19,6 @@ parameters:
|
||||
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
||||
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_host: 127.0.0.1
|
||||
mailer_user: ~
|
||||
|
||||
8
app/config/parameters_test.yml
Normal file
8
app/config/parameters_test.yml
Normal 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'
|
||||
@ -6,7 +6,7 @@ services:
|
||||
filesystem_cache:
|
||||
class: Doctrine\Common\Cache\FilesystemCache
|
||||
arguments:
|
||||
- %kernel.cache_dir%/doctrine/metadata
|
||||
- "%kernel.cache_dir%/doctrine/metadata"
|
||||
|
||||
twig.extension.text:
|
||||
class: Twig_Extensions_Extension_Text
|
||||
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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
|
||||
8
app/config/tests/parameters_test.mysql.yml
Normal file
8
app/config/tests/parameters_test.mysql.yml
Normal 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: ~
|
||||
8
app/config/tests/parameters_test.pgsql.yml
Normal file
8
app/config/tests/parameters_test.pgsql.yml
Normal 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: ~
|
||||
8
app/config/tests/parameters_test.sqlite.yml
Normal file
8
app/config/tests/parameters_test.sqlite.yml
Normal 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"
|
||||
12
build.xml
12
build.xml
@ -42,8 +42,8 @@
|
||||
<target name="db_mysql" description="Run test for MySQL">
|
||||
<delete dir="${basedir}/app/config/parameters.yml"/>
|
||||
<exec executable="cp">
|
||||
<arg value="${basedir}/app/config/tests/parameters.yml.dist.mysql"/>
|
||||
<arg value="${basedir}/app/config/parameters.yml"/>
|
||||
<arg value="${basedir}/app/config/tests/parameters_test.mysql.yml"/>
|
||||
<arg value="${basedir}/app/config/parameters_test.yml"/>
|
||||
</exec>
|
||||
|
||||
<exec executable="php">
|
||||
@ -56,8 +56,8 @@
|
||||
<target name="db_sqlite" description="Run test for SQLite">
|
||||
<delete dir="${basedir}/app/config/parameters.yml"/>
|
||||
<exec executable="cp">
|
||||
<arg value="${basedir}/app/config/tests/parameters.yml.dist.sqlite"/>
|
||||
<arg value="${basedir}/app/config/parameters.yml"/>
|
||||
<arg value="${basedir}/app/config/tests/parameters_test.sqlite.yml"/>
|
||||
<arg value="${basedir}/app/config/parameters_test.yml"/>
|
||||
</exec>
|
||||
|
||||
<exec executable="php">
|
||||
@ -70,8 +70,8 @@
|
||||
<target name="db_pgsql" description="Run test for PostgreSQL">
|
||||
<delete dir="${basedir}/app/config/parameters.yml"/>
|
||||
<exec executable="cp">
|
||||
<arg value="${basedir}/app/config/tests/parameters.yml.dist.pgsql"/>
|
||||
<arg value="${basedir}/app/config/parameters.yml"/>
|
||||
<arg value="${basedir}/app/config/tests/parameters_test.pgsql.yml"/>
|
||||
<arg value="${basedir}/app/config/parameters_test.yml"/>
|
||||
</exec>
|
||||
|
||||
<exec executable="php">
|
||||
|
||||
@ -58,7 +58,6 @@
|
||||
"friendsofsymfony/rest-bundle": "~1.4",
|
||||
"jms/serializer-bundle": "~1.0",
|
||||
"nelmio/api-doc-bundle": "~2.7",
|
||||
"ezyang/htmlpurifier": "~4.6",
|
||||
"mgargano/simplehtmldom": "~1.5",
|
||||
"tecnickcom/tcpdf": "~6.2",
|
||||
"simplepie/simplepie": "~1.3.1",
|
||||
@ -80,7 +79,9 @@
|
||||
"paragonie/random_compat": "~1.0",
|
||||
"craue/config-bundle": "~1.4",
|
||||
"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": {
|
||||
"doctrine/doctrine-fixtures-bundle": "~2.2",
|
||||
@ -90,11 +91,8 @@
|
||||
"fabpot/php-cs-fixer": "~1.9"
|
||||
},
|
||||
"scripts": {
|
||||
"build-parameters": [
|
||||
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters"
|
||||
],
|
||||
"post-cmd": [
|
||||
"@build-parameters",
|
||||
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
|
||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
|
||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
|
||||
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
|
||||
@ -116,13 +114,7 @@
|
||||
"symfony-tests-dir": "tests",
|
||||
"symfony-assets-install": "relative",
|
||||
"incenteev-parameters": {
|
||||
"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"
|
||||
}
|
||||
"file": "app/config/parameters.yml"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
||||
259
docs/en/developer/api.rst
Normal file
259
docs/en/developer/api.rst
Normal file
File diff suppressed because one or more lines are too long
@ -12,15 +12,15 @@ Translation files
|
||||
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.
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/CraueConfigBundle/translations.
|
||||
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/FOSUserBundle/translations.
|
||||
- https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations.
|
||||
- https://github.com/wallabag/wallabag/tree/master/app/Resources/FOSUserBundle/translations.
|
||||
|
||||
You have to create ``THE_TRANSLATION_FILE.CODE.yml`` files.
|
||||
|
||||
@ -28,7 +28,7 @@ Configuration file
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
@ -24,6 +24,7 @@ The main documentation for this application is organized into a couple sections:
|
||||
:caption: User documentation
|
||||
|
||||
user/installation
|
||||
user/migration
|
||||
user/create_account
|
||||
user/login
|
||||
user/configuration
|
||||
@ -41,7 +42,7 @@ The main documentation for this application is organized into a couple sections:
|
||||
:maxdepth: 2
|
||||
:caption: Developer documentation
|
||||
|
||||
developer/api
|
||||
developer/docker
|
||||
developer/translate
|
||||
developer/maintenance
|
||||
developer/releasing
|
||||
|
||||
@ -12,9 +12,9 @@ There may be several reasons:
|
||||
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.
|
||||
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?
|
||||
---------------------------------------
|
||||
|
||||
@ -42,7 +42,7 @@ Install Composer:
|
||||
|
||||
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:
|
||||
|
||||
@ -50,7 +50,7 @@ To install wallabag itself, you must run these two commands:
|
||||
|
||||
git clone https://github.com/wallabag/wallabag.git
|
||||
cd wallabag
|
||||
git checkout 2.0.0
|
||||
git checkout 2.0.2
|
||||
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
||||
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
|
||||
|
||||
.. 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
|
||||
--------------------
|
||||
|
||||
@ -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.
|
||||
|
||||
.. 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``.
|
||||
|
||||
@ -24,6 +24,28 @@ After creating an user account on your new wallabag v2 instance, you must head o
|
||||
:alt: Import from wallabag v1
|
||||
: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
|
||||
-----------------
|
||||
|
||||
235
docs/fr/developer/api.rst
Normal file
235
docs/fr/developer/api.rst
Normal file
File diff suppressed because one or more lines are too long
@ -13,15 +13,15 @@ Fichiers de traductions
|
||||
cette traduction qui est considérée comme la plus récente. Merci de vous baser
|
||||
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``,
|
||||
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 :
|
||||
|
||||
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/CraueConfigBundle/translations.
|
||||
- https://github.com/wallabag/wallabag/tree/v2/app/Resources/FOSUserBundle/translations.
|
||||
- https://github.com/wallabag/wallabag/tree/master/app/Resources/CraueConfigBundle/translations.
|
||||
- https://github.com/wallabag/wallabag/tree/master/app/Resources/FOSUserBundle/translations.
|
||||
|
||||
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
|
||||
<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
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
@ -25,6 +25,7 @@ La documentation principale de cette application est découpée en plusieurs sec
|
||||
:caption: Documentation utilisateur
|
||||
|
||||
user/installation
|
||||
user/migration
|
||||
user/create_account
|
||||
user/login
|
||||
user/configuration
|
||||
@ -42,6 +43,7 @@ La documentation principale de cette application est découpée en plusieurs sec
|
||||
:maxdepth: 2
|
||||
:caption: Documentation développeur
|
||||
|
||||
developer/api
|
||||
developer/docker
|
||||
developer/translate
|
||||
developer/maintenance
|
||||
|
||||
@ -12,9 +12,9 @@ Il peut y avoir plusieurs raisons :
|
||||
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.
|
||||
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 ?
|
||||
---------------------------------------------------
|
||||
|
||||
@ -40,7 +40,7 @@ Installation de Composer :
|
||||
|
||||
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 :
|
||||
|
||||
@ -48,7 +48,7 @@ Pour installer wallabag, vous devez exécuter ces deux commandes :
|
||||
|
||||
git clone https://github.com/wallabag/wallabag.git
|
||||
cd wallabag
|
||||
git checkout 2.0.0
|
||||
git checkout 2.0.2
|
||||
SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
||||
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
|
||||
|
||||
.. 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
|
||||
------------------------
|
||||
|
||||
@ -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.
|
||||
|
||||
.. 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``.
|
||||
|
||||
@ -24,6 +24,28 @@ Une fois que vous avez créé un compte utilisateur sur votre nouvelle instance
|
||||
:alt: Import depuis wallabag v1
|
||||
: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
|
||||
-------------------
|
||||
|
||||
@ -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")
|
||||
@ -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
|
||||
@ -1,2 +0,0 @@
|
||||
Sphinx>=1.3.0,<1.4.0
|
||||
guzzle_sphinx_theme>=0.7.0,<0.8.0
|
||||
@ -30,7 +30,7 @@ class WallabagAnnotationController extends FOSRestController
|
||||
->getRepository('WallabagAnnotationBundle:Annotation')
|
||||
->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId());
|
||||
$total = count($annotationRows);
|
||||
$annotations = array('total' => $total, 'rows' => $annotationRows);
|
||||
$annotations = ['total' => $total, 'rows' => $annotationRows];
|
||||
|
||||
$json = $this->get('serializer')->serialize($annotations, 'json');
|
||||
|
||||
@ -141,6 +141,6 @@ class WallabagAnnotationController extends FOSRestController
|
||||
*/
|
||||
private function renderJsonResponse($json, $code = 200)
|
||||
{
|
||||
return new Response($json, $code, array('application/json'));
|
||||
return new Response($json, $code, ['application/json']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,13 +35,13 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->findOneByUsernameAndNotArchived('admin');
|
||||
|
||||
$headers = array('CONTENT_TYPE' => 'application/json');
|
||||
$content = json_encode(array(
|
||||
$headers = ['CONTENT_TYPE' => 'application/json'];
|
||||
$content = json_encode([
|
||||
'text' => 'my annotation',
|
||||
'quote' => 'my quote',
|
||||
'ranges' => array('start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31),
|
||||
));
|
||||
$crawler = $this->client->request('POST', 'annotations/'.$entry->getId().'.json', array(), array(), $headers, $content);
|
||||
'ranges' => ['start' => '', 'startOffset' => 24, 'end' => '', 'endOffset' => 31],
|
||||
]);
|
||||
$crawler = $this->client->request('POST', 'annotations/'.$entry->getId().'.json', [], [], $headers, $content);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
@ -69,11 +69,11 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
|
||||
|
||||
$this->logInAs('admin');
|
||||
|
||||
$headers = array('CONTENT_TYPE' => 'application/json');
|
||||
$content = json_encode(array(
|
||||
$headers = ['CONTENT_TYPE' => 'application/json'];
|
||||
$content = json_encode([
|
||||
'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());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
@ -99,11 +99,11 @@ class AnnotationControllerTest extends WallabagAnnotationTestCase
|
||||
|
||||
$this->logInAs('admin');
|
||||
|
||||
$headers = array('CONTENT_TYPE' => 'application/json');
|
||||
$content = json_encode(array(
|
||||
$headers = ['CONTENT_TYPE' => 'application/json'];
|
||||
$content = json_encode([
|
||||
'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());
|
||||
|
||||
$content = json_decode($this->client->getResponse()->getContent(), true);
|
||||
|
||||
@ -26,10 +26,10 @@ abstract class WallabagAnnotationTestCase extends WebTestCase
|
||||
{
|
||||
$crawler = $this->client->request('GET', '/login');
|
||||
$form = $crawler->filter('button[type=submit]')->form();
|
||||
$data = array(
|
||||
$data = [
|
||||
'_username' => $username,
|
||||
'_password' => 'mypassword',
|
||||
);
|
||||
];
|
||||
|
||||
$this->client->submit($form, $data);
|
||||
}
|
||||
@ -48,7 +48,7 @@ abstract class WallabagAnnotationTestCase extends WebTestCase
|
||||
$loginManager = $container->get('fos_user.security.login_manager');
|
||||
$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);
|
||||
|
||||
// save the login token into the session and put it in a cookie
|
||||
|
||||
@ -43,8 +43,8 @@ class WallabagRestController extends FOSRestController
|
||||
{
|
||||
$this->validateAuthentication();
|
||||
|
||||
$isArchived = (int) $request->query->get('archive');
|
||||
$isStarred = (int) $request->query->get('starred');
|
||||
$isArchived = (null === $request->query->get('archive')) ? null : (bool) $request->query->get('archive');
|
||||
$isStarred = (null === $request->query->get('starred')) ? null : (bool) $request->query->get('starred');
|
||||
$sort = $request->query->get('sort', 'created');
|
||||
$order = $request->query->get('order', 'desc');
|
||||
$page = (int) $request->query->get('page', 1);
|
||||
@ -52,7 +52,7 @@ class WallabagRestController extends FOSRestController
|
||||
|
||||
$pager = $this->getDoctrine()
|
||||
->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->setMaxPerPage($perPage);
|
||||
@ -384,6 +384,6 @@ class WallabagRestController extends FOSRestController
|
||||
*/
|
||||
private function renderJsonResponse($json)
|
||||
{
|
||||
return new Response($json, 200, array('application/json'));
|
||||
return new Response($json, 200, ['application/json']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
$entry = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->findOneBy(array('user' => 1, 'isArchived' => false));
|
||||
->findOneBy(['user' => 1, 'isArchived' => false]);
|
||||
|
||||
if (!$entry) {
|
||||
$this->markTestSkipped('No content found in db.');
|
||||
@ -44,7 +44,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
$entry = $this->client->getContainer()
|
||||
->get('doctrine.orm.entity_manager')
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->findOneBy(array('user' => 2, 'isArchived' => false));
|
||||
->findOneBy(['user' => 2, 'isArchived' => false]);
|
||||
|
||||
if (!$entry) {
|
||||
$this->markTestSkipped('No content found in db.');
|
||||
@ -79,7 +79,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
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());
|
||||
|
||||
@ -101,7 +101,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
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());
|
||||
|
||||
@ -149,10 +149,10 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
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',
|
||||
'tags' => 'google',
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
@ -168,11 +168,11 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
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',
|
||||
'archive' => '1',
|
||||
'tags' => 'google, apple',
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
@ -187,11 +187,11 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
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',
|
||||
'archive' => '1',
|
||||
'starred' => '1',
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
@ -206,11 +206,11 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
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',
|
||||
'archive' => 0,
|
||||
'starred' => 1,
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
@ -236,12 +236,12 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
// hydrate the tags relations
|
||||
$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',
|
||||
'tags' => 'new tag '.uniqid(),
|
||||
'starred' => '1',
|
||||
'archive' => '0',
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
@ -268,12 +268,12 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
// hydrate the tags relations
|
||||
$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',
|
||||
'tags' => 'new tag '.uniqid(),
|
||||
'starred' => 1,
|
||||
'archive' => 0,
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertEquals(200, $this->client->getResponse()->getStatusCode());
|
||||
|
||||
@ -298,9 +298,9 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
$this->markTestSkipped('No content found in db.');
|
||||
}
|
||||
|
||||
$tags = array();
|
||||
$tags = [];
|
||||
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');
|
||||
@ -323,7 +323,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
|
||||
$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());
|
||||
|
||||
@ -337,7 +337,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase
|
||||
->getRepository('WallabagCoreBundle:Entry')
|
||||
->find($entry->getId());
|
||||
|
||||
$tagsInDB = array();
|
||||
$tagsInDB = [];
|
||||
foreach ($entryDB->getTags()->toArray() as $tag) {
|
||||
$tagsInDB[$tag->getId()] = $tag->getLabel();
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ abstract class WallabagApiTestCase extends WebTestCase
|
||||
$loginManager = $container->get('fos_user.security.login_manager');
|
||||
$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);
|
||||
|
||||
// save the login token into the session and put it in a cookie
|
||||
|
||||
@ -60,6 +60,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||
->checkRequirements()
|
||||
->setupDatabase()
|
||||
->setupAdmin()
|
||||
->setupConfig()
|
||||
->setupAsset()
|
||||
;
|
||||
|
||||
@ -69,7 +70,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||
|
||||
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;
|
||||
|
||||
@ -119,7 +120,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||
|
||||
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
|
||||
if (true === $this->defaultInput->getOption('reset')) {
|
||||
@ -190,7 +191,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||
|
||||
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');
|
||||
$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);
|
||||
|
||||
$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
|
||||
$em->createQuery('DELETE FROM CraueConfigBundle:Setting')->execute();
|
||||
|
||||
$settings = [
|
||||
[
|
||||
'name' => 'download_pictures',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'carrot',
|
||||
'value' => '1',
|
||||
@ -370,7 +376,7 @@ class InstallCommand extends ContainerAwareCommand
|
||||
|
||||
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
|
||||
->runCommand('assets:install')
|
||||
@ -460,7 +466,13 @@ class InstallCommand extends ContainerAwareCommand
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -32,7 +32,7 @@ class ConfigController extends Controller
|
||||
$user = $this->getUser();
|
||||
|
||||
// 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);
|
||||
|
||||
if ($configForm->isValid()) {
|
||||
@ -52,7 +52,7 @@ class ConfigController extends Controller
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
if ($pwdForm->isValid()) {
|
||||
@ -71,10 +71,10 @@ class ConfigController extends Controller
|
||||
}
|
||||
|
||||
// handle changing user information
|
||||
$userForm = $this->createForm(UserInformationType::class, $user, array(
|
||||
'validation_groups' => array('Profile'),
|
||||
$userForm = $this->createForm(UserInformationType::class, $user, [
|
||||
'validation_groups' => ['Profile'],
|
||||
'action' => $this->generateUrl('config').'#set3',
|
||||
));
|
||||
]);
|
||||
$userForm->handleRequest($request);
|
||||
|
||||
if ($userForm->isValid()) {
|
||||
@ -89,7 +89,7 @@ class ConfigController extends Controller
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
if ($rssForm->isValid()) {
|
||||
@ -106,7 +106,7 @@ class ConfigController extends Controller
|
||||
|
||||
// handle tagging rule
|
||||
$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);
|
||||
|
||||
if ($newTaggingRule->isValid()) {
|
||||
@ -126,10 +126,10 @@ class ConfigController extends Controller
|
||||
$newUser = $userManager->createUser();
|
||||
// enable created user by default
|
||||
$newUser->setEnabled(true);
|
||||
$newUserForm = $this->createForm(NewUserType::class, $newUser, array(
|
||||
'validation_groups' => array('Profile'),
|
||||
$newUserForm = $this->createForm(NewUserType::class, $newUser, [
|
||||
'validation_groups' => ['Profile'],
|
||||
'action' => $this->generateUrl('config').'#set6',
|
||||
));
|
||||
]);
|
||||
$newUserForm->handleRequest($request);
|
||||
|
||||
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(
|
||||
'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->render('WallabagCoreBundle:Config:index.html.twig', array(
|
||||
'form' => array(
|
||||
return $this->render('WallabagCoreBundle:Config:index.html.twig', [
|
||||
'form' => [
|
||||
'config' => $configForm->createView(),
|
||||
'rss' => $rssForm->createView(),
|
||||
'pwd' => $pwdForm->createView(),
|
||||
'user' => $userForm->createView(),
|
||||
'new_user' => $newUserForm->createView(),
|
||||
'new_tagging_rule' => $newTaggingRule->createView(),
|
||||
),
|
||||
'rss' => array(
|
||||
],
|
||||
'rss' => [
|
||||
'username' => $user->getUsername(),
|
||||
'token' => $config->getRssToken(),
|
||||
),
|
||||
],
|
||||
'twofactor_auth' => $this->getParameter('twofactor_auth'),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -187,7 +187,7 @@ class ConfigController extends Controller
|
||||
$em->flush();
|
||||
|
||||
if ($request->isXmlHttpRequest()) {
|
||||
return new JsonResponse(array('token' => $config->getRssToken()));
|
||||
return new JsonResponse(['token' => $config->getRssToken()]);
|
||||
}
|
||||
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
@ -229,7 +229,7 @@ class ConfigController extends Controller
|
||||
* Retrieve config for the current user.
|
||||
* If no config were found, create a new one.
|
||||
*
|
||||
* @return Wallabag\CoreBundle\Entity\Config
|
||||
* @return Config
|
||||
*/
|
||||
private function getConfig()
|
||||
{
|
||||
|
||||
@ -21,9 +21,9 @@ class DeveloperController extends Controller
|
||||
{
|
||||
$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,
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -43,7 +43,7 @@ class DeveloperController extends Controller
|
||||
$clientForm->handleRequest($request);
|
||||
|
||||
if ($clientForm->isValid()) {
|
||||
$client->setAllowedGrantTypes(array('token', 'authorization_code', 'password', 'refresh_token'));
|
||||
$client->setAllowedGrantTypes(['token', 'authorization_code', 'password', 'refresh_token']);
|
||||
$em->persist($client);
|
||||
$em->flush();
|
||||
|
||||
@ -52,15 +52,15 @@ class DeveloperController extends Controller
|
||||
'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_secret' => $client->getSecret(),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->render('WallabagCoreBundle:Developer:client.html.twig', array(
|
||||
return $this->render('WallabagCoreBundle:Developer:client.html.twig', [
|
||||
'form' => $clientForm->createView(),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -49,16 +49,15 @@ class EntryController extends Controller
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
// check for existing entry, if it exists, redirect to it with a message
|
||||
$existingEntry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($entry->getUrl(), $this->getUser()->getId());
|
||||
$existingEntry = $this->checkIfEntryAlreadyExists($entry);
|
||||
|
||||
if (false !== $existingEntry) {
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'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);
|
||||
@ -70,9 +69,9 @@ class EntryController extends Controller
|
||||
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(),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,7 +85,10 @@ class EntryController extends Controller
|
||||
{
|
||||
$entry = new Entry($this->getUser());
|
||||
$entry->setUrl($request->get('url'));
|
||||
$this->updateEntry($entry);
|
||||
|
||||
if (false === $this->checkIfEntryAlreadyExists($entry)) {
|
||||
$this->updateEntry($entry);
|
||||
}
|
||||
|
||||
return $this->redirect($this->generateUrl('homepage'));
|
||||
}
|
||||
@ -129,12 +131,12 @@ class EntryController extends Controller
|
||||
'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(),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -255,17 +257,17 @@ class EntryController extends Controller
|
||||
$entries->setCurrentPage($page);
|
||||
} catch (OutOfRangeCurrentPageException $e) {
|
||||
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(
|
||||
'WallabagCoreBundle:Entry:entries.html.twig',
|
||||
array(
|
||||
[
|
||||
'form' => $form->createView(),
|
||||
'entries' => $entries,
|
||||
'currentPage' => $page,
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -284,7 +286,7 @@ class EntryController extends Controller
|
||||
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Entry:entry.html.twig',
|
||||
array('entry' => $entry)
|
||||
['entry' => $entry]
|
||||
);
|
||||
}
|
||||
|
||||
@ -312,7 +314,7 @@ class EntryController extends Controller
|
||||
$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
|
||||
);
|
||||
|
||||
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
|
||||
);
|
||||
|
||||
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.
|
||||
$url = $this->generateUrl(
|
||||
'view',
|
||||
array('id' => $entry->getId()),
|
||||
['id' => $entry->getId()],
|
||||
UrlGeneratorInterface::ABSOLUTE_URL
|
||||
);
|
||||
|
||||
@ -406,7 +412,11 @@ class EntryController extends Controller
|
||||
);
|
||||
|
||||
// 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.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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());
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,12 +16,15 @@ class ExportController extends Controller
|
||||
/**
|
||||
* Gets one entry content.
|
||||
*
|
||||
* @param Entry $entry
|
||||
* @param Entry $entry
|
||||
* @param string $format
|
||||
*
|
||||
* @Route("/export/{id}.{format}", name="export_entry", requirements={
|
||||
* "format": "epub|mobi|pdf|json|xml|txt|csv",
|
||||
* "id": "\d+"
|
||||
* })
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function downloadEntryAction(Entry $entry, $format)
|
||||
{
|
||||
@ -38,10 +41,15 @@ class ExportController extends Controller
|
||||
/**
|
||||
* Export all entries for current user.
|
||||
*
|
||||
* @param string $format
|
||||
* @param string $category
|
||||
*
|
||||
* @Route("/export/{category}.{format}", name="export_entries", requirements={
|
||||
* "format": "epub|mobi|pdf|json|xml|txt|csv",
|
||||
* "category": "all|unread|starred|archive"
|
||||
* })
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function downloadEntriesAction($format, $category)
|
||||
{
|
||||
|
||||
@ -87,9 +87,9 @@ class RssController extends Controller
|
||||
$perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit');
|
||||
$entries->setMaxPerPage($perPage);
|
||||
|
||||
return $this->render('WallabagCoreBundle:Entry:entries.xml.twig', array(
|
||||
return $this->render('WallabagCoreBundle:Entry:entries.xml.twig', [
|
||||
'type' => $type,
|
||||
'entries' => $entries,
|
||||
));
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ class StaticController extends Controller
|
||||
{
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Static:howto.html.twig',
|
||||
array()
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
@ -25,10 +25,10 @@ class StaticController extends Controller
|
||||
{
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Static:about.html.twig',
|
||||
array(
|
||||
[
|
||||
'version' => $this->getParameter('wallabag_core.version'),
|
||||
'paypal_url' => $this->getParameter('wallabag_core.paypal_url'),
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ class StaticController extends Controller
|
||||
{
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Static:quickstart.html.twig',
|
||||
array()
|
||||
[]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ class TagController extends Controller
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param Entry $entry
|
||||
*
|
||||
* @Route("/new-tag/{entry}", requirements={"entry" = "\d+"}, name="new_tag")
|
||||
*
|
||||
@ -38,13 +39,13 @@ class TagController extends Controller
|
||||
'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(),
|
||||
'entry' => $entry,
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -64,7 +65,9 @@ class TagController extends Controller
|
||||
}
|
||||
$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(
|
||||
'WallabagCoreBundle:Tag:tags.html.twig',
|
||||
array(
|
||||
[
|
||||
'tags' => $tags,
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,11 +15,6 @@ class LoadSettingData extends AbstractFixture implements OrderedFixtureInterface
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$settings = [
|
||||
[
|
||||
'name' => 'download_pictures',
|
||||
'value' => '1',
|
||||
'section' => 'entry',
|
||||
],
|
||||
[
|
||||
'name' => 'carrot',
|
||||
'value' => '1',
|
||||
|
||||
@ -16,14 +16,14 @@ class LoadTaggingRuleData extends AbstractFixture implements OrderedFixtureInter
|
||||
{
|
||||
$tr1 = new TaggingRule();
|
||||
$tr1->setRule('content matches "spurs"');
|
||||
$tr1->setTags(array('sport'));
|
||||
$tr1->setTags(['sport']);
|
||||
$tr1->setConfig($this->getReference('admin-config'));
|
||||
|
||||
$manager->persist($tr1);
|
||||
|
||||
$tr2 = new TaggingRule();
|
||||
$tr2->setRule('content matches "basket"');
|
||||
$tr2->setTags(array('sport'));
|
||||
$tr2->setTags(['sport']);
|
||||
$tr2->setConfig($this->getReference('admin-config'));
|
||||
|
||||
$manager->persist($tr2);
|
||||
|
||||
@ -36,9 +36,9 @@ class LocaleListener implements EventSubscriberInterface
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
// must be registered before the default Locale listener
|
||||
KernelEvents::REQUEST => array(array('onKernelRequest', 17)),
|
||||
);
|
||||
KernelEvents::REQUEST => [['onKernelRequest', 17]],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,9 +28,9 @@ class RegistrationConfirmedListener implements EventSubscriberInterface
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
return [
|
||||
FOSUserEvents::REGISTRATION_CONFIRMED => 'authenticate',
|
||||
);
|
||||
];
|
||||
}
|
||||
|
||||
public function authenticate(FilterUserResponseEvent $event, $eventName = null, EventDispatcherInterface $eventDispatcher = null)
|
||||
|
||||
@ -15,28 +15,28 @@ class ChangePasswordType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('old_password', PasswordType::class, array(
|
||||
'constraints' => new UserPassword(array('message' => 'validator.password_wrong_value')),
|
||||
->add('old_password', PasswordType::class, [
|
||||
'constraints' => new UserPassword(['message' => 'validator.password_wrong_value']),
|
||||
'label' => 'config.form_password.old_password_label',
|
||||
))
|
||||
->add('new_password', RepeatedType::class, array(
|
||||
])
|
||||
->add('new_password', RepeatedType::class, [
|
||||
'type' => PasswordType::class,
|
||||
'invalid_message' => 'validator.password_must_match',
|
||||
'required' => true,
|
||||
'first_options' => array('label' => 'config.form_password.new_password_label'),
|
||||
'second_options' => array('label' => 'config.form_password.repeat_new_password_label'),
|
||||
'constraints' => array(
|
||||
new Constraints\Length(array(
|
||||
'first_options' => ['label' => 'config.form_password.new_password_label'],
|
||||
'second_options' => ['label' => 'config.form_password.repeat_new_password_label'],
|
||||
'constraints' => [
|
||||
new Constraints\Length([
|
||||
'min' => 8,
|
||||
'minMessage' => 'validator.password_too_short',
|
||||
)),
|
||||
]),
|
||||
new Constraints\NotBlank(),
|
||||
),
|
||||
],
|
||||
'label' => 'config.form_password.new_password_label',
|
||||
))
|
||||
->add('save', SubmitType::class, array(
|
||||
])
|
||||
->add('save', SubmitType::class, [
|
||||
'label' => 'config.form.save',
|
||||
))
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@ -14,8 +14,8 @@ class ClientType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('redirect_uris', UrlType::class, array('required' => true, 'label' => 'developer.client.form.redirect_uris_label'))
|
||||
->add('save', SubmitType::class, array('label' => 'developer.client.form.save_label'))
|
||||
->add('redirect_uris', UrlType::class, ['required' => true, 'label' => 'developer.client.form.redirect_uris_label'])
|
||||
->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label'])
|
||||
;
|
||||
|
||||
$builder->get('redirect_uris')
|
||||
@ -24,7 +24,7 @@ class ClientType extends AbstractType
|
||||
return $originalUri;
|
||||
},
|
||||
function ($submittedUri) {
|
||||
return array($submittedUri);
|
||||
return [$submittedUri];
|
||||
}
|
||||
))
|
||||
;
|
||||
@ -32,9 +32,9 @@ class ClientType extends AbstractType
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\ApiBundle\Entity\Client',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -10,8 +10,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class ConfigType extends AbstractType
|
||||
{
|
||||
private $themes = array();
|
||||
private $languages = array();
|
||||
private $themes = [];
|
||||
private $languages = [];
|
||||
|
||||
/**
|
||||
* @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)
|
||||
{
|
||||
$builder
|
||||
->add('theme', ChoiceType::class, array(
|
||||
->add('theme', ChoiceType::class, [
|
||||
'choices' => array_flip($this->themes),
|
||||
'choices_as_values' => true,
|
||||
'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',
|
||||
))
|
||||
->add('reading_speed', ChoiceType::class, array(
|
||||
])
|
||||
->add('reading_speed', ChoiceType::class, [
|
||||
'label' => 'config.form_settings.reading_speed.label',
|
||||
'choices' => array(
|
||||
'choices' => [
|
||||
'config.form_settings.reading_speed.100_word' => '0.5',
|
||||
'config.form_settings.reading_speed.200_word' => '1',
|
||||
'config.form_settings.reading_speed.300_word' => '1.5',
|
||||
'config.form_settings.reading_speed.400_word' => '2',
|
||||
),
|
||||
))
|
||||
->add('language', ChoiceType::class, array(
|
||||
],
|
||||
])
|
||||
->add('language', ChoiceType::class, [
|
||||
'choices' => array_flip($this->languages),
|
||||
'choices_as_values' => true,
|
||||
'label' => 'config.form_settings.language_label',
|
||||
))
|
||||
->add('save', SubmitType::class, array(
|
||||
])
|
||||
->add('save', SubmitType::class, [
|
||||
'label' => 'config.form.save',
|
||||
))
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\CoreBundle\Entity\Config',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -14,30 +14,30 @@ class EditEntryType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('title', TextType::class, array(
|
||||
->add('title', TextType::class, [
|
||||
'required' => true,
|
||||
'label' => 'entry.edit.title_label',
|
||||
))
|
||||
->add('is_public', CheckboxType::class, array(
|
||||
])
|
||||
->add('is_public', CheckboxType::class, [
|
||||
'required' => false,
|
||||
'label' => 'entry.edit.is_public_label',
|
||||
))
|
||||
->add('url', TextType::class, array(
|
||||
])
|
||||
->add('url', TextType::class, [
|
||||
'disabled' => true,
|
||||
'required' => false,
|
||||
'label' => 'entry.edit.url_label',
|
||||
))
|
||||
->add('save', SubmitType::class, array(
|
||||
])
|
||||
->add('save', SubmitType::class, [
|
||||
'label' => 'entry.edit.save_label',
|
||||
))
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -34,28 +34,28 @@ class EntryFilterType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('readingTime', NumberRangeFilterType::class, array(
|
||||
->add('readingTime', NumberRangeFilterType::class, [
|
||||
'label' => 'entry.filters.reading_time.label',
|
||||
))
|
||||
->add('createdAt', DateRangeFilterType::class, array(
|
||||
'left_date_options' => array(
|
||||
'attr' => array(
|
||||
])
|
||||
->add('createdAt', DateRangeFilterType::class, [
|
||||
'left_date_options' => [
|
||||
'attr' => [
|
||||
'placeholder' => 'dd/mm/yyyy',
|
||||
),
|
||||
],
|
||||
'format' => 'dd/MM/yyyy',
|
||||
'widget' => 'single_text',
|
||||
),
|
||||
'right_date_options' => array(
|
||||
'attr' => array(
|
||||
],
|
||||
'right_date_options' => [
|
||||
'attr' => [
|
||||
'placeholder' => 'dd/mm/yyyy',
|
||||
),
|
||||
],
|
||||
'format' => 'dd/MM/yyyy',
|
||||
'widget' => 'single_text',
|
||||
),
|
||||
],
|
||||
'label' => 'entry.filters.created_at.label',
|
||||
)
|
||||
]
|
||||
)
|
||||
->add('domainName', TextFilterType::class, array(
|
||||
->add('domainName', TextFilterType::class, [
|
||||
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
|
||||
$value = $values['value'];
|
||||
if (strlen($value) <= 2 || empty($value)) {
|
||||
@ -66,14 +66,14 @@ class EntryFilterType extends AbstractType
|
||||
return $filterQuery->createCondition($expression);
|
||||
},
|
||||
'label' => 'entry.filters.domain_label',
|
||||
))
|
||||
->add('isArchived', CheckboxFilterType::class, array(
|
||||
])
|
||||
->add('isArchived', CheckboxFilterType::class, [
|
||||
'label' => 'entry.filters.archived_label',
|
||||
))
|
||||
->add('isStarred', CheckboxFilterType::class, array(
|
||||
])
|
||||
->add('isStarred', CheckboxFilterType::class, [
|
||||
'label' => 'entry.filters.starred_label',
|
||||
))
|
||||
->add('previewPicture', CheckboxFilterType::class, array(
|
||||
])
|
||||
->add('previewPicture', CheckboxFilterType::class, [
|
||||
'apply_filter' => function (QueryInterface $filterQuery, $field, $values) {
|
||||
if (false === $values['value']) {
|
||||
return;
|
||||
@ -84,12 +84,12 @@ class EntryFilterType extends AbstractType
|
||||
return $filterQuery->createCondition($expression);
|
||||
},
|
||||
'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_as_values' => true,
|
||||
'label' => 'entry.filters.language_label',
|
||||
))
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
@ -100,9 +100,9 @@ class EntryFilterType extends AbstractType
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'csrf_protection' => false,
|
||||
'validation_groups' => array('filtering'),
|
||||
));
|
||||
'validation_groups' => ['filtering'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,18 +12,18 @@ class NewEntryType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('url', UrlType::class, array(
|
||||
->add('url', UrlType::class, [
|
||||
'required' => true,
|
||||
'label' => 'entry.new.form_new.url_label',
|
||||
))
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\CoreBundle\Entity\Entry',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -12,15 +12,15 @@ class NewTagType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('label', TextType::class, array('required' => true))
|
||||
->add('label', TextType::class, ['required' => true])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\CoreBundle\Entity\Tag',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -17,38 +17,38 @@ class NewUserType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('username', TextType::class, array(
|
||||
->add('username', TextType::class, [
|
||||
'required' => true,
|
||||
'label' => 'config.form_new_user.username_label',
|
||||
))
|
||||
->add('plainPassword', RepeatedType::class, array(
|
||||
])
|
||||
->add('plainPassword', RepeatedType::class, [
|
||||
'type' => PasswordType::class,
|
||||
'invalid_message' => 'validator.password_must_match',
|
||||
'first_options' => array('label' => 'config.form_new_user.password_label'),
|
||||
'second_options' => array('label' => 'config.form_new_user.repeat_new_password_label'),
|
||||
'constraints' => array(
|
||||
new Constraints\Length(array(
|
||||
'first_options' => ['label' => 'config.form_new_user.password_label'],
|
||||
'second_options' => ['label' => 'config.form_new_user.repeat_new_password_label'],
|
||||
'constraints' => [
|
||||
new Constraints\Length([
|
||||
'min' => 8,
|
||||
'minMessage' => 'validator.password_too_short',
|
||||
)),
|
||||
]),
|
||||
new Constraints\NotBlank(),
|
||||
),
|
||||
],
|
||||
'label' => 'config.form_new_user.plain_password_label',
|
||||
))
|
||||
->add('email', EmailType::class, array(
|
||||
])
|
||||
->add('email', EmailType::class, [
|
||||
'label' => 'config.form_new_user.email_label',
|
||||
))
|
||||
->add('save', SubmitType::class, array(
|
||||
])
|
||||
->add('save', SubmitType::class, [
|
||||
'label' => 'config.form.save',
|
||||
))
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\UserBundle\Entity\User',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -12,20 +12,20 @@ class RssType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('rss_limit', null, array(
|
||||
->add('rss_limit', null, [
|
||||
'label' => 'config.form_rss.rss_limit',
|
||||
))
|
||||
->add('save', SubmitType::class, array(
|
||||
])
|
||||
->add('save', SubmitType::class, [
|
||||
'label' => 'config.form.save',
|
||||
))
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\CoreBundle\Entity\Config',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -14,19 +14,19 @@ class TaggingRuleType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('rule', TextType::class, array(
|
||||
->add('rule', TextType::class, [
|
||||
'required' => true,
|
||||
'label' => 'config.form_rules.rule_label',
|
||||
))
|
||||
->add('save', SubmitType::class, array(
|
||||
])
|
||||
->add('save', SubmitType::class, [
|
||||
'label' => 'config.form.save',
|
||||
))
|
||||
])
|
||||
;
|
||||
|
||||
$tagsField = $builder
|
||||
->create('tags', TextType::class, array(
|
||||
->create('tags', TextType::class, [
|
||||
'label' => 'config.form_rules.tags_label',
|
||||
))
|
||||
])
|
||||
->addModelTransformer(new StringToListTransformer(','));
|
||||
|
||||
$builder->add($tagsField);
|
||||
@ -34,9 +34,9 @@ class TaggingRuleType extends AbstractType
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\CoreBundle\Entity\TaggingRule',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -15,19 +15,19 @@ class UserInformationType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('name', TextType::class, array(
|
||||
->add('name', TextType::class, [
|
||||
'label' => 'config.form_user.name_label',
|
||||
))
|
||||
->add('email', EmailType::class, array(
|
||||
])
|
||||
->add('email', EmailType::class, [
|
||||
'label' => 'config.form_user.email_label',
|
||||
))
|
||||
->add('twoFactorAuthentication', CheckboxType::class, array(
|
||||
])
|
||||
->add('twoFactorAuthentication', CheckboxType::class, [
|
||||
'required' => false,
|
||||
'label' => 'config.form_user.twoFactorAuthentication_label',
|
||||
))
|
||||
->add('save', SubmitType::class, array(
|
||||
])
|
||||
->add('save', SubmitType::class, [
|
||||
'label' => 'config.form.save',
|
||||
))
|
||||
])
|
||||
->remove('username')
|
||||
->remove('plainPassword')
|
||||
;
|
||||
@ -40,9 +40,9 @@ class UserInformationType extends AbstractType
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver->setDefaults(array(
|
||||
$resolver->setDefaults([
|
||||
'data_class' => 'Wallabag\UserBundle\Entity\User',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
|
||||
@ -82,10 +82,10 @@ class ContentProxy
|
||||
try {
|
||||
$this->tagger->tag($entry);
|
||||
} 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,
|
||||
'error_msg' => $e->getMessage(),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
return $entry;
|
||||
|
||||
@ -18,10 +18,10 @@ class EntriesExport
|
||||
private $wallabagUrl;
|
||||
private $logoPath;
|
||||
private $title = '';
|
||||
private $entries = array();
|
||||
private $authors = array('wallabag');
|
||||
private $entries = [];
|
||||
private $authors = ['wallabag'];
|
||||
private $language = '';
|
||||
private $tags = array();
|
||||
private $tags = [];
|
||||
private $footerTemplate = '<div style="text-align:center;">
|
||||
<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>
|
||||
@ -41,12 +41,14 @@ class EntriesExport
|
||||
* Define entries.
|
||||
*
|
||||
* @param array|Entry $entries An array of entries or one entry
|
||||
*
|
||||
* @return EntriesExport
|
||||
*/
|
||||
public function setEntries($entries)
|
||||
{
|
||||
if (!is_array($entries)) {
|
||||
$this->language = $entries->getLanguage();
|
||||
$entries = array($entries);
|
||||
$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.
|
||||
*
|
||||
* @param string $method Method to get articles
|
||||
*
|
||||
* @return EntriesExport
|
||||
*/
|
||||
public function updateTitle($method)
|
||||
{
|
||||
@ -78,6 +82,8 @@ class EntriesExport
|
||||
* Sets the output format.
|
||||
*
|
||||
* @param string $format
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function exportAs($format)
|
||||
{
|
||||
@ -91,6 +97,8 @@ class EntriesExport
|
||||
|
||||
/**
|
||||
* Use PHPePub to dump a .epub file.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function produceEpub()
|
||||
{
|
||||
@ -162,17 +170,19 @@ class EntriesExport
|
||||
return Response::create(
|
||||
$book->getBook(),
|
||||
200,
|
||||
array(
|
||||
[
|
||||
'Content-Description' => 'File Transfer',
|
||||
'Content-type' => 'application/epub+zip',
|
||||
'Content-Disposition' => 'attachment; filename="'.$this->title.'.epub"',
|
||||
'Content-Transfer-Encoding' => 'binary',
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use PHPMobi to dump a .mobi file.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function produceMobi()
|
||||
{
|
||||
@ -211,18 +221,20 @@ class EntriesExport
|
||||
return Response::create(
|
||||
$mobi->toString(),
|
||||
200,
|
||||
array(
|
||||
[
|
||||
'Accept-Ranges' => 'bytes',
|
||||
'Content-Description' => 'File Transfer',
|
||||
'Content-type' => 'application/x-mobipocket-ebook',
|
||||
'Content-Disposition' => 'attachment; filename="'.$this->title.'.mobi"',
|
||||
'Content-Transfer-Encoding' => 'binary',
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use TCPDF to dump a .pdf file.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function producePdf()
|
||||
{
|
||||
@ -266,17 +278,19 @@ class EntriesExport
|
||||
return Response::create(
|
||||
$pdf->Output('', 'S'),
|
||||
200,
|
||||
array(
|
||||
[
|
||||
'Content-Description' => 'File Transfer',
|
||||
'Content-type' => 'application/pdf',
|
||||
'Content-Disposition' => 'attachment; filename="'.$this->title.'.pdf"',
|
||||
'Content-Transfer-Encoding' => 'binary',
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inspired from CsvFileDumper.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function produceCsv()
|
||||
{
|
||||
@ -284,20 +298,20 @@ class EntriesExport
|
||||
$enclosure = '"';
|
||||
$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) {
|
||||
fputcsv(
|
||||
$handle,
|
||||
array(
|
||||
[
|
||||
$entry->getTitle(),
|
||||
$entry->getURL(),
|
||||
// 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()),
|
||||
$entry->getMimetype(),
|
||||
$entry->getLanguage(),
|
||||
),
|
||||
],
|
||||
$delimiter,
|
||||
$enclosure
|
||||
);
|
||||
@ -310,40 +324,55 @@ class EntriesExport
|
||||
return Response::create(
|
||||
$output,
|
||||
200,
|
||||
array(
|
||||
[
|
||||
'Content-type' => 'application/csv',
|
||||
'Content-Disposition' => 'attachment; filename="'.$this->title.'.csv"',
|
||||
'Content-Transfer-Encoding' => 'UTF-8',
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump a JSON file.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function produceJson()
|
||||
{
|
||||
return Response::create(
|
||||
$this->prepareSerializingContent('json'),
|
||||
200,
|
||||
array(
|
||||
[
|
||||
'Content-type' => 'application/json',
|
||||
'Content-Disposition' => 'attachment; filename="'.$this->title.'.json"',
|
||||
'Content-Transfer-Encoding' => 'UTF-8',
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump a XML file.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function produceXml()
|
||||
{
|
||||
return Response::create(
|
||||
$this->prepareSerializingContent('xml'),
|
||||
200,
|
||||
array(
|
||||
[
|
||||
'Content-type' => 'application/xml',
|
||||
'Content-Disposition' => 'attachment; filename="'.$this->title.'.xml"',
|
||||
'Content-Transfer-Encoding' => 'UTF-8',
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dump a TXT file.
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
private function produceTxt()
|
||||
{
|
||||
$content = '';
|
||||
@ -356,11 +385,11 @@ class EntriesExport
|
||||
return Response::create(
|
||||
$content,
|
||||
200,
|
||||
array(
|
||||
[
|
||||
'Content-type' => 'text/plain',
|
||||
'Content-Disposition' => 'attachment; filename="'.$this->title.'.txt"',
|
||||
'Content-Transfer-Encoding' => 'UTF-8',
|
||||
)
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@ -378,7 +407,7 @@ class EntriesExport
|
||||
return $serializer->serialize(
|
||||
$this->entries,
|
||||
$format,
|
||||
SerializationContext::create()->setGroups(array('entries_for_user'))
|
||||
SerializationContext::create()->setGroups(['entries_for_user'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
37
src/Wallabag/CoreBundle/Helper/Redirect.php
Normal file
37
src/Wallabag/CoreBundle/Helper/Redirect.php
Normal 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;
|
||||
}
|
||||
}
|
||||
@ -54,7 +54,7 @@ class RuleBasedTagger
|
||||
public function tagAllForUser(User $user)
|
||||
{
|
||||
$rules = $this->getRulesForUser($user);
|
||||
$entries = array();
|
||||
$entries = [];
|
||||
|
||||
foreach ($rules as $rule) {
|
||||
$qb = $this->entryRepository->getBuilderForAllByUser($user->getId());
|
||||
|
||||
@ -157,7 +157,7 @@ class EntryRepository extends EntityRepository
|
||||
->getQuery()
|
||||
->getResult();
|
||||
|
||||
$languages = array();
|
||||
$languages = [];
|
||||
foreach ($results as $result) {
|
||||
$languages[$result['language']] = $result['language'];
|
||||
}
|
||||
@ -233,7 +233,7 @@ class EntryRepository extends EntityRepository
|
||||
* @param $url
|
||||
* @param $userId
|
||||
*
|
||||
* @return array|bool
|
||||
* @return Entry|bool
|
||||
*/
|
||||
public function findByUrlAndUserId($url, $userId)
|
||||
{
|
||||
|
||||
@ -3,14 +3,14 @@ services:
|
||||
class: Wallabag\CoreBundle\Helper\DetectActiveTheme
|
||||
arguments:
|
||||
- "@security.token_storage"
|
||||
- %wallabag_core.theme%
|
||||
- "%wallabag_core.theme%"
|
||||
|
||||
# custom form type
|
||||
wallabag_core.form.type.config:
|
||||
class: Wallabag\CoreBundle\Form\Type\ConfigType
|
||||
arguments:
|
||||
- %liip_theme.themes%
|
||||
- %wallabag_core.languages%
|
||||
- "%liip_theme.themes%"
|
||||
- "%wallabag_core.languages%"
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
@ -32,14 +32,29 @@ services:
|
||||
wallabag_core.table_prefix_subscriber:
|
||||
class: Wallabag\CoreBundle\Subscriber\TablePrefixSubscriber
|
||||
arguments:
|
||||
- %database_table_prefix%
|
||||
- "%database_table_prefix%"
|
||||
tags:
|
||||
- { name: doctrine.event_subscriber }
|
||||
|
||||
wallabag_core.graby:
|
||||
class: Graby\Graby
|
||||
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:
|
||||
- [ setLogger, [ "@logger" ] ]
|
||||
tags:
|
||||
@ -77,10 +92,10 @@ services:
|
||||
class: Wallabag\CoreBundle\EventListener\RegistrationConfirmedListener
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- %wallabag_core.theme%
|
||||
- %wallabag_core.items_on_page%
|
||||
- %wallabag_core.rss_limit%
|
||||
- %wallabag_core.language%
|
||||
- "%wallabag_core.theme%"
|
||||
- "%wallabag_core.items_on_page%"
|
||||
- "%wallabag_core.rss_limit%"
|
||||
- "%wallabag_core.language%"
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
@ -99,3 +114,8 @@ services:
|
||||
class: Wallabag\CoreBundle\Operator\Doctrine\Matches
|
||||
tags:
|
||||
- { name: rulerz.operator, executor: rulerz.executor.doctrine, operator: matches, inline: true }
|
||||
|
||||
wallabag_core.helper.redirect:
|
||||
class: Wallabag\CoreBundle\Helper\Redirect
|
||||
arguments:
|
||||
- "@router"
|
||||
|
||||
@ -512,7 +512,7 @@ img.preview {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
div.pagination ul {
|
||||
text-align: right;
|
||||
margin-bottom:50px;
|
||||
}
|
||||
@ -523,25 +523,25 @@ img.preview {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.pagination > * {
|
||||
div.pagination ul > * {
|
||||
display: inline-block;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
.pagination a {
|
||||
div.pagination ul a {
|
||||
color: #999;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.pagination a:hover, .pagination a:focus {
|
||||
div.pagination ul a:hover, div.pagination ul a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.pagination .disabled {
|
||||
div.pagination ul .disabled {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pagination .current {
|
||||
div.pagination ul .current {
|
||||
height: 25px;
|
||||
padding: 4px 8px;
|
||||
border: 1px solid #d5d5d5;
|
||||
|
||||
@ -78,19 +78,6 @@ $.fn.ready(function() {
|
||||
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
|
||||
========================================================================== */
|
||||
|
||||
@ -80,6 +80,14 @@ main, #content, .valign-wrapper {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.pagination ul {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.pagination li {
|
||||
padding: 0;
|
||||
}
|
||||
@ -90,6 +98,18 @@ main, #content, .valign-wrapper {
|
||||
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 {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ entry:
|
||||
page_titles:
|
||||
# unread: 'Unread entries'
|
||||
# starred: 'Starred entries'
|
||||
# archive: 'Archived entries'
|
||||
# archived: 'Archived entries'
|
||||
# filtered: 'Filtered entries'
|
||||
list:
|
||||
# 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'
|
||||
# how_to_first_app: 'How to create my first application'
|
||||
# full_documentation: 'View full API documentation'
|
||||
# list_methods: 'List API methods'
|
||||
# clients:
|
||||
# title: 'Clients'
|
||||
# create_new: 'Create a new client'
|
||||
|
||||
@ -137,7 +137,7 @@ entry:
|
||||
page_titles:
|
||||
unread: 'Ungelesene Einträge'
|
||||
starred: 'Favorisierte Einträge'
|
||||
archive: 'Archivierte Einträge'
|
||||
archived: 'Archivierte Einträge'
|
||||
filtered: 'Gefilterte Einträge'
|
||||
list:
|
||||
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'
|
||||
how_to_first_app: 'Wie erstelle ich meine erste Anwendung'
|
||||
full_documentation: 'Komplette API-Dokumentation einsehen'
|
||||
# list_methods: 'List API methods'
|
||||
clients:
|
||||
title: 'Clients'
|
||||
create_new: 'Neuen Client erstellen'
|
||||
|
||||
@ -137,7 +137,7 @@ entry:
|
||||
page_titles:
|
||||
unread: 'Unread entries'
|
||||
starred: 'Starred entries'
|
||||
archive: 'Archived entries'
|
||||
archived: 'Archived entries'
|
||||
filtered: 'Filtered entries'
|
||||
list:
|
||||
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_unread: 'Mark as unread'
|
||||
set_as_favorite: 'Favorite'
|
||||
view_original_article: 'Orignal article'
|
||||
view_original_article: 'Original article'
|
||||
re_fetch_content: 'Re-fetch content'
|
||||
delete: 'Delete'
|
||||
add_a_tag: 'Add a tag'
|
||||
@ -338,6 +338,7 @@ developer:
|
||||
documentation: 'Documentation'
|
||||
how_to_first_app: 'How to create my first application'
|
||||
full_documentation: 'View full API documentation'
|
||||
list_methods: 'List API methods'
|
||||
clients:
|
||||
title: 'Clients'
|
||||
create_new: 'Create a new client'
|
||||
|
||||
@ -19,9 +19,9 @@ menu:
|
||||
unread: 'Sin leer'
|
||||
starred: 'Favoritos'
|
||||
archive: 'Archivo'
|
||||
all_articles: 'Todos los artículos'
|
||||
all_articles: 'Todos artículos'
|
||||
config: 'Configuración'
|
||||
tags: 'Tags'
|
||||
tags: 'Etiquetas'
|
||||
internal_settings: 'Configuración interna'
|
||||
import: 'Importar'
|
||||
howto: 'Ayuda'
|
||||
@ -62,18 +62,18 @@ config:
|
||||
items_per_page_label: 'Número de artículos por página'
|
||||
language_label: 'Idioma'
|
||||
reading_speed:
|
||||
# label: 'Reading speed'
|
||||
# help_message: 'You can use online tools to estimate your reading speed:'
|
||||
# 100_word: 'I read ~100 words per minute'
|
||||
# 200_word: 'I read ~200 words per minute'
|
||||
# 300_word: 'I read ~300 words per minute'
|
||||
# 400_word: 'I read ~400 words per minute'
|
||||
label: 'Velocidad de leer'
|
||||
help_message: 'Se puede usar las técnicas para calcular su velocidad de leer:'
|
||||
100_word: 'Leo ~100 palabras por minuto'
|
||||
200_word: 'Leo ~200 palabras por minuto'
|
||||
300_word: 'Leo ~300 palabras por minuto'
|
||||
400_word: 'Leo ~400 palabras por minuto'
|
||||
form_rss:
|
||||
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'
|
||||
# no_token: 'No token'
|
||||
token_create: 'Crear token'
|
||||
token_reset: 'Resetear token'
|
||||
token_reset: 'Reiniciar token'
|
||||
rss_links: 'URL de su feed RSS'
|
||||
rss_link:
|
||||
unread: 'sin leer'
|
||||
@ -90,17 +90,17 @@ config:
|
||||
new_password_label: 'Nueva contraseña'
|
||||
repeat_new_password_label: 'Confirmar la nueva contraseña'
|
||||
form_rules:
|
||||
# if_label: 'if'
|
||||
# then_tag_as_label: 'then tag as'
|
||||
# delete_rule_label: 'delete'
|
||||
if_label: 'si'
|
||||
then_tag_as_label: 'Etiquete como'
|
||||
delete_rule_label: 'Borre'
|
||||
rule_label: 'Regla'
|
||||
tags_label: 'Tags'
|
||||
tags_label: 'Etiquetas'
|
||||
faq:
|
||||
title: 'FAQ'
|
||||
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_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 <= 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 >= 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 <= 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 >= 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_description: 'Las siguientes variables y operadores se pueden utilizar para crear las reglas de etiquetado automáticas:'
|
||||
meaning: 'Significado'
|
||||
@ -111,7 +111,7 @@ config:
|
||||
isArchived: 'El artículo está guardado o no'
|
||||
isStarred: 'Si el artículo es un favorito o no'
|
||||
content: "El contenido del artículo"
|
||||
language: "El idoma del artículo"
|
||||
language: "El idioma del artículo"
|
||||
mimetype: "Tipo MIME del artículo"
|
||||
readingTime: "El tiempo estimado de lectura del artículo, en minutos"
|
||||
domainName: 'El dominio del artículo'
|
||||
@ -123,9 +123,9 @@ config:
|
||||
strictly_greater_than: 'Estrictámente mas que…'
|
||||
equal_to: 'Egual a…'
|
||||
not_equal_to: 'Diferente de…'
|
||||
or: 'Una regla O otra'
|
||||
or: 'Una regla U 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:
|
||||
username_label: 'Nombre de usuario'
|
||||
password_label: 'Contraseña'
|
||||
@ -135,18 +135,18 @@ config:
|
||||
|
||||
entry:
|
||||
page_titles:
|
||||
# unread: 'Unread entries'
|
||||
# starred: 'Starred entries'
|
||||
# archive: 'Archived entries'
|
||||
# filtered: 'Filtered entries'
|
||||
unread: 'Artúclos no leídos'
|
||||
starred: 'Artículos favoritos'
|
||||
archived: 'Artículos archivados'
|
||||
filtered: 'Artículos filtrados'
|
||||
list:
|
||||
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_minutes: 'tiempo estimado de lectura: %readingTime% min'
|
||||
reading_time_less_one_minute: 'tiempo estimado de lectura: <small class="inferieur"><</small> 1 min'
|
||||
original_article: 'original'
|
||||
toogle_as_read: 'Marcar cómo leído/ no leído'
|
||||
toogle_as_star: 'Marcar cómo favorito/ no favorito'
|
||||
toogle_as_read: 'Marcar como leído/ no leído'
|
||||
toogle_as_star: 'Marcar como favorito/ no favorito'
|
||||
delete: 'Suprimir'
|
||||
export_title: 'Exportar'
|
||||
filters:
|
||||
@ -158,7 +158,7 @@ entry:
|
||||
preview_picture_help: 'Foto de preview'
|
||||
language_label: 'Idioma'
|
||||
reading_time:
|
||||
label: 'Duración de lectura en minutos'
|
||||
label: 'Duración de lectura en minutos'
|
||||
from: 'de'
|
||||
to: 'a'
|
||||
domain_label: 'Nombre de dominio'
|
||||
@ -175,7 +175,7 @@ entry:
|
||||
back_to_homepage: 'Volver'
|
||||
set_as_read: 'Marcar como leído'
|
||||
# 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'
|
||||
re_fetch_content: 'Redescargar el contenido'
|
||||
delete: 'Suprimir'
|
||||
@ -205,18 +205,18 @@ entry:
|
||||
about:
|
||||
page_title: 'Acerca de'
|
||||
top_menu:
|
||||
who_behind_wallabag: 'Equipo de desarrollo de wallabag'
|
||||
getting_help: 'Conseguir ayuda'
|
||||
who_behind_wallabag: 'Equipo del desarrollo de wallabag'
|
||||
getting_help: 'Pedir ayuda'
|
||||
helping: 'Ayudar a wallabag'
|
||||
contributors: 'Contribuidores'
|
||||
third_party: 'Librerías de terceeros'
|
||||
contributors: 'Colaboradores'
|
||||
third_party: 'Librerías de terceros'
|
||||
who_behind_wallabag:
|
||||
developped_by: 'Desarrollado por'
|
||||
website: 'Sitio web'
|
||||
many_contributors: 'Y muchos otros contribuidores ♥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">en Github</a>'
|
||||
project_website: 'Web del proyecto'
|
||||
many_contributors: 'Y muchos otros colaboradores ♥ <a href="https://github.com/wallabag/wallabag/graphs/contributors">en Github</a>'
|
||||
project_website: 'Sitio web del proyecto'
|
||||
license: 'Licencia'
|
||||
version: 'Version'
|
||||
version: 'Versión'
|
||||
getting_help:
|
||||
documentation: 'Documentación'
|
||||
bug_reports: 'Reporte de errores'
|
||||
@ -227,7 +227,7 @@ about:
|
||||
by_contributing_2: 'nuestras necesidades están en un ticket'
|
||||
by_paypal: 'via Paypal'
|
||||
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:
|
||||
description: 'Aquí está la lista de las dependencias utilizadas por wallabag (con sus licencias) :'
|
||||
package: 'Paquete'
|
||||
@ -235,10 +235,10 @@ about:
|
||||
|
||||
howto:
|
||||
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:
|
||||
browser_addons: 'Extensiones de navigador'
|
||||
mobile_apps: 'Applicaciones para smartphone'
|
||||
mobile_apps: 'Aplicaciones para smartphone'
|
||||
bookmarklet: 'Bookmarklet'
|
||||
form:
|
||||
description: 'Gracias a este formulario'
|
||||
@ -249,8 +249,8 @@ howto:
|
||||
android:
|
||||
via_f_droid: 'via F-Droid'
|
||||
via_google_play: 'via Google Play'
|
||||
# ios: 'on the iTunes Store'
|
||||
# windows: 'on the Microsoft Store'
|
||||
ios: 'por la tienda de iTunes'
|
||||
windows: 'por la tienda de Microsoft'
|
||||
bookmarklet:
|
||||
description: 'Desplazar y soltar este link en la barra de marcadores :'
|
||||
|
||||
@ -301,9 +301,9 @@ quickstart:
|
||||
gitter: 'En Gitter'
|
||||
|
||||
tag:
|
||||
page_title: 'Tags'
|
||||
page_title: 'Etiquetas'
|
||||
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:
|
||||
page_title: 'Importar'
|
||||
@ -338,6 +338,7 @@ developer:
|
||||
# documentation: 'Documentation'
|
||||
# how_to_first_app: 'How to create my first application'
|
||||
# full_documentation: 'View full API documentation'
|
||||
# list_methods: 'List API methods'
|
||||
# clients:
|
||||
# title: 'Clients'
|
||||
# create_new: 'Create a new client'
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
security:
|
||||
login:
|
||||
# page_title: 'Welcome to wallabag!'
|
||||
page_title: 'به wallabag خوش آمدید!'
|
||||
keep_logged_in: 'مرا به خاطر بسپار'
|
||||
forgot_password: ' رمزتان را گم کردهاید؟'
|
||||
submit: 'ورود'
|
||||
# register: 'Register'
|
||||
register: 'نامنویسی'
|
||||
username: 'نام کاربری'
|
||||
password: 'رمز'
|
||||
# cancel: 'Cancel'
|
||||
cancel: 'لغو'
|
||||
resetting:
|
||||
description: "نشانی ایمیل خود را بنویسید تا راهنمای تغییر رمز را برایتان بفرستیم."
|
||||
register:
|
||||
# page_title: 'Create an account'
|
||||
# go_to_account: 'Go to your account'
|
||||
page_title: 'حساب بسازید'
|
||||
go_to_account: 'حساب خود را ببینید'
|
||||
|
||||
menu:
|
||||
left:
|
||||
@ -22,28 +22,28 @@ menu:
|
||||
all_articles: 'همه'
|
||||
config: 'پیکربندی'
|
||||
tags: 'برچسبها'
|
||||
# internal_settings: 'Internal Settings'
|
||||
# import: 'Import'
|
||||
internal_settings: 'تنظیمات درونی'
|
||||
import: 'درونریزی'
|
||||
howto: 'خودآموز'
|
||||
# developer: 'Developer'
|
||||
developer: 'سازندگان'
|
||||
logout: 'خروج'
|
||||
about: 'درباره'
|
||||
search: 'جستجو'
|
||||
# save_link: 'Save a link'
|
||||
save_link: 'ذخیرهٔ یک پیوند'
|
||||
back_to_unread: 'بازگشت به خواندهنشدهها'
|
||||
top:
|
||||
add_new_entry: 'افزودن مقالهٔ تازه'
|
||||
search: 'جستجو'
|
||||
filter_entries: 'فیلترکردن مقالهها'
|
||||
# export: 'Export'
|
||||
export: 'برونبری'
|
||||
search_form:
|
||||
input_label: 'جستجوی خود را اینجا بنویسید:'
|
||||
|
||||
footer:
|
||||
wallabag:
|
||||
# elsewhere: 'Take wallabag with you'
|
||||
# social: 'Social'
|
||||
# powered_by: 'powered by'
|
||||
elsewhere: 'wallabag همراه شما'
|
||||
social: 'شبکههای اجتماعی'
|
||||
powered_by: 'توانمند با'
|
||||
about: 'درباره'
|
||||
|
||||
config:
|
||||
@ -53,7 +53,7 @@ config:
|
||||
rss: 'آر-اس-اس'
|
||||
user_info: 'اطلاعات کاربر'
|
||||
password: 'رمز'
|
||||
# rules: 'Tagging rules'
|
||||
rules: 'برچسبگذاری خودکار'
|
||||
new_user: 'افزودن کاربر'
|
||||
form:
|
||||
save: 'ذخیره'
|
||||
@ -62,12 +62,12 @@ config:
|
||||
items_per_page_label: 'تعداد مقاله در هر صفحه'
|
||||
language_label: 'زبان'
|
||||
reading_speed:
|
||||
# label: 'Reading speed'
|
||||
# help_message: 'You can use online tools to estimate your reading speed:'
|
||||
# 100_word: 'I read ~100 words per minute'
|
||||
# 200_word: 'I read ~200 words per minute'
|
||||
# 300_word: 'I read ~300 words per minute'
|
||||
# 400_word: 'I read ~400 words per minute'
|
||||
label: 'سرعت خواندن'
|
||||
help_message: 'سرعت خواندنتان را با ابزارهای آنلاین تخمین بزنید:'
|
||||
100_word: 'من تقریباً ۱۰۰ واژه را در دقیقه میخوانم'
|
||||
200_word: 'من تقریباً ۲۰۰ واژه را در دقیقه میخوانم'
|
||||
300_word: 'من تقریباً ۳۰۰ واژه را در دقیقه میخوانم'
|
||||
400_word: 'من تقریباً ۴۰۰ واژه را در دقیقه میخوانم'
|
||||
form_rss:
|
||||
description: 'با خوراک آر-اس-اس که wallabag در اختیارتان میگذارد، میتوانید مقالههای ذخیرهشده را در نرمافزار آر-اس-اس دلخواه خود بخوانید. برای این کار نخست باید یک کد بسازید.'
|
||||
token_label: 'کد آر-اس-اس'
|
||||
@ -81,23 +81,23 @@ config:
|
||||
archive: 'بایگانی'
|
||||
rss_limit: 'محدودیت آر-اس-اس'
|
||||
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: 'نام'
|
||||
email_label: 'نشانی ایمیل'
|
||||
# twoFactorAuthentication_label: 'Two factor authentication'
|
||||
twoFactorAuthentication_label: 'تأیید ۲مرحلهای'
|
||||
form_password:
|
||||
old_password_label: 'رمز قدیمی'
|
||||
new_password_label: 'رمز تازه'
|
||||
repeat_new_password_label: 'رمز تازه را دوباره بنویسید'
|
||||
form_rules:
|
||||
# if_label: 'if'
|
||||
# then_tag_as_label: 'then tag as'
|
||||
# delete_rule_label: 'delete'
|
||||
# rule_label: 'Rule'
|
||||
# tags_label: 'Tags'
|
||||
# faq:
|
||||
# title: 'FAQ'
|
||||
# tagging_rules_definition_title: 'What does « tagging rules » mean?'
|
||||
if_label: 'اگر'
|
||||
then_tag_as_label: 'این برچسب را بزن'
|
||||
delete_rule_label: 'پاک کن'
|
||||
rule_label: 'قانون'
|
||||
tags_label: 'برچسبها'
|
||||
faq:
|
||||
title: 'پرسشهای متداول'
|
||||
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.'
|
||||
# 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 <= 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 >= 5 AND domainName = "github.com"</i> » then tag as « <i>long reading, github </i> »'
|
||||
@ -135,12 +135,12 @@ config:
|
||||
|
||||
entry:
|
||||
page_titles:
|
||||
# unread: 'Unread entries'
|
||||
# starred: 'Starred entries'
|
||||
# archive: 'Archived entries'
|
||||
# filtered: 'Filtered entries'
|
||||
unread: 'مقالههای خواندهنشده'
|
||||
starred: 'مقالههای برگزیده'
|
||||
archived: 'مقالههای بایگانیشده'
|
||||
filtered: 'مقالههای فیلترشده'
|
||||
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_minutes: 'زمان تخمینی برای خواندن: %readingTime% min'
|
||||
reading_time_less_one_minute: 'زمان تخمینی برای خواندن: <small class="inferieur"><</small> 1 min'
|
||||
@ -148,7 +148,7 @@ entry:
|
||||
toogle_as_read: 'خواندهشده/خواندهنشده'
|
||||
toogle_as_star: 'برگزیده/نابرگزیده'
|
||||
delete: 'پاک کردن'
|
||||
# export_title: 'Export'
|
||||
export_title: 'برونبری'
|
||||
filters:
|
||||
title: 'فیلتر'
|
||||
status_label: 'وضعیت'
|
||||
@ -171,35 +171,35 @@ entry:
|
||||
filter: 'فیلتر'
|
||||
view:
|
||||
left_menu:
|
||||
# back_to_top: 'Back to top'
|
||||
back_to_top: 'بازگشت به بالای صفحه'
|
||||
back_to_homepage: 'بازگشت'
|
||||
set_as_read: 'خواندهشده'
|
||||
# set_as_unread: 'Mark as unread'
|
||||
set_as_unread: 'به عنوان خواندهنشده علامت بزن'
|
||||
set_as_favorite: 'برگزیده'
|
||||
view_original_article: 'مقالهٔ اصلی'
|
||||
# re_fetch_content: 'Re-fetch content'
|
||||
re_fetch_content: 'مقالهها را دوباره دریافت کن'
|
||||
delete: 'پاک کردن'
|
||||
add_a_tag: 'افزودن برچسب'
|
||||
share_content: 'همرسانی'
|
||||
share_email_label: 'نشانی ایمیل'
|
||||
download: 'بارگیری'
|
||||
# print: 'Print'
|
||||
print: 'چاپ'
|
||||
problem:
|
||||
label: 'مشکلات؟'
|
||||
description: 'آیا مقاله نادرست نشان داده شده؟'
|
||||
edit_title: 'ویرایش عنوان'
|
||||
original_article: 'original'
|
||||
# annotations_on_the_entry: '{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations'
|
||||
original_article: 'اصلی'
|
||||
annotations_on_the_entry: '{0} بدون حاشیه|{1} یک حاشیه|]1,Inf[ %nbحاشیه% annotations'
|
||||
new:
|
||||
page_title: 'ذخیرهٔ مقالهٔ تازه'
|
||||
placeholder: 'http://website.com'
|
||||
form_new:
|
||||
# url_label: Url
|
||||
url_label: نشانی
|
||||
edit:
|
||||
# page_title: 'Edit an entry'
|
||||
# title_label: 'Title'
|
||||
# url_label: 'Url'
|
||||
# is_public_label: 'Public'
|
||||
page_title: 'ویرایش مقاله'
|
||||
title_label: 'عنوان'
|
||||
url_label: 'نشانی'
|
||||
is_public_label: 'عمومی'
|
||||
save_label: 'ذخیره'
|
||||
|
||||
about:
|
||||
@ -208,8 +208,8 @@ about:
|
||||
who_behind_wallabag: 'سازندگان wallabag'
|
||||
getting_help: 'گرفتن کمک'
|
||||
helping: 'کمککردن به wallabag'
|
||||
# contributors: 'Contributors'
|
||||
# third_party: 'Third-party libraries'
|
||||
contributors: 'مشارکتکنندگان'
|
||||
third_party: 'کتابخانههای نرمافزاری'
|
||||
who_behind_wallabag:
|
||||
developped_by: 'ساختهٔ'
|
||||
website: 'وبگاه'
|
||||
@ -227,15 +227,15 @@ about:
|
||||
by_contributing_2: 'فهرست نیازمندیهای ما در این صفحه است:'
|
||||
by_paypal: 'از راه Paypal'
|
||||
contributors:
|
||||
# description: 'Thank you to contributors on wallabag web application'
|
||||
description: 'از مشارکت شما در برنامهٔ وب wallabag ممنونیم.'
|
||||
third_party:
|
||||
# description: 'Here are the list of third-party libraries used in wallabag (with their licenses):'
|
||||
# package: 'Package'
|
||||
description: 'فهرست کتابخانههای نرمافزاری که در wallabag به کار رفتهاند (به همراه پروانهٔ آنها) :'
|
||||
package: 'بسته'
|
||||
license: 'پروانه'
|
||||
|
||||
howto:
|
||||
page_title: 'خودآموز'
|
||||
# page_description: 'There are several ways to save an article:'
|
||||
page_description: 'راههای زیادی برای ذخیرهٔ مقالهها هست:'
|
||||
top_menu:
|
||||
browser_addons: 'افزونه برای مرورگرها'
|
||||
mobile_apps: 'برنامههای موبایل'
|
||||
@ -255,82 +255,82 @@ howto:
|
||||
description: 'این پیوند را به نوار بوکمارک مرورگرتان بکشید:'
|
||||
|
||||
quickstart:
|
||||
# page_title: 'Quickstart'
|
||||
# intro:
|
||||
# title: 'Welcome to wallabag!'
|
||||
# paragraph_1: "We'll accompany you to visit wallabag and show you some features which can interest you."
|
||||
# paragraph_2: 'Follow us!'
|
||||
# configure:
|
||||
# title: 'Configure the application'
|
||||
# language: 'Change language and design'
|
||||
# rss: 'Enable RSS feeds'
|
||||
# tagging_rules: 'Write rules to automatically tag your articles'
|
||||
# admin:
|
||||
# title: 'Administration'
|
||||
# description: 'As an administrator, you have privileges on wallabag. You can:'
|
||||
# new_user: 'Create a new user'
|
||||
# analytics: 'Configure analytics'
|
||||
# sharing: 'Enable some parameters about article sharing'
|
||||
# export: 'Configure export'
|
||||
# import: 'Configure import'
|
||||
# first_steps:
|
||||
# title: 'First steps'
|
||||
# new_article: 'Save your first article'
|
||||
# unread_articles: 'And classify it!'
|
||||
# migrate:
|
||||
# title: 'Migrate from an existing service'
|
||||
# description: "Are you using another service? We'll help you to retrieve your data on wallabag."
|
||||
# pocket: 'Migrate from Pocket'
|
||||
# wallabag_v1: 'Migrate from wallabag v1'
|
||||
# wallabag_v2: 'Migrate from wallabag v2'
|
||||
# developer:
|
||||
# title: 'Developers'
|
||||
# create_application: 'Create your third application'
|
||||
# docs:
|
||||
# title: 'Full documentation'
|
||||
# annotate: 'Annotate your article'
|
||||
# export: 'Convert your articles into ePUB or PDF'
|
||||
# search_filters: 'See how you can look for an article by using search engine and filters'
|
||||
# fetching_errors: 'What can I do if an article encounters errors during fetching?'
|
||||
# all_docs: 'And so many other articles!'
|
||||
# support:
|
||||
# title: 'Support'
|
||||
# description: 'If you need some help, we are here for you.'
|
||||
# github: 'On GitHub'
|
||||
# email: 'By email'
|
||||
# gitter: 'On Gitter'
|
||||
page_title: 'Quickstart'
|
||||
intro:
|
||||
title: 'به wallabag خوش آمدید!!'
|
||||
paragraph_1: "به شما کمک خواهیم کرد تا wallabag را بشناسید و با برخی از ویژگیهای جالبش آشنا شوید"
|
||||
paragraph_2: 'ادامه دهید!'
|
||||
configure:
|
||||
title: 'برنامه را تنظیم کنید'
|
||||
language: 'زبان و نمای برنامه را تغییر دهید'
|
||||
rss: 'خوراک آر-اس-اس را فعال کنید'
|
||||
tagging_rules: 'قانونهای برچسبگذاری خودکار مقالههایتان را تعریف کنید'
|
||||
admin:
|
||||
title: 'مدیریت'
|
||||
description: 'به عنوان مدیر، شما دسترسیهای بیشتری به wallabag دارید. شما میتوانید:'
|
||||
new_user: 'کاربر تازهای بسازید'
|
||||
analytics: 'تحلیلهای آماری را تنظیم کنید'
|
||||
sharing: 'گزینههای مربوط به همرسانی مقالهها را فعال کنید'
|
||||
export: 'برونسپاری را تنظیم کنید'
|
||||
import: 'درونریزی را تنظیم کنید'
|
||||
first_steps:
|
||||
title: 'گام نخست'
|
||||
new_article: 'نخستین مقالهٔ خود را ذخیره کنید'
|
||||
unread_articles: 'و آن را طبقهبندی کنید!'
|
||||
migrate:
|
||||
title: 'از سرویس قبلی خود به اینجا مهاجرت کنید'
|
||||
description: "آیا سرویس دیگری را بهکار میبرید؟ دادههایتان را به wallabag بیاورید.."
|
||||
pocket: 'مهاجرت از Pocket'
|
||||
wallabag_v1: 'مهاجرت از نسخهٔ یکم wallabag'
|
||||
wallabag_v2: 'مهاجرت از نسخهٔ دوم wallabag'
|
||||
developer:
|
||||
title: 'برنامهنویسان'
|
||||
create_application: 'برنامهٔ wallabag خود را بسازید'
|
||||
docs:
|
||||
title: 'راهنمای کامل'
|
||||
annotate: 'روی مقالههایتان یادداشت بگذارید'
|
||||
export: 'مقالههایتان را به قالب ePUB یا PDF دربیاورید'
|
||||
search_filters: 'به کمک موتور جستجو و فیلترها به دنبال مقالههایتان بگردید'
|
||||
fetching_errors: 'اگر مقالهای هنگام ذخیره شدن به مشکل برخورد چه کار کنید؟'
|
||||
all_docs: 'و بسیاری از موضوعات دیگر'
|
||||
support:
|
||||
title: 'پشتیبانی'
|
||||
description: 'به کمک نیاز دارید؟ ما پشتیبان شما هستیم!'
|
||||
github: 'روی گیتهاب'
|
||||
email: 'با ایمیل'
|
||||
gitter: 'روی گیتر'
|
||||
|
||||
tag:
|
||||
page_title: 'برچسبها'
|
||||
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:
|
||||
# page_title: 'Import'
|
||||
# page_description: 'Welcome to wallabag importer. Please select your previous service that you want to migrate.'
|
||||
# action:
|
||||
# import_contents: 'Import contents'
|
||||
# form:
|
||||
# mark_as_read_title: 'Mark all as read?'
|
||||
# mark_as_read_label: 'Mark all imported entries as read'
|
||||
# file_label: 'File'
|
||||
# save_label: 'Upload file'
|
||||
# pocket:
|
||||
# page_title: 'Import > 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."
|
||||
# config_missing:
|
||||
# description: "Pocket import isn't configured."
|
||||
# admin_message: 'You need to define %keyurls%a pocket_consumer_key%keyurle%.'
|
||||
# user_message: 'Your server admin needs to define an API Key for 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.'
|
||||
# connect_to_pocket: 'Connect to Pocket and import data'
|
||||
# wallabag_v1:
|
||||
# page_title: 'Import > 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.'
|
||||
# how_to: 'Please select your wallabag export and click on the below button to upload and import it.'
|
||||
# wallabag_v2:
|
||||
# page_title: 'Import > 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.'
|
||||
page_title: 'درونریزی'
|
||||
page_description: 'به درونریز wallabag خوش آمدید. لطفاً سرویس قبلی خود را که میخواهید از آن مهاجرت کنید انتخاب کنید.'
|
||||
action:
|
||||
import_contents: 'درونریزی مقالهها'
|
||||
form:
|
||||
mark_as_read_title: 'علامتزدن همه به عنوان خواندهشده؟'
|
||||
mark_as_read_label: 'همهٔ مقالههای درونریزی شده را به عنوان خواندهشده علامت بزن'
|
||||
file_label: 'پرونده'
|
||||
save_label: 'بارگذاری پرونده'
|
||||
pocket:
|
||||
page_title: 'درونریزی > Pocket'
|
||||
description: "این برنامه همهٔ دادههای Pocket شما را درونریزی میکند. سرویس Pocket اجازه نمیدهد که متن مقالهها را درونریزی کنیم، بنابراین wallabag متن مقالهها را دوباره از اینترنت دریافت میکند."
|
||||
config_missing:
|
||||
description: "درونریزی از Pocket تنظیم نشده است."
|
||||
admin_message: 'شما باید %keyurls%یک pocket_consumer_key%keyurle% تعریف کنید.'
|
||||
user_message: 'مدیر سرور شما باید یک API Key برای Pocket تعریف کند.'
|
||||
authorize_message: 'شما میتوانید دادههایتان را از حساب Pocket خود درونریزی کنید. روی دکمهٔ زیر کلیک کنید و به برنامه اجازه دهید تا به getpocket.com وصل شود.'
|
||||
connect_to_pocket: 'به Pocket وصل شو و دادهها را دریافت کن'
|
||||
wallabag_v1:
|
||||
page_title: 'درونریزی > Wallabag v1'
|
||||
description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۱ wallabag درونریزی میکند. در صفحهٔ تنظیمات، روی "JSON export" در بخش "Export your wallabag data" کلیک کنید. با این کار شما پروندهای به شکل "wallabag-export-1-xxxx-xx-xx.json" دریافت خواهید کرد.'
|
||||
how_to: 'لطفاً پرونده را انتخاب کنید و روی دکمهٔ زیر کلیک کنید تا بارگذاری و درونریزی شود.'
|
||||
wallabag_v2:
|
||||
page_title: 'درونریزی > Wallabag v2'
|
||||
description: 'این برنامه همهٔ دادههای شما را در نسخهٔ ۲ wallabag درونریزی میکند. به بخش «همهٔ مقالهها» بروید و در بخش «برونریزی» روی "JSON" کلیک کنید. با این کار شما پروندهای به شکل "All articles.json" دریافت خواهید کرد.'
|
||||
|
||||
developer:
|
||||
# page_title: 'Developer'
|
||||
@ -338,6 +338,7 @@ developer:
|
||||
# documentation: 'Documentation'
|
||||
# how_to_first_app: 'How to create my first application'
|
||||
# full_documentation: 'View full API documentation'
|
||||
# list_methods: 'List API methods'
|
||||
# clients:
|
||||
# title: 'Clients'
|
||||
# create_new: 'Create a new client'
|
||||
@ -382,42 +383,42 @@ developer:
|
||||
validator:
|
||||
password_must_match: 'رمزها باید یکی باشند'
|
||||
password_too_short: 'رمز شما باید ۸ حرف یا بیشتر باشد'
|
||||
# password_wrong_value: 'Wrong value for your current password'
|
||||
# item_per_page_too_high: 'This will certainly kill the app'
|
||||
# rss_limit_too_hight: 'This will certainly kill the app'
|
||||
password_wrong_value: 'رمز فعلی را اشتباه وارد کردهاید'
|
||||
item_per_page_too_high: 'با این تعداد برنامه به فنا میرود'
|
||||
rss_limit_too_hight: 'با این تعداد برنامه به فنا میرود'
|
||||
|
||||
flashes:
|
||||
config:
|
||||
notice:
|
||||
config_saved: 'پیکربندی ذخیره شد. برخی از تنظیمات پس از این که قطع شدید اعمال میشود.'
|
||||
password_updated: 'رمز بهروز شد'
|
||||
# password_not_updated_demo: "In demonstration mode, you can't change password for this user."
|
||||
user_updated: 'اطلاعات بهروز شد'
|
||||
rss_updated: 'اطلاعات آر-اس-اس بهروز شد'
|
||||
# tagging_rules_updated: 'Tagging rules updated'
|
||||
# tagging_rules_deleted: 'Tagging rule deleted'
|
||||
# user_added: 'User "%username%" added'
|
||||
# rss_token_updated: 'RSS token updated'
|
||||
config_saved: 'پیکربندی ذخیره شد. برخی از تنظیمات پس از این که قطع شدید اعمال میشود.'
|
||||
password_updated: 'رمز بهروز شد'
|
||||
password_not_updated_demo: "در حالت نمایشی نمیتوانید رمز کاربر را عوض کنید."
|
||||
user_updated: 'اطلاعات بهروز شد'
|
||||
rss_updated: 'اطلاعات آر-اس-اس بهروز شد'
|
||||
tagging_rules_updated: 'برچسبگذاری خودکار بهروز شد'
|
||||
tagging_rules_deleted: 'قانون برچسبگذاری پاک شد'
|
||||
user_added: 'کابر "%username%" افزوده شد'
|
||||
rss_token_updated: 'کد آر-اس-اس بهروز شد'
|
||||
entry:
|
||||
notice:
|
||||
# entry_already_saved: 'Entry already saved on %date%'
|
||||
# entry_saved: 'Entry saved'
|
||||
# entry_updated: 'Entry updated'
|
||||
# entry_reloaded: 'Entry reloaded'
|
||||
# entry_reload_failed: 'Failed to reload entry'
|
||||
entry_archived: 'مقاله بایگانی شد'
|
||||
entry_unarchived: 'مقاله از بایگانی درآمد'
|
||||
entry_starred: 'مقاله برگزیده شد'
|
||||
entry_unstarred: 'مقاله نابرگزیده شد'
|
||||
entry_deleted: 'مقاله پاک شد'
|
||||
entry_already_saved: 'این مقاله در تاریخ %date% ذخیره شده بود'
|
||||
entry_saved: 'مقاله ذخیره شد'
|
||||
entry_updated: 'مقاله بهروز شد'
|
||||
entry_reloaded: 'مقاله بهروز شد'
|
||||
entry_reload_failed: 'بهروزرسانی مقاله شکست خورد'
|
||||
entry_archived: 'مقاله بایگانی شد'
|
||||
entry_unarchived: 'مقاله از بایگانی درآمد'
|
||||
entry_starred: 'مقاله برگزیده شد'
|
||||
entry_unstarred: 'مقاله نابرگزیده شد'
|
||||
entry_deleted: 'مقاله پاک شد'
|
||||
tag:
|
||||
notice:
|
||||
# tag_added: 'Tag added'
|
||||
tag_added: 'برچسب افزوده شد'
|
||||
import:
|
||||
notice:
|
||||
# failed: 'Import failed, please try again.'
|
||||
# failed_on_file: 'Error while processing import. Please verify your import file.'
|
||||
# summary: 'Import summary: %imported% imported, %skipped% already saved.'
|
||||
failed: 'درونریزی شکست خورد. لطفاً دوباره تلاش کنید.'
|
||||
failed_on_file: 'خطا هنگام پردازش پروندهٔ ورودی. آیا پروندهٔ درونریزی شده سالم است؟'
|
||||
summary: 'گزارش درونریزی: %imported% وارد شد, %skipped% از قبل ذخیره شده بود.'
|
||||
developer:
|
||||
notice:
|
||||
# client_created: 'New client created.'
|
||||
|
||||
@ -137,7 +137,7 @@ entry:
|
||||
page_titles:
|
||||
unread: 'Articles non lus'
|
||||
starred: 'Articles favoris'
|
||||
archive: 'Articles lus'
|
||||
archived: 'Articles lus'
|
||||
filtered: 'Articles filtrés'
|
||||
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."
|
||||
@ -338,6 +338,7 @@ developer:
|
||||
documentation: 'Documentation'
|
||||
how_to_first_app: 'Comment créer votre première application'
|
||||
full_documentation: "Voir la documentation complète de l'API"
|
||||
list_methods: "Lister toutes les méthodes de l'API"
|
||||
clients:
|
||||
title: 'Clients'
|
||||
create_new: 'Créer une nouveau client'
|
||||
|
||||
@ -137,7 +137,7 @@ entry:
|
||||
page_titles:
|
||||
unread: 'Articles pas legits'
|
||||
starred: 'Articles favorits'
|
||||
archive: 'Articles legits'
|
||||
archived: 'Articles legits'
|
||||
filtered: 'Articles filtrats'
|
||||
list:
|
||||
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'
|
||||
how_to_first_app: 'Cossí crear vòstra primièra aplicacion'
|
||||
full_documentation: "Veire la documentacion completa de l'API"
|
||||
# list_methods: 'List API methods'
|
||||
clients:
|
||||
title: 'Clients'
|
||||
create_new: 'Crear un novèl client'
|
||||
|
||||
@ -137,7 +137,7 @@ entry:
|
||||
page_titles:
|
||||
unread: 'Nieprzeczytane wpisy'
|
||||
starred: 'Wpisy oznaczone gwiazdką'
|
||||
archive: 'Zarchiwizowane wpisy'
|
||||
archived: 'Zarchiwizowane wpisy'
|
||||
filtered: 'Odfiltrowane wpisy'
|
||||
list:
|
||||
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'
|
||||
how_to_first_app: 'Jak stworzyć moją pierwszą aplikację'
|
||||
full_documentation: 'Pokaż pełne API'
|
||||
# list_methods: 'List API methods'
|
||||
clients:
|
||||
title: 'Klienci'
|
||||
create_new: 'Utwórz nowego klienta'
|
||||
|
||||
@ -137,7 +137,7 @@ entry:
|
||||
page_titles:
|
||||
# unread: 'Unread entries'
|
||||
# starred: 'Starred entries'
|
||||
# archive: 'Archived entries'
|
||||
# archived: 'Archived entries'
|
||||
# filtered: 'Filtered entries'
|
||||
list:
|
||||
# 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'
|
||||
# how_to_first_app: 'How to create my first application'
|
||||
# full_documentation: 'View full API documentation'
|
||||
# list_methods: 'List API methods'
|
||||
# clients:
|
||||
# title: 'Clients'
|
||||
# create_new: 'Create a new client'
|
||||
|
||||
@ -137,7 +137,7 @@ entry:
|
||||
page_titles:
|
||||
# unread: 'Unread entries'
|
||||
# starred: 'Starred entries'
|
||||
# archive: 'Archived entries'
|
||||
# archived: 'Archived entries'
|
||||
# filtered: 'Filtered entries'
|
||||
list:
|
||||
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'
|
||||
# how_to_first_app: 'How to create my first application'
|
||||
# full_documentation: 'View full API documentation'
|
||||
# list_methods: 'List API methods'
|
||||
# clients:
|
||||
# title: 'Clients'
|
||||
# create_new: 'Create a new client'
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
<h2>{{ 'config.tab_menu.rss'|trans }}</h2>
|
||||
|
||||
{{ form_start(form.rss) }}
|
||||
{{ form_start(form.rss) }}
|
||||
{{ form_errors(form.rss) }}
|
||||
|
||||
<div class="row">
|
||||
@ -169,7 +169,7 @@
|
||||
{{ form_rest(form.pwd) }}
|
||||
</form>
|
||||
|
||||
<h2>{{ 'config.tab_menu.rules'|trans }}}</h2>
|
||||
<h2>{{ 'config.tab_menu.rules'|trans }}</h2>
|
||||
|
||||
<ul>
|
||||
{% for tagging_rule in app.user.config.taggingRules %}
|
||||
@ -183,7 +183,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{{ form_start(form.new_tagging_rule) }}
|
||||
{{ form_start(form.new_tagging_rule) }}
|
||||
{{ form_errors(form.new_tagging_rule) }}
|
||||
|
||||
<fieldset class="w500p inline">
|
||||
@ -205,6 +205,91 @@
|
||||
{{ form_rest(form.new_tagging_rule) }}
|
||||
</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><=</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><</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>>=</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>></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') %}
|
||||
<h2>{{ 'config.tab_menu.new_user'|trans }}</h2>
|
||||
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
|
||||
<ul>
|
||||
<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>
|
||||
|
||||
<h4>{{ 'developer.clients.title'|trans }}</h4>
|
||||
|
||||
@ -6,15 +6,10 @@
|
||||
{% block pager %}
|
||||
<div class="results">
|
||||
<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>
|
||||
{% if entries is not empty %}
|
||||
–
|
||||
{% 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 %}
|
||||
{% if entries.getNbPages > 1 %}
|
||||
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@ -22,20 +17,18 @@
|
||||
|
||||
{% for entry in entries %}
|
||||
<div id="entry-{{ entry.id|e }}" class="entry">
|
||||
<h2><a href="{{ path('view', { 'id': entry.id }) }}">{{ entry.title|raw }}</a></h2>
|
||||
{% if entry.readingTime > 0 %}
|
||||
<div class="estimatedTime">
|
||||
<h2><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|raw }}</a></h2>
|
||||
|
||||
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
|
||||
<div class="estimatedTime">
|
||||
<span class="tool reading-time">
|
||||
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': entry.readingTime}) }}
|
||||
</span>
|
||||
</div>
|
||||
{% if readingTime > 0 %}
|
||||
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
|
||||
{% else %}
|
||||
<div class="estimatedTime">
|
||||
<span class="tool reading-time">
|
||||
{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
|
||||
</span>
|
||||
</div>
|
||||
{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
<item>
|
||||
<title><![CDATA[{{ entry.title }}]]></title>
|
||||
<source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
|
||||
<link>{{ url('view', { 'id': entry.id }) }}</link>
|
||||
<guid>{{ url('view', { 'id': entry.id }) }}</guid>
|
||||
<link>{{ entry.url }}</link>
|
||||
<guid>{{ entry.url }}</guid>
|
||||
<pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate>
|
||||
<description>
|
||||
<![CDATA[
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
{% if craue_setting('share_shaarli') %}<li><a href="{{ craue_setting('shaarli_url') }}/index.php?post={{ entry.url|url_encode }}&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 }}¬es=&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('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&method=id&value={{ entry.id }}" title="Generate ePub file">EPUB</a></li>{% endif %}
|
||||
{% if craue_setting('export_mobi') %}<li><a href="?mobi&method=id&value={{ entry.id }}" title="Generate Mobi file">MOBI</a></li>{% endif %}
|
||||
{% if craue_setting('export_pdf') %}<li><a href="?pdf&method=id&value={{ entry.id }}" title="Generate PDF file">PDF</a></li>{% endif %}
|
||||
|
||||
@ -25,8 +25,8 @@
|
||||
|
||||
<dl>
|
||||
<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/fr/v2/">français</a></dd>
|
||||
<dd><a href="http://doc.wallabag.org/en/master/">english</a></dd>
|
||||
<dd><a href="http://doc.wallabag.org/fr/master/">français</a></dd>
|
||||
|
||||
<dt>{{ 'about.getting_help.bug_reports'|trans }}</dt>
|
||||
<dd>{{ 'about.getting_help.support'|trans|raw }}</dd>
|
||||
@ -67,7 +67,6 @@
|
||||
<tr><td>doctrine/lexer</td><td>MIT</td></tr>
|
||||
<tr><td>doctrine/migrations</td><td>LGPL-2.1</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/oauth2-php</td><td>MIT</td></tr>
|
||||
<tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr>
|
||||
|
||||
@ -48,10 +48,10 @@
|
||||
|
||||
<h4>{{ 'quickstart.docs.title'|trans }}</h4>
|
||||
<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/v2/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/v2/user/errors_during_fetching.html">{{ 'quickstart.docs.fetching_errors'|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/master/user/download_articles.html">{{ 'quickstart.docs.export'|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/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>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -250,75 +250,75 @@
|
||||
<h5>{{ 'config.form_rules.faq.variables_available_title'|trans }}</h5>
|
||||
<p class="help">
|
||||
{{ '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><=</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><</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>=></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>></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>
|
||||
|
||||
<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><=</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><</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>>=</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>></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>
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
|
||||
<ul>
|
||||
<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>
|
||||
|
||||
<h4>{{ 'developer.clients.title'|trans }}</h4>
|
||||
|
||||
@ -21,13 +21,9 @@
|
||||
<div class="nb-results left">
|
||||
{{ 'entry.list.number_on_the_page'|transchoice(entries.count) }}
|
||||
</div>
|
||||
<ul class="pagination right">
|
||||
{% for p in range(1, entries.nbPages) if entries.nbPages > 1 %}
|
||||
<li class="{{ currentPage == p ? 'active':'waves-effect'}}">
|
||||
<a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'page': p})) }}">{{ p }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if entries.getNbPages > 1 %}
|
||||
{{ pagerfanta(entries, 'twitter_bootstrap_translated', {'proximity': 1}) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
<br />
|
||||
@ -48,13 +44,13 @@
|
||||
<i class="card-title grey-text text-darken-4 activator mdi-navigation-more-vert right"></i>
|
||||
{% 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">
|
||||
<span class="tool reading-time">
|
||||
{% set readingTime = entry.readingTime / app.user.config.readingSpeed %}
|
||||
{% if readingTime > 0 %}
|
||||
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime}) }}
|
||||
{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}
|
||||
{% else %}
|
||||
{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}
|
||||
{% endif %}
|
||||
@ -74,8 +70,7 @@
|
||||
|
||||
<div class="estimatedTime grey-text">
|
||||
<span class="tool reading-time">
|
||||
{{ 'entry.list.reading_time'|trans }}
|
||||
{% if entry.readingTime > 0 %}{{ entry.readingTime }}{% else %}<small class="inferieur"><</small> 1{% endif %} min
|
||||
{% if readingTime > 0 %}{{ 'entry.list.reading_time_minutes'|trans({'%readingTime%': readingTime|round}) }}{% else %}{{ 'entry.list.reading_time_less_one_minute'|trans|raw }}{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
<item>
|
||||
<title><![CDATA[{{ entry.title }}]]></title>
|
||||
<source url="{{ url('view', { 'id': entry.id }) }}">wallabag</source>
|
||||
<link>{{ url('view', { 'id': entry.id }) }}</link>
|
||||
<guid>{{ url('view', { 'id': entry.id }) }}</guid>
|
||||
<link>{{ entry.url }}</link>
|
||||
<guid>{{ entry.url }}</guid>
|
||||
<pubDate>{{ entry.createdAt|date('D, d M Y H:i:s') }}</pubDate>
|
||||
<description>
|
||||
<![CDATA[
|
||||
|
||||
@ -138,6 +138,17 @@
|
||||
</div>
|
||||
</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">
|
||||
<a class="waves-effect collapsible-header">
|
||||
<i class="mdi-file-file-download small"></i>
|
||||
@ -192,14 +203,14 @@
|
||||
{% endfor %}
|
||||
</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">
|
||||
{{ render(controller( "WallabagCoreBundle:Tag:addTagForm", { 'id': entry.id } )) }}
|
||||
</div>
|
||||
|
||||
{% if entry.previewPicture is not null %}
|
||||
<div><img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|raw }}" /></div>
|
||||
{% endif %}
|
||||
|
||||
</aside>
|
||||
<article>
|
||||
{{ entry.content | raw }}
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
<div id="set2" class="col s12">
|
||||
<dl>
|
||||
<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/fr/v2/">français</a></dd>
|
||||
<dd><a href="http://doc.wallabag.org/en/master/">english</a></dd>
|
||||
<dd><a href="http://doc.wallabag.org/fr/master/">français</a></dd>
|
||||
|
||||
<dt>{{ 'about.getting_help.bug_reports'|trans }}</dt>
|
||||
<dd>{{ 'about.getting_help.support'|trans|raw }}</dd>
|
||||
@ -76,7 +76,6 @@
|
||||
<tr><td>doctrine/lexer</td><td>MIT</td></tr>
|
||||
<tr><td>doctrine/migrations</td><td>LGPL-2.1</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/oauth2-php</td><td>MIT</td></tr>
|
||||
<tr><td>friendsofsymfony/rest-bundle</td><td>MIT</td></tr>
|
||||
|
||||
@ -53,10 +53,10 @@
|
||||
|
||||
<h4>{{ 'quickstart.docs.title'|trans }}</h4>
|
||||
<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/v2/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/v2/user/errors_during_fetching.html">{{ 'quickstart.docs.fetching_errors'|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/master/user/download_articles.html">{{ 'quickstart.docs.export'|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/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>
|
||||
</ul>
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ class TablePrefixSubscriber implements EventSubscriber
|
||||
|
||||
public function getSubscribedEvents()
|
||||
{
|
||||
return array('loadClassMetadata');
|
||||
return ['loadClassMetadata'];
|
||||
}
|
||||
|
||||
public function loadClassMetadata(LoadClassMetadataEventArgs $args)
|
||||
|
||||
@ -37,11 +37,11 @@ class InstallCommandTest extends WallabagCoreTestCase
|
||||
$application = new Application(static::$kernel);
|
||||
$application->setAutoExit(false);
|
||||
|
||||
$code = $application->run(new ArrayInput(array(
|
||||
$code = $application->run(new ArrayInput([
|
||||
'command' => 'doctrine:fixtures:load',
|
||||
'--no-interaction' => true,
|
||||
'--env' => 'test',
|
||||
)), new NullOutput());
|
||||
]), new NullOutput());
|
||||
}
|
||||
|
||||
public function testRunInstallCommand()
|
||||
@ -63,14 +63,15 @@ class InstallCommandTest extends WallabagCoreTestCase
|
||||
$command->getHelperSet()->set($question, 'question');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay());
|
||||
$this->assertContains('Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Config setup.', $tester->getDisplay());
|
||||
$this->assertContains('Installing assets.', $tester->getDisplay());
|
||||
}
|
||||
|
||||
public function testRunInstallCommandWithReset()
|
||||
@ -92,16 +93,17 @@ class InstallCommandTest extends WallabagCoreTestCase
|
||||
$command->getHelperSet()->set($question, 'question');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
'--reset' => true,
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Setting up database.', $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('Step 4 of 4. Installing assets.', $tester->getDisplay());
|
||||
$this->assertContains('Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Config setup.', $tester->getDisplay());
|
||||
$this->assertContains('Installing assets.', $tester->getDisplay());
|
||||
|
||||
// we force to reset everything
|
||||
$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
|
||||
$command = $application->find('doctrine:database:drop');
|
||||
$command->run(new ArrayInput(array(
|
||||
$command->run(new ArrayInput([
|
||||
'command' => 'doctrine:database:drop',
|
||||
'--force' => true,
|
||||
)), new NullOutput());
|
||||
]), new NullOutput());
|
||||
|
||||
// start a new application to avoid lagging connexion to pgsql
|
||||
$client = static::createClient();
|
||||
@ -138,14 +140,15 @@ class InstallCommandTest extends WallabagCoreTestCase
|
||||
$command->getHelperSet()->set($question, 'question');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay());
|
||||
$this->assertContains('Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Config setup.', $tester->getDisplay());
|
||||
$this->assertContains('Installing assets.', $tester->getDisplay());
|
||||
|
||||
// the current database doesn't already exist
|
||||
$this->assertContains('Creating database and schema, clearing the cache', $tester->getDisplay());
|
||||
@ -175,14 +178,15 @@ class InstallCommandTest extends WallabagCoreTestCase
|
||||
$command->getHelperSet()->set($question, 'question');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay());
|
||||
$this->assertContains('Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Config setup.', $tester->getDisplay());
|
||||
$this->assertContains('Installing assets.', $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
|
||||
$command = new DropDatabaseDoctrineCommand();
|
||||
$command->setApplication($application);
|
||||
$command->run(new ArrayInput(array(
|
||||
$command->run(new ArrayInput([
|
||||
'command' => 'doctrine:database:drop',
|
||||
'--force' => true,
|
||||
)), new NullOutput());
|
||||
]), new NullOutput());
|
||||
|
||||
$this->getClient()->getContainer()->get('doctrine')->getConnection()->close();
|
||||
|
||||
$command = new CreateDatabaseDoctrineCommand();
|
||||
$command->setApplication($application);
|
||||
$command->run(new ArrayInput(array(
|
||||
$command->run(new ArrayInput([
|
||||
'command' => 'doctrine:database:create',
|
||||
'--env' => 'test',
|
||||
)), new NullOutput());
|
||||
]), new NullOutput());
|
||||
|
||||
$command = $application->find('wallabag:install');
|
||||
|
||||
@ -229,14 +233,15 @@ class InstallCommandTest extends WallabagCoreTestCase
|
||||
$command->getHelperSet()->set($question, 'question');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay());
|
||||
$this->assertContains('Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Config setup.', $tester->getDisplay());
|
||||
$this->assertContains('Installing assets.', $tester->getDisplay());
|
||||
|
||||
$this->assertContains('Creating schema', $tester->getDisplay());
|
||||
}
|
||||
@ -260,14 +265,15 @@ class InstallCommandTest extends WallabagCoreTestCase
|
||||
$command->getHelperSet()->set($question, 'question');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
'--no-interaction' => true,
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertContains('Step 1 of 4. Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Step 2 of 4. Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Step 3 of 4. Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Step 4 of 4. Installing assets.', $tester->getDisplay());
|
||||
$this->assertContains('Checking system requirements.', $tester->getDisplay());
|
||||
$this->assertContains('Setting up database.', $tester->getDisplay());
|
||||
$this->assertContains('Administration setup.', $tester->getDisplay());
|
||||
$this->assertContains('Config setup.', $tester->getDisplay());
|
||||
$this->assertContains('Installing assets.', $tester->getDisplay());
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,9 +21,9 @@ class TagAllCommandTest extends WallabagCoreTestCase
|
||||
$command = $application->find('wallabag:tag:all');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function testRunTagAllCommandWithBadUsername()
|
||||
@ -34,10 +34,10 @@ class TagAllCommandTest extends WallabagCoreTestCase
|
||||
$command = $application->find('wallabag:tag:all');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
'username' => 'unknown',
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertContains('User "unknown" not found', $tester->getDisplay());
|
||||
}
|
||||
@ -50,10 +50,10 @@ class TagAllCommandTest extends WallabagCoreTestCase
|
||||
$command = $application->find('wallabag:tag:all');
|
||||
|
||||
$tester = new CommandTester($command);
|
||||
$tester->execute(array(
|
||||
$tester->execute([
|
||||
'command' => $command->getName(),
|
||||
'username' => 'admin',
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertContains('Tagging entries for user « admin »... Done', $tester->getDisplay());
|
||||
}
|
||||
|
||||
@ -43,12 +43,12 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$form = $crawler->filter('button[id=config_save]')->form();
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'config[theme]' => 'baggy',
|
||||
'config[items_per_page]' => '30',
|
||||
'config[reading_speed]' => '0.5',
|
||||
'config[language]' => 'en',
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -56,19 +56,19 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(['_text']));
|
||||
$this->assertContains('flashes.config.notice.config_saved', $alert[0]);
|
||||
}
|
||||
|
||||
public function dataForUpdateFailed()
|
||||
{
|
||||
return array(
|
||||
array(array(
|
||||
return [
|
||||
[[
|
||||
'config[theme]' => 'baggy',
|
||||
'config[items_per_page]' => '',
|
||||
'config[language]' => 'en',
|
||||
)),
|
||||
);
|
||||
]],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,46 +89,46 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('This value should not be blank', $alert[0]);
|
||||
}
|
||||
|
||||
public function dataForChangePasswordFailed()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
array(
|
||||
return [
|
||||
[
|
||||
[
|
||||
'change_passwd[old_password]' => 'material',
|
||||
'change_passwd[new_password][first]' => '',
|
||||
'change_passwd[new_password][second]' => '',
|
||||
),
|
||||
],
|
||||
'validator.password_wrong_value',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'change_passwd[old_password]' => 'mypassword',
|
||||
'change_passwd[new_password][first]' => '',
|
||||
'change_passwd[new_password][second]' => '',
|
||||
),
|
||||
],
|
||||
'This value should not be blank',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'change_passwd[old_password]' => 'mypassword',
|
||||
'change_passwd[new_password][first]' => 'hop',
|
||||
'change_passwd[new_password][second]' => '',
|
||||
),
|
||||
],
|
||||
'validator.password_must_match',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'change_passwd[old_password]' => 'mypassword',
|
||||
'change_passwd[new_password][first]' => 'hop',
|
||||
'change_passwd[new_password][second]' => 'hop',
|
||||
),
|
||||
],
|
||||
'validator.password_too_short',
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -149,7 +149,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains($expectedMessage, $alert[0]);
|
||||
}
|
||||
|
||||
@ -164,11 +164,11 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$form = $crawler->filter('button[id=change_passwd_save]')->form();
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'change_passwd[old_password]' => 'mypassword',
|
||||
'change_passwd[new_password][first]' => 'mypassword',
|
||||
'change_passwd[new_password][second]' => 'mypassword',
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -176,28 +176,28 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(['_text']));
|
||||
$this->assertContains('flashes.config.notice.password_updated', $alert[0]);
|
||||
}
|
||||
|
||||
public function dataForUserFailed()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
array(
|
||||
return [
|
||||
[
|
||||
[
|
||||
'update_user[name]' => '',
|
||||
'update_user[email]' => '',
|
||||
),
|
||||
],
|
||||
'fos_user.email.blank',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'update_user[name]' => '',
|
||||
'update_user[email]' => 'test',
|
||||
),
|
||||
],
|
||||
'fos_user.email.invalid',
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -218,7 +218,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains($expectedMessage, $alert[0]);
|
||||
}
|
||||
|
||||
@ -233,10 +233,10 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$form = $crawler->filter('button[id=update_user_save]')->form();
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'update_user[name]' => 'new name',
|
||||
'update_user[email]' => 'admin@wallabag.io',
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -244,59 +244,59 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('flashes.config.notice.user_updated', $alert[0]);
|
||||
}
|
||||
|
||||
public function dataForNewUserFailed()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
array(
|
||||
return [
|
||||
[
|
||||
[
|
||||
'new_user[username]' => '',
|
||||
'new_user[plainPassword][first]' => '',
|
||||
'new_user[plainPassword][second]' => '',
|
||||
'new_user[email]' => '',
|
||||
),
|
||||
],
|
||||
'fos_user.username.blank',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'new_user[username]' => 'a',
|
||||
'new_user[plainPassword][first]' => 'mypassword',
|
||||
'new_user[plainPassword][second]' => 'mypassword',
|
||||
'new_user[email]' => '',
|
||||
),
|
||||
],
|
||||
'fos_user.username.short',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'new_user[username]' => 'wallace',
|
||||
'new_user[plainPassword][first]' => 'mypassword',
|
||||
'new_user[plainPassword][second]' => 'mypassword',
|
||||
'new_user[email]' => 'test',
|
||||
),
|
||||
],
|
||||
'fos_user.email.invalid',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'new_user[username]' => 'admin',
|
||||
'new_user[plainPassword][first]' => 'wallacewallace',
|
||||
'new_user[plainPassword][second]' => 'wallacewallace',
|
||||
'new_user[email]' => 'wallace@wallace.me',
|
||||
),
|
||||
],
|
||||
'fos_user.username.already_used',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'new_user[username]' => 'wallace',
|
||||
'new_user[plainPassword][first]' => 'mypassword1',
|
||||
'new_user[plainPassword][second]' => 'mypassword2',
|
||||
'new_user[email]' => 'wallace@wallace.me',
|
||||
),
|
||||
],
|
||||
'validator.password_must_match',
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -317,7 +317,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains($expectedMessage, $alert[0]);
|
||||
}
|
||||
|
||||
@ -332,12 +332,12 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$form = $crawler->filter('button[id=new_user_save]')->form();
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'new_user[username]' => 'wallace',
|
||||
'new_user[plainPassword][first]' => 'wallace1',
|
||||
'new_user[plainPassword][second]' => 'wallace1',
|
||||
'new_user[email]' => 'wallace@wallace.me',
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -345,7 +345,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(['_text']));
|
||||
$this->assertContains('flashes.config.notice.user_added', $alert[0]);
|
||||
|
||||
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
|
||||
@ -381,7 +381,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('config.form_rss.no_token', $body[0]);
|
||||
|
||||
$client->request('GET', '/generate-token');
|
||||
@ -389,7 +389,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertNotContains('config.form_rss.no_token', $body[0]);
|
||||
}
|
||||
|
||||
@ -401,9 +401,9 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
$client->request(
|
||||
'GET',
|
||||
'/generate-token',
|
||||
array(),
|
||||
array(),
|
||||
array('HTTP_X-Requested-With' => 'XMLHttpRequest')
|
||||
[],
|
||||
[],
|
||||
['HTTP_X-Requested-With' => 'XMLHttpRequest']
|
||||
);
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
@ -422,9 +422,9 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$form = $crawler->filter('button[id=rss_config_save]')->form();
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'rss_config[rss_limit]' => 12,
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -432,26 +432,26 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(['_text']));
|
||||
$this->assertContains('flashes.config.notice.rss_updated', $alert[0]);
|
||||
}
|
||||
|
||||
public function dataForRssFailed()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
array(
|
||||
return [
|
||||
[
|
||||
[
|
||||
'rss_config[rss_limit]' => 0,
|
||||
),
|
||||
],
|
||||
'This value should be 1 or more.',
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
[
|
||||
[
|
||||
'rss_config[rss_limit]' => 1000000000000,
|
||||
),
|
||||
],
|
||||
'validator.rss_limit_too_hight',
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -472,7 +472,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains($expectedMessage, $alert[0]);
|
||||
}
|
||||
|
||||
@ -487,10 +487,10 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$form = $crawler->filter('button[id=tagging_rule_save]')->form();
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'tagging_rule[rule]' => 'readingTime <= 3',
|
||||
'tagging_rule[tags]' => 'short reading',
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
@ -498,7 +498,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(['_text']));
|
||||
$this->assertContains('flashes.config.notice.tagging_rules_updated', $alert[0]);
|
||||
|
||||
$deleteLink = $crawler->filter('.delete')->last()->link();
|
||||
@ -507,34 +507,34 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
$this->assertEquals(302, $client->getResponse()->getStatusCode());
|
||||
|
||||
$crawler = $client->followRedirect();
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(['_text']));
|
||||
$this->assertContains('flashes.config.notice.tagging_rules_deleted', $alert[0]);
|
||||
}
|
||||
|
||||
public function dataForTaggingRuleFailed()
|
||||
{
|
||||
return array(
|
||||
array(
|
||||
array(
|
||||
return [
|
||||
[
|
||||
[
|
||||
'tagging_rule[rule]' => 'unknownVar <= 3',
|
||||
'tagging_rule[tags]' => 'cool tag',
|
||||
),
|
||||
array(
|
||||
],
|
||||
[
|
||||
'The variable',
|
||||
'does not exist.',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
],
|
||||
],
|
||||
[
|
||||
[
|
||||
'tagging_rule[rule]' => 'length(domainName) <= 42',
|
||||
'tagging_rule[tags]' => 'cool tag',
|
||||
),
|
||||
array(
|
||||
],
|
||||
[
|
||||
'The operator',
|
||||
'does not exist.',
|
||||
),
|
||||
),
|
||||
);
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -555,7 +555,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
|
||||
foreach ($messages as $message) {
|
||||
$this->assertContains($message, $body[0]);
|
||||
@ -574,7 +574,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
$crawler = $client->request('GET', '/tagging-rule/delete/'.$rule->getId());
|
||||
|
||||
$this->assertEquals(403, $client->getResponse()->getStatusCode());
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text')));
|
||||
$this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(['_text']));
|
||||
$this->assertContains('You can not access this tagging rule', $body[0]);
|
||||
}
|
||||
|
||||
@ -593,11 +593,11 @@ class ConfigControllerTest extends WallabagCoreTestCase
|
||||
|
||||
$form = $crawler->filter('button[id=change_passwd_save]')->form();
|
||||
|
||||
$data = array(
|
||||
$data = [
|
||||
'change_passwd[old_password]' => 'mypassword',
|
||||
'change_passwd[new_password][first]' => 'mypassword',
|
||||
'change_passwd[new_password][second]' => 'mypassword',
|
||||
);
|
||||
];
|
||||
|
||||
$client->submit($form, $data);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user