diff options
-rw-r--r-- | docs/en/index.rst | 1 | ||||
-rw-r--r-- | docs/en/user/upgrade.rst | 24 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/WallabagRestController.php | 5 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php | 2 |
4 files changed, 32 insertions, 0 deletions
diff --git a/docs/en/index.rst b/docs/en/index.rst index 34ec7999..590c234a 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst | |||
@@ -26,6 +26,7 @@ The main documentation for this application is organized into a couple sections: | |||
26 | user/faq | 26 | user/faq |
27 | user/installation | 27 | user/installation |
28 | user/migration | 28 | user/migration |
29 | user/upgrade | ||
29 | user/create_account | 30 | user/create_account |
30 | user/login | 31 | user/login |
31 | user/configuration | 32 | user/configuration |
diff --git a/docs/en/user/upgrade.rst b/docs/en/user/upgrade.rst new file mode 100644 index 00000000..e4735631 --- /dev/null +++ b/docs/en/user/upgrade.rst | |||
@@ -0,0 +1,24 @@ | |||
1 | Upgrade wallabag | ||
2 | ================ | ||
3 | |||
4 | Upgrade on a dedicated web server | ||
5 | --------------------------------- | ||
6 | |||
7 | The last release is published on https://www.wallabag.org/pages/download-wallabag.html. In order to upgrade your wallabag installation and get the last version, run the following commands in you wallabag folder (replace ``2.0.3`` by the last release number): | ||
8 | :: | ||
9 | |||
10 | git fetch origin | ||
11 | git fetch --tags | ||
12 | git checkout 2.0.3 | ||
13 | SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist | ||
14 | php bin/console cache:clear --env=prod | ||
15 | |||
16 | |||
17 | Upgrade on a shared hosting | ||
18 | --------------------------- | ||
19 | |||
20 | Backup your ``app/config/parameters.yml`` file. Extract the archive in your wallabag folder and replace ``app/config/parameters.yml`` with yours. | ||
21 | |||
22 | If you use SQLite, you must also copy your ``data/`` folder inside the new installation. | ||
23 | |||
24 | Empty ``var/cache`` folder. | ||
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 316d45be..5202c524 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -109,6 +109,7 @@ class WallabagRestController extends FOSRestController | |||
109 | $this->validateAuthentication(); | 109 | $this->validateAuthentication(); |
110 | 110 | ||
111 | $url = $request->request->get('url'); | 111 | $url = $request->request->get('url'); |
112 | $title = $request->request->get('title'); | ||
112 | $isArchived = (int) $request->request->get('archive'); | 113 | $isArchived = (int) $request->request->get('archive'); |
113 | $isStarred = (int) $request->request->get('starred'); | 114 | $isStarred = (int) $request->request->get('starred'); |
114 | 115 | ||
@@ -121,6 +122,10 @@ class WallabagRestController extends FOSRestController | |||
121 | ); | 122 | ); |
122 | } | 123 | } |
123 | 124 | ||
125 | if (!is_null($title)) { | ||
126 | $entry->setTitle($title); | ||
127 | } | ||
128 | |||
124 | $tags = $request->request->get('tags', ''); | 129 | $tags = $request->request->get('tags', ''); |
125 | if (!empty($tags)) { | 130 | if (!empty($tags)) { |
126 | $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); | 131 | $this->get('wallabag_core.content_proxy')->assignTagsToEntry($entry, $tags); |
diff --git a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php index 839ff386..2f2d92ee 100644 --- a/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php +++ b/src/Wallabag/ApiBundle/Tests/Controller/WallabagRestControllerTest.php | |||
@@ -152,6 +152,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase | |||
152 | $this->client->request('POST', '/api/entries.json', [ | 152 | $this->client->request('POST', '/api/entries.json', [ |
153 | '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', | 153 | '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', |
154 | 'tags' => 'google', | 154 | 'tags' => 'google', |
155 | 'title' => 'New title for my article', | ||
155 | ]); | 156 | ]); |
156 | 157 | ||
157 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); | 158 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); |
@@ -162,6 +163,7 @@ class WallabagRestControllerTest extends WallabagApiTestCase | |||
162 | $this->assertEquals('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', $content['url']); | 163 | $this->assertEquals('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', $content['url']); |
163 | $this->assertEquals(false, $content['is_archived']); | 164 | $this->assertEquals(false, $content['is_archived']); |
164 | $this->assertEquals(false, $content['is_starred']); | 165 | $this->assertEquals(false, $content['is_starred']); |
166 | $this->assertEquals('New title for my article', $content['title']); | ||
165 | $this->assertEquals(1, $content['user_id']); | 167 | $this->assertEquals(1, $content['user_id']); |
166 | $this->assertCount(1, $content['tags']); | 168 | $this->assertCount(1, $content['tags']); |
167 | } | 169 | } |