From: Jérémy Benoist Date: Fri, 11 Jan 2019 12:34:38 +0000 (+0100) Subject: Merge pull request #3826 from wallabag/epub-toc X-Git-Tag: 2.3.6~2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=3625833b2c0bce7a37ec2bd873e6bbb0b76c4a4e;hp=5e1f27767bc2dcf0760bc3061544ecbb833ad5e7;p=github%2Fwallabag%2Fwallabag.git Merge pull request #3826 from wallabag/epub-toc Rework of EPUB/PDF exports --- diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index e6f98f98..78349820 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php @@ -11,7 +11,7 @@ use Wallabag\UserBundle\Entity\User; /** * @ORM\Table("oauth2_clients") - * @ORM\Entity + * @ORM\Entity(repositoryClass="Wallabag\ApiBundle\Repository\ClientRepository") */ class Client extends BaseClient { diff --git a/src/Wallabag/ApiBundle/Repository/ClientRepository.php b/src/Wallabag/ApiBundle/Repository/ClientRepository.php new file mode 100644 index 00000000..fc14262e --- /dev/null +++ b/src/Wallabag/ApiBundle/Repository/ClientRepository.php @@ -0,0 +1,19 @@ +EPUB{% endif %} {% if craue_setting('export_mobi') %}
  • MOBI
  • {% endif %} {% if craue_setting('export_pdf') %}
  • PDF
  • {% endif %} - {% if craue_setting('export_csv') %}
  • JSON
  • {% endif %} - {% if craue_setting('export_json') %}
  • CSV
  • {% endif %} + {% if craue_setting('export_json') %}
  • JSON
  • {% endif %} + {% if craue_setting('export_csv') %}
  • CSV
  • {% endif %} {% if craue_setting('export_txt') %}
  • TXT
  • {% endif %} {% if craue_setting('export_xml') %}
  • XML
  • {% endif %} diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig index a137f3c3..742dd330 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entries.html.twig @@ -68,8 +68,8 @@ {% if craue_setting('export_epub') %}
  • EPUB
  • {% endif %} {% if craue_setting('export_mobi') %}
  • MOBI
  • {% endif %} {% if craue_setting('export_pdf') %}
  • PDF
  • {% endif %} - {% if craue_setting('export_csv') %}
  • JSON
  • {% endif %} - {% if craue_setting('export_json') %}
  • CSV
  • {% endif %} + {% if craue_setting('export_json') %}
  • JSON
  • {% endif %} + {% if craue_setting('export_csv') %}
  • CSV
  • {% endif %} {% if craue_setting('export_txt') %}
  • TXT
  • {% endif %} {% if craue_setting('export_xml') %}
  • XML
  • {% endif %} diff --git a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php index f58d1c12..e1a0ac7e 100644 --- a/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/DeveloperControllerTest.php @@ -56,6 +56,20 @@ class DeveloperControllerTest extends WallabagCoreTestCase $this->assertArrayHasKey('refresh_token', $data); } + public function testCreateTokenWithBadClientId() + { + $client = $this->getClient(); + $client->request('POST', '/oauth/v2/token', [ + 'grant_type' => 'password', + 'client_id' => '$WALLABAG_CLIENT_ID', + 'client_secret' => 'secret', + 'username' => 'admin', + 'password' => 'mypassword', + ]); + + $this->assertSame(400, $client->getResponse()->getStatusCode()); + } + public function testListingClient() { $this->logInAs('admin');