diff options
author | tcit <tcit@tcit.fr> | 2014-09-27 17:54:24 +0200 |
---|---|---|
committer | tcit <tcit@tcit.fr> | 2014-09-27 17:54:24 +0200 |
commit | 9b8283d0fc0290e3fe635f572a034bca959b34d8 (patch) | |
tree | bcc26634c68a8689ad511513c316058647e90789 | |
parent | a15108e65b12ceaf50821783bcaa1ee3fee10d13 (diff) | |
parent | 04a7674bdd20f2f24b32de69c086ecffdf20ceb4 (diff) | |
download | wallabag-9b8283d0fc0290e3fe635f572a034bca959b34d8.tar.gz wallabag-9b8283d0fc0290e3fe635f572a034bca959b34d8.tar.zst wallabag-9b8283d0fc0290e3fe635f572a034bca959b34d8.zip |
Merge branch 'refactor' into dev
-rw-r--r-- | inc/poche/WallabagEpub.class.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/inc/poche/WallabagEpub.class.php b/inc/poche/WallabagEpub.class.php index b81d9bfd..9c4d3566 100644 --- a/inc/poche/WallabagEpub.class.php +++ b/inc/poche/WallabagEpub.class.php | |||
@@ -12,14 +12,12 @@ class WallabagEpub | |||
12 | { | 12 | { |
13 | protected $wallabag; | 13 | protected $wallabag; |
14 | protected $method; | 14 | protected $method; |
15 | protected $id; | ||
16 | protected $value; | 15 | protected $value; |
17 | 16 | ||
18 | public function __construct(Poche $wallabag, $method, $id, $value) | 17 | public function __construct(Poche $wallabag, $method, $value) |
19 | { | 18 | { |
20 | $this->wallabag = $wallabag; | 19 | $this->wallabag = $wallabag; |
21 | $this->method = $method; | 20 | $this->method = $method; |
22 | $this->id = $id; | ||
23 | $this->value = $value; | 21 | $this->value = $value; |
24 | } | 22 | } |
25 | 23 | ||
@@ -30,7 +28,7 @@ class WallabagEpub | |||
30 | { | 28 | { |
31 | switch ($this->method) { | 29 | switch ($this->method) { |
32 | case 'id': | 30 | case 'id': |
33 | $entryID = filter_var($this->id, FILTER_SANITIZE_NUMBER_INT); | 31 | $entryID = filter_var($this->value, FILTER_SANITIZE_NUMBER_INT); |
34 | $entry = $this->wallabag->store->retrieveOneById($entryID, $this->wallabag->user->getId()); | 32 | $entry = $this->wallabag->store->retrieveOneById($entryID, $this->wallabag->user->getId()); |
35 | $entries = array($entry); | 33 | $entries = array($entry); |
36 | $bookTitle = $entry['title']; | 34 | $bookTitle = $entry['title']; |
@@ -87,7 +85,7 @@ class WallabagEpub | |||
87 | $log->logLine("getCurrentServerURL: " . $book->getCurrentServerURL()); | 85 | $log->logLine("getCurrentServerURL: " . $book->getCurrentServerURL()); |
88 | $log->logLine("getCurrentPageURL..: " . $book->getCurrentPageURL()); | 86 | $log->logLine("getCurrentPageURL..: " . $book->getCurrentPageURL()); |
89 | 87 | ||
90 | $book->setTitle(_('wallabag\'s articles')); | 88 | $book->setTitle($bookTitle); |
91 | $book->setIdentifier("http://$_SERVER[HTTP_HOST]", EPub::IDENTIFIER_URI); // Could also be the ISBN number, prefered for published books, or a UUID. | 89 | $book->setIdentifier("http://$_SERVER[HTTP_HOST]", EPub::IDENTIFIER_URI); // Could also be the ISBN number, prefered for published books, or a UUID. |
92 | //$book->setLanguage("en"); // Not needed, but included for the example, Language is mandatory, but EPub defaults to "en". Use RFC3066 Language codes, such as "en", "da", "fr" etc. | 90 | //$book->setLanguage("en"); // Not needed, but included for the example, Language is mandatory, but EPub defaults to "en". Use RFC3066 Language codes, such as "en", "da", "fr" etc. |
93 | $book->setDescription(_("Some articles saved on my wallabag")); | 91 | $book->setDescription(_("Some articles saved on my wallabag")); |