aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
authortcit <tcit@tcit.fr>2014-05-14 19:17:51 +0200
committertcit <tcit@tcit.fr>2014-05-14 19:17:51 +0200
commit6a3c5101577d08d65c22706dea61bba23cca782b (patch)
tree61454bcb0d3f059963d5eef255cc9d79e736d4f0 /inc
parent34acb02cbbc700f0d73ac340e906d3179932ab2b (diff)
parent818b186f8aa3f46d7cbddaeca94bd9cec57c213e (diff)
downloadwallabag-6a3c5101577d08d65c22706dea61bba23cca782b.tar.gz
wallabag-6a3c5101577d08d65c22706dea61bba23cca782b.tar.zst
wallabag-6a3c5101577d08d65c22706dea61bba23cca782b.zip
Merge branch 'dev' of https://github.com/wallabag/wallabag into epub
Diffstat (limited to 'inc')
-rw-r--r--inc/3rdparty/libraries/feedwriter/FeedItem.php3
-rwxr-xr-xinc/3rdparty/libraries/feedwriter/FeedWriter.php23
-rwxr-xr-xinc/3rdparty/makefulltextfeed.php6
-rwxr-xr-xinc/poche/Poche.class.php8
-rwxr-xr-xinc/poche/config.inc.default.php78
5 files changed, 66 insertions, 52 deletions
diff --git a/inc/3rdparty/libraries/feedwriter/FeedItem.php b/inc/3rdparty/libraries/feedwriter/FeedItem.php
index 3487423f..54a56f22 100644
--- a/inc/3rdparty/libraries/feedwriter/FeedItem.php
+++ b/inc/3rdparty/libraries/feedwriter/FeedItem.php
@@ -174,7 +174,8 @@
174 */ 174 */
175 public function setSource($link) 175 public function setSource($link)
176 { 176 {
177 $this->setElement('source', $link); 177 $attributes = array('url'=>$link);
178 $this->setElement('source', "wallabag",$attributes);
178 } 179 }
179 180
180 /** 181 /**
diff --git a/inc/3rdparty/libraries/feedwriter/FeedWriter.php b/inc/3rdparty/libraries/feedwriter/FeedWriter.php
index 79639c0c..d708e99b 100755
--- a/inc/3rdparty/libraries/feedwriter/FeedWriter.php
+++ b/inc/3rdparty/libraries/feedwriter/FeedWriter.php
@@ -87,12 +87,25 @@ define('JSONP', 3, true);
87 * @access public 87 * @access public
88 * @return void 88 * @return void
89 */ 89 */
90 public function genarateFeed() 90 public function genarateFeed($withHeaders = true)
91 { 91 {
92 header('Content-type: text/xml; charset=UTF-8'); 92 if ($withHeaders) {
93 // this line prevents Chrome 20 from prompting download 93 if ($this->version == RSS2) {
94 // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss 94 header('Content-type: text/xml; charset=UTF-8');
95 header('X-content-type-options: nosniff'); 95 // this line prevents Chrome 20 from prompting download
96 // used by Google: https://news.google.com/news/feeds?ned=us&topic=b&output=rss
97 header('X-content-type-options: nosniff');
98 } elseif ($this->version == JSON) {
99 header('Content-type: application/json; charset=UTF-8');
100 } elseif ($this->version == JSONP) {
101 header('Content-type: application/javascript; charset=UTF-8');
102 }
103 }
104
105 if ($this->version == JSON || $this->version == JSONP) {
106 $this->json = new stdClass();
107 }
108
96 109
97 $this->printHead(); 110 $this->printHead();
98 $this->printChannels(); 111 $this->printChannels();
diff --git a/inc/3rdparty/makefulltextfeed.php b/inc/3rdparty/makefulltextfeed.php
index 135964f1..4faad6d9 100755
--- a/inc/3rdparty/makefulltextfeed.php
+++ b/inc/3rdparty/makefulltextfeed.php
@@ -749,7 +749,7 @@ foreach ($items as $key => $item) {
749 // add effective URL (URL after redirects) 749 // add effective URL (URL after redirects)
750 if (isset($effective_url)) { 750 if (isset($effective_url)) {
751 //TODO: ensure $effective_url is valid witout - sometimes it causes problems, e.g. 751 //TODO: ensure $effective_url is valid witout - sometimes it causes problems, e.g.
752 //http://www.siasat.pk/forum/showthread.php?108883-Pakistan-Chowk-by-Rana-Mubashir-–-25th-March-2012-Special-Program-from-Liari-(Karachi) 752 //http://www.siasat.pk/forum/showthread.php?108883-Pakistan-Chowk-by-Rana-Mubashir-�-25th-March-2012-Special-Program-from-Liari-(Karachi)
753 //temporary measure: use utf8_encode() 753 //temporary measure: use utf8_encode()
754 $newitem->addElement('dc:identifier', remove_url_cruft(utf8_encode($effective_url))); 754 $newitem->addElement('dc:identifier', remove_url_cruft(utf8_encode($effective_url)));
755 } else { 755 } else {
@@ -831,7 +831,7 @@ if (!$debug_mode) {
831 } 831 }
832 if ($add_to_cache) { 832 if ($add_to_cache) {
833 ob_start(); 833 ob_start();
834 $output->genarateFeed(); 834 $output->genarateFeed(false);
835 $output = ob_get_contents(); 835 $output = ob_get_contents();
836 ob_end_clean(); 836 ob_end_clean();
837 if ($html_only && $item_count == 0) { 837 if ($html_only && $item_count == 0) {
@@ -842,7 +842,7 @@ if (!$debug_mode) {
842 } 842 }
843 echo $output; 843 echo $output;
844 } else { 844 } else {
845 $output->genarateFeed(); 845 $output->genarateFeed(false);
846 } 846 }
847 if ($callback) echo ');'; 847 if ($callback) echo ');';
848} 848}
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php
index c59973f3..85dd3848 100755
--- a/inc/poche/Poche.class.php
+++ b/inc/poche/Poche.class.php
@@ -72,7 +72,7 @@ class Poche
72 72
73 # l10n 73 # l10n
74 $language = $this->user->getConfigValue('language'); 74 $language = $this->user->getConfigValue('language');
75 putenv('LC_ALL=' . $language); 75 @putenv('LC_ALL=' . $language);
76 setlocale(LC_ALL, $language); 76 setlocale(LC_ALL, $language);
77 bindtextdomain($language, LOCALE); 77 bindtextdomain($language, LOCALE);
78 textdomain($language); 78 textdomain($language);
@@ -241,12 +241,12 @@ class Poche
241 $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime'); 241 $filter = new Twig_SimpleFilter('getReadingTime', 'Tools::getReadingTime');
242 $this->tpl->addFilter($filter); 242 $this->tpl->addFilter($filter);
243 } 243 }
244 244
245 public function createNewUser() { 245 public function createNewUser() {
246 if (isset($_GET['newuser'])){ 246 if (isset($_GET['newuser'])){
247 if ($_POST['newusername'] != "" && $_POST['password4newuser'] != ""){ 247 if ($_POST['newusername'] != "" && $_POST['password4newuser'] != ""){
248 $newusername = filter_var($_POST['newusername'], FILTER_SANITIZE_STRING); 248 $newusername = filter_var($_POST['newusername'], FILTER_SANITIZE_STRING);
249 if (!$this->store->userExists($newusername)){ 249 if (!$this->store->userExists($newusername)){
250 if ($this->store->install($newusername, Tools::encodeString($_POST['password4newuser'] . $newusername))) { 250 if ($this->store->install($newusername, Tools::encodeString($_POST['password4newuser'] . $newusername))) {
251 Tools::logm('The new user '.$newusername.' has been installed'); 251 Tools::logm('The new user '.$newusername.' has been installed');
252 $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to <a href="?logout">logout ?</a>'),$newusername)); 252 $this->messages->add('s', sprintf(_('The new user %s has been installed. Do you want to <a href="?logout">logout ?</a>'),$newusername));
@@ -265,7 +265,7 @@ class Poche
265 } 265 }
266 } 266 }
267 } 267 }
268 268
269 public function deleteUser(){ 269 public function deleteUser(){
270 if (isset($_GET['deluser'])){ 270 if (isset($_GET['deluser'])){
271 if ($this->store->listUsers() > 1) { 271 if ($this->store->listUsers() > 1) {
diff --git a/inc/poche/config.inc.default.php b/inc/poche/config.inc.default.php
index 3b08c212..edc42fc9 100755
--- a/inc/poche/config.inc.default.php
+++ b/inc/poche/config.inc.default.php
@@ -8,56 +8,56 @@
8 * @license http://www.wtfpl.net/ see COPYING file 8 * @license http://www.wtfpl.net/ see COPYING file
9 */ 9 */
10 10
11define ('SALT', ''); # put a strong string here 11@define ('SALT', ''); # put a strong string here
12define ('LANG', 'en_EN.utf8'); 12@define ('LANG', 'en_EN.utf8');
13 13
14define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite 14@define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite
15 15
16define ('STORAGE_SQLITE', ROOT . '/db/poche.sqlite'); # if you are using sqlite, where the database file is located 16@define ('STORAGE_SQLITE', ROOT . '/db/poche.sqlite'); # if you are using sqlite, where the database file is located
17 17
18# only for postgres & mysql 18# only for postgres & mysql
19define ('STORAGE_SERVER', 'localhost'); 19@define ('STORAGE_SERVER', 'localhost');
20define ('STORAGE_DB', 'poche'); 20@define ('STORAGE_DB', 'poche');
21define ('STORAGE_USER', 'poche'); 21@define ('STORAGE_USER', 'poche');
22define ('STORAGE_PASSWORD', 'poche'); 22@define ('STORAGE_PASSWORD', 'poche');
23 23
24################################################################################# 24#################################################################################
25# Do not trespass unless you know what you are doing 25# Do not trespass unless you know what you are doing
26################################################################################# 26#################################################################################
27 27
28// Change this if not using the standart port for SSL - i.e you server is behind sslh 28// Change this if not using the standart port for SSL - i.e you server is behind sslh
29define ('SSL_PORT', 443); 29@define ('SSL_PORT', 443);
30 30
31define ('MODE_DEMO', FALSE); 31@define ('MODE_DEMO', FALSE);
32define ('DEBUG_POCHE', FALSE); 32@define ('DEBUG_POCHE', FALSE);
33define ('DOWNLOAD_PICTURES', FALSE); 33@define ('DOWNLOAD_PICTURES', FALSE);
34define ('CONVERT_LINKS_FOOTNOTES', FALSE); 34@define ('CONVERT_LINKS_FOOTNOTES', FALSE);
35define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE); 35@define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE);
36define ('SHARE_TWITTER', TRUE); 36@define ('SHARE_TWITTER', TRUE);
37define ('SHARE_MAIL', TRUE); 37@define ('SHARE_MAIL', TRUE);
38define ('SHARE_SHAARLI', FALSE); 38@define ('SHARE_SHAARLI', FALSE);
39define ('SHAARLI_URL', 'http://myshaarliurl.com'); 39@define ('SHAARLI_URL', 'http://myshaarliurl.com');
40define ('FLATTR', TRUE); 40@define ('FLATTR', TRUE);
41define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url='); 41@define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url=');
42define ('NOT_FLATTRABLE', '0'); 42@define ('NOT_FLATTRABLE', '0');
43define ('FLATTRABLE', '1'); 43@define ('FLATTRABLE', '1');
44define ('FLATTRED', '2'); 44@define ('FLATTRED', '2');
45// display or not print link in article view 45// display or not print link in article view
46define ('SHOW_PRINTLINK', '1'); 46@define ('SHOW_PRINTLINK', '1');
47// display or not percent of read in article view. Affects only default theme. 47// display or not percent of read in article view. Affects only default theme.
48define ('SHOW_READPERCENT', '1'); 48@define ('SHOW_READPERCENT', '1');
49define ('ABS_PATH', 'assets/'); 49@define ('ABS_PATH', 'assets/');
50 50
51define ('DEFAULT_THEME', 'baggy'); 51@define ('DEFAULT_THEME', 'baggy');
52 52
53define ('THEME', ROOT . '/themes'); 53@define ('THEME', ROOT . '/themes');
54define ('LOCALE', ROOT . '/locale'); 54@define ('LOCALE', ROOT . '/locale');
55define ('CACHE', ROOT . '/cache'); 55@define ('CACHE', ROOT . '/cache');
56 56
57define ('PAGINATION', '10'); 57@define ('PAGINATION', '10');
58 58
59//limit for download of articles during import 59//limit for download of articles during import
60define ('IMPORT_LIMIT', 5); 60@define ('IMPORT_LIMIT', 5);
61//delay between downloads (in sec) 61//delay between downloads (in sec)
62define ('IMPORT_DELAY', 5); 62@define ('IMPORT_DELAY', 5);
63 63