aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-06-03 15:18:04 +0200
committerGravatar GitHub <noreply@github.com> 2017-06-03 15:18:04 +0200
commitfd43ee546e419fc9fbb9a3ad974d2234d94cffaa (patch)
tree2df9fd1daf5b994d7bbde8dd46f7605e4370c268 /p
parentbe0bcfef7e38f27284ec7b377b342ba389515964 (diff)
parent6f3653d430c86b026f8e007a276fdba2b09b61b3 (diff)
Merge pull request #1549 from FreshRSS/dev1.7.0
Version 1.7.0
Diffstat (limited to 'p')
-rw-r--r--p/api/greader.php2
-rw-r--r--p/api/index.php2
-rw-r--r--p/api/pshb.php45
-rw-r--r--p/f.php3
-rw-r--r--p/scripts/main.js37
-rw-r--r--p/themes/BlueLagoon/BlueLagoon.css11
-rw-r--r--p/themes/BlueLagoon/template.css3
-rw-r--r--p/themes/Dark/dark.css12
-rw-r--r--p/themes/Flat/flat.css10
-rw-r--r--p/themes/Origine-compact/origine-compact.css14
-rw-r--r--p/themes/Origine/origine.css14
-rw-r--r--p/themes/Pafat/pafat.css23
-rw-r--r--p/themes/Screwdriver/screwdriver.css13
-rw-r--r--p/themes/base-theme/base.css9
-rw-r--r--p/themes/base-theme/template.css3
15 files changed, 104 insertions, 97 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index 01eca6d4f..e1f4202a7 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -695,7 +695,7 @@ $pathInfos = explode('/', $pathInfo);
Minz_Configuration::register('system',
DATA_PATH . '/config.php',
- DATA_PATH . '/config.default.php');
+ FRESHRSS_PATH . '/config.default.php');
FreshRSS_Context::$system_conf = Minz_Configuration::get('system');
if (!FreshRSS_Context::$system_conf->api_enabled) {
serviceUnavailable();
diff --git a/p/api/index.php b/p/api/index.php
index 3ab4e02b3..580c90255 100644
--- a/p/api/index.php
+++ b/p/api/index.php
@@ -16,7 +16,7 @@
<dd><?php
require('../../constants.php');
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
-Minz_Configuration::register('system', DATA_PATH . '/config.php', DATA_PATH . '/config.default.php');
+Minz_Configuration::register('system', DATA_PATH . '/config.php', FRESHRSS_PATH . '/config.default.php');
echo Minz_Url::display('/api/greader.php', 'html', true);
?></dd>
</dl>
diff --git a/p/api/pshb.php b/p/api/pshb.php
index e9b66b167..4b546908a 100644
--- a/p/api/pshb.php
+++ b/p/api/pshb.php
@@ -23,8 +23,13 @@ if (!ctype_xdigit($key)) {
chdir(PSHB_PATH);
$canonical64 = @file_get_contents('keys/' . $key . '.txt');
if ($canonical64 === false) {
+ if (!empty($_REQUEST['hub_mode']) && $_REQUEST['hub_mode'] === 'unsubscribe') {
+ logMe('Warning: Accept unknown unsubscribe');
+ header('Connection: close');
+ exit(isset($_REQUEST['hub_challenge']) ? $_REQUEST['hub_challenge'] : '');
+ }
header('HTTP/1.1 404 Not Found');
- logMe('Error: Feed key not found!: ' . $key);
+ logMe('Warning: Feed key not found!: ' . $key);
die('Feed key not found!');
}
$canonical64 = trim($canonical64);
@@ -36,7 +41,7 @@ if (!preg_match('/^[A-Za-z0-9_-]+$/D', $canonical64)) {
$hubFile = @file_get_contents('feeds/' . $canonical64 . '/!hub.json');
if ($hubFile === false) {
header('HTTP/1.1 404 Not Found');
- //@unlink('keys/' . $key . '.txt');
+ unlink('keys/' . $key . '.txt');
logMe('Error: Feed info not found!: ' . $canonical64);
die('Feed info not found!');
}
@@ -50,8 +55,19 @@ chdir('feeds/' . $canonical64);
$users = glob('*.txt', GLOB_NOSORT);
if (empty($users)) {
header('HTTP/1.1 410 Gone');
- logMe('Error: Nobody is subscribed to this feed anymore!: ' . $canonical64);
- die('Nobody is subscribed to this feed anymore!');
+ $url = base64url_decode($canonical64);
+ logMe('Warning: Nobody subscribes to this feed anymore!: ' . $url);
+ unlink('../../keys/' . $key . '.txt');
+ Minz_Configuration::register('system',
+ DATA_PATH . '/config.php',
+ FRESHRSS_PATH . '/config.default.php');
+ FreshRSS_Context::$system_conf = Minz_Configuration::get('system');
+ $feed = new FreshRSS_Feed($url);
+ $feed->pubSubHubbubSubscribe(false);
+ unlink('!hub.json');
+ chdir('..');
+ recursive_unlink($canonical64);
+ die('Nobody subscribes to this feed anymore!');
}
if (!empty($_REQUEST['hub_mode']) && $_REQUEST['hub_mode'] === 'subscribe') {
@@ -85,7 +101,7 @@ if ($ORIGINAL_INPUT == '') {
die('Missing XML payload!');
}
-Minz_Configuration::register('system', DATA_PATH . '/config.php', DATA_PATH . '/config.default.php');
+Minz_Configuration::register('system', DATA_PATH . '/config.php', FRESHRSS_PATH . '/config.default.php');
$system_conf = Minz_Configuration::get('system');
$system_conf->auth_type = 'none'; // avoid necessity to be logged in (not saved!)
@@ -108,22 +124,27 @@ $nb = 0;
foreach ($users as $userFilename) {
$username = basename($userFilename, '.txt');
if (!file_exists(USERS_PATH . '/' . $username . '/config.php')) {
- break;
+ logMe('Warning: Removing broken user link: ' . $username . ' for ' . $self);
+ unlink($userFilename);
+ continue;
}
try {
Minz_Session::_param('currentUser', $username);
Minz_Configuration::register('user',
join_path(USERS_PATH, $username, 'config.php'),
- join_path(USERS_PATH, '_', 'config.default.php'));
+ join_path(FRESHRSS_PATH, 'config-user.default.php'));
new Minz_ModelPdo($username); //TODO: FIXME: Quick-fix while waiting for a better FreshRSS() constructor/init
FreshRSS_Context::init();
- list($updated_feeds, $feed) = FreshRSS_feed_Controller::actualizeFeed(0, $self, false, $simplePie);
- if ($updated_feeds > 0) {
+ list($updated_feeds, $feed, $nb_new_articles) = FreshRSS_feed_Controller::actualizeFeed(0, $self, false, $simplePie);
+ if ($updated_feeds > 0 || $feed != false) {
$nb++;
+ } else {
+ logMe('Warning: User ' . $username . ' does not subscribe anymore to ' . $self);
+ unlink($userFilename);
}
} catch (Exception $e) {
- logMe('Error: ' . $e->getMessage());
+ logMe('Error: ' . $e->getMessage() . ' for user ' . $username . ' and feed ' . $self);
}
}
@@ -132,8 +153,8 @@ unset($simplePie);
if ($nb === 0) {
header('HTTP/1.1 410 Gone');
- logMe('Error: Nobody is subscribed to this feed anymore after all!: ' . $self);
- die('Nobody is subscribed to this feed anymore after all!');
+ logMe('Warning: Nobody subscribes to this feed anymore after all!: ' . $self);
+ die('Nobody subscribes to this feed anymore after all!');
} elseif (!empty($hubJson['error'])) {
$hubJson['error'] = false;
file_put_contents('./!hub.json', json_encode($hubJson));
diff --git a/p/f.php b/p/f.php
index e4c82bb16..c47fa747a 100644
--- a/p/f.php
+++ b/p/f.php
@@ -1,6 +1,6 @@
<?php
-
require('../constants.php');
+require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
require(LIB_PATH . '/favicons.php');
require(LIB_PATH . '/http-conditional.php');
@@ -15,7 +15,6 @@ function show_default_favicon($cacheSeconds = 3600) {
}
}
-
$id = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '0';
if (!ctype_xdigit($id)) {
$id = '0';
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 5dbb95c91..5be7bc36b 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -555,39 +555,42 @@ function init_shortcuts() {
window.setTimeout(init_shortcuts, 200);
return;
}
- // Touches de manipulation
+ // Manipulation shortcuts
shortcut.add(shortcuts.mark_read, function () {
- // on marque comme lu ou non lu
+ // Toggle the read state
var active = $(".flux.current");
mark_read(active, false);
}, {
'disable_in_input': true
});
shortcut.add("shift+" + shortcuts.mark_read, function () {
- // on marque tout comme lu
+ // Mark everything as read
$(".nav_menu .read_all").click();
}, {
'disable_in_input': true
});
shortcut.add(shortcuts.mark_favorite, function () {
- // on marque comme favori ou non favori
+ // Toggle the favorite state
var active = $(".flux.current");
mark_favorite(active);
}, {
'disable_in_input': true
});
shortcut.add(shortcuts.collapse_entry, function () {
+ // Toggle the collapse state
collapse_entry();
}, {
'disable_in_input': true
});
shortcut.add(shortcuts.auto_share, function () {
+ // Display the share options
auto_share();
}, {
'disable_in_input': true
});
shortcut.add(shortcuts.user_filter, function () {
+ // Display the user filters
user_filter();
}, {
'disable_in_input': true
@@ -606,7 +609,7 @@ function init_shortcuts() {
});
}
- // Touches de navigation pour les articles
+ // Entry navigation shortcuts
shortcut.add(shortcuts.prev_entry, prev_entry, {
'disable_in_input': true
});
@@ -633,7 +636,7 @@ function init_shortcuts() {
}, {
'disable_in_input': true
});
- // Touches de navigation pour les flux
+ // Feed navigation shortcuts
shortcut.add("shift+" + shortcuts.prev_entry, prev_feed, {
'disable_in_input': true
});
@@ -646,7 +649,7 @@ function init_shortcuts() {
shortcut.add("shift+" + shortcuts.last_entry, last_feed, {
'disable_in_input': true
});
- // Touches de navigation pour les categories
+ // Category navigation shortcuts
shortcut.add("alt+" + shortcuts.prev_entry, prev_category, {
'disable_in_input': true
});
@@ -661,7 +664,7 @@ function init_shortcuts() {
});
shortcut.add(shortcuts.go_website, function () {
- var url_website = $('.flux.current > .flux_header > .title > a').attr("href");
+ var url_website = $('.flux.current a.go_website').attr("href");
if (context.auto_mark_site) {
$(".flux.current").each(function () {
@@ -705,6 +708,10 @@ function init_stream(divStream) {
if ($(e.target).closest('.content, .item.website, .item.link').length > 0) {
return;
}
+ if (!context.sides_close_article && $(e.target).is('div.flux_content')) {
+ // setting for not-closing after clicking outside article area
+ return;
+ }
var old_active = $(".flux.current"),
new_active = $(this).parent();
isCollapsed = true;
@@ -803,12 +810,12 @@ function updateFeed(feeds, feeds_count) {
if (!feed) {
return;
}
-
$.ajax({
type: 'POST',
url: feed.url,
data : {
_csrf: context.csrf,
+ noCommit: feeds.length > 0 ? 1 : 0,
},
}).always(function (data) {
feed_processed++;
@@ -830,7 +837,6 @@ function init_actualize() {
if (ajax_loading) {
return false;
}
-
ajax_loading = true;
$.getJSON('./?c=javascript&a=actualize').done(function (data) {
@@ -841,7 +847,16 @@ function init_actualize() {
}
if (data.feeds.length === 0) {
openNotification(data.feedback_no_refresh, "good");
- ajax_loading = false;
+ $.ajax({ //Empty request to force refresh server database cache
+ type: 'POST',
+ url: './?c=feed&a=actualize&id=-1',
+ data : {
+ _csrf: context.csrf,
+ noCommit: 0,
+ },
+ }).always(function (data) {
+ ajax_loading = false;
+ });
return;
}
//Progress bar
diff --git a/p/themes/BlueLagoon/BlueLagoon.css b/p/themes/BlueLagoon/BlueLagoon.css
index 27bae5404..150e27908 100644
--- a/p/themes/BlueLagoon/BlueLagoon.css
+++ b/p/themes/BlueLagoon/BlueLagoon.css
@@ -10,7 +10,7 @@
/*============*/
html, body {
height: 100%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
background: #fafafa;
font-size: 92%;
}
@@ -368,16 +368,13 @@ a.btn {
.dropdown-header {
display:none;
}
-.dropdown-menu > .item > a {
- padding: 0 25px;
- line-height: 2.5em;
- color: #ccc;
-}
+.dropdown-menu > .item > a,
.dropdown-menu > .item > span,
.dropdown-menu > .item > .as-link {
padding: 0 22px;
- line-height: 2em;
+ line-height: 2.5em;
color: #ccc;
+ font-size: 0.8rem;
}
.dropdown-menu > .item:hover {
background: linear-gradient(180deg, #0090FF 0%, #0062BE 100%) #E4992C;
diff --git a/p/themes/BlueLagoon/template.css b/p/themes/BlueLagoon/template.css
index 8c1a4ed21..4bc0fb735 100644
--- a/p/themes/BlueLagoon/template.css
+++ b/p/themes/BlueLagoon/template.css
@@ -2,7 +2,7 @@
/*=== GENERAL */
/*============*/
-html, body {
+html, body {
margin: 0;
padding: 0;
font-size: 92%;
@@ -79,6 +79,7 @@ textarea {
input, select, textarea {
display: inline-block;
max-width: 100%;
+ font-size: 0.8rem;
}
input[type="radio"],
input[type="checkbox"] {
diff --git a/p/themes/Dark/dark.css b/p/themes/Dark/dark.css
index f72ed8b5b..d8415ef25 100644
--- a/p/themes/Dark/dark.css
+++ b/p/themes/Dark/dark.css
@@ -10,7 +10,7 @@
/*============*/
html, body {
height: 100%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
background: #1c1c1c;
color: #888;
}
@@ -334,14 +334,12 @@ a.btn {
text-align: left;
color: #888;
}
-.dropdown-menu > .item > a {
- padding: 0 25px;
- line-height: 2.5em;
-}
+.dropdown-menu > .item > a,
.dropdown-menu > .item > span,
.dropdown-menu > .item > .as-link {
padding: 0 22px;
- line-height: 2em;
+ line-height: 2.5em;
+ font-size: 0.8rem;
}
.dropdown-menu > .item:hover {
background: #26303F;
@@ -810,7 +808,7 @@ a.btn {
/*=== "Load more" part */
#bigMarkAsRead {
text-align: center;
- text-decoration: none;
+ text-decoration: none;
}
#bigMarkAsRead:hover {
background: #111;
diff --git a/p/themes/Flat/flat.css b/p/themes/Flat/flat.css
index 0672c6a38..0240fe4b4 100644
--- a/p/themes/Flat/flat.css
+++ b/p/themes/Flat/flat.css
@@ -10,7 +10,7 @@
/*============*/
html, body {
height: 100%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
background: #fafafa;
}
@@ -334,14 +334,12 @@ a.btn {
text-align: left;
color: #34495e;
}
-.dropdown-menu > .item > a {
- padding: 0 25px;
- line-height: 2.5em;
-}
+.dropdown-menu > .item > a,
.dropdown-menu > .item > span,
.dropdown-menu > .item > .as-link {
padding: 0 22px;
- line-height: 2em;
+ line-height: 2.5em;
+ font-size: 0.8rem;
}
.dropdown-menu > .item:hover {
background: #2980b9;
diff --git a/p/themes/Origine-compact/origine-compact.css b/p/themes/Origine-compact/origine-compact.css
index 87d04e93e..8447e2486 100644
--- a/p/themes/Origine-compact/origine-compact.css
+++ b/p/themes/Origine-compact/origine-compact.css
@@ -10,7 +10,7 @@
/*============*/
html, body {
height: 100%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
background: #fafafa;
}
@@ -360,16 +360,12 @@ a.btn {
font-weight: bold;
text-align: left;
}
-.dropdown-menu > .item {
-}
-.dropdown-menu > .item > a {
- padding: 0 25px;
- line-height: 2.5em;
-}
+.dropdown-menu > .item > a,
.dropdown-menu > .item > span,
.dropdown-menu > .item > .as-link {
padding: 0 22px;
- line-height: 2em;
+ line-height: 2.5em;
+ font-size: 0.8rem;
}
.dropdown-menu > .item:hover {
background: #0062BE;
@@ -870,7 +866,7 @@ a.btn {
/*=== "Load more" part */
#bigMarkAsRead {
text-align: center;
- text-decoration: none;
+ text-decoration: none;
color: #666;
background: #fafafa;
font-size: 1.2em;
diff --git a/p/themes/Origine/origine.css b/p/themes/Origine/origine.css
index da461087b..becf3f433 100644
--- a/p/themes/Origine/origine.css
+++ b/p/themes/Origine/origine.css
@@ -10,7 +10,7 @@
/*============*/
html, body {
height: 100%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
background: #fafafa;
}
@@ -358,16 +358,12 @@ a.btn {
font-weight: bold;
text-align: left;
}
-.dropdown-menu > .item {
-}
-.dropdown-menu > .item > a {
- padding: 0 25px;
- line-height: 2.5em;
-}
+.dropdown-menu > .item > a,
.dropdown-menu > .item > span,
.dropdown-menu > .item > .as-link {
padding: 0 22px;
- line-height: 2em;
+ line-height: 2.5em;
+ font-size: 0.8rem;
}
.dropdown-menu > .item:hover {
background: #0062BE;
@@ -853,7 +849,7 @@ a.btn {
/*=== "Load more" part */
#bigMarkAsRead {
text-align: center;
- text-decoration: none;
+ text-decoration: none;
text-shadow: 0 -1px 0 #aaa;
color: #666;
background: #fafafa;
diff --git a/p/themes/Pafat/pafat.css b/p/themes/Pafat/pafat.css
index abe808eab..23bc6671d 100644
--- a/p/themes/Pafat/pafat.css
+++ b/p/themes/Pafat/pafat.css
@@ -10,7 +10,7 @@
/*============*/
html, body {
height: 100%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
background: #fafafa;
color : #666;
}
@@ -146,8 +146,8 @@ form th {
.stick .dropdown + .dropdown > .btn {
border-left: none;
-}
-
+}
+
.stick .btn + .dropdown > .btn {
border-left: none;
border-radius: 0 3px 3px 0;
@@ -338,20 +338,13 @@ a.btn {
font-weight: bold;
text-align: left;
}
-.dropdown-menu > .item {
-}
-
-.dropdown-menu > .item > a {
- padding: 0 22px;
- line-height: 2.5em;
- color: #666;
- font-size: 0.8rem;
-}
+.dropdown-menu > .item > a,
.dropdown-menu > .item > span,
.dropdown-menu > .item > .as-link {
padding: 0 22px;
- line-height: 2em;
+ line-height: 2.5em;
+ color: #666;
font-size: 0.8rem;
}
@@ -550,7 +543,7 @@ a.btn {
text-decoration: none;
color : #C5C6CA;
}
-
+
.header > .item.search input {
width: 230px;
height : 29px;
@@ -861,7 +854,7 @@ a.btn {
/*=== "Load more" part */
#bigMarkAsRead {
text-align: center;
- text-decoration: none;
+ text-decoration: none;
color: #666;
background: #fafafa;
}
diff --git a/p/themes/Screwdriver/screwdriver.css b/p/themes/Screwdriver/screwdriver.css
index 9dbe523a1..b2c539b13 100644
--- a/p/themes/Screwdriver/screwdriver.css
+++ b/p/themes/Screwdriver/screwdriver.css
@@ -10,7 +10,7 @@
/*============*/
html, body {
height: 100%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
background: #fafafa;
font-size: 92%;
}
@@ -368,18 +368,13 @@ a.btn {
.dropdown-header {
display:none;
}
-.dropdown-menu > .item {
-}
-.dropdown-menu > .item > a {
- padding: 0 25px;
- line-height: 2.5em;
- color: #ccc;
-}
+.dropdown-menu > .item > a,
.dropdown-menu > .item > span,
.dropdown-menu > .item > .as-link {
padding: 0 22px;
- line-height: 2em;
+ line-height: 2.5em;
color: #ccc;
+ font-size: 0.8rem;
}
.dropdown-menu > .item:hover {
background: #171717;
diff --git a/p/themes/base-theme/base.css b/p/themes/base-theme/base.css
index 192a957c9..1bf73d8b3 100644
--- a/p/themes/base-theme/base.css
+++ b/p/themes/base-theme/base.css
@@ -10,7 +10,7 @@
/*============*/
html, body {
height: 100%;
- font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
+ font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
}
/*=== Links */
@@ -251,14 +251,11 @@ a.btn {
}
.dropdown-menu > .item {
}
-.dropdown-menu > .item > a {
- padding: 0 25px;
- line-height: 2.5em;
-}
+.dropdown-menu > .item > a,
.dropdown-menu > .item > span,
.dropdown-menu > .item > .as-link {
padding: 0 22px;
- line-height: 2em;
+ line-height: 2.5em;
}
.dropdown-menu > .item:hover {
}
diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css
index cc36c3ffa..277bb61b2 100644
--- a/p/themes/base-theme/template.css
+++ b/p/themes/base-theme/template.css
@@ -88,6 +88,7 @@ input.extend:focus {
input, select, textarea {
display: inline-block;
max-width: 100%;
+ font-size: 0.8rem;
}
input[type="radio"],
input[type="checkbox"] {
@@ -345,7 +346,7 @@ a.btn {
/*=== Tree */
.tree {
margin: 0;
- padding: 0;
+ padding: 0 0 15em 0;
list-style: none;
text-align: left;
}