From 27764b36353b3066a9e92da2a96ac17b546295be Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 22 Feb 2014 16:53:51 -0500 Subject: Improve sharing Previously, the share page can handle only a limited number of shares and only one of each type. Now the configuration has been change to be more flexible and allows an unlimited number of shares. The share description is located in an array and the share configuration is stored along with the user configuration. Note: I tried to include the specific javascript code in a separate file but I did not succeded to import it. --- app/Models/Configuration.php | 56 +++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 32 deletions(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 2b719c370..052e28ba8 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -48,16 +48,7 @@ class FreshRSS_Configuration { 'bottomline_tags' => true, 'bottomline_date' => true, 'bottomline_link' => true, - 'sharing' => array( - 'shaarli' => '', - 'wallabag' => '', - 'diaspora' => '', - 'twitter' => true, - 'g+' => true, - 'facebook' => true, - 'email' => true, - 'print' => true, - ), + 'sharing' => array(), ); private $available_languages = array( @@ -65,8 +56,10 @@ class FreshRSS_Configuration { 'fr' => 'Français', ); - public function __construct ($user) { - $this->filename = DATA_PATH . '/' . $user . '_user.php'; + private $shares; + + public function __construct($user) { + $this->filename = DATA_PATH . DIRECTORY_SEPARATOR . $user . '_user.php'; $data = @include($this->filename); if (!is_array($data)) { @@ -80,10 +73,20 @@ class FreshRSS_Configuration { } } $this->data['user'] = $user; + + $this->shares = DATA_PATH . DIRECTORY_SEPARATOR . 'shares.php'; + + $shares = @include($this->shares); + if (!is_array($shares)) { + throw new Minz_PermissionDeniedException($this->shares); + } + + $this->data['shares'] = $shares; } public function save() { @rename($this->filename, $this->filename . '.bak.php'); + unset($this->data['shares']); // Remove shares because it is not intended to be stored in user configuration if (file_put_contents($this->filename, "data, true) . ';', LOCK_EX) === false) { throw new Minz_PermissionDeniedException($this->filename); } @@ -104,16 +107,6 @@ class FreshRSS_Configuration { } } - public function sharing($key = false) { - if ($key === false) { - return $this->data['sharing']; - } - if (isset($this->data['sharing'][$key])) { - return $this->data['sharing'][$key]; - } - return false; - } - public function availableLanguages() { return $this->available_languages; } @@ -187,24 +180,23 @@ class FreshRSS_Configuration { } } public function _sharing ($values) { - $are_url = array ('shaarli', 'wallabag', 'diaspora'); - foreach ($values as $key => $value) { - if (in_array($key, $are_url)) { + $this->data['sharing'] = array(); + foreach ($values as $value) { + if (array_key_exists('url', $value)) { $is_url = ( - filter_var ($value, FILTER_VALIDATE_URL) || + filter_var ($value['url'], FILTER_VALIDATE_URL) || (version_compare(PHP_VERSION, '5.3.3', '<') && (strpos($value, '-') > 0) && ($value === filter_var($value, FILTER_SANITIZE_URL))) ); //PHP bug #51192 - if (!$is_url) { - $value = ''; + continue; + } + if (!array_key_exists('name', $value) || strcmp($value['name'], '') === 0) { + $value['name'] = $value['type']; } - } elseif (!is_bool($value)) { - $value = true; } - - $this->data['sharing'][$key] = $value; + $this->data['sharing'][] = $value; } } public function _theme($value) { -- cgit v1.2.3 From 166009f3623213249086038f7af72a76507f60dc Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 23 Feb 2014 21:55:45 +0100 Subject: Sharing: Compatibility 0.7 https://github.com/marienfressinaud/FreshRSS/pull/433 --- README.md | 2 +- app/Models/Configuration.php | 3 +++ app/i18n/en.php | 2 +- app/i18n/fr.php | 2 +- app/views/configure/sharing.phtml | 2 +- app/views/helpers/view/normal_view.phtml | 2 +- 6 files changed, 8 insertions(+), 5 deletions(-) (limited to 'app/Models/Configuration.php') diff --git a/README.md b/README.md index 2b54ff9d5..6c434527c 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Privilégiez pour cela des demandes sur GitHub # Contrôle d’accès Il est requis pour le mode multi-utilisateur, et recommandé dans tous les cas, de limiter l’accès à votre FreshRSS. Au choix : -* En utilisant l’identification par formulaire (requiert JavaScript, et PHP 5.3.7+ recommandé – fonctionne avec certaines versions de PHP5.3.3+) +* En utilisant l’identification par formulaire (requiert JavaScript, et PHP 5.3.7+ recommandé – fonctionne avec certaines versions de PHP 5.3.3+) * En utilisant l’identification par [Mozilla Persona](https://login.persona.org/about) incluse dans FreshRSS * En utilisant un contrôle d’accès HTTP défini par votre serveur Web * Voir par exemple la [documentation d’Apache sur l’authentification](http://httpd.apache.org/docs/trunk/howto/auth.html) diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 052e28ba8..bacb79510 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -182,6 +182,9 @@ class FreshRSS_Configuration { public function _sharing ($values) { $this->data['sharing'] = array(); foreach ($values as $value) { + if (!is_array($value)) { + continue; + } if (array_key_exists('url', $value)) { $is_url = ( filter_var ($value['url'], FILTER_VALIDATE_URL) || diff --git a/app/i18n/en.php b/app/i18n/en.php index d4fd491a3..69c2fd310 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -167,7 +167,7 @@ return array ( 'http_password' => 'HTTP password', 'blank_to_disable' => 'Leave blank to disable', 'share_name' => 'Share name to display', - 'share_url' => 'Share URL to use', + 'share_url' => 'Share URL to use', 'not_yet_implemented' => 'Not yet implemented', 'access_protected_feeds' => 'Connection allows to access HTTP protected RSS feeds', 'no_selected_feed' => 'No feed selected.', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 7420e2fdd..452c560a7 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -167,7 +167,7 @@ return array ( 'http_password' => 'Mot de passe HTTP', 'blank_to_disable' => 'Laissez vide pour désactiver', 'share_name' => 'Nom du partage à afficher', - 'share_url' => 'URL du partage à utiliser', + 'share_url' => 'URL du partage à utiliser', 'not_yet_implemented' => 'Pas encore implémenté', 'access_protected_feeds' => 'La connexion permet d’accéder aux flux protégés par une authentification HTTP', 'no_selected_feed' => 'Aucun flux sélectionné.', diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml index e46284955..b50e6ddc4 100644 --- a/app/views/configure/sharing.phtml +++ b/app/views/configure/sharing.phtml @@ -48,4 +48,4 @@ - \ No newline at end of file + diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index f27984025..ff535c60a 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -138,7 +138,7 @@ if (!empty($this->entries)) { -- cgit v1.2.3 From 1e105a64ab12b37f55b605a89e869f7bbb520e95 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Mon, 24 Feb 2014 19:51:57 -0500 Subject: Add a configuration option to get sticky articles Now the user can choose if an opened article will be repositioned to the top or not See #338 --- app/Controllers/configureController.php | 1 + app/Models/Configuration.php | 4 ++++ app/i18n/en.php | 1 + app/i18n/fr.php | 1 + app/views/configure/display.phtml | 10 ++++++++++ app/views/helpers/javascript_vars.phtml | 3 ++- p/scripts/main.js | 34 +++++++++++++++++---------------- 7 files changed, 37 insertions(+), 17 deletions(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 104fa8900..f831f25d0 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -148,6 +148,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { $this->view->conf->_display_posts(Minz_Request::param('display_posts', false)); $this->view->conf->_onread_jump_next(Minz_Request::param('onread_jump_next', false)); $this->view->conf->_lazyload (Minz_Request::param('lazyload', false)); + $this->view->conf->_sticky_post (Minz_Request::param('sticky_post', false)); $this->view->conf->_sort_order(Minz_Request::param('sort_order', 'DESC')); $this->view->conf->_mark_when (array( 'article' => Minz_Request::param('mark_open_article', false), diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index bacb79510..48efe3bf6 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -17,6 +17,7 @@ class FreshRSS_Configuration { 'display_posts' => false, 'onread_jump_next' => true, 'lazyload' => true, + 'sticky_post' => true, 'sort_order' => 'DESC', 'anon_access' => false, 'mark_when' => array( @@ -140,6 +141,9 @@ class FreshRSS_Configuration { public function _lazyload ($value) { $this->data['lazyload'] = ((bool)$value) && $value !== 'no'; } + public function _sticky_post($value) { + $this->data['sticky_post'] = ((bool)$value) && $value !== 'no'; + } public function _sort_order ($value) { $this->data['sort_order'] = $value === 'ASC' ? 'ASC' : 'DESC'; } diff --git a/app/i18n/en.php b/app/i18n/en.php index 69c2fd310..e67447520 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -215,6 +215,7 @@ return array ( 'top_line' => 'Top line', 'bottom_line' => 'Bottom line', 'img_with_lazyload' => 'Use "lazy load" mode to load pictures', + 'sticky_post' => 'Stick the article to the top when opened', 'auto_read_when' => 'Mark article as read…', 'article_selected' => 'when article is selected', 'article_open_on_website' => 'when article is opened on its original website', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 452c560a7..2bd4fabab 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -215,6 +215,7 @@ return array ( 'top_line' => 'Ligne du haut', 'bottom_line' => 'Ligne du bas', 'img_with_lazyload' => 'Utiliser le mode “chargement différé” pour les images', + 'sticky_post' => 'Aligner l’article en haut quand il est ouvert', 'auto_read_when' => 'Marquer un article comme lu…', 'article_selected' => 'lorsque l’article est sélectionné', 'article_open_on_website' => 'lorsque l’article est ouvert sur le site d’origine', diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 9104e4ef1..846db4b4c 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -110,6 +110,16 @@ +
+
+ +
+
+
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index afe0ab258..2ce11d7d7 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -11,7 +11,8 @@ echo 'var ', ',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false', ',auto_load_more=', $this->conf->auto_load_more ? 'true' : 'false', ',full_lazyload=', $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'true' : 'false', - ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false'; + ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false', + ',sticky_post=', $this->conf->sticky_post ? 'true' : 'false'; $s = $this->conf->shortcuts; echo ',shortcuts={', diff --git a/p/scripts/main.js b/p/scripts/main.js index ec27bd50c..6cc992379 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -238,26 +238,28 @@ function toggleContent(new_active, old_active) { var new_pos = new_active.position().top, old_scroll = $(box_to_move).scrollTop(); - if (hide_posts) { + if (sticky_post) { + if (hide_posts) { - new_pos = new_active.position().top; - old_scroll = $(box_to_move).scrollTop(); + new_pos = new_active.position().top; + old_scroll = $(box_to_move).scrollTop(); - if (relative_move) { - new_pos += old_scroll; - } + if (relative_move) { + new_pos += old_scroll; + } - if (old_active[0] !== new_active[0]) { - new_active.children(".flux_content").first().each(function () { - $(box_to_move).scrollTop(new_pos).scrollTop(); - }); - } - } else { - if (relative_move) { - new_pos += old_scroll; - } + if (old_active[0] !== new_active[0]) { + new_active.children(".flux_content").first().each(function () { + $(box_to_move).scrollTop(new_pos).scrollTop(); + }); + } + } else { + if (relative_move) { + new_pos += old_scroll; + } - $(box_to_move).scrollTop(new_pos).scrollTop(); + $(box_to_move).scrollTop(new_pos).scrollTop(); + } } if (auto_mark_article) { -- cgit v1.2.3 From 29b3bbfe284a6e56413a2e89b740ffc4172c6847 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 1 Mar 2014 14:45:58 +0100 Subject: API: Real password system https://github.com/marienfressinaud/FreshRSS/issues/13 Expiring token not implemented yet --- app/Controllers/usersController.php | 12 +++++ app/Models/Configuration.php | 4 ++ app/i18n/en.php | 1 + app/i18n/fr.php | 1 + app/views/configure/users.phtml | 12 ++++- p/api/greader.php | 89 ++++++++++++++++++++++--------------- 6 files changed, 82 insertions(+), 37 deletions(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Controllers/usersController.php b/app/Controllers/usersController.php index bb4f34c5e..b03989cd7 100644 --- a/app/Controllers/usersController.php +++ b/app/Controllers/usersController.php @@ -32,6 +32,18 @@ class FreshRSS_users_Controller extends Minz_ActionController { } Minz_Session::_param('passwordHash', $this->view->conf->passwordHash); + $passwordPlain = Minz_Request::param('apiPasswordPlain', false); + if ($passwordPlain != '') { + if (!function_exists('password_hash')) { + include_once(LIB_PATH . '/password_compat.php'); + } + $passwordHash = password_hash($passwordPlain, PASSWORD_BCRYPT, array('cost' => self::BCRYPT_COST)); + $passwordPlain = ''; + $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash); //Compatibility with bcrypt.js + $ok &= ($passwordHash != ''); + $this->view->conf->_apiPasswordHash($passwordHash); + } + if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { $this->view->conf->_mail_login(Minz_Request::param('mail_login', false)); } diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 48efe3bf6..827a1d166 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -10,6 +10,7 @@ class FreshRSS_Configuration { 'mail_login' => '', 'token' => '', 'passwordHash' => '', //CRYPT_BLOWFISH + 'apiPasswordHash' => '', //CRYPT_BLOWFISH 'posts_per_page' => 20, 'view_mode' => 'normal', 'default_view' => 'not_read', @@ -165,6 +166,9 @@ class FreshRSS_Configuration { public function _passwordHash ($value) { $this->data['passwordHash'] = ctype_graph($value) && (strlen($value) >= 60) ? $value : ''; } + public function _apiPasswordHash ($value) { + $this->data['apiPasswordHash'] = ctype_graph($value) && (strlen($value) >= 60) ? $value : ''; + } public function _mail_login ($value) { $value = filter_var($value, FILTER_VALIDATE_EMAIL); if ($value) { diff --git a/app/i18n/en.php b/app/i18n/en.php index e67447520..d504ffc11 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -176,6 +176,7 @@ return array ( 'current_user' => 'Current user', 'default_user' => 'Username of the default user (maximum 16 alphanumeric characters)', 'password_form' => 'Password
(for the Web-form login method)', + 'password_api' => 'Password API
(e.g., for mobile apps)', 'persona_connection_email' => 'Login mail address
(for Mozilla Persona)', 'allow_anonymous' => 'Allow anonymous reading of the articles of the default user (%s)', 'allow_anonymous_refresh' => 'Allow anonymous refresh of the articles', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 2bd4fabab..c5581a78b 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -175,6 +175,7 @@ return array ( 'current_user' => 'Utilisateur actuel', 'password_form' => 'Mot de passe
(pour connexion par formulaire)', + 'password_api' => 'Mot de passe API
(ex. : pour applis mobiles)', 'default_user' => 'Nom de l’utilisateur par défaut (16 caractères alphanumériques maximum)', 'persona_connection_email' => 'Adresse courriel de connexion
(pour Mozilla Persona)', 'allow_anonymous' => 'Autoriser la lecture anonyme des articles de l’utilisateur par défaut (%s)', diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml index 0677db881..f5c7dff17 100644 --- a/app/views/configure/users.phtml +++ b/app/views/configure/users.phtml @@ -20,7 +20,15 @@
- + /> + +
+
+ +
+ +
+ />
@@ -85,7 +93,7 @@ conf->token; ?>
- />
diff --git a/p/api/greader.php b/p/api/greader.php index e99e1c0c8..035a031dd 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -20,9 +20,6 @@ Server-side API compatible with Google Reader API layer 2 * https://github.com/theoldreader/api */ -define('TEMP_PASSWORD', 'temp123'); //Change to another ASCII password -define('TEMP_AUTH', 'XtofqkkOkCULRLH8'); //Change to another random ASCII auth - require('../../constants.php'); require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader @@ -119,14 +116,28 @@ function checkCompatibility() { exit(); } -function authorizationToUser() { +function authorizationToUserConf() { $headerAuth = headerVariable('Authorization', 'GoogleLogin_auth'); //Input is 'GoogleLogin auth', but PHP replaces spaces by '_' http://php.net/language.variables.external if ($headerAuth != '') { $headerAuthX = explode('/', $headerAuth, 2); - if ((count($headerAuthX) === 2) && ($headerAuthX[1] === TEMP_AUTH)) { + if (count($headerAuthX) === 2) { $user = $headerAuthX[0]; if (ctype_alnum($user)) { - return $user; + try { + $conf = new FreshRSS_Configuration($user); + } catch (Exception $e) { + logMe($e->getMessage() . "\n"); + unauthorized(); + } + if ($headerAuthX[1] === sha1(Minz_Configuration::salt() . $conf->user . $conf->apiPasswordHash)) { + return $conf; + } else { + logMe('Invalid API authorisation for user ' . $user . ': ' . $headerAuthX[1] . "\n"); + Minz_Log::record('Invalid API authorisation for user ' . $user . ': ' . $headerAuthX[1], Minz_Log::WARNING); + unauthorized(); + } + } else { + badRequest(); } } } @@ -135,28 +146,45 @@ function authorizationToUser() { function clientLogin($email, $pass) { //http://web.archive.org/web/20130604091042/http://undoc.in/clientLogin.html logMe('clientLogin(' . $email . ")\n"); - if ($pass !== TEMP_PASSWORD) { - unauthorized(); + if (ctype_alnum($email)) { + if (!function_exists('password_verify')) { + include_once(LIB_PATH . '/password_compat.php'); + } + try { + $conf = new FreshRSS_Configuration($email); + } catch (Exception $e) { + logMe($e->getMessage() . "\n"); + Minz_Log::record('Invalid API user ' . $email, Minz_Log::WARNING); + unauthorized(); + } + if ($conf->apiPasswordHash != '' && password_verify($pass, $conf->apiPasswordHash)) { + header('Content-Type: text/plain; charset=UTF-8'); + $auth = $email . '/' . sha1(Minz_Configuration::salt() . $conf->user . $conf->apiPasswordHash); + echo 'SID=', $auth, "\n", + 'Auth=', $auth, "\n"; + exit(); + } else { + Minz_Log::record('Password API mismatch for user ' . $email, Minz_Log::WARNING); + unauthorized(); + } + } else { + badRequest(); } - header('Content-Type: text/plain; charset=UTF-8'); - $auth = $email . '/' . TEMP_AUTH; - echo 'SID=', $auth, "\n", - 'Auth=', $auth, "\n"; - exit(); + die(); } -function token($user) { +function token($conf) { //http://blog.martindoms.com/2009/08/15/using-the-google-reader-api-part-1/ https://github.com/ericmann/gReader-Library/blob/master/greader.class.php - logMe('token('. $user . ")\n"); - $token = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ01234'; //Must have 57 characters... + logMe('token('. $conf->user . ")\n"); //TODO: Implement real token that expires + $token = str_pad(sha1(Minz_Configuration::salt() . $conf->user . $conf->apiPasswordHash), 57, 'Z'); //Must have 57 characters echo $token, "\n"; exit(); } -function checkToken($user, $token) { +function checkToken($conf, $token) { //http://code.google.com/p/google-reader-api/wiki/ActionToken logMe('checkToken(' . $token . ")\n"); - if ($token === 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ01234') { + if ($token === str_pad(sha1(Minz_Configuration::salt() . $conf->user . $conf->apiPasswordHash), 57, 'Z')) { return true; } unauthorized(); @@ -462,32 +490,23 @@ if (!Minz_Configuration::apiEnabled()) { Minz_Session::init('FreshRSS'); -$user = authorizationToUser(); -$conf = null; +$conf = authorizationToUserConf(); +$user = $conf == null ? '' : $conf->user; logMe('User => ' . $user . "\n"); -if ($user != null) { - try { - $conf = new FreshRSS_Configuration($user); - } catch (Exception $e) { - logMe($e->getMessage()); - $user = null; - badRequest(); - } -} - Minz_Session::_param('currentUser', $user); if (count($pathInfos) < 3) { badRequest(); } elseif ($pathInfos[1] === 'accounts') { - if (($pathInfos[2] === 'ClientLogin') && isset($_REQUEST['Email']) && isset($_REQUEST['Passwd'])) + if (($pathInfos[2] === 'ClientLogin') && isset($_REQUEST['Email']) && isset($_REQUEST['Passwd'])) { clientLogin($_REQUEST['Email'], $_REQUEST['Passwd']); + } } elseif ($pathInfos[1] === 'reader' && $pathInfos[2] === 'api' && isset($pathInfos[3]) && $pathInfos[3] === '0' && isset($pathInfos[4])) { - if ($user == null) { + if ($user == '') { unauthorized(); } $timestamp = isset($_GET['ck']) ? intval($_GET['ck']) : 0; //ck=[unix timestamp] : Use the current Unix time here, helps Google with caching. @@ -543,7 +562,7 @@ elseif ($pathInfos[1] === 'reader' && $pathInfos[2] === 'api' && isset($pathInfo break; case 'edit-tag': //http://blog.martindoms.com/2010/01/20/using-the-google-reader-api-part-3/ $token = isset($_POST['T']) ? trim($_POST['T']) : ''; - checkToken($user, $token); + checkToken($conf, $token); $a = isset($_POST['a']) ? $_POST['a'] : ''; //Add: user/-/state/com.google/read user/-/state/com.google/starred $r = isset($_POST['r']) ? $_POST['r'] : ''; //Remove: user/-/state/com.google/read user/-/state/com.google/starred $e_ids = multiplePosts('i'); //item IDs @@ -551,7 +570,7 @@ elseif ($pathInfos[1] === 'reader' && $pathInfos[2] === 'api' && isset($pathInfo break; case 'mark-all-as-read': $token = isset($_POST['T']) ? trim($_POST['T']) : ''; - checkToken($user, $token); + checkToken($conf, $token); $streamId = $_POST['s']; //StreamId $ts = isset($_POST['ts']) ? $_POST['ts'] : '0'; //Older than timestamp in nanoseconds if (!ctype_digit($ts)) { @@ -560,7 +579,7 @@ elseif ($pathInfos[1] === 'reader' && $pathInfos[2] === 'api' && isset($pathInfo markAllAsRead($streamId, $ts); break; case 'token': - Token($user); + Token($conf); break; } } elseif ($pathInfos[1] === 'check' && $pathInfos[2] === 'compatibility') { -- cgit v1.2.3 From e9eca6aff6c7e2e2349b3b6cf714e2e7eb99405e Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Wed, 5 Mar 2014 20:22:03 -0500 Subject: Sharing optimization Change the storage and display of sharings to improve the time needed to generate the page. Instead of looking for a default value when displaying the sharing links, they are added during the configuration. --- app/Models/Configuration.php | 15 +++++++++++---- app/Models/Share.php | 3 --- app/views/helpers/view/normal_view.phtml | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 827a1d166..85e891b64 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -193,7 +193,9 @@ class FreshRSS_Configuration { if (!is_array($value)) { continue; } - if (array_key_exists('url', $value)) { + + // Verify URL and add default value when needed + if (array_key_exists('url', $value) && $value['url'] !== null) { $is_url = ( filter_var ($value['url'], FILTER_VALIDATE_URL) || (version_compare(PHP_VERSION, '5.3.3', '<') && @@ -203,10 +205,15 @@ class FreshRSS_Configuration { if (!$is_url) { continue; } - if (!array_key_exists('name', $value) || strcmp($value['name'], '') === 0) { - $value['name'] = $value['type']; - } + } else { + $value['url'] = null; } + + // Add a default name + if (!array_key_exists('name', $value) || strcmp($value['name'], '') === 0) { + $value['name'] = $value['type']; + } + $this->data['sharing'][] = $value; } } diff --git a/app/Models/Share.php b/app/Models/Share.php index 887fcef05..b146db722 100644 --- a/app/Models/Share.php +++ b/app/Models/Share.php @@ -3,9 +3,6 @@ class FreshRSS_Share { static public function generateUrl($options, $selected, $link, $title) { - if (!array_key_exists('url', $selected)) { - $selected['url'] = ''; - } $share = $options[$selected['type']]; $matches = array( '~URL~', diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index ff535c60a..9fd06ebae 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -138,7 +138,7 @@ if (!empty($this->entries)) { -- cgit v1.2.3 From b0a3610db735c7f719e8c35d84ffdc5a4e4987af Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Fri, 7 Mar 2014 21:04:16 -0500 Subject: Change test --- app/Models/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 85e891b64..3e5cd8bad 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -210,7 +210,7 @@ class FreshRSS_Configuration { } // Add a default name - if (!array_key_exists('name', $value) || strcmp($value['name'], '') === 0) { + if (empty($value['name'])) { $value['name'] = $value['type']; } -- cgit v1.2.3 From 339a0dd49c79b9adba67483a3cab55c4cb2e2066 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 8 Mar 2014 09:23:59 -0500 Subject: Change test on URL parameter --- app/Models/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 3e5cd8bad..80031369e 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -195,7 +195,7 @@ class FreshRSS_Configuration { } // Verify URL and add default value when needed - if (array_key_exists('url', $value) && $value['url'] !== null) { + if (isset($value['url'])) { $is_url = ( filter_var ($value['url'], FILTER_VALIDATE_URL) || (version_compare(PHP_VERSION, '5.3.3', '<') && -- cgit v1.2.3 From 3e665bcf9aefe40499b5d16e901d0c7427e367af Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 12 Apr 2014 11:51:44 -0400 Subject: Delete favorite button I extract drop-down menu actions to make them as button action in the page header. I removed the favorite button on the category list because it is a duplicate from the button action. Now button action act as filters and you can combine them. It is a test to see if we can keep it like that. There is still work to do to extract other actions from the drop-down list. I did not want to change everything if we don't keep it. See #376 and #277 --- app/Controllers/indexController.php | 7 +-- app/Models/Configuration.php | 9 +++- app/Models/EntryDAO.php | 32 ++++++----- app/i18n/en.php | 4 +- app/i18n/fr.php | 2 +- app/layout/aside_flux.phtml | 9 ---- app/layout/nav_menu.phtml | 102 +++++++++++++++++++++++------------- app/views/configure/reading.phtml | 2 +- p/themes/Dark/freshrss.css | 5 ++ p/themes/Dark/global.css | 6 --- p/themes/Flat/freshrss.css | 5 ++ p/themes/Flat/global.css | 6 --- p/themes/Origine/freshrss.css | 5 ++ p/themes/Origine/global.css | 6 --- 14 files changed, 111 insertions(+), 89 deletions(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 9da1e5022..243d887ac 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -91,14 +91,11 @@ class FreshRSS_index_Controller extends Minz_ActionController { $nb = Minz_Request::param ('nb', $this->view->conf->posts_per_page); $first = Minz_Request::param ('next', ''); - if ($state === 'not_read') { //Any unread article in this category at all? + if ($state === FreshRSS_Configuration::STATE_NOT_READ) { //Any unread article in this category at all? switch ($getType) { case 'a': $hasUnread = $this->view->nb_not_read > 0; break; - case 's': - $hasUnread = $this->view->nb_favorites['unread'] > 0; - break; case 'c': $hasUnread = (!isset($this->view->cat_aside[$getId])) || ($this->view->cat_aside[$getId]->nbNotRead() > 0); break; @@ -128,7 +125,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { // Si on a récupéré aucun article "non lus" // on essaye de récupérer tous les articles - if ($state === 'not_read' && empty($entries) && ($state_param === null)) { + if ($state === FreshRSS_Configuration::STATE_NOT_READ && empty($entries) && ($state_param === null)) { Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG); $this->view->state = 'all'; $entries = $entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min, true, $keepHistoryDefault); diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 80031369e..f9ea47be6 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -1,6 +1,11 @@ '', //CRYPT_BLOWFISH 'posts_per_page' => 20, 'view_mode' => 'normal', - 'default_view' => 'not_read', + 'default_view' => self::STATE_NOT_READ, 'auto_load_more' => true, 'display_posts' => false, 'onread_jump_next' => true, @@ -131,7 +136,7 @@ class FreshRSS_Configuration { } } public function _default_view ($value) { - $this->data['default_view'] = $value === 'all' ? 'all' : 'not_read'; + $this->data['default_view'] = $value === 'all' ? 'all' : self::STATE_NOT_READ; } public function _display_posts ($value) { $this->data['display_posts'] = ((bool)$value) && $value !== 'no'; diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 6d00967fc..2f5a9e1f6 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -415,9 +415,6 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { $where .= 'f.priority > 0 '; $joinFeed = true; break; - case 's': - $where .= 'e1.is_favorite = 1 '; - break; case 'c': $where .= 'f.category = ? '; $values[] = intval($id); @@ -433,21 +430,28 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { default: throw new FreshRSS_EntriesGetter_Exception ('Bad type in Entry->listByType: [' . $type . ']!'); } - switch ($state) { - case 'all': - break; - case 'not_read': + + if ($state & FreshRSS_Configuration::STATE_NOT_READ) { + if (!($state & FreshRSS_Configuration::STATE_READ)) { $where .= 'AND e1.is_read = 0 '; - break; - case 'read': + } + } + if ($state & FreshRSS_Configuration::STATE_READ) { + if (!($state & FreshRSS_Configuration::STATE_NOT_READ)) { $where .= 'AND e1.is_read = 1 '; - break; - case 'favorite': + } + } + if ($state & FreshRSS_Configuration::STATE_NOT_FAVORITE) { + if (!($state & FreshRSS_Configuration::STATE_FAVORITE)) { + $where .= 'AND e1.is_favorite = 0 '; + } + } + if ($state & FreshRSS_Configuration::STATE_FAVORITE) { + if (!($state & FreshRSS_Configuration::STATE_NOT_FAVORITE)) { $where .= 'AND e1.is_favorite = 1 '; - break; - default: - throw new FreshRSS_EntriesGetter_Exception ('Bad state in Entry->listByType: [' . $state . ']!'); + } } + switch ($order) { case 'DESC': case 'ASC': diff --git a/app/i18n/en.php b/app/i18n/en.php index d6096bbe8..01f31eca7 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -27,7 +27,6 @@ return array ( 'subscription_management' => 'Subscriptions management', 'main_stream' => 'Main stream', 'all_feeds' => 'All feeds', - 'favorite_feeds' => 'Favourites (%d)', 'not_read' => '%d unread', 'not_reads' => '%d unread', @@ -51,7 +50,8 @@ return array ( 'show_all_articles' => 'Show all articles', 'show_not_reads' => 'Show only unread', 'show_read' => 'Show only read', - 'show_favorite' => 'Show favorites', + 'show_favorite' => 'Show only favorites', + 'show_not_favorite' => 'Show all but favorites', 'older_first' => 'Oldest first', 'newer_first' => 'Newer first', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index d89cbb098..299d4d242 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -27,7 +27,6 @@ return array ( 'subscription_management' => 'Gestion des abonnements', 'main_stream' => 'Flux principal', 'all_feeds' => 'Tous les flux', - 'favorite_feeds' => 'Favoris (%d)', 'not_read' => '%d non lu', 'not_reads' => '%d non lus', @@ -52,6 +51,7 @@ return array ( 'show_not_reads' => 'Afficher les non lus', 'show_read' => 'Afficher les lus', 'show_favorite' => 'Afficher les favoris', + 'show_not_favorite' => 'Afficher tout sauf les favoris', 'older_first' => 'Plus anciens en premier', 'newer_first' => 'Plus récents en premier', diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index 817dae676..0542e6b66 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -28,15 +28,6 @@
-
  • - -
  • - cat_aside as $cat) { $feeds = $cat->feeds (); diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index ffdc95b24..129647607 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -11,6 +11,70 @@ loginOk) { ?> + url; + if ($this->state & FreshRSS_Configuration::STATE_READ) { + $url_state['params']['state'] = $this->state - FreshRSS_Configuration::STATE_READ; + $checked = 'true'; + } else { + $url_state['params']['state'] = $this->state + FreshRSS_Configuration::STATE_READ; + $checked = 'false'; + } + ?> + + + + state & FreshRSS_Configuration::STATE_NOT_READ) { + $url_state['params']['state'] = $this->state - FreshRSS_Configuration::STATE_NOT_READ; + $checked = 'true'; + } else { + $url_state['params']['state'] = $this->state + FreshRSS_Configuration::STATE_NOT_READ; + $checked = 'false'; + } + ?> + + + + state & FreshRSS_Configuration::STATE_FAVORITE) { + $url_state['params']['state'] = $this->state - FreshRSS_Configuration::STATE_FAVORITE; + $checked = 'true'; + } else { + $url_state['params']['state'] = $this->state + FreshRSS_Configuration::STATE_FAVORITE; + $checked = 'false'; + } + ?> + + + + state & FreshRSS_Configuration::STATE_NOT_FAVORITE) { + $url_state['params']['state'] = $this->state - FreshRSS_Configuration::STATE_NOT_FAVORITE; + $checked = 'true'; + } else { + $url_state['params']['state'] = $this->state + FreshRSS_Configuration::STATE_NOT_FAVORITE; + $checked = 'false'; + } + ?> + + + -
  • +
  • today; @@ -132,42 +196,6 @@
  • - url; - $url_state['params']['state'] = 'all'; - ?> - - - - - - - - -
  • -
  • url; diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index c32c59305..b778a4d22 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -36,7 +36,7 @@
  • diff --git a/p/themes/Dark/freshrss.css b/p/themes/Dark/freshrss.css index be8d6b86a..d7da91bb8 100644 --- a/p/themes/Dark/freshrss.css +++ b/p/themes/Dark/freshrss.css @@ -88,6 +88,11 @@ .nav_menu .search { display:none; } + .nav_menu .btn[aria-checked="true"]:before{ + content: '✓'; + font-size: 2.5rem; + position: absolute; + } .favicon { height: 16px; diff --git a/p/themes/Dark/global.css b/p/themes/Dark/global.css index e296f2188..0f1baa216 100644 --- a/p/themes/Dark/global.css +++ b/p/themes/Dark/global.css @@ -416,12 +416,6 @@ input, select, textarea { background: #26303F; color: #888; } - .dropdown-menu > .item[aria-checked="true"] > a:before { - content: '✓ '; - font-weight: bold; - margin: 0 0 0 -1.2em; - padding: 0 0.2em 0 0; - } .dropdown-menu > .item:hover > a { color: #888; text-decoration: none; diff --git a/p/themes/Flat/freshrss.css b/p/themes/Flat/freshrss.css index 1f297309b..f1737d23e 100644 --- a/p/themes/Flat/freshrss.css +++ b/p/themes/Flat/freshrss.css @@ -87,6 +87,11 @@ body { .nav_menu .search { display:none; } + .nav_menu .btn[aria-checked="true"]:before{ + content: '✓'; + font-size: 2.5rem; + position: absolute; + } .favicon { height: 16px; diff --git a/p/themes/Flat/global.css b/p/themes/Flat/global.css index 4044dd781..68e9fa359 100644 --- a/p/themes/Flat/global.css +++ b/p/themes/Flat/global.css @@ -412,12 +412,6 @@ input, select, textarea { background: #2980b9; color: #fff; } - .dropdown-menu > .item[aria-checked="true"] > a:before { - content: '✓ '; - font-weight: bold; - margin: 0 0 0 -1.2em; - padding: 0 0.2em 0 0; - } .dropdown-menu > .item:hover > a { color: #fff; text-decoration: none; diff --git a/p/themes/Origine/freshrss.css b/p/themes/Origine/freshrss.css index 662e085d6..d33ee4f54 100644 --- a/p/themes/Origine/freshrss.css +++ b/p/themes/Origine/freshrss.css @@ -89,6 +89,11 @@ .nav_menu .search { display:none; } + .nav_menu .btn[aria-checked="true"]:before{ + content: '✓'; + font-size: 2.5rem; + position: absolute; + } .favicon { height: 16px; diff --git a/p/themes/Origine/global.css b/p/themes/Origine/global.css index 5792c9e4d..7fb3a8f95 100644 --- a/p/themes/Origine/global.css +++ b/p/themes/Origine/global.css @@ -428,12 +428,6 @@ input, select, textarea { background: #0062BE; color: #fff; } - .dropdown-menu > .item[aria-checked="true"] > a:before { - content: '✓ '; - font-weight: bold; - margin: 0 0 0 -1.2em; - padding: 0 0.2em 0 0; - } .dropdown-menu > .item:hover > a { color: #fff; text-decoration: none; -- cgit v1.2.3 From 86066b1659e33eb5fdfbcae5fb7f0bd93604d442 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 13 Apr 2014 07:28:41 -0400 Subject: Add a new status for 'ALL' I made the conversion in every file I can think of. It should not have any reference to the string 'all' for the state context --- app/Controllers/importExportController.php | 4 ++-- app/Controllers/indexController.php | 8 ++++---- app/Models/Configuration.php | 3 ++- app/Models/EntryDAO.php | 9 ++++++--- app/views/configure/reading.phtml | 2 +- p/api/greader.php | 8 ++++---- 6 files changed, 19 insertions(+), 15 deletions(-) (limited to 'app/Models/Configuration.php') diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php index a9b103a34..b8253b7bd 100644 --- a/app/Controllers/importExportController.php +++ b/app/Controllers/importExportController.php @@ -370,7 +370,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController { $this->view->type = 'starred'; $unread_fav = $this->entryDAO->countUnreadReadFavorites(); $this->view->entries = $this->entryDAO->listWhere( - 's', '', 'all', 'ASC', + 's', '', FreshRSS_Configuration::STATE_ALL, 'ASC', $unread_fav['all'] ); } elseif ($type == 'feed' && !is_null($feed)) { @@ -379,7 +379,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController { ); $this->view->type = 'feed/' . $feed->id(); $this->view->entries = $this->entryDAO->listWhere( - 'f', $feed->id(), 'all', 'ASC', + 'f', $feed->id(), FreshRSS_Configuration::STATE_ALL, 'ASC', $this->view->conf->posts_per_page ); $this->view->feed = $feed; diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 243d887ac..48471b480 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -85,7 +85,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { $state_param = Minz_Request::param ('state', null); $filter = Minz_Request::param ('search', ''); if (!empty($filter)) { - $state = 'all'; //Search always in read and unread articles + $state = FreshRSS_Configuration::STATE_ALL; //Search always in read and unread articles } $this->view->order = $order = Minz_Request::param ('order', $this->view->conf->sort_order); $nb = Minz_Request::param ('nb', $this->view->conf->posts_per_page); @@ -108,7 +108,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { break; } if (!$hasUnread && ($state_param === null)) { - $this->view->state = $state = 'all'; + $this->view->state = $state = FreshRSS_Configuration::STATE_ALL; } } @@ -127,8 +127,8 @@ class FreshRSS_index_Controller extends Minz_ActionController { // on essaye de récupérer tous les articles if ($state === FreshRSS_Configuration::STATE_NOT_READ && empty($entries) && ($state_param === null)) { Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG); - $this->view->state = 'all'; - $entries = $entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min, true, $keepHistoryDefault); + $this->view->state = FreshRSS_Configuration::STATE_ALL; + $entries = $entryDAO->listWhere($getType, $getId, $this->view->state, $order, $nb, $first, $filter, $date_min, true, $keepHistoryDefault); } if (count($entries) <= $nb) { diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index f9ea47be6..e693542e0 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -1,6 +1,7 @@ data['default_view'] = $value === 'all' ? 'all' : self::STATE_NOT_READ; + $this->data['default_view'] = $value === self::STATE_ALL ? self::STATE_ALL : self::STATE_NOT_READ; } public function _display_posts ($value) { $this->data['display_posts'] = ((bool)$value) && $value !== 'no'; diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 2f5a9e1f6..b9cbfd584 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -406,7 +406,10 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { return isset ($entries[0]) ? $entries[0] : null; } - private function sqlListWhere($type = 'a', $id = '', $state = 'all', $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) { + private function sqlListWhere($type = 'a', $id = '', $state = null , $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) { + if (!$state) { + $state = FreshRSS_Configuration::STATE_ALL; + } $where = ''; $joinFeed = false; $values = array(); @@ -532,7 +535,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { . ($limit > 0 ? ' LIMIT ' . $limit : '')); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/ } - public function listWhere($type = 'a', $id = '', $state = 'all', $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) { + public function listWhere($type = 'a', $id = '', $state = null, $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) { list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filter, $date_min, $showOlderUnreadsorFavorites, $keepHistoryDefault); $sql = 'SELECT e.id, e.guid, e.title, e.author, UNCOMPRESS(e.content_bin) AS content, e.link, e.date, e.is_read, e.is_favorite, e.id_feed, e.tags ' @@ -548,7 +551,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { return self::daoToEntry ($stm->fetchAll (PDO::FETCH_ASSOC)); } - public function listIdsWhere($type = 'a', $id = '', $state = 'all', $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) { //For API + public function listIdsWhere($type = 'a', $id = '', $state = null, $order = 'DESC', $limit = 1, $firstId = '', $filter = '', $date_min = 0, $showOlderUnreadsorFavorites = false, $keepHistoryDefault = 0) { //For API list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filter, $date_min, $showOlderUnreadsorFavorites, $keepHistoryDefault); $stm = $this->bd->prepare($sql); diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index b778a4d22..b277397b1 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -32,7 +32,7 @@