aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-02-28 12:26:24 +0100
committerGravatar GitHub <noreply@github.com> 2021-02-28 12:26:24 +0100
commit947e918f05d70d5dce4efa4ef403e593581c3fa9 (patch)
treee66ef1ffe8a6cc0ffbea1bff1791588f72879637 /app
parentbf2718cada964fba66d8497592abcb73cb9520ba (diff)
Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length * Also check whitespace in CSS files * Fix line length ext.php * More syntax, string templates * Fix exclude-pattern * Test JS files as well
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/authController.php20
-rw-r--r--app/Controllers/categoryController.php3
-rwxr-xr-xapp/Controllers/configureController.php24
-rw-r--r--app/Controllers/extensionController.php39
-rwxr-xr-xapp/Controllers/feedController.php9
-rw-r--r--app/Controllers/importExportController.php3
-rwxr-xr-xapp/Controllers/javascriptController.php3
-rw-r--r--app/Controllers/tagController.php12
-rw-r--r--app/Controllers/updateController.php6
-rw-r--r--app/Controllers/userController.php6
-rw-r--r--app/FreshRSS.php6
-rw-r--r--app/Models/CategoryDAO.php29
-rw-r--r--app/Models/DatabaseDAOPGSQL.php16
-rw-r--r--app/Models/Entry.php2
-rw-r--r--app/Models/EntryDAO.php34
-rw-r--r--app/Models/EntryDAOSQLite.php4
-rw-r--r--app/Models/FeedDAO.php36
-rw-r--r--app/Models/FormAuth.php5
-rw-r--r--app/Models/Share.php3
-rw-r--r--app/Models/StatsDAO.php4
-rw-r--r--app/Models/TagDAO.php24
-rw-r--r--app/Models/UserQuery.php12
-rw-r--r--app/install.php51
-rw-r--r--app/layout/aside_configure.phtml12
-rw-r--r--app/layout/aside_feed.phtml28
-rw-r--r--app/layout/nav_menu.phtml45
-rw-r--r--app/views/auth/formLogin.phtml3
-rw-r--r--app/views/auth/index.phtml26
-rw-r--r--app/views/auth/register.phtml3
-rw-r--r--app/views/configure/archiving.phtml38
-rw-r--r--app/views/configure/display.phtml63
-rw-r--r--app/views/configure/integration.phtml18
-rw-r--r--app/views/configure/reading.phtml76
-rw-r--r--app/views/configure/shortcut.phtml63
-rw-r--r--app/views/configure/system.phtml18
-rw-r--r--app/views/extension/index.phtml2
-rw-r--r--app/views/helpers/category/update.phtml27
-rw-r--r--app/views/helpers/configure/query.phtml12
-rw-r--r--app/views/helpers/extension/configure.phtml3
-rw-r--r--app/views/helpers/feed/update.phtml75
-rw-r--r--app/views/helpers/index/normal/entry_header.phtml3
-rwxr-xr-xapp/views/helpers/pagination.phtml8
-rw-r--r--app/views/index/global.phtml6
-rw-r--r--app/views/index/logs.phtml6
-rw-r--r--app/views/index/normal.phtml16
-rw-r--r--app/views/index/reader.phtml8
-rw-r--r--app/views/stats/idle.phtml6
-rw-r--r--app/views/stats/repartition.phtml6
-rw-r--r--app/views/subscription/bookmarklet.phtml4
-rw-r--r--app/views/subscription/index.phtml8
-rw-r--r--app/views/user/details.phtml139
-rw-r--r--app/views/user/manage.phtml8
-rw-r--r--app/views/user/profile.phtml9
53 files changed, 637 insertions, 453 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index ca8a9758a..3202b59f2 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -53,11 +53,9 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
invalidateHttpCache();
if ($ok) {
- Minz_Request::good(_t('feedback.conf.updated'),
- array('c' => 'auth', 'a' => 'index'));
+ Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'auth', 'a' => 'index' ]);
} else {
- Minz_Request::bad(_t('feedback.conf.error'),
- array('c' => 'auth', 'a' => 'index'));
+ Minz_Request::bad(_t('feedback.conf.error'), [ 'c' => 'auth', 'a' => 'index' ]);
}
}
}
@@ -160,13 +158,9 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
Minz_Translate::init(FreshRSS_Context::$user_conf->language);
// All is good, go back to the index.
- Minz_Request::good(_t('feedback.auth.login.success'),
- array('c' => 'index', 'a' => 'index'));
+ Minz_Request::good(_t('feedback.auth.login.success'), [ 'c' => 'index', 'a' => 'index' ]);
} else {
- Minz_Log::warning('Password mismatch for' .
- ' user=' . $username .
- ', nonce=' . $nonce .
- ', c=' . $challenge);
+ Minz_Log::warning("Password mismatch for user={$username}, nonce={$nonce}, c={$challenge}");
header('HTTP/1.1 403 Forbidden');
Minz_Session::_param('POST_to_GET', true); //Prevent infinite internal redirect
@@ -203,8 +197,7 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
Minz_Translate::init(FreshRSS_Context::$user_conf->language);
- Minz_Request::good(_t('feedback.auth.login.success'),
- array('c' => 'index', 'a' => 'index'));
+ Minz_Request::good(_t('feedback.auth.login.success'), [ 'c' => 'index', 'a' => 'index' ]);
} else {
Minz_Log::warning('Unsafe password mismatch for user ' . $username);
Minz_Request::bad(
@@ -221,8 +214,7 @@ class FreshRSS_auth_Controller extends Minz_ActionController {
public function logoutAction() {
invalidateHttpCache();
FreshRSS_Auth::removeAccess();
- Minz_Request::good(_t('feedback.auth.logout.success'),
- array('c' => 'index', 'a' => 'index'));
+ Minz_Request::good(_t('feedback.auth.logout.success'), [ 'c' => 'index', 'a' => 'index' ]);
}
/**
diff --git a/app/Controllers/categoryController.php b/app/Controllers/categoryController.php
index 1d0359a39..3ec88460a 100644
--- a/app/Controllers/categoryController.php
+++ b/app/Controllers/categoryController.php
@@ -34,8 +34,7 @@ class FreshRSS_category_Controller extends Minz_ActionController {
$this->view->categories = $catDAO->listCategories(false);
if (count($this->view->categories) >= $limits['max_categories']) {
- Minz_Request::bad(_t('feedback.sub.category.over_max', $limits['max_categories']),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.sub.category.over_max', $limits['max_categories']), $url_redirect);
}
if (Minz_Request::isPost()) {
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index f658d1c44..b2c1b5109 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -63,8 +63,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
Minz_Translate::reset(FreshRSS_Context::$user_conf->language);
invalidateHttpCache();
- Minz_Request::good(_t('feedback.conf.updated'),
- array('c' => 'configure', 'a' => 'display'));
+ Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'display' ]);
}
$this->view->themes = FreshRSS_Themes::get();
@@ -127,8 +126,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->save();
invalidateHttpCache();
- Minz_Request::good(_t('feedback.conf.updated'),
- array('c' => 'configure', 'a' => 'reading'));
+ Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'reading' ]);
}
Minz_View::prependTitle(_t('conf.reading.title') . ' · ');
@@ -154,8 +152,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->save();
invalidateHttpCache();
- Minz_Request::good(_t('feedback.conf.updated'),
- array('c' => 'configure', 'a' => 'integration'));
+ Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'integration' ]);
}
Minz_View::prependTitle(_t('conf.sharing.title') . ' · ');
@@ -236,8 +233,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->save();
invalidateHttpCache();
- Minz_Request::good(_t('feedback.conf.updated'),
- array('c' => 'configure', 'a' => 'archiving'));
+ Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'archiving' ]);
}
$volatile = [
@@ -300,8 +296,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->queries = $queries;
FreshRSS_Context::$user_conf->save();
- Minz_Request::good(_t('feedback.conf.updated'),
- array('c' => 'configure', 'a' => 'queries'));
+ Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'queries' ]);
} else {
$this->view->queries = array();
foreach (FreshRSS_Context::$user_conf->queries as $key => $query) {
@@ -369,8 +364,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->queries = $queries;
FreshRSS_Context::$user_conf->save();
- Minz_Request::good(_t('feedback.conf.updated'),
- array('c' => 'configure', 'a' => 'queries', 'params' => ['id' => $id]));
+ Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'queries', 'params' => ['id' => $id] ]);
}
Minz_View::prependTitle(_t('conf.query.title') . ' · ' . $query->getName() . ' · ');
@@ -391,8 +385,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->queries = $queries;
FreshRSS_Context::$user_conf->save();
- Minz_Request::good(_t('feedback.conf.updated'),
- array('c' => 'configure', 'a' => 'queries'));
+ Minz_Request::good(_t('feedback.conf.updated'), [ 'c' => 'configure', 'a' => 'queries' ]);
}
/**
@@ -419,8 +412,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->queries = $queries;
FreshRSS_Context::$user_conf->save();
- Minz_Request::good(_t('feedback.conf.query_created', $params['name']),
- array('c' => 'configure', 'a' => 'queries'));
+ Minz_Request::good(_t('feedback.conf.query_created', $params['name']), [ 'c' => 'configure', 'a' => 'queries' ]);
}
/**
diff --git a/app/Controllers/extensionController.php b/app/Controllers/extensionController.php
index 8ac45acc7..a932954a9 100644
--- a/app/Controllers/extensionController.php
+++ b/app/Controllers/extensionController.php
@@ -117,13 +117,11 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
$ext = Minz_ExtensionManager::findExtension($ext_name);
if (is_null($ext)) {
- Minz_Request::bad(_t('feedback.extensions.not_found', $ext_name),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.not_found', $ext_name), $url_redirect);
}
if ($ext->isEnabled()) {
- Minz_Request::bad(_t('feedback.extensions.already_enabled', $ext_name),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.already_enabled', $ext_name), $url_redirect);
}
$conf = null;
@@ -132,8 +130,7 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
} elseif ($ext->getType() === 'user') {
$conf = FreshRSS_Context::$user_conf;
} else {
- Minz_Request::bad(_t('feedback.extensions.no_access', $ext_name),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.no_access', $ext_name), $url_redirect);
}
$res = $ext->install();
@@ -144,12 +141,10 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
$conf->extensions_enabled = $ext_list;
$conf->save();
- Minz_Request::good(_t('feedback.extensions.enable.ok', $ext_name),
- $url_redirect);
+ Minz_Request::good(_t('feedback.extensions.enable.ok', $ext_name), $url_redirect);
} else {
Minz_Log::warning('Can not enable extension ' . $ext_name . ': ' . $res);
- Minz_Request::bad(_t('feedback.extensions.enable.ko', $ext_name, _url('index', 'logs')),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.enable.ko', $ext_name, _url('index', 'logs')), $url_redirect);
}
}
@@ -173,13 +168,11 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
$ext = Minz_ExtensionManager::findExtension($ext_name);
if (is_null($ext)) {
- Minz_Request::bad(_t('feedback.extensions.not_found', $ext_name),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.not_found', $ext_name), $url_redirect);
}
if (!$ext->isEnabled()) {
- Minz_Request::bad(_t('feedback.extensions.not_enabled', $ext_name),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.not_enabled', $ext_name), $url_redirect);
}
$conf = null;
@@ -188,8 +181,7 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
} elseif ($ext->getType() === 'user') {
$conf = FreshRSS_Context::$user_conf;
} else {
- Minz_Request::bad(_t('feedback.extensions.no_access', $ext_name),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.no_access', $ext_name), $url_redirect);
}
$res = $ext->uninstall();
@@ -204,12 +196,10 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
$conf->extensions_enabled = $ext_list;
$conf->save();
- Minz_Request::good(_t('feedback.extensions.disable.ok', $ext_name),
- $url_redirect);
+ Minz_Request::good(_t('feedback.extensions.disable.ok', $ext_name), $url_redirect);
} else {
Minz_Log::warning('Can not unable extension ' . $ext_name . ': ' . $res);
- Minz_Request::bad(_t('feedback.extensions.disable.ko', $ext_name, _url('index', 'logs')),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.disable.ko', $ext_name, _url('index', 'logs')), $url_redirect);
}
}
@@ -237,17 +227,14 @@ class FreshRSS_extension_Controller extends Minz_ActionController {
$ext = Minz_ExtensionManager::findExtension($ext_name);
if (is_null($ext)) {
- Minz_Request::bad(_t('feedback.extensions.not_found', $ext_name),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.not_found', $ext_name), $url_redirect);
}
$res = recursive_unlink($ext->getPath());
if ($res) {
- Minz_Request::good(_t('feedback.extensions.removed', $ext_name),
- $url_redirect);
+ Minz_Request::good(_t('feedback.extensions.removed', $ext_name), $url_redirect);
} else {
- Minz_Request::bad(_t('feedback.extensions.cannot_remove', $ext_name),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.extensions.cannot_remove', $ext_name), $url_redirect);
}
}
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 5737a8535..158015d2b 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -150,8 +150,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$limits = FreshRSS_Context::$system_conf->limits;
$this->view->feeds = $feedDAO->listFeeds();
if (count($this->view->feeds) >= $limits['max_feeds']) {
- Minz_Request::bad(_t('feedback.sub.feed.over_max', $limits['max_feeds']),
- $url_redirect);
+ Minz_Request::bad(_t('feedback.sub.feed.over_max', $limits['max_feeds']), $url_redirect);
}
if (Minz_Request::isPost()) {
@@ -366,9 +365,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
} else { //This entry already exists but has been updated
//Minz_Log::debug('Entry with GUID `' . $entry->guid() . '` updated in feed ' . $feed->url(false) .
//', old hash ' . $existingHash . ', new hash ' . $entry->hash());
- $mark_updated_article_unread = $feed->attributes('mark_updated_article_unread') !== null ? (
- $feed->attributes('mark_updated_article_unread')
- ) : FreshRSS_Context::$user_conf->mark_updated_article_unread;
+ $mark_updated_article_unread = $feed->attributes('mark_updated_article_unread') !== null ?
+ $feed->attributes('mark_updated_article_unread') :
+ FreshRSS_Context::$user_conf->mark_updated_article_unread;
$needFeedCacheRefresh = $mark_updated_article_unread;
$entry->_isRead($mark_updated_article_unread ? false : null); //Change is_read according to policy.
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
index d23bb3689..3550ba0dd 100644
--- a/app/Controllers/importExportController.php
+++ b/app/Controllers/importExportController.php
@@ -157,8 +157,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
if ($status_file !== 0) {
Minz_Log::warning('File cannot be uploaded. Error code: ' . $status_file);
- Minz_Request::bad(_t('feedback.import_export.file_cannot_be_uploaded'),
- array('c' => 'importExport', 'a' => 'index'));
+ Minz_Request::bad(_t('feedback.import_export.file_cannot_be_uploaded'), [ 'c' => 'importExport', 'a' => 'index' ]);
}
@set_time_limit(300);
diff --git a/app/Controllers/javascriptController.php b/app/Controllers/javascriptController.php
index 40f0fc19a..4a79da27a 100755
--- a/app/Controllers/javascriptController.php
+++ b/app/Controllers/javascriptController.php
@@ -34,7 +34,8 @@ class FreshRSS_javascript_Controller extends Minz_ActionController {
$salt = FreshRSS_Context::$system_conf->salt;
$s = FreshRSS_Context::$user_conf->passwordHash;
if (strlen($s) >= 60) {
- $this->view->salt1 = substr($s, 0, 29); //CRYPT_BLOWFISH Salt: "$2a$", a two digit cost parameter, "$", and 22 characters from the alphabet "./0-9A-Za-z".
+ //CRYPT_BLOWFISH Salt: "$2a$", a two digit cost parameter, "$", and 22 characters from the alphabet "./0-9A-Za-z".
+ $this->view->salt1 = substr($s, 0, 29);
$this->view->nonce = sha1($salt . uniqid(mt_rand(), true));
Minz_Session::_param('nonce', $this->view->nonce);
return; //Success
diff --git a/app/Controllers/tagController.php b/app/Controllers/tagController.php
index 217d95db1..4f3fe9bf9 100644
--- a/app/Controllers/tagController.php
+++ b/app/Controllers/tagController.php
@@ -34,12 +34,12 @@ class FreshRSS_tag_Controller extends Minz_ActionController {
$tagDAO = FreshRSS_Factory::createTagDao();
if ($id_tag == 0 && $name_tag != '' && $checked) {
if ($existing_tag = $tagDAO->searchByName($name_tag)) {
- // Use existing tag
- $tagDAO->tagEntry($existing_tag->id(), $id_entry, $checked);
- } else {
- //Create new tag
- $id_tag = $tagDAO->addTag(array('name' => $name_tag));
- }
+ // Use existing tag
+ $tagDAO->tagEntry($existing_tag->id(), $id_entry, $checked);
+ } else {
+ //Create new tag
+ $id_tag = $tagDAO->addTag(array('name' => $name_tag));
+ }
}
if ($id_tag != 0) {
$tagDAO->tagEntry($id_tag, $id_entry, $checked);
diff --git a/app/Controllers/updateController.php b/app/Controllers/updateController.php
index c0c1ef1c8..45bf70f62 100644
--- a/app/Controllers/updateController.php
+++ b/app/Controllers/updateController.php
@@ -193,8 +193,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {
@file_put_contents(join_path(DATA_PATH, 'last_update.txt'), '');
Minz_Request::good(_t('feedback.update.finished'));
} else {
- Minz_Request::bad(_t('feedback.update.error', $res),
- array('c' => 'update', 'a' => 'index'));
+ Minz_Request::bad(_t('feedback.update.error', $res), [ 'c' => 'update', 'a' => 'index' ]);
}
} else {
$res = false;
@@ -220,8 +219,7 @@ class FreshRSS_update_Controller extends Minz_ActionController {
'params' => array('post_conf' => true)
), true);
} else {
- Minz_Request::bad(_t('feedback.update.error', $res),
- array('c' => 'update', 'a' => 'index'));
+ Minz_Request::bad(_t('feedback.update.error', $res), [ 'c' => 'update', 'a' => 'index' ]);
}
}
}
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php
index 06c9ebc04..ec5e348c2 100644
--- a/app/Controllers/userController.php
+++ b/app/Controllers/userController.php
@@ -71,8 +71,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
Minz_Request::good(_t('feedback.profile.updated'), array('c' => 'index', 'a' => 'index'));
}
} else {
- Minz_Request::bad(_t('feedback.user.updated.error', $username),
- array('c' => 'user', 'a' => 'manage'));
+ Minz_Request::bad(_t('feedback.user.updated.error', $username), [ 'c' => 'user', 'a' => 'manage' ]);
}
}
}
@@ -140,8 +139,7 @@ class FreshRSS_user_Controller extends Minz_ActionController {
Minz_Request::good(_t('feedback.profile.updated'), array('c' => 'index', 'a' => 'index'));
}
} else {
- Minz_Request::bad(_t('feedback.profile.error'),
- array('c' => 'user', 'a' => 'profile'));
+ Minz_Request::bad(_t('feedback.profile.error'), [ 'c' => 'user', 'a' => 'profile' ]);
}
}
}
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index 8a9a85213..17ff9ab21 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -68,8 +68,10 @@ class FreshRSS extends Minz_FrontController {
if (!(FreshRSS_Auth::isCsrfOk() ||
(Minz_Request::controllerName() === 'auth' && Minz_Request::actionName() === 'login') ||
(Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'create' && !FreshRSS_Auth::hasAccess('admin')) ||
- (Minz_Request::controllerName() === 'feed' && Minz_Request::actionName() === 'actualize' && FreshRSS_Context::$system_conf->allow_anonymous_refresh) ||
- (Minz_Request::controllerName() === 'javascript' && Minz_Request::actionName() === 'actualize' && FreshRSS_Context::$system_conf->allow_anonymous)
+ (Minz_Request::controllerName() === 'feed' && Minz_Request::actionName() === 'actualize'
+ && FreshRSS_Context::$system_conf->allow_anonymous_refresh) ||
+ (Minz_Request::controllerName() === 'javascript' && Minz_Request::actionName() === 'actualize'
+ && FreshRSS_Context::$system_conf->allow_anonymous)
)) {
// Token-based protection against XSRF attacks, except for the login or self-create user forms
self::initI18n();
diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php
index 519c7a29b..0a9bd68db 100644
--- a/app/Models/CategoryDAO.php
+++ b/app/Models/CategoryDAO.php
@@ -80,9 +80,13 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable
}
public function addCategory($valuesTmp) {
- $sql = 'INSERT INTO `_category`(name, attributes) '
- . 'SELECT * FROM (SELECT TRIM(?) AS name, TRIM(?) AS attributes) c2 ' //TRIM() to provide a type hint as text
- . 'WHERE NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = TRIM(?))'; //No tag of the same name
+ // TRIM() to provide a type hint as text
+ // No tag of the same name
+ $sql = <<<'SQL'
+INSERT INTO `_category`(name, attributes)
+SELECT * FROM (SELECT TRIM(?) AS name, TRIM(?) AS attributes) c2
+WHERE NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = TRIM(?))
+SQL;
$stm = $this->pdo->prepare($sql);
$valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8');
@@ -121,8 +125,11 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable
}
public function updateCategory($id, $valuesTmp) {
- $sql = 'UPDATE `_category` SET name=?, attributes=? WHERE id=? '
- . 'AND NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = ?)'; //No tag of the same name
+ // No tag of the same name
+ $sql = <<<'SQL'
+UPDATE `_category` SET name=?, attributes=? WHERE id=?
+AND NOT EXISTS (SELECT 1 FROM `_tag` WHERE name = ?)
+SQL;
$stm = $this->pdo->prepare($sql);
$valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8');
@@ -240,12 +247,12 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable
public function listCategories($prePopulateFeeds = true, $details = false) {
if ($prePopulateFeeds) {
$sql = 'SELECT c.id AS c_id, c.name AS c_name, c.attributes AS c_attributes, '
- . ($details ? 'f.* ' : 'f.id, f.name, f.url, f.website, f.priority, f.error, f.`cache_nbEntries`, f.`cache_nbUnreads`, f.ttl ')
- . 'FROM `_category` c '
- . 'LEFT OUTER JOIN `_feed` f ON f.category=c.id '
- . 'WHERE f.priority >= :priority_normal '
- . 'GROUP BY f.id, c_id '
- . 'ORDER BY c.name, f.name';
+ . ($details ? 'f.* ' : 'f.id, f.name, f.url, f.website, f.priority, f.error, f.`cache_nbEntries`, f.`cache_nbUnreads`, f.ttl ')
+ . 'FROM `_category` c '
+ . 'LEFT OUTER JOIN `_feed` f ON f.category=c.id '
+ . 'WHERE f.priority >= :priority_normal '
+ . 'GROUP BY f.id, c_id '
+ . 'ORDER BY c.name, f.name';
$stm = $this->pdo->prepare($sql);
$values = [ ':priority_normal' => FreshRSS_Feed::PRIORITY_NORMAL ];
if ($stm && $stm->execute($values)) {
diff --git a/app/Models/DatabaseDAOPGSQL.php b/app/Models/DatabaseDAOPGSQL.php
index 75ff8be7b..75b01c90b 100644
--- a/app/Models/DatabaseDAOPGSQL.php
+++ b/app/Models/DatabaseDAOPGSQL.php
@@ -57,13 +57,15 @@ class FreshRSS_DatabaseDAOPGSQL extends FreshRSS_DatabaseDAOSQLite {
$stm->bindParam(':base', $db['base']);
$stm->execute();
} else {
- $sql = "SELECT "
- . "pg_total_relation_size('`{$this->pdo->prefix()}category`') + "
- . "pg_total_relation_size('`{$this->pdo->prefix()}feed`') + "
- . "pg_total_relation_size('`{$this->pdo->prefix()}entry`') + "
- . "pg_total_relation_size('`{$this->pdo->prefix()}entrytmp`') + "
- . "pg_total_relation_size('`{$this->pdo->prefix()}tag`') + "
- . "pg_total_relation_size('`{$this->pdo->prefix()}entrytag`')";
+ $sql = <<<SQL
+SELECT
+pg_total_relation_size('`{$this->pdo->prefix()}category`')
+pg_total_relation_size('`{$this->pdo->prefix()}feed`')
+pg_total_relation_size('`{$this->pdo->prefix()}entry`')
+pg_total_relation_size('`{$this->pdo->prefix()}entrytmp`')
+pg_total_relation_size('`{$this->pdo->prefix()}tag`')
+pg_total_relation_size('`{$this->pdo->prefix()}entrytag`')
+SQL;
$stm = $this->pdo->query($sql);
}
if ($stm == false) {
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index b5b28c97a..6e14d43b7 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -23,7 +23,7 @@ class FreshRSS_Entry extends Minz_Model {
private $tags;
public function __construct($feedId = '', $guid = '', $title = '', $authors = '', $content = '',
- $link = '', $pubdate = 0, $is_read = false, $is_favorite = false, $tags = '') {
+ $link = '', $pubdate = 0, $is_read = false, $is_favorite = false, $tags = '') {
$this->_title($title);
$this->_authors($authors);
$this->_content($content);
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index 6f7a4b48f..a9bf5a49b 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -578,14 +578,14 @@ SQL;
if (!empty($options['keep_min']) && $options['keep_min'] > 0) {
//Double SELECT for MySQL workaround ERROR 1093 (HY000)
$sql .= ' AND `lastSeen` < (SELECT `lastSeen`'
- . ' FROM (SELECT e2.`lastSeen` FROM `_entry` e2 WHERE e2.id_feed = :id_feed2'
- . ' ORDER BY e2.`lastSeen` DESC LIMIT 1 OFFSET :keep_min) last_seen2)';
+ . ' FROM (SELECT e2.`lastSeen` FROM `_entry` e2 WHERE e2.id_feed = :id_feed2'
+ . ' ORDER BY e2.`lastSeen` DESC LIMIT 1 OFFSET :keep_min) last_seen2)';
$params[':id_feed2'] = $id_feed;
$params[':keep_min'] = (int)$options['keep_min'];
}
//Keep at least the articles seen at the last refresh
$sql .= ' AND `lastSeen` < (SELECT maxlastseen'
- . ' FROM (SELECT MAX(e3.`lastSeen`) AS maxlastseen FROM `_entry` e3 WHERE e3.id_feed = :id_feed3) last_seen3)';
+ . ' FROM (SELECT MAX(e3.`lastSeen`) AS maxlastseen FROM `_entry` e3 WHERE e3.id_feed = :id_feed3) last_seen3)';
$params[':id_feed3'] = $id_feed;
//==Inclusions==
@@ -598,8 +598,8 @@ SQL;
}
if (!empty($options['keep_max']) && $options['keep_max'] > 0) {
$sql .= ' OR `lastSeen` <= (SELECT `lastSeen`'
- . ' FROM (SELECT e4.`lastSeen` FROM `_entry` e4 WHERE e4.id_feed = :id_feed4'
- . ' ORDER BY e4.`lastSeen` DESC LIMIT 1 OFFSET :keep_max) last_seen4)';
+ . ' FROM (SELECT e4.`lastSeen` FROM `_entry` e4 WHERE e4.id_feed = :id_feed4'
+ . ' ORDER BY e4.`lastSeen` DESC LIMIT 1 OFFSET :keep_max) last_seen4)';
$params[':id_feed4'] = $id_feed;
$params[':keep_max'] = (int)$options['keep_max'];
}
@@ -670,7 +670,8 @@ SQL;
return 'CONCAT(' . $s1 . ',' . $s2 . ')'; //MySQL
}
- protected function sqlListEntriesWhere($alias = '', $filters = null, $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $firstId = '', $date_min = 0) {
+ protected function sqlListEntriesWhere($alias = '', $filters = null, $state = FreshRSS_Entry::STATE_ALL,
+ $order = 'DESC', $firstId = '', $date_min = 0) {
$search = ' ';
$values = array();
if ($state & FreshRSS_Entry::STATE_NOT_READ) {
@@ -831,13 +832,15 @@ SQL;
if ($filter->getSearch()) {
foreach ($filter->getSearch() as $search_value) {
- $sub_search .= 'AND ' . $this->sqlConcat($alias . 'title', $this->isCompressed() ? 'UNCOMPRESS(' . $alias . 'content_bin)' : '' . $alias . 'content') . ' LIKE ? ';
+ $sub_search .= 'AND ' . $this->sqlConcat($alias . 'title',
+ $this->isCompressed() ? 'UNCOMPRESS(' . $alias . 'content_bin)' : '' . $alias . 'content') . ' LIKE ? ';
$values[] = "%{$search_value}%";
}
}
if ($filter->getNotSearch()) {
foreach ($filter->getNotSearch() as $search_value) {
- $sub_search .= 'AND (NOT ' . $this->sqlConcat($alias . 'title', $this->isCompressed() ? 'UNCOMPRESS(' . $alias . 'content_bin)' : '' . $alias . 'content') . ' LIKE ?) ';
+ $sub_search .= 'AND (NOT ' . $this->sqlConcat($alias . 'title',
+ $this->isCompressed() ? 'UNCOMPRESS(' . $alias . 'content_bin)' : '' . $alias . 'content') . ' LIKE ?) ';
$values[] = "%{$search_value}%";
}
}
@@ -859,7 +862,8 @@ SQL;
return array($values, $search);
}
- private function sqlListWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filters = null, $date_min = 0) {
+ private function sqlListWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL,
+ $order = 'DESC', $limit = 1, $firstId = '', $filters = null, $date_min = 0) {
if (!$state) {
$state = FreshRSS_Entry::STATE_ALL;
}
@@ -917,7 +921,8 @@ SQL;
. ($limit > 0 ? ' LIMIT ' . intval($limit) : '')); //TODO: See http://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/
}
- public function listWhereRaw($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filters = null, $date_min = 0) {
+ public function listWhereRaw($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL,
+ $order = 'DESC', $limit = 1, $firstId = '', $filters = null, $date_min = 0) {
list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filters, $date_min);
$sql = 'SELECT e0.id, e0.guid, e0.title, e0.author, '
@@ -939,7 +944,8 @@ SQL;
}
}
- public function listWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filters = null, $date_min = 0) {
+ public function listWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL,
+ $order = 'DESC', $limit = 1, $firstId = '', $filters = null, $date_min = 0) {
$stm = $this->listWhereRaw($type, $id, $state, $order, $limit, $firstId, $filters, $date_min);
if ($stm) {
while ($row = $stm->fetch(PDO::FETCH_ASSOC)) {
@@ -969,7 +975,8 @@ SQL;
}
}
- public function listIdsWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL, $order = 'DESC', $limit = 1, $firstId = '', $filters = null) { //For API
+ public function listIdsWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL,
+ $order = 'DESC', $limit = 1, $firstId = '', $filters = null) { //For API
list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filters);
$stm = $this->pdo->prepare($sql);
@@ -983,7 +990,8 @@ SQL;
return array();
}
$guids = array_unique($guids);
- $sql = 'SELECT guid, ' . $this->sqlHexEncode('hash') . ' AS hex_hash FROM `_entry` WHERE id_feed=? AND guid IN (' . str_repeat('?,', count($guids) - 1). '?)';
+ $sql = 'SELECT guid, ' . $this->sqlHexEncode('hash') .
+ ' AS hex_hash FROM `_entry` WHERE id_feed=? AND guid IN (' . str_repeat('?,', count($guids) - 1). '?)';
$stm = $this->pdo->prepare($sql);
$values = array($id_feed);
$values = array_merge($values, $guids);
diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php
index e53583654..82d7c099c 100644
--- a/app/Models/EntryDAOSQLite.php
+++ b/app/Models/EntryDAOSQLite.php
@@ -114,13 +114,13 @@ DROP TABLE IF EXISTS `tmp`;
public function markRead($ids, $is_read = true) {
FreshRSS_UserDAO::touch();
if (is_array($ids)) { //Many IDs at once (used by API)
- if (true) { //Speed heuristics //TODO: Not implemented yet for SQLite (so always call IDs one by one)
+ //if (true) { //Speed heuristics //TODO: Not implemented yet for SQLite (so always call IDs one by one)
$affected = 0;
foreach ($ids as $id) {
$affected += $this->markRead($id, $is_read);
}
return $affected;
- }
+ //}
} else {
$this->pdo->beginTransaction();
$sql = 'UPDATE `_entry` SET is_read=? WHERE id=? AND is_read=?';
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php
index 2b2b3c0ec..43485451c 100644
--- a/app/Models/FeedDAO.php
+++ b/app/Models/FeedDAO.php
@@ -175,9 +175,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
public function updateLastUpdate($id, $inError = false, $mtime = 0) { //See also updateCachedValue()
- $sql = 'UPDATE `_feed` '
- . 'SET `lastUpdate`=?, error=? '
- . 'WHERE id=?';
+ $sql = 'UPDATE `_feed` SET `lastUpdate`=?, error=? WHERE id=?';
$values = array(
$mtime <= 0 ? time() : $mtime,
$inError ? 1 : 0,
@@ -248,9 +246,11 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
public function selectAll() {
- $sql = 'SELECT id, url, category, name, website, description, `lastUpdate`, priority, '
- . '`pathEntries`, `httpAuth`, error, ttl, attributes '
- . 'FROM `_feed`';
+ $sql = <<<'SQL'
+SELECT id, url, category, name, website, description, `lastUpdate`,
+ priority, `pathEntries`, `httpAuth`, error, ttl, attributes
+FROM `_feed`
+SQL;
$stm = $this->pdo->query($sql);
while ($row = $stm->fetch(PDO::FETCH_ASSOC)) {
yield $row;
@@ -317,8 +317,10 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
public function arrayFeedCategoryNames() { //For API
- $sql = 'SELECT f.id, f.name, c.name as c_name FROM `_feed` f '
- . 'INNER JOIN `_category` c ON c.id = f.category';
+ $sql = <<<'SQL'
+SELECT f.id, f.name, c.name as c_name FROM `_feed` f
+INNER JOIN `_category` c ON c.id = f.category
+SQL;
$stm = $this->pdo->query($sql);
$res = $stm->fetchAll(PDO::FETCH_ASSOC);
$feedCategoryNames = array();
@@ -337,12 +339,12 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
public function listFeedsOrderUpdate($defaultCacheDuration = 3600, $limit = 0) {
$this->updateTTL();
$sql = 'SELECT id, url, name, website, `lastUpdate`, `pathEntries`, `httpAuth`, ttl, attributes '
- . 'FROM `_feed` '
- . ($defaultCacheDuration < 0 ? '' : 'WHERE ttl >= ' . FreshRSS_Feed::TTL_DEFAULT
- . ' AND `lastUpdate` < (' . (time() + 60)
- . '-(CASE WHEN ttl=' . FreshRSS_Feed::TTL_DEFAULT . ' THEN ' . intval($defaultCacheDuration) . ' ELSE ttl END)) ')
- . 'ORDER BY `lastUpdate` '
- . ($limit < 1 ? '' : 'LIMIT ' . intval($limit));
+ . 'FROM `_feed` '
+ . ($defaultCacheDuration < 0 ? '' : 'WHERE ttl >= ' . FreshRSS_Feed::TTL_DEFAULT
+ . ' AND `lastUpdate` < (' . (time() + 60)
+ . '-(CASE WHEN ttl=' . FreshRSS_Feed::TTL_DEFAULT . ' THEN ' . intval($defaultCacheDuration) . ' ELSE ttl END)) ')
+ . 'ORDER BY `lastUpdate` '
+ . ($limit < 1 ? '' : 'LIMIT ' . intval($limit));
$stm = $this->pdo->query($sql);
if ($stm !== false) {
return self::daoToFeed($stm->fetchAll(PDO::FETCH_ASSOC));
@@ -394,9 +396,9 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
public function updateCachedValues($id = null) {
//2 sub-requests with FOREIGN KEY(e.id_feed), INDEX(e.is_read) faster than 1 request with GROUP BY or CASE
$sql = 'UPDATE `_feed` '
- . 'SET `cache_nbEntries`=(SELECT COUNT(e1.id) FROM `_entry` e1 WHERE e1.id_feed=`_feed`.id),'
- . '`cache_nbUnreads`=(SELECT COUNT(e2.id) FROM `_entry` e2 WHERE e2.id_feed=`_feed`.id AND e2.is_read=0)'
- . ($id != null ? ' WHERE id=:id' : '');
+ . 'SET `cache_nbEntries`=(SELECT COUNT(e1.id) FROM `_entry` e1 WHERE e1.id_feed=`_feed`.id),'
+ . '`cache_nbUnreads`=(SELECT COUNT(e2.id) FROM `_entry` e2 WHERE e2.id_feed=`_feed`.id AND e2.is_read=0)'
+ . ($id != null ? ' WHERE id=:id' : '');
$stm = $this->pdo->prepare($sql);
if ($id != null) {
$stm->bindParam(':id', $id, PDO::PARAM_INT);
diff --git a/app/Models/FormAuth.php b/app/Models/FormAuth.php
index 1aca7c3d1..5211fd5d1 100644
--- a/app/Models/FormAuth.php
+++ b/app/Models/FormAuth.php
@@ -6,10 +6,7 @@ class FreshRSS_FormAuth {
!ctype_graph($hash) ||
!ctype_graph($challenge) ||
!ctype_alnum($nonce)) {
- Minz_Log::debug('Invalid credential parameters:' .
- ' user=' . $username .
- ' challenge=' . $challenge .
- ' nonce=' . $nonce);
+ Minz_Log::debug("Invalid credential parameters: user={$username}, challenge={$challenge}, nonce={$nonce}");
return false;
}
diff --git a/app/Models/Share.php b/app/Models/Share.php
index 218781dcc..7988a021f 100644
--- a/app/Models/Share.php
+++ b/app/Models/Share.php
@@ -97,8 +97,7 @@ class FreshRSS_Share {
* @param $help_url is an optional url to give help on this option.
* @param $method defines the sharing method (GET or POST)
*/
- private function __construct($type, $url_transform, $transform,
- $form_type, $help_url, $method, $field) {
+ private function __construct($type, $url_transform, $transform, $form_type, $help_url, $method, $field) {
$this->type = $type;
$this->name = _t('gen.share.' . $type);
$this->url_transform = $url_transform;
diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php
index cbfa79c61..a73657e9a 100644
--- a/app/Models/StatsDAO.php
+++ b/app/Models/StatsDAO.php
@@ -15,8 +15,8 @@ class FreshRSS_StatsDAO extends Minz_ModelPdo {
*/
public function calculateEntryRepartition() {
return array(
- 'main_stream' => $this->calculateEntryRepartitionPerFeed(null, true),
- 'all_feeds' => $this->calculateEntryRepartitionPerFeed(null, false),
+ 'main_stream' => $this->calculateEntryRepartitionPerFeed(null, true),
+ 'all_feeds' => $this->calculateEntryRepartitionPerFeed(null, false),
);
}
diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php
index a9aad519d..7f95e2ac2 100644
--- a/app/Models/TagDAO.php
+++ b/app/Models/TagDAO.php
@@ -42,9 +42,13 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
public function addTag($valuesTmp) {
- $sql = 'INSERT INTO `_tag`(name, attributes) '
- . 'SELECT * FROM (SELECT TRIM(?) as name, TRIM(?) as attributes) t2 ' //TRIM() gives a text type hint to PostgreSQL
- . 'WHERE NOT EXISTS (SELECT 1 FROM `_category` WHERE name = TRIM(?))'; //No category of the same name
+ // TRIM() gives a text type hint to PostgreSQL
+ // No category of the same name
+ $sql = <<<'SQL'
+INSERT INTO `_tag`(name, attributes)
+SELECT * FROM (SELECT TRIM(?) as name, TRIM(?) as attributes) t2
+WHERE NOT EXISTS (SELECT 1 FROM `_category` WHERE name = TRIM(?))
+SQL;
$stm = $this->pdo->prepare($sql);
$valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, 63, 'UTF-8');
@@ -79,8 +83,12 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
public function updateTag($id, $valuesTmp) {
- $sql = 'UPDATE `_tag` SET name=?, attributes=? WHERE id=? '
- . 'AND NOT EXISTS (SELECT 1 FROM `_category` WHERE name = ?)'; //No category of the same name
+ // No category of the same name
+ $sql = <<<'SQL'
+UPDATE `_tag` SET name=?, attributes=? WHERE id=?
+AND NOT EXISTS (SELECT 1 FROM `_category` WHERE name = ?)
+SQL;
+
$stm = $this->pdo->prepare($sql);
$valuesTmp['name'] = mb_strcut(trim($valuesTmp['name']), 0, 63, 'UTF-8');
@@ -149,7 +157,11 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
public function updateEntryTag($oldTagId, $newTagId) {
- $sql = 'DELETE FROM `_entrytag` WHERE EXISTS (SELECT 1 FROM `_entrytag` AS e WHERE e.id_entry = `_entrytag`.id_entry AND e.id_tag = ? AND `_entrytag`.id_tag = ?)';
+ $sql = <<<'SQL'
+DELETE FROM `_entrytag` WHERE EXISTS (
+ SELECT 1 FROM `_entrytag` AS e
+ WHERE e.id_entry = `_entrytag`.id_entry AND e.id_tag = ? AND `_entrytag`.id_tag = ?)
+SQL;
$stm = $this->pdo->prepare($sql);
if (!($stm && $stm->execute([$newTagId, $oldTagId]))) {
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php
index a5a5a6ce2..88ddd3629 100644
--- a/app/Models/UserQuery.php
+++ b/app/Models/UserQuery.php
@@ -59,12 +59,12 @@ class FreshRSS_UserQuery {
*/
public function toArray() {
return array_filter(array(
- 'get' => $this->get,
- 'name' => $this->name,
- 'order' => $this->order,
- 'search' => $this->search->__toString(),
- 'state' => $this->state,
- 'url' => $this->url,
+ 'get' => $this->get,
+ 'name' => $this->name,
+ 'order' => $this->order,
+ 'search' => $this->search->__toString(),
+ 'state' => $this->state,
+ 'url' => $this->url,
));
}
diff --git a/app/install.php b/app/install.php
index a156027e4..b3e96a773 100644
--- a/app/install.php
+++ b/app/install.php
@@ -104,9 +104,9 @@ function saveStep2() {
]);
} else {
if (empty($_POST['type']) ||
- empty($_POST['host']) ||
- empty($_POST['user']) ||
- empty($_POST['base'])) {
+ empty($_POST['host']) ||
+ empty($_POST['user']) ||
+ empty($_POST['base'])) {
Minz_Session::_param('bd_error', 'Missing parameters!');
}
Minz_Session::_params([
@@ -336,7 +336,7 @@ function printStep0() {
?>
<?php if ($s0['all'] === 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?= _t('gen.short.ok') ?></span> <?= _t('install.language.defined') ?></p>
- <?php } else if (!empty($_POST) && $s0['sessionWorking'] !== 'ok') { ?>
+ <?php } elseif (!empty($_POST) && $s0['sessionWorking'] !== 'ok') { ?>
<p class="alert alert-error"><span class="alert-head"><?= _t('gen.short.damn') ?></span> <?= _t('install.session.nok') ?></p>
<?php } ?>
@@ -426,7 +426,8 @@ function printStep1() {
<form action="index.php?step=1" method="post">
<input type="hidden" name="freshrss-keep-install" value="1" />
<button type="submit" class="btn btn-important next-step" tabindex="1" ><?= _t('install.action.keep_install') ?></button>
- <a class="btn btn-attention next-step confirm" data-str-confirm="<?= _t('install.js.confirm_reinstall') ?>" href="?step=2" tabindex="2" ><?= _t('install.action.reinstall') ?></a>
+ <a class="btn btn-attention next-step confirm" data-str-confirm="<?= _t('install.js.confirm_reinstall') ?>"
+ href="?step=2" tabindex="2" ><?= _t('install.action.reinstall') ?></a>
</form>
<?php } elseif ($res['all'] == 'ok') { ?>
@@ -443,7 +444,8 @@ function printStep2() {
<?php $s2 = checkStep2(); if ($s2['all'] == 'ok') { ?>
<p class="alert alert-success"><span class="alert-head"><?= _t('gen.short.ok') ?></span> <?= _t('install.bdd.conf.ok') ?></p>
<?php } elseif ($s2['conn'] == 'ko') { ?>
- <p class="alert alert-error"><span class="alert-head"><?= _t('gen.short.damn') ?></span> <?= _t('install.bdd.conf.ko'),(empty($_SESSION['bd_error']) ? '' : ' : ' . $_SESSION['bd_error']) ?></p>
+ <p class="alert alert-error"><span class="alert-head"><?= _t('gen.short.damn') ?></span> <?= _t('install.bdd.conf.ko'),
+ (empty($_SESSION['bd_error']) ? '' : ' : ' . $_SESSION['bd_error']) ?></p>
<?php } ?>
<form action="index.php?step=2" method="post" autocomplete="off">
@@ -454,19 +456,19 @@ function printStep2() {
<select name="type" id="type" tabindex="1">
<?php if (extension_loaded('pdo_sqlite')) {?>
<option value="sqlite"
- <?php echo(isset($_SESSION['bd_type']) && $_SESSION['bd_type'] === 'sqlite') ? 'selected="selected"' : ''; ?>>
+ <?= isset($_SESSION['bd_type']) && $_SESSION['bd_type'] === 'sqlite' ? 'selected="selected"' : '' ?>>
SQLite
</option>
<?php }?>
<?php if (extension_loaded('pdo_mysql')) {?>
<option value="mysql"
- <?php echo(isset($_SESSION['bd_type']) && $_SESSION['bd_type'] === 'mysql') ? 'selected="selected"' : ''; ?>>
+ <?= isset($_SESSION['bd_type']) && $_SESSION['bd_type'] === 'mysql' ? 'selected="selected"' : '' ?>>
MySQL
</option>
<?php }?>
<?php if (extension_loaded('pdo_pgsql')) {?>
<option value="pgsql"
- <?php echo(isset($_SESSION['bd_type']) && $_SESSION['bd_type'] === 'pgsql') ? 'selected="selected"' : ''; ?>>
+ <?= isset($_SESSION['bd_type']) && $_SESSION['bd_type'] === 'pgsql' ? 'selected="selected"' : '' ?>>
PostgreSQL
</option>
<?php }?>
@@ -478,35 +480,40 @@ function printStep2() {
<div class="form-group">
<label class="group-name" for="host"><?= _t('install.bdd.host') ?></label>
<div class="group-controls">
- <input type="text" id="host" name="host" pattern="[0-9A-Z/a-z_.-]{1,64}(:[0-9]{2,5})?" value="<?= isset($_SESSION['bd_host']) ? $_SESSION['bd_host'] : $system_default_config->db['host'] ?>" tabindex="2" />
+ <input type="text" id="host" name="host" pattern="[0-9A-Z/a-z_.-]{1,64}(:[0-9]{2,5})?" value="<?=
+ isset($_SESSION['bd_host']) ? $_SESSION['bd_host'] : $system_default_config->db['host'] ?>" tabindex="2" />
</div>
</div>
<div class="form-group">
<label class="group-name" for="user"><?= _t('install.bdd.username') ?></label>
<div class="group-controls">
- <input type="text" id="user" name="user" maxlength="64" pattern="[0-9A-Za-z@_.-]{1,64}" value="<?= isset($_SESSION['bd_user']) ? $_SESSION['bd_user'] : '' ?>" tabindex="3" />
+ <input type="text" id="user" name="user" maxlength="64" pattern="[0-9A-Za-z@_.-]{1,64}" value="<?=
+ isset($_SESSION['bd_user']) ? $_SESSION['bd_user'] : '' ?>" tabindex="3" />
</div>
</div>
<div class="form-group">
<label class="group-name" for="pass"><?= _t('install.bdd.password') ?></label>
<div class="group-controls">
- <input type="password" id="pass" name="pass" value="<?= isset($_SESSION['bd_password']) ? $_SESSION['bd_password'] : '' ?>" tabindex="4" autocomplete="off" />
+ <input type="password" id="pass" name="pass" value="<?=
+ isset($_SESSION['bd_password']) ? $_SESSION['bd_password'] : '' ?>" tabindex="4" autocomplete="off" />
</div>
</div>
<div class="form-group">
<label class="group-name" for="base"><?= _t('install.bdd') ?></label>
<div class="group-controls">
- <input type="text" id="base" name="base" maxlength="64" pattern="[0-9A-Za-z_-]{1,64}" value="<?= isset($_SESSION['bd_base']) ? $_SESSION['bd_base'] : '' ?>" tabindex="5" />
+ <input type="text" id="base" name="base" maxlength="64" pattern="[0-9A-Za-z_-]{1,64}" value="<?=
+ isset($_SESSION['bd_base']) ? $_SESSION['bd_base'] : '' ?>" tabindex="5" />
</div>
</div>
<div class="form-group">
<label class="group-name" for="prefix"><?= _t('install.bdd.prefix') ?></label>
<div class="group-controls">
- <input type="text" id="prefix" name="prefix" maxlength="16" pattern="[0-9A-Za-z_]{1,16}" value="<?= isset($_SESSION['bd_prefix']) ? $_SESSION['bd_prefix'] : $system_default_config->db['prefix'] ?>" tabindex="6" />
+ <input type="text" id="prefix" name="prefix" maxlength="16" pattern="[0-9A-Za-z_]{1,16}" value="<?=
+ isset($_SESSION['bd_prefix']) ? $_SESSION['bd_prefix'] : $system_default_config->db['prefix'] ?>" tabindex="6" />
</div>
</div>
</div>
@@ -539,7 +546,9 @@ function printStep3() {
<div class="form-group">
<label class="group-name" for="default_user"><?= _t('install.default_user') ?></label>
<div class="group-controls">
- <input type="text" id="default_user" name="default_user" autocomplete="username" required="required" size="16" pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" value="<?= isset($_SESSION['default_user']) ? $_SESSION['default_user'] : '' ?>" placeholder="<?= httpAuthUser() == '' ? 'alice' : httpAuthUser() ?>" tabindex="3" />
+ <input type="text" id="default_user" name="default_user" autocomplete="username" required="required" size="16"
+ pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" value="<?= isset($_SESSION['default_user']) ? $_SESSION['default_user'] : '' ?>"
+ placeholder="<?= httpAuthUser() == '' ? 'alice' : httpAuthUser() ?>" tabindex="3" />
</div>
</div>
@@ -553,9 +562,12 @@ function printStep3() {
}
$auth_type = isset($_SESSION['auth_type']) ? $_SESSION['auth_type'] : '';
?>
- <option value="form"<?= $auth_type === 'form' || (no_auth($auth_type) && cryptAvailable()) ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"' ?>><?= _t('install.auth.form') ?></option>
- <option value="http_auth"<?= $auth_type === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : '' ?>><?= _t('install.auth.http') ?>(REMOTE_USER = '<?= httpAuthUser() ?>')</option>
- <option value="none"<?= $auth_type === 'none' || (no_auth($auth_type) && !cryptAvailable()) ? ' selected="selected"' : '' ?>><?= _t('install.auth.none') ?></option>
+ <option value="form"<?= $auth_type === 'form' || (no_auth($auth_type) && cryptAvailable()) ? ' selected="selected"' : '',
+ cryptAvailable() ? '' : ' disabled="disabled"' ?>><?= _t('install.auth.form') ?></option>
+ <option value="http_auth"<?= $auth_type === 'http_auth' ? ' selected="selected"' : '',
+ httpAuthUser() == '' ? ' disabled="disabled"' : '' ?>><?= _t('install.auth.http') ?>(REMOTE_USER = '<?= httpAuthUser() ?>')</option>
+ <option value="none"<?= $auth_type === 'none' || (no_auth($auth_type) && !cryptAvailable()) ? ' selected="selected"' : ''
+ ?>><?= _t('install.auth.none') ?></option>
</select>
</div>
</div>
@@ -564,7 +576,8 @@ function printStep3() {
<label class="group-name" for="passwordPlain"><?= _t('install.auth.password_form') ?></label>
<div class="group-controls">
<div class="stick">
- <input type="password" id="passwordPlain" name="passwordPlain" pattern=".{7,}" autocomplete="off" <?= $auth_type === 'form' ? ' required="required"' : '' ?> tabindex="5" />
+ <input type="password" id="passwordPlain" name="passwordPlain" pattern=".{7,}"
+ autocomplete="off" <?= $auth_type === 'form' ? ' required="required"' : '' ?> tabindex="5" />
<a class="btn toggle-password" data-toggle="passwordPlain"><?= FreshRSS_Themes::icon('key') ?></a>
</div>
<p class="help"><?= _i('help') ?> <?= _t('install.auth.password_format') ?></p>
diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml
index e74630b5a..5738cbb0f 100644
--- a/app/layout/aside_configure.phtml
+++ b/app/layout/aside_configure.phtml
@@ -18,8 +18,7 @@
<li class="item<?= Minz_Request::actionName() === 'queries' ? ' active' : '' ?>">
<a href="<?= _url('configure', 'queries') ?>"><?= _t('gen.menu.queries') ?></a>
</li>
- <li class="item<?php echo Minz_Request::controllerName() === 'user' &&
- Minz_Request::actionName() === 'profile'? ' active' : ''; ?>">
+ <li class="item<?= Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'profile' ? ' active' : '' ?>">
<a href="<?= _url('user', 'profile') ?>"><?= _t('gen.menu.user_profile') ?></a>
</li>
<li class="item<?= Minz_Request::controllerName() === 'extension' ? ' active' : '' ?>">
@@ -32,20 +31,17 @@
<li class="item<?= Minz_Request::actionName() === 'system' ? ' active' : '' ?>">
<a href="<?= _url('configure', 'system') ?>"><?= _t('gen.menu.system') ?></a>
</li>
- <li class="item<?php echo Minz_Request::controllerName() === 'user' &&
- Minz_Request::actionName() === 'manage' ? ' active' : ''; ?>">
+ <li class="item<?= Minz_Request::controllerName() === 'user' && Minz_Request::actionName() === 'manage' ? ' active' : '' ?>">
<a href="<?= _url('user', 'manage') ?>"><?= _t('gen.menu.user_management') ?></a>
</li>
<li class="item<?= Minz_Request::controllerName() === 'auth' ? ' active' : '' ?>">
<a href="<?= _url('auth', 'index') ?>"><?= _t('gen.menu.authentication') ?></a>
</li>
- <li class="item<?php echo Minz_Request::controllerName() === 'update' &&
- Minz_Request::actionName() === 'checkInstall' ? ' active' : ''; ?>">
+ <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'checkInstall' ? ' active' : '' ?>">
<a href="<?= _url('update', 'checkInstall') ?>"><?= _t('gen.menu.check_install') ?></a>
</li>
<?php if (!Minz_Configuration::get('system')->disable_update) { ?>
- <li class="item<?php echo Minz_Request::controllerName() === 'update' &&
- Minz_Request::actionName() === 'index' ? ' active' : ''; ?>">
+ <li class="item<?= Minz_Request::controllerName() === 'update' && Minz_Request::actionName() === 'index' ? ' active' : '' ?>">
<a href="<?= _url('update', 'index') ?>"><?= _t('gen.menu.update') ?></a>
</li>
<?php } ?>
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml
index 98daf633c..c3f066601 100644
--- a/app/layout/aside_feed.phtml
+++ b/app/layout/aside_feed.phtml
@@ -27,7 +27,8 @@
<ul id="sidebar" class="tree">
<li class="tree-folder category all<?= FreshRSS_Context::isCurrentGet('a') ? ' active' : '' ?>">
<div class="tree-folder-title">
- <?= _i('all') ?> <a class="title" data-unread="<?= format_number(FreshRSS_Context::$total_unread) ?>" href="<?= _url('index', $actual_view) ?>"><?= _t('index.menu.main_stream') ?></a>
+ <?= _i('all') ?> <a class="title" data-unread="<?= format_number(FreshRSS_Context::$total_unread) ?>" href="<?=
+ _url('index', $actual_view) ?>"><?= _t('index.menu.main_stream') ?></a>
</div>
</li>
@@ -59,7 +60,8 @@
<a class="dropdown-toggle"><?= _i('configure') ?></a>
<?php /* tag_config_template */ ?>
</div>
- <?= FreshRSS_Themes::alt('label') ?> <a class="item-title" data-unread="<?= format_number($tag->nbUnread()) ?>" href="<?= _url('index', $actual_view, 'get', 't_' . $tag->id()) . $state_filter ?>"><?= $tag->name() ?></a>
+ <?= FreshRSS_Themes::alt('label') ?> <a class="item-title" data-unread="<?= format_number($tag->nbUnread()) ?>" href="<?=
+ _url('index', $actual_view, 'get', 't_' . $tag->id()) . $state_filter ?>"><?= $tag->name() ?></a>
</li>
<?php endforeach; ?>
</ul>
@@ -71,12 +73,15 @@
$position = $cat->attributes('position');
if (!empty($feeds)) {
$c_active = FreshRSS_Context::isCurrentGet('c_' . $cat->id());
- $c_show = ($c_active && in_array(FreshRSS_Context::$user_conf->display_categories, [ 'active', 'remember' ])) || FreshRSS_Context::$user_conf->display_categories === 'all';
+ $c_show = ($c_active && in_array(FreshRSS_Context::$user_conf->display_categories, [ 'active', 'remember' ]))
+ || FreshRSS_Context::$user_conf->display_categories === 'all';
?>
- <li id="c_<?= $cat->id() ?>" class="tree-folder category<?= $c_active ? ' active' : '' ?>"<?= null === $position ? '' : "data-position='$position'" ?> data-unread="<?= $cat->nbNotRead() ?>">
+ <li id="c_<?= $cat->id() ?>" class="tree-folder category<?= $c_active ? ' active' : '' ?>"<?=
+ null === $position ? '' : "data-position='$position'" ?> data-unread="<?= $cat->nbNotRead() ?>">
<div class="tree-folder-title">
<a class="dropdown-toggle" href="#"><?= _i($c_show ? 'up' : 'down') ?></a>
- <a class="title<?= $cat->hasFeedsWithError() ? ' error' : '' ?>" data-unread="<?= format_number($cat->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'c_' . $cat->id()) ?>"><?= $cat->name() ?></a>
+ <a class="title<?= $cat->hasFeedsWithError() ? ' error' : '' ?>" data-unread="<?=
+ format_number($cat->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'c_' . $cat->id()) ?>"><?= $cat->name() ?></a>
</div>
<ul class="tree-folder-items<?= $c_show ? ' active' : '' ?>">
@@ -84,14 +89,17 @@
foreach ($feeds as $feed) {
$f_active = FreshRSS_Context::isCurrentGet('f_' . $feed->id());
?>
- <li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active ? ' active' : '', $feed->mute() ? ' mute' : '' ?><?= $feed->inError() ? ' error' : '' ?><?= $feed->nbEntries() <= 0 ? ' empty' : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>">
+ <li id="f_<?= $feed->id() ?>" class="item feed<?= $f_active ? ' active' : '', $feed->mute() ? ' mute' : '' ?><?=
+ $feed->inError() ? ' error' : '' ?><?= $feed->nbEntries() <= 0 ? ' empty' : ''
+ ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>">
<div class="dropdown no-mobile">
<div class="dropdown-target"></div>
<a class="dropdown-toggle" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a>
<?php /* feed_config_template */ ?>
</div>
<?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?>
- <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'f_' . $feed->id()) ?>"><?= $feed->name() ?></a>
+ <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?=
+ _url('index', $actual_view, 'get', 'f_' . $feed->id()) ?>"><?= $feed->name() ?></a>
</li>
<?php } ?>
</ul>
@@ -134,9 +142,9 @@
<li class="item">
<?php $confirm = FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : ''; ?>
<button class="read_all as-link <?= $confirm ?>"
- form="mark-read-aside"
- formaction="<?= _url('entry', 'read', 'get', 'f_------') ?>"
- type="submit"><?= _t('gen.action.mark_read') ?></button>
+ form="mark-read-aside"
+ formaction="<?= _url('entry', 'read', 'get', 'f_------') ?>"
+ type="submit"><?= _t('gen.action.mark_read') ?></button>
</li>
<?php } ?>
</ul>
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index 5a385589f..0724abc16 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -3,7 +3,7 @@
?>
<div class="nav_menu">
- <?php if ($actual_view === 'normal' || $actual_view === 'reader' ) { ?>
+ <?php if ($actual_view === 'normal' || $actual_view === 'reader') { ?>
<a class="btn toggle_aside" href="#aside_feed"><?= _i('category') ?></a>
<?php } ?>
@@ -23,10 +23,10 @@
$url_state['params']['state'] = FreshRSS_Context::getRevertState($state);
?>
<a id="toggle-<?= $state_str ?>"
- class="btn <?= $state_enabled ? 'active' : '' ?>"
- role="checkbox" aria-checked="<?= $state_enabled ? 'true' : 'false' ?>"
- title="<?= _t('index.menu.' . $state_str) ?>"
- href="<?= Minz_Url::display($url_state) ?>"><?= _i($state_str) ?></a>
+ class="btn <?= $state_enabled ? 'active' : '' ?>"
+ role="checkbox" aria-checked="<?= $state_enabled ? 'true' : 'false' ?>"
+ title="<?= _t('index.menu.' . $state_str) ?>"
+ href="<?= Minz_Url::display($url_state) ?>"><?= _i($state_str) ?></a>
<?php } ?>
<div class="dropdown">
@@ -92,9 +92,9 @@
<form id="mark-read-menu" method="post">
<?php $confirm = FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : ''; ?>
<button class="read_all btn <?= $confirm ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_read_url) ?>"
- type="submit"><?= _t('gen.action.mark_read') ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_read_url) ?>"
+ type="submit"><?= _t('gen.action.mark_read') ?></button>
<div class="dropdown">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
@@ -106,9 +106,9 @@
<li class="item">
<button class="as-link <?= $confirm ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_read_url) ?>"
- type="submit"><?= $string_mark ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_read_url) ?>"
+ type="submit"><?= $string_mark ?></button>
</li>
<li class="separator"></li>
<?php
@@ -121,22 +121,22 @@
?>
<li class="item">
<button class="as-link <?= $confirm ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_before_today) ?>"
- type="submit"><?= _t('index.menu.before_one_day') ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_before_today) ?>"
+ type="submit"><?= _t('index.menu.before_one_day') ?></button>
</li>
<li class="item">
<button class="as-link <?= $confirm ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_before_one_week) ?>"
- type="submit"><?= _t('index.menu.before_one_week') ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_before_one_week) ?>"
+ type="submit"><?= _t('index.menu.before_one_week') ?></button>
</li>
<li class="separator"></li>
<li class="item">
<button class="as-link <?= $mark_unread_enabled ? $confirm : '" disabled="disabled' ?>"
- form="mark-read-menu"
- formaction="<?= Minz_Url::display($mark_unread_url) ?>"
- type="submit"><?= $string_unmark ?></button>
+ form="mark-read-menu"
+ formaction="<?= Minz_Url::display($mark_unread_url) ?>"
+ type="submit"><?= $string_unmark ?></button>
</li>
</ul>
</div>
@@ -153,7 +153,8 @@
/** @var FreshRSS_ReadingMode $mode */
foreach ($readingModes as $mode) {
?>
- <a class="<?= $mode->getId() ?> btn <?php if ($mode->isActive()) { echo 'active'; } ?>" title="<?= $mode->getTitle() ?>" href="<?= Minz_Url::display($mode->getUrlParams()) ?>">
+ <a class="<?= $mode->getId() ?> btn <?php if ($mode->isActive()) { echo 'active'; } ?>" title="<?=
+ $mode->getTitle() ?>" href="<?= Minz_Url::display($mode->getUrlParams()) ?>">
<?= $mode->getName() ?>
</a>
<?php
@@ -178,7 +179,7 @@
<?php $nav_menu_hooks = Minz_ExtensionManager::callHook('nav_menu'); ?>
<?php if ($nav_menu_hooks != '') { ?>
<div class="stick" id="nav_menu_hooks">
- <?php echo $nav_menu_hooks; ?>
+ <?= $nav_menu_hooks ?>
</div>
<?php } ?>
diff --git a/app/views/auth/formLogin.phtml b/app/views/auth/formLogin.phtml
index b5fee2c27..0f3910a3c 100644
--- a/app/views/auth/formLogin.phtml
+++ b/app/views/auth/formLogin.phtml
@@ -10,7 +10,8 @@
<div class="form-group">
<label for="username"><?= _t('gen.auth.username') ?></label>
- <input type="text" id="username" name="username" autocomplete="username" size="16" required="required" pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" autofocus="autofocus" autocapitalize="off" />
+ <input type="text" id="username" name="username" autocomplete="username" size="16" required="required"
+ pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" autofocus="autofocus" autocapitalize="off" />
</div>
<div class="form-group">
diff --git a/app/views/auth/index.phtml b/app/views/auth/index.phtml
index c1cf95b2b..313a7c14d 100644
--- a/app/views/auth/index.phtml
+++ b/app/views/auth/index.phtml
@@ -14,8 +14,10 @@
<?php if (!in_array(FreshRSS_Context::$system_conf->auth_type, array('form', 'http_auth', 'none'))) { ?>
<option selected="selected"></option>
<?php } ?>
- <option value="form"<?= FreshRSS_Context::$system_conf->auth_type === 'form' ? ' selected="selected"' : '', cryptAvailable() ? '' : ' disabled="disabled"' ?>><?= _t('admin.auth.form') ?></option>
- <option value="http_auth"<?= FreshRSS_Context::$system_conf->auth_type === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : '' ?>><?= _t('admin.auth.http') ?> (REMOTE_USER = '<?= httpAuthUser() ?>')</option>
+ <option value="form"<?= FreshRSS_Context::$system_conf->auth_type === 'form' ? ' selected="selected"' : '',
+ cryptAvailable() ? '' : ' disabled="disabled"' ?>><?= _t('admin.auth.form') ?></option>
+ <option value="http_auth"<?= FreshRSS_Context::$system_conf->auth_type === 'http_auth' ? ' selected="selected"' : '',
+ httpAuthUser() == '' ? ' disabled="disabled"' : '' ?>><?= _t('admin.auth.http') ?> (REMOTE_USER = '<?= httpAuthUser() ?>')</option>
<option value="none"<?= FreshRSS_Context::$system_conf->auth_type === 'none' ? ' selected="selected"' : '' ?>><?= _t('admin.auth.none') ?></option>
</select>
</div>
@@ -24,8 +26,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="anon_access">
- <input type="checkbox" name="anon_access" id="anon_access" value="1"<?php echo FreshRSS_Context::$system_conf->allow_anonymous ? ' checked="checked"' : '',
- FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"'; ?> data-leave-validation="<?= FreshRSS_Context::$system_conf->allow_anonymous ?>"/>
+ <input type="checkbox" name="anon_access" id="anon_access" value="1"<?=
+ FreshRSS_Context::$system_conf->allow_anonymous ? ' checked="checked"' : '',
+ FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"' ?> data-leave-validation="<?= FreshRSS_Context::$system_conf->allow_anonymous ?>"/>
<?= _t('admin.auth.allow_anonymous', FreshRSS_Context::$system_conf->default_user) ?>
</label>
</div>
@@ -34,8 +37,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="anon_refresh">
- <input type="checkbox" name="anon_refresh" id="anon_refresh" value="1"<?php echo FreshRSS_Context::$system_conf->allow_anonymous_refresh ? ' checked="checked"' : '',
- FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"'; ?> data-leave-validation="<?= FreshRSS_Context::$system_conf->allow_anonymous_refresh ?>"/>
+ <input type="checkbox" name="anon_refresh" id="anon_refresh" value="1"<?=
+ FreshRSS_Context::$system_conf->allow_anonymous_refresh ? ' checked="checked"' : '',
+ FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"' ?> data-leave-validation="<?= FreshRSS_Context::$system_conf->allow_anonymous_refresh ?>"/>
<?= _t('admin.auth.allow_anonymous_refresh') ?>
</label>
</div>
@@ -44,8 +48,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="unsafe_autologin">
- <input type="checkbox" name="unsafe_autologin" id="unsafe_autologin" value="1"<?php echo FreshRSS_Context::$system_conf->unsafe_autologin_enabled ? ' checked="checked"' : '',
- FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"'; ?> data-leave-validation="<?= FreshRSS_Context::$system_conf->unsafe_autologin_enabled ?>"/>
+ <input type="checkbox" name="unsafe_autologin" id="unsafe_autologin" value="1"<?=
+ FreshRSS_Context::$system_conf->unsafe_autologin_enabled ? ' checked="checked"' : '',
+ FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"' ?> data-leave-validation="<?= FreshRSS_Context::$system_conf->unsafe_autologin_enabled ?>"/>
<?= _t('admin.auth.unsafe_autologin') ?>
<kbd><?= Minz_Url::display(array('c' => 'auth', 'a' => 'login', 'params' => array('u' => 'alice', 'p' => '1234')), 'html', true) ?></kbd>
</label>
@@ -55,8 +60,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="api_enabled">
- <input type="checkbox" name="api_enabled" id="api_enabled" value="1"<?php echo FreshRSS_Context::$system_conf->api_enabled ? ' checked="checked"' : '',
- FreshRSS_Auth::accessNeedsLogin() ? '' : ' disabled="disabled"'; ?> data-leave-validation="<?= FreshRSS_Context::$system_conf->api_enabled ?>"/>
+ <input type="checkbox" name="api_enabled" id="api_enabled" value="1"<?=
+ FreshRSS_Context::$system_conf->api_enabled ? ' checked="checked"' : '',
+ FreshRSS_Auth::accessNeedsLogin() ? '' : ' disabled="disabled"' ?> data-leave-validation="<?= FreshRSS_Context::$system_conf->api_enabled ?>"/>
<?= _t('admin.auth.api_enabled') ?>
</label>
</div>
diff --git a/app/views/auth/register.phtml b/app/views/auth/register.phtml
index b2494a8ab..c0c05758f 100644
--- a/app/views/auth/register.phtml
+++ b/app/views/auth/register.phtml
@@ -16,7 +16,8 @@
<div class="form-group">
<label for="new_user_name"><?= _t('gen.auth.username') ?></label>
- <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off" pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" autocapitalize="off" />
+ <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off"
+ pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" autocapitalize="off" />
<p class="help"><?= _i('help') ?> <?= _t('gen.auth.username.format') ?></p>
</div>
diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml
index 9c183f81f..3cc014b15 100644
--- a/app/views/configure/archiving.phtml
+++ b/app/views/configure/archiving.phtml
@@ -14,17 +14,18 @@
<select class="number" name="ttl_default" id="ttl_default" required="required" data-leave-validation="<?= FreshRSS_Context::$user_conf->ttl_default ?>"><?php
$found = false;
foreach (array(1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
- 3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
- 36000 => '10h', 43200 => '12h', 64800 => '18h',
- 86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
- 604800 => '1wk') as $v => $t) {
+ 3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
+ 36000 => '10h', 43200 => '12h', 64800 => '18h',
+ 86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
+ 604800 => '1wk') as $v => $t) {
echo '<option value="' . $v . (FreshRSS_Context::$user_conf->ttl_default == $v ? '" selected="selected' : '') . '">' . $t . '</option>';
if (FreshRSS_Context::$user_conf->ttl_default == $v) {
$found = true;
}
}
if (!$found) {
- echo '<option value="' . intval(FreshRSS_Context::$user_conf->ttl_default) . '" selected="selected">' . intval(FreshRSS_Context::$user_conf->ttl_default) . 's</option>';
+ echo '<option value="' . intval(FreshRSS_Context::$user_conf->ttl_default) . '" selected="selected">'
+ . intval(FreshRSS_Context::$user_conf->ttl_default) . 's</option>';
}
?></select> (<?= _t('gen.short.by_default') ?>)
</div>
@@ -38,7 +39,9 @@
<label class="group-name"><?= _t('conf.archiving.policy') ?><br /><small>(<?= _t('gen.short.by_default') ?>)</small></label>
<div class="group-controls">
<label class="checkbox" for="enable_keep_max">
- <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty(FreshRSS_Context::$user_conf->archiving['keep_max']) ? '' : ' checked="checked"' ?> data-leave-validation="<?= empty(FreshRSS_Context::$user_conf->archiving['keep_max']) ? 0 : 1 ?>"/>
+ <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?=
+ empty(FreshRSS_Context::$user_conf->archiving['keep_max']) ? '' : ' checked="checked"' ?>
+ data-leave-validation="<?= empty(FreshRSS_Context::$user_conf->archiving['keep_max']) ? 0 : 1 ?>"/>
<?= _t('conf.archiving.keep_max') ?>
<?php $keepMax = empty(FreshRSS_Context::$user_conf->archiving['keep_max']) ? 200 : FreshRSS_Context::$user_conf->archiving['keep_max']; ?>
<input type="number" id="keep_max" name="keep_max" min="0" value="<?= $keepMax ?>" data-leave-validation="<?= $keepMax ?>"/>
@@ -49,9 +52,12 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="enable_keep_period">
- <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= FreshRSS_Context::$user_conf->volatile['enable_keep_period'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->volatile['enable_keep_period'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?=
+ FreshRSS_Context::$user_conf->volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->volatile['enable_keep_period'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_period') ?>
- <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= FreshRSS_Context::$user_conf->volatile['keep_period_count'] ?>" data-leave-validation="<?= FreshRSS_Context::$user_conf->volatile['keep_period_count'] ?>"/>
+ <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= FreshRSS_Context::$user_conf->volatile['keep_period_count'] ?>"
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->volatile['keep_period_count'] ?>"/>
<select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= FreshRSS_Context::$user_conf->volatile['keep_period_unit'] ?>">
<option></option>
<option value="P1Y" <?= 'P1Y' === FreshRSS_Context::$user_conf->volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
@@ -68,7 +74,9 @@
<label class="group-name"><?= _t('conf.archiving.exception') ?><br /><small>(<?= _t('gen.short.by_default') ?>)</small></label>
<div class="group-controls">
<label class="checkbox" for="keep_favourites">
- <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= FreshRSS_Context::$user_conf->archiving['keep_favourites'] !== false ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->archiving['keep_favourites'] !== false ? 1 : 0 ?>"/>
+ <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?=
+ FreshRSS_Context::$user_conf->archiving['keep_favourites'] !== false ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->archiving['keep_favourites'] !== false ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_favourites') ?>
</label>
</div>
@@ -77,7 +85,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="keep_labels">
- <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= FreshRSS_Context::$user_conf->archiving['keep_labels'] !== false ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->archiving['keep_labels'] !== false ? 1 : 0 ?>"/>
+ <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?=
+ FreshRSS_Context::$user_conf->archiving['keep_labels'] !== false ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->archiving['keep_labels'] !== false ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_labels') ?>
</label>
</div>
@@ -86,7 +96,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="keep_unreads">
- <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= FreshRSS_Context::$user_conf->archiving['keep_unreads'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->archiving['keep_unreads'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?=
+ FreshRSS_Context::$user_conf->archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->archiving['keep_unreads'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_unreads') ?>
</label>
</div>
@@ -95,7 +107,9 @@
<div class="form-group">
<div class="group-controls">
<label for="keep_min_default"><?= _t('conf.archiving.keep_min_by_feed') ?>
- <input type="number" id="keep_min_default" name="keep_min_default" min="0" value="<?= FreshRSS_Context::$user_conf->archiving['keep_min'] ?>" data-leave-validation="<?= FreshRSS_Context::$user_conf->archiving['keep_min'] ?>">
+ <input type="number" id="keep_min_default" name="keep_min_default" min="0" value="<?=
+ FreshRSS_Context::$user_conf->archiving['keep_min'] ?>"
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->archiving['keep_min'] ?>">
</label>
</div>
</div>
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index c1cfecc2a..8e2105333 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -25,7 +25,9 @@
<ul class="slides">
<?php $slides = count($this->themes); $i = 1; ?>
<?php foreach($this->themes as $theme) { ?>
- <input type="radio" name="theme" id="img-<?= $i ?>" <?php if (FreshRSS_Context::$user_conf->theme === $theme['id']) {echo "checked";}?> value="<?= $theme['id'] ?>" data-leave-validation="<?= (FreshRSS_Context::$user_conf->theme === $theme['id']) ? 1 : 0 ?>"/>
+ <input type="radio" name="theme" id="img-<?= $i ?>" <?=
+ FreshRSS_Context::$user_conf->theme === $theme['id'] ? 'checked="checked"' : '' ?> value="<?= $theme['id'] ?>"
+ data-leave-validation="<?= (FreshRSS_Context::$user_conf->theme === $theme['id']) ? 1 : 0 ?>"/>
<li class="slide-container">
<div class="slide">
<img src="<?= Minz_Url::display('/themes/' . $theme['id'] . '/thumbs/original.png') ?>"/>
@@ -55,16 +57,16 @@
<label class="group-name" for="content_width"><?= _t('conf.display.width.content') ?></label>
<div class="group-controls">
<select name="content_width" id="content_width" required="" data-leave-validation="<?= $width ?>">
- <option value="thin" <?= $width === 'thin'? 'selected="selected"' : '' ?>>
+ <option value="thin" <?= $width === 'thin' ? 'selected="selected"' : '' ?>>
<?= _t('conf.display.width.thin') ?>
</option>
- <option value="medium" <?= $width === 'medium'? 'selected="selected"' : '' ?>>
+ <option value="medium" <?= $width === 'medium' ? 'selected="selected"' : '' ?>>
<?= _t('conf.display.width.medium') ?>
</option>
- <option value="large" <?= $width === 'large'? 'selected="selected"' : '' ?>>
+ <option value="large" <?= $width === 'large' ? 'selected="selected"' : '' ?>>
<?= _t('conf.display.width.large') ?>
</option>
- <option value="no_limit" <?= $width === 'no_limit'? 'selected="selected"' : '' ?>>
+ <option value="no_limit" <?= $width === 'no_limit' ? 'selected="selected"' : '' ?>>
<?= _t('conf.display.width.no_limit') ?>
</option>
</select>
@@ -89,22 +91,43 @@
<tbody>
<tr>
<th><?= _t('conf.display.icon.top_line') ?></th>
- <td><input type="checkbox" name="topline_read" value="1"<?= FreshRSS_Context::$user_conf->topline_read ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_read ?>"/></td>
- <td><input type="checkbox" name="topline_favorite" value="1"<?= FreshRSS_Context::$user_conf->topline_favorite ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_favorite ?>"/></td>
+ <td><input type="checkbox" name="topline_read" value="1"<?=
+ FreshRSS_Context::$user_conf->topline_read ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_read ?>"/></td>
+ <td><input type="checkbox" name="topline_favorite" value="1"<?=
+ FreshRSS_Context::$user_conf->topline_favorite ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_favorite ?>"/></td>
<td><input type="checkbox" disabled="disabled" /></td>
<td><input type="checkbox" disabled="disabled" /></td>
- <td><input type="checkbox" name="topline_display_authors" value="1"<?= FreshRSS_Context::$user_conf->topline_display_authors ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_display_authors ?>"/></td>
- <td><input type="checkbox" name="topline_date" value="1"<?= FreshRSS_Context::$user_conf->topline_date ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_date ?>"/></td>
- <td><input type="checkbox" name="topline_link" value="1"<?= FreshRSS_Context::$user_conf->topline_link ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_link ?>"/></td>
+ <td><input type="checkbox" name="topline_display_authors" value="1"<?=
+ FreshRSS_Context::$user_conf->topline_display_authors ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_display_authors ?>"/></td>
+ <td><input type="checkbox" name="topline_date" value="1"<?=
+ FreshRSS_Context::$user_conf->topline_date ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_date ?>"/></td>
+ <td><input type="checkbox" name="topline_link" value="1"<?= FreshRSS_Context::$user_conf->topline_link ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_link ?>"/></td>
</tr><tr>
<th><?= _t('conf.display.icon.bottom_line') ?></th>
- <td><input type="checkbox" name="bottomline_read" value="1"<?= FreshRSS_Context::$user_conf->bottomline_read ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_read ?>"/></td>
- <td><input type="checkbox" name="bottomline_favorite" value="1"<?= FreshRSS_Context::$user_conf->bottomline_favorite ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_favorite ?>"/></td>
- <td><input type="checkbox" name="bottomline_tags" value="1"<?= FreshRSS_Context::$user_conf->bottomline_tags ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_tags ?>"/></td>
- <td><input type="checkbox" name="bottomline_sharing" value="1"<?= FreshRSS_Context::$user_conf->bottomline_sharing ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_sharing ?>"/></td>
+ <td><input type="checkbox" name="bottomline_read" value="1"<?=
+ FreshRSS_Context::$user_conf->bottomline_read ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_read ?>"/></td>
+ <td><input type="checkbox" name="bottomline_favorite" value="1"<?=
+ FreshRSS_Context::$user_conf->bottomline_favorite ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_favorite ?>"/></td>
+ <td><input type="checkbox" name="bottomline_tags" value="1"<?=
+ FreshRSS_Context::$user_conf->bottomline_tags ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_tags ?>"/></td>
+ <td><input type="checkbox" name="bottomline_sharing" value="1"<?=
+ FreshRSS_Context::$user_conf->bottomline_sharing ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_sharing ?>"/></td>
<td><input type="checkbox" disabled="disabled" /></td>
- <td><input type="checkbox" name="bottomline_date" value="1"<?= FreshRSS_Context::$user_conf->bottomline_date ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_date ?>"/></td>
- <td><input type="checkbox" name="bottomline_link" value="1"<?= FreshRSS_Context::$user_conf->bottomline_link ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_link ?>"/></td>
+ <td><input type="checkbox" name="bottomline_date" value="1"<?=
+ FreshRSS_Context::$user_conf->bottomline_date ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_date ?>"/></td>
+ <td><input type="checkbox" name="bottomline_link" value="1"<?=
+ FreshRSS_Context::$user_conf->bottomline_link ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_link ?>"/></td>
</tr>
</tbody>
</table><br />
@@ -113,14 +136,18 @@
<div class="form-group">
<label class="group-name" for="html5_notif_timeout"><?= _t('conf.display.notif_html5.timeout') ?></label>
<div class="group-controls">
- <input type="number" id="html5_notif_timeout" name="html5_notif_timeout" value="<?= FreshRSS_Context::$user_conf->html5_notif_timeout ?>" data-leave-validation="<?= FreshRSS_Context::$user_conf->html5_notif_timeout ?>"/> <?= _t('conf.display.notif_html5.seconds') ?>
+ <input type="number" id="html5_notif_timeout" name="html5_notif_timeout" value="<?=
+ FreshRSS_Context::$user_conf->html5_notif_timeout ?>"
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->html5_notif_timeout ?>"/> <?= _t('conf.display.notif_html5.seconds') ?>
</div>
</div>
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="show_nav_buttons">
- <input type="checkbox" name="show_nav_buttons" id="show_nav_buttons" value="1"<?= FreshRSS_Context::$user_conf->show_nav_buttons ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->show_nav_buttons ?>"/>
+ <input type="checkbox" name="show_nav_buttons" id="show_nav_buttons" value="1"<?=
+ FreshRSS_Context::$user_conf->show_nav_buttons ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->show_nav_buttons ?>"/>
<?= _t('conf.display.show_nav_buttons') ?>
</label>
</div>
diff --git a/app/views/configure/integration.phtml b/app/views/configure/integration.phtml
index 19d46d8a3..e8ca5c3a3 100644
--- a/app/views/configure/integration.phtml
+++ b/app/views/configure/integration.phtml
@@ -4,8 +4,10 @@
<a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
<form method="post" action="<?= _url('configure', 'integration') ?>"
- data-simple='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"><div class="stick"><input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="##label##" placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" />
- <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled /><a href="#" class="remove btn btn-attention"><?= _i('close') ?></a></div>
+ data-simple='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"><div class="stick">
+ <input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="##label##" placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" />
+ <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled />
+ <a href="#" class="remove btn btn-attention"><?= _i('close') ?></a></div>
<input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /></div></div>'
data-advanced='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls">
<input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" />
@@ -33,11 +35,14 @@
<input type='hidden' id='share_<?= $key ?>_method' name="share[<?= $key ?>][method]" value='<?= $share->method() ?>' />
<input type='hidden' id='share_<?= $key ?>_field' name="share[<?= $key ?>][field]" value='<?= $share->field() ?>' />
<div class="stick">
- <input type="text" id="share_<?= $key ?>_name" name="share[<?= $key ?>][name]" class="extend" value="<?= $share->name() ?>" placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" data-leave-validation="<?= $share->name() ?>"/>
+ <input type="text" id="share_<?= $key ?>_name" name="share[<?= $key ?>][name]" class="extend" value="<?= $share->name() ?>"
+ placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" data-leave-validation="<?= $share->name() ?>"/>
<?php if ($share->formType() === 'advanced') { ?>
- <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="extend" value="<?= $share->baseUrl() ?>" placeholder="<?= _t('conf.sharing.share_url') ?>" size="64" data-leave-validation="<?= $share->baseUrl() ?>"/>
+ <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="extend" value="<?= $share->baseUrl() ?>"
+ placeholder="<?= _t('conf.sharing.share_url') ?>" size="64" data-leave-validation="<?= $share->baseUrl() ?>"/>
<?php } else { ?>
- <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="extend" value="<?= $share->baseUrl() ?>" placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled/>
+ <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="extend" value="<?= $share->baseUrl() ?>"
+ placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled="disabled" />
<?php } ?>
<a href='#' class='remove btn btn-attention' title="<?= _t('conf.sharing.remove') ?>"><?= _i('close') ?></a>
</div>
@@ -52,7 +57,8 @@
<div class="group-controls">
<select>
<?php foreach (FreshRSS_Share::enum() as $share) { ?>
- <option value='<?= $share->type() ?>' data-form='<?= $share->formType() ?>' data-help='<?= $share->help() ?>' data-method='<?= $share->method() ?>' data-field='<?= $share->field() ?>'>
+ <option value='<?= $share->type() ?>' data-form='<?= $share->formType() ?>' data-help='<?= $share->help() ?>'
+ data-method='<?= $share->method() ?>' data-field='<?= $share->field() ?>'>
<?= $share->name(true) ?>
</option>
<?php } ?>
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml
index 68fbc5bf2..199bd5ab6 100644
--- a/app/views/configure/reading.phtml
+++ b/app/views/configure/reading.phtml
@@ -10,7 +10,9 @@
<div class="form-group">
<label class="group-name" for="posts_per_page"><?= _t('conf.reading.articles_per_page') ?></label>
<div class="group-controls">
- <input type="number" id="posts_per_page" name="posts_per_page" value="<?= FreshRSS_Context::$user_conf->posts_per_page ?>" min="5" max="500" data-leave-validation="<?= FreshRSS_Context::$user_conf->posts_per_page ?>"/>
+ <input type="number" id="posts_per_page" name="posts_per_page" value="<?=
+ FreshRSS_Context::$user_conf->posts_per_page ?>" min="5" max="500"
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->posts_per_page ?>"/>
<p class="help"><?= _i('help') ?> <?= _t('conf.reading.number_divided_when_reader') ?></p>
</div>
</div>
@@ -51,10 +53,14 @@
<label class="group-name" for="default_view"><?= _t('conf.reading.display_categories_unfolded') ?></label>
<div class="group-controls">
<select name="display_categories" id="display_categories" data-leave-validation="<?= FreshRSS_Context::$user_conf->display_categories ?>">
- <option value="active"<?= FreshRSS_Context::$user_conf->display_categories === 'active' ? ' selected="selected"' : '' ?>><?= _t('conf.reading.show.active_category') ?></option>
- <option value="remember"<?= FreshRSS_Context::$user_conf->display_categories === 'remember' ? ' selected="selected"' : '' ?>><?= _t('conf.reading.show.remember_categories') ?></option>
- <option value="all"<?= FreshRSS_Context::$user_conf->display_categories === 'all' ? ' selected="selected"' : '' ?>><?= _t('conf.reading.show.all_categories') ?></option>
- <option value="none"<?= FreshRSS_Context::$user_conf->display_categories === 'none' ? ' selected="selected"' : '' ?>><?= _t('conf.reading.show.no_category') ?></option>
+ <option value="active"<?= FreshRSS_Context::$user_conf->display_categories === 'active' ? ' selected="selected"' : '' ?>><?=
+ _t('conf.reading.show.active_category') ?></option>
+ <option value="remember"<?= FreshRSS_Context::$user_conf->display_categories === 'remember' ? ' selected="selected"' : '' ?>><?=
+ _t('conf.reading.show.remember_categories') ?></option>
+ <option value="all"<?= FreshRSS_Context::$user_conf->display_categories === 'all' ? ' selected="selected"' : '' ?>><?=
+ _t('conf.reading.show.all_categories') ?></option>
+ <option value="none"<?= FreshRSS_Context::$user_conf->display_categories === 'none' ? ' selected="selected"' : '' ?>><?=
+ _t('conf.reading.show.no_category') ?></option>
</select>
</div>
</div>
@@ -62,7 +68,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="hide_read_feeds">
- <input type="checkbox" name="hide_read_feeds" id="hide_read_feeds" value="1"<?= FreshRSS_Context::$user_conf->hide_read_feeds ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->hide_read_feeds ?>"/>
+ <input type="checkbox" name="hide_read_feeds" id="hide_read_feeds" value="1"<?=
+ FreshRSS_Context::$user_conf->hide_read_feeds ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->hide_read_feeds ?>"/>
<?= _t('conf.reading.hide_read_feeds') ?>
</label>
</div>
@@ -71,7 +79,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="show_fav_unread">
- <input type="checkbox" name="show_fav_unread" id="show_fav_unread" value="1"<?= FreshRSS_Context::$user_conf->show_fav_unread ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->show_fav_unread ?>"/>
+ <input type="checkbox" name="show_fav_unread" id="show_fav_unread" value="1"<?=
+ FreshRSS_Context::$user_conf->show_fav_unread ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->show_fav_unread ?>"/>
<?= _t('conf.reading.always_show_favorites') ?>
<p class="help"><?= _i('help') ?> <?= _t('conf.reading.show_fav_unread_help') ?></p>
</label>
@@ -81,7 +91,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="display_posts">
- <input type="checkbox" name="display_posts" id="display_posts" value="1"<?= FreshRSS_Context::$user_conf->display_posts ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->display_posts ?>"/>
+ <input type="checkbox" name="display_posts" id="display_posts" value="1"<?=
+ FreshRSS_Context::$user_conf->display_posts ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->display_posts ?>"/>
<?= _t('conf.reading.display_articles_unfolded') ?>
<noscript> — <strong><?= _t('gen.js.should_be_activated') ?></strong></noscript>
</label>
@@ -91,7 +103,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="sticky_post">
- <input type="checkbox" name="sticky_post" id="sticky_post" value="1"<?= FreshRSS_Context::$user_conf->sticky_post ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->sticky_post ?>"/>
+ <input type="checkbox" name="sticky_post" id="sticky_post" value="1"<?=
+ FreshRSS_Context::$user_conf->sticky_post ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->sticky_post ?>"/>
<?= _t('conf.reading.sticky_post') ?>
<noscript> — <strong><?= _t('gen.js.should_be_activated') ?></strong></noscript>
</label>
@@ -101,7 +115,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="auto_load_more">
- <input type="checkbox" name="auto_load_more" id="auto_load_more" value="1"<?= FreshRSS_Context::$user_conf->auto_load_more ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->auto_load_more ?>"/>
+ <input type="checkbox" name="auto_load_more" id="auto_load_more" value="1"<?=
+ FreshRSS_Context::$user_conf->auto_load_more ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->auto_load_more ?>"/>
<?= _t('conf.reading.auto_load_more') ?>
<noscript> — <strong><?= _t('gen.js.should_be_activated') ?></strong></noscript>
</label>
@@ -111,7 +127,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="lazyload">
- <input type="checkbox" name="lazyload" id="lazyload" value="1"<?= FreshRSS_Context::$user_conf->lazyload ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->lazyload ?>"/>
+ <input type="checkbox" name="lazyload" id="lazyload" value="1"<?=
+ FreshRSS_Context::$user_conf->lazyload ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->lazyload ?>"/>
<?= _t('conf.reading.img_with_lazyload') ?>
<noscript> — <strong><?= _t('gen.js.should_be_activated') ?></strong></noscript>
</label>
@@ -121,7 +139,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="sides_close_article">
- <input type="checkbox" name="sides_close_article" id="sides_close_article" value="1"<?= FreshRSS_Context::$user_conf->sides_close_article ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->sides_close_article ?>"/>
+ <input type="checkbox" name="sides_close_article" id="sides_close_article" value="1"<?=
+ FreshRSS_Context::$user_conf->sides_close_article ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->sides_close_article ?>"/>
<?= _t('conf.reading.sides_close_article') ?>
<noscript> — <strong><?= _t('gen.js.should_be_activated') ?></strong></noscript>
</label>
@@ -131,7 +151,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="reading_confirm">
- <input type="checkbox" name="reading_confirm" id="reading_confirm" value="1"<?= FreshRSS_Context::$user_conf->reading_confirm ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->reading_confirm ?>"/>
+ <input type="checkbox" name="reading_confirm" id="reading_confirm" value="1"<?=
+ FreshRSS_Context::$user_conf->reading_confirm ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->reading_confirm ?>"/>
<?= _t('conf.reading.confirm_enabled') ?>
<noscript> — <strong><?= _t('gen.js.should_be_activated') ?></strong></noscript>
</label>
@@ -141,7 +163,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="auto_remove_article">
- <input type="checkbox" name="auto_remove_article" id="auto_remove_article" value="1"<?= FreshRSS_Context::$user_conf->auto_remove_article ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->auto_remove_article ?>"/>
+ <input type="checkbox" name="auto_remove_article" id="auto_remove_article" value="1"<?=
+ FreshRSS_Context::$user_conf->auto_remove_article ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->auto_remove_article ?>"/>
<?= _t('conf.reading.auto_remove_article') ?>
<noscript> — <strong><?= _t('gen.js.should_be_activated') ?></strong></noscript>
</label>
@@ -151,7 +175,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="mark_updated_article_unread">
- <input type="checkbox" name="mark_updated_article_unread" id="mark_updated_article_unread" value="1"<?= FreshRSS_Context::$user_conf->mark_updated_article_unread ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_updated_article_unread ?>"/>
+ <input type="checkbox" name="mark_updated_article_unread" id="mark_updated_article_unread" value="1"<?=
+ FreshRSS_Context::$user_conf->mark_updated_article_unread ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_updated_article_unread ?>"/>
<?= _t('conf.reading.mark_updated_article_unread') ?>
</label>
</div>
@@ -161,19 +187,27 @@
<label class="group-name"><?= _t('conf.reading.read.when') ?></label>
<div class="group-controls">
<label class="checkbox" for="check_open_article">
- <input type="checkbox" name="mark_open_article" id="check_open_article" value="1"<?= FreshRSS_Context::$user_conf->mark_when['article'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_when['article'] ?>"/>
+ <input type="checkbox" name="mark_open_article" id="check_open_article" value="1"<?=
+ FreshRSS_Context::$user_conf->mark_when['article'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_when['article'] ?>"/>
<?= _t('conf.reading.read.article_viewed') ?>
</label>
<label class="checkbox" for="check_open_site">
- <input type="checkbox" name="mark_open_site" id="check_open_site" value="1"<?= FreshRSS_Context::$user_conf->mark_when['site'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_when['site'] ?>"/>
+ <input type="checkbox" name="mark_open_site" id="check_open_site" value="1"<?=
+ FreshRSS_Context::$user_conf->mark_when['site'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_when['site'] ?>"/>
<?= _t('conf.reading.read.article_open_on_website') ?>
</label>
<label class="checkbox" for="check_scroll">
- <input type="checkbox" name="mark_scroll" id="check_scroll" value="1"<?= FreshRSS_Context::$user_conf->mark_when['scroll'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_when['scroll'] ?>"/>
+ <input type="checkbox" name="mark_scroll" id="check_scroll" value="1"<?=
+ FreshRSS_Context::$user_conf->mark_when['scroll'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_when['scroll'] ?>"/>
<?= _t('conf.reading.read.scroll') ?>
</label>
<label class="checkbox" for="check_reception">
- <input type="checkbox" name="mark_upon_reception" id="check_reception" value="1"<?= FreshRSS_Context::$user_conf->mark_when['reception'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_when['reception'] ?>"/>
+ <input type="checkbox" name="mark_upon_reception" id="check_reception" value="1"<?=
+ FreshRSS_Context::$user_conf->mark_when['reception'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->mark_when['reception'] ?>"/>
<?= _t('conf.reading.read.upon_reception') ?>
</label>
</div>
@@ -183,7 +217,9 @@
<label class="group-name"><?= _t('conf.reading.after_onread') ?></label>
<div class="group-controls">
<label class="checkbox" for="onread_jump_next">
- <input type="checkbox" name="onread_jump_next" id="onread_jump_next" value="1"<?= FreshRSS_Context::$user_conf->onread_jump_next ? ' checked="checked"' : '' ?> data-leave-validation="<?= FreshRSS_Context::$user_conf->onread_jump_next ?>"/>
+ <input type="checkbox" name="onread_jump_next" id="onread_jump_next" value="1"<?=
+ FreshRSS_Context::$user_conf->onread_jump_next ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= FreshRSS_Context::$user_conf->onread_jump_next ?>"/>
<?= _t('conf.reading.jump_next') ?>
</label>
</div>
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index b24bc9101..2194457ee 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -22,28 +22,32 @@
<div class="form-group">
<label class="group-name" for="normal_view_shortcut"><?= _t('conf.shortcut.normal_view') ?></label>
<div class="group-controls">
- <input type="text" id="normal_view_shortcut" name="shortcuts[normal_view]" list="keys" value="<?= $s['normal_view'] ?>" data-leave-validation="<?= $s['normal_view'] ?>"/>
+ <input type="text" id="normal_view_shortcut" name="shortcuts[normal_view]" list="keys" value="<?= $s['normal_view'] ?>"
+ data-leave-validation="<?= $s['normal_view'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="global_view_shortcut"><?= _t('conf.shortcut.global_view') ?></label>
<div class="group-controls">
- <input type="text" id="global_view_shortcut" name="shortcuts[global_view]" list="keys" value="<?= $s['global_view'] ?>" data-leave-validation="<?= $s['global_view'] ?>"/>
+ <input type="text" id="global_view_shortcut" name="shortcuts[global_view]" list="keys" value="<?= $s['global_view'] ?>"
+ data-leave-validation="<?= $s['global_view'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="reading_view_shortcut"><?= _t('conf.shortcut.reading_view') ?></label>
<div class="group-controls">
- <input type="text" id="reading_view_shortcut" name="shortcuts[reading_view]" list="keys" value="<?= $s['reading_view'] ?>" data-leave-validation="<?= $s['reading_view'] ?>"/>
+ <input type="text" id="reading_view_shortcut" name="shortcuts[reading_view]" list="keys" value="<?= $s['reading_view'] ?>"
+ data-leave-validation="<?= $s['reading_view'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="rss_view_shortcut"><?= _t('conf.shortcut.rss_view') ?></label>
<div class="group-controls">
- <input type="text" id="rss_view_shortcut" name="shortcuts[rss_view]" list="keys" value="<?= $s['rss_view'] ?>" data-leave-validation="<?= $s['rss_view'] ?>"/>
+ <input type="text" id="rss_view_shortcut" name="shortcuts[rss_view]" list="keys" value="<?= $s['rss_view'] ?>"
+ data-leave-validation="<?= $s['rss_view'] ?>"/>
</div>
</div>
@@ -54,28 +58,32 @@
<div class="form-group">
<label class="group-name" for="next_entry"><?= _t('conf.shortcut.next_article') ?></label>
<div class="group-controls">
- <input type="text" id="next_entry" name="shortcuts[next_entry]" list="keys" value="<?= $s['next_entry'] ?>" data-leave-validation="<?= $s['next_entry'] ?>"/>
+ <input type="text" id="next_entry" name="shortcuts[next_entry]" list="keys" value="<?= $s['next_entry'] ?>"
+ data-leave-validation="<?= $s['next_entry'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="prev_entry"><?= _t('conf.shortcut.previous_article') ?></label>
<div class="group-controls">
- <input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?= $s['prev_entry'] ?>" data-leave-validation="<?= $s['prev_entry'] ?>"/>
+ <input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?= $s['prev_entry'] ?>"
+ data-leave-validation="<?= $s['prev_entry'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="first_entry"><?= _t('conf.shortcut.first_article') ?></label>
<div class="group-controls">
- <input type="text" id="first_entry" name="shortcuts[first_entry]" list="keys" value="<?= $s['first_entry'] ?>" data-leave-validation="<?= $s['first_entry'] ?>"/>
+ <input type="text" id="first_entry" name="shortcuts[first_entry]" list="keys" value="<?= $s['first_entry'] ?>"
+ data-leave-validation="<?= $s['first_entry'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="last_entry"><?= _t('conf.shortcut.last_article') ?></label>
<div class="group-controls">
- <input type="text" id="last_entry" name="shortcuts[last_entry]" list="keys" value="<?= $s['last_entry'] ?>" data-leave-validation="<?= $s['last_entry'] ?>"/>
+ <input type="text" id="last_entry" name="shortcuts[last_entry]" list="keys" value="<?= $s['last_entry'] ?>"
+ data-leave-validation="<?= $s['last_entry'] ?>"/>
</div>
</div>
@@ -84,14 +92,16 @@
<div class="form-group">
<label class="group-name" for="skip_next_entry"><?= _t('conf.shortcut.skip_next_article') ?></label>
<div class="group-controls">
- <input type="text" id="skip_next_entry" name="shortcuts[skip_next_entry]" list="keys" value="<?= $s['skip_next_entry'] ?>" data-leave-validation="<?= $s['skip_next_entry'] ?>"/>
+ <input type="text" id="skip_next_entry" name="shortcuts[skip_next_entry]" list="keys" value="<?= $s['skip_next_entry'] ?>"
+ data-leave-validation="<?= $s['skip_next_entry'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="skip_prev_entry"><?= _t('conf.shortcut.skip_previous_article') ?></label>
<div class="group-controls">
- <input type="text" id="skip_prev_entry" name="shortcuts[skip_prev_entry]" list="keys" value="<?= $s['skip_prev_entry'] ?>" data-leave-validation="<?= $s['skip_prev_entry'] ?>"/>
+ <input type="text" id="skip_prev_entry" name="shortcuts[skip_prev_entry]" list="keys" value="<?= $s['skip_prev_entry'] ?>"
+ data-leave-validation="<?= $s['skip_prev_entry'] ?>"/>
</div>
</div>
@@ -101,7 +111,8 @@
<p class="alert alert-warn"><?= _t('conf.shortcut.shift_for_all_read') ?></p>
<label class="group-name" for="mark_read"><?= _t('conf.shortcut.mark_read') ?></label>
<div class="group-controls">
- <input type="text" id="mark_read" name="shortcuts[mark_read]" list="keys" value="<?= $s['mark_read'] ?>" data-leave-validation="<?= $s['mark_read'] ?>"/>
+ <input type="text" id="mark_read" name="shortcuts[mark_read]" list="keys" value="<?= $s['mark_read'] ?>"
+ data-leave-validation="<?= $s['mark_read'] ?>"/>
</div>
</div>
@@ -110,21 +121,24 @@
<div class="form-group">
<label class="group-name" for="mark_favorite"><?= _t('conf.shortcut.mark_favorite') ?></label>
<div class="group-controls">
- <input type="text" id="mark_favorite" name="shortcuts[mark_favorite]" list="keys" value="<?= $s['mark_favorite'] ?>" data-leave-validation="<?= $s['mark_favorite'] ?>"/>
+ <input type="text" id="mark_favorite" name="shortcuts[mark_favorite]" list="keys" value="<?= $s['mark_favorite'] ?>"
+ data-leave-validation="<?= $s['mark_favorite'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="go_website"><?= _t('conf.shortcut.see_on_website') ?></label>
<div class="group-controls">
- <input type="text" id="go_website" name="shortcuts[go_website]" list="keys" value="<?= $s['go_website'] ?>" data-leave-validation="<?= $s['go_website'] ?>"/>
+ <input type="text" id="go_website" name="shortcuts[go_website]" list="keys" value="<?= $s['go_website'] ?>"
+ data-leave-validation="<?= $s['go_website'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="auto_share_shortcut"><?= _t('conf.shortcut.auto_share') ?></label>
<div class="group-controls">
- <input type="text" id="auto_share_shortcut" name="shortcuts[auto_share]" list="keys" value="<?= $s['auto_share'] ?>" data-leave-validation="<?= $s['auto_share'] ?>"/>
+ <input type="text" id="auto_share_shortcut" name="shortcuts[auto_share]" list="keys" value="<?= $s['auto_share'] ?>"
+ data-leave-validation="<?= $s['auto_share'] ?>"/>
<?= _t('conf.shortcut.auto_share_help') ?>
</div>
</div>
@@ -132,14 +146,16 @@
<div class="form-group">
<label class="group-name" for="collapse_entry"><?= _t('conf.shortcut.collapse_article') ?></label>
<div class="group-controls">
- <input type="text" id="collapse_entry" name="shortcuts[collapse_entry]" list="keys" value="<?= $s['collapse_entry'] ?>" data-leave-validation="<?= $s['collapse_entry'] ?>"/>
+ <input type="text" id="collapse_entry" name="shortcuts[collapse_entry]" list="keys" value="<?= $s['collapse_entry'] ?>"
+ data-leave-validation="<?= $s['collapse_entry'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="toggle_media"><?= _t('conf.shortcut.toggle_media') ?></label>
<div class="group-controls">
- <input type="text" id="toggle_media" name="shortcuts[toggle_media]" list="keys" value="<?= $s['toggle_media'] ?>" data-leave-validation="<?= $s['toggle_media'] ?>"/>
+ <input type="text" id="toggle_media" name="shortcuts[toggle_media]" list="keys" value="<?= $s['toggle_media'] ?>"
+ data-leave-validation="<?= $s['toggle_media'] ?>"/>
</div>
</div>
@@ -148,21 +164,24 @@
<div class="form-group">
<label class="group-name" for="load_more_shortcut"><?= _t('conf.shortcut.load_more') ?></label>
<div class="group-controls">
- <input type="text" id="load_more_shortcut" name="shortcuts[load_more]" list="keys" value="<?= $s['load_more'] ?>" data-leave-validation="<?= $s['load_more'] ?>"/>
+ <input type="text" id="load_more_shortcut" name="shortcuts[load_more]" list="keys" value="<?= $s['load_more'] ?>"
+ data-leave-validation="<?= $s['load_more'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="focus_search_shortcut"><?= _t('conf.shortcut.focus_search') ?></label>
<div class="group-controls">
- <input type="text" id="focus_search_shortcut" name="shortcuts[focus_search]" list="keys" value="<?= $s['focus_search'] ?>" data-leave-validation="<?= $s['focus_search'] ?>"/>
+ <input type="text" id="focus_search_shortcut" name="shortcuts[focus_search]" list="keys" value="<?= $s['focus_search'] ?>"
+ data-leave-validation="<?= $s['focus_search'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="user_filter_shortcut"><?= _t('conf.shortcut.user_filter') ?></label>
<div class="group-controls">
- <input type="text" id="user_filter_shortcut" name="shortcuts[user_filter]" list="keys" value="<?= $s['user_filter'] ?>" data-leave-validation="<?= $s['user_filter'] ?>"/>
+ <input type="text" id="user_filter_shortcut" name="shortcuts[user_filter]" list="keys" value="<?= $s['user_filter'] ?>"
+ data-leave-validation="<?= $s['user_filter'] ?>"/>
<?= _t('conf.shortcut.user_filter_help') ?>
</div>
</div>
@@ -170,14 +189,16 @@
<div class="form-group">
<label class="group-name" for="close_dropdown_shortcut"><?= _t('conf.shortcut.close_dropdown') ?></label>
<div class="group-controls">
- <input type="text" id="close_dropdown" name="shortcuts[close_dropdown]" list="keys" value="<?= $s['close_dropdown'] ?>" data-leave-validation="<?= $s['close_dropdown'] ?>"/>
+ <input type="text" id="close_dropdown" name="shortcuts[close_dropdown]" list="keys" value="<?= $s['close_dropdown'] ?>"
+ data-leave-validation="<?= $s['close_dropdown'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="help_shortcut"><?= _t('conf.shortcut.help') ?></label>
<div class="group-controls">
- <input type="text" id="help_shortcut" name="shortcuts[help]" list="keys" value="<?= $s['help'] ?>" data-leave-validation="<?= $s['help'] ?>"/>
+ <input type="text" id="help_shortcut" name="shortcuts[help]" list="keys" value="<?= $s['help'] ?>"
+ data-leave-validation="<?= $s['help'] ?>"/>
</div>
</div>
diff --git a/app/views/configure/system.phtml b/app/views/configure/system.phtml
index 79376bc4e..f185fb1d3 100644
--- a/app/views/configure/system.phtml
+++ b/app/views/configure/system.phtml
@@ -10,21 +10,24 @@
<div class="form-group">
<label class="group-name" for="instance-name"><?= _t('admin.system.instance-name') ?></label>
<div class="group-controls">
- <input type="text" class="extend" id="instance-name" name="instance-name" value="<?= FreshRSS_Context::$system_conf->title ?>" data-leave-validation="<?= FreshRSS_Context::$system_conf->title ?>"/>
+ <input type="text" class="extend" id="instance-name" name="instance-name" value="<?= FreshRSS_Context::$system_conf->title ?>"
+ data-leave-validation="<?= FreshRSS_Context::$system_conf->title ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="auto-update-url"><?= _t('admin.system.auto-update-url') ?></label>
<div class="group-controls">
- <input type="text" class="extend" id="auto-update-url" name="auto-update-url" value="<?= FreshRSS_Context::$system_conf->auto_update_url ?>" data-leave-validation="<?= FreshRSS_Context::$system_conf->auto_update_url ?>"/>
+ <input type="text" class="extend" id="auto-update-url" name="auto-update-url" value="<?= FreshRSS_Context::$system_conf->auto_update_url ?>"
+ data-leave-validation="<?= FreshRSS_Context::$system_conf->auto_update_url ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="max-registrations"><?= _t('admin.system.registration.number') ?></label>
<div class="group-controls">
- <input type="number" id="max-registrations" name="max-registrations" value="<?= FreshRSS_Context::$system_conf->limits['max_registrations'] ?>" min="0" data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_registrations'] ?>"/>
+ <input type="number" id="max-registrations" name="max-registrations" value="<?= FreshRSS_Context::$system_conf->limits['max_registrations'] ?>" min="0"
+ data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_registrations'] ?>"/>
<p class="help"><?= _i('help') ?> <?= _t('admin.system.registration.help') ?></p>
</div>
</div>
@@ -57,21 +60,24 @@
<div class="form-group">
<label class="group-name" for="max-feeds"><?= _t('admin.system.max-feeds') ?></label>
<div class="group-controls">
- <input type="number" id="max-feeds" name="max-feeds" value="<?= FreshRSS_Context::$system_conf->limits['max_feeds'] ?>" min="1" data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_feeds'] ?>"/>
+ <input type="number" id="max-feeds" name="max-feeds" value="<?= FreshRSS_Context::$system_conf->limits['max_feeds'] ?>" min="1"
+ data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_feeds'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="max-categories"><?= _t('admin.system.max-categories') ?></label>
<div class="group-controls">
- <input type="number" id="max-categories" name="max-categories" value="<?= FreshRSS_Context::$system_conf->limits['max_categories'] ?>" min="1" data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_categories'] ?>"/>
+ <input type="number" id="max-categories" name="max-categories" value="<?= FreshRSS_Context::$system_conf->limits['max_categories'] ?>" min="1"
+ data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['max_categories'] ?>"/>
</div>
</div>
<div class="form-group">
<label class="group-name" for="cookie-duration"><?= _t('admin.system.cookie-duration.number') ?></label>
<div class="group-controls">
- <input type="number" id="cookie-duration" name="cookie-duration" value="<?= FreshRSS_Context::$system_conf->limits['cookie_duration'] ?>" min="0" data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['cookie_duration'] ?>"/>
+ <input type="number" id="cookie-duration" name="cookie-duration" value="<?= FreshRSS_Context::$system_conf->limits['cookie_duration'] ?>" min="0"
+ data-leave-validation="<?= FreshRSS_Context::$system_conf->limits['cookie_duration'] ?>"/>
<p class="help"><?= _i('help') ?> <?= _t('admin.system.cookie-duration.help') ?></p>
</div>
</div>
diff --git a/app/views/extension/index.phtml b/app/views/extension/index.phtml
index f5c5bf032..bb163c8ee 100644
--- a/app/views/extension/index.phtml
+++ b/app/views/extension/index.phtml
@@ -55,7 +55,7 @@
<span class="alert alert-success">
<?= _t('admin.extensions.latest') ?>
</span>
- <?php } else if ($this->extensions_installed[$ext['name']] != $ext['version']) { ?>
+ <?php } elseif ($this->extensions_installed[$ext['name']] != $ext['version']) { ?>
<span class="alert alert-warn">
<?= _t('admin.extensions.update') ?>
</span>
diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml
index 350a57287..022d5e8e3 100644
--- a/app/views/helpers/category/update.phtml
+++ b/app/views/helpers/category/update.phtml
@@ -87,7 +87,8 @@
<label class="group-name"><?= _t('conf.archiving.policy') ?></label>
<div class="group-controls">
<label class="checkbox">
- <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
+ <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
<?= _t('gen.short.by_default') ?>
</label>
</div>
@@ -95,18 +96,22 @@
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="enable_keep_max">
- <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?> data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
+ <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
+ data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
<?= _t('conf.archiving.keep_max') ?>
- <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>" data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
+ <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
+ data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
</label>
</div>
</div>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="enable_keep_period">
- <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_period') ?>
- <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>" data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
+ <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
+ data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
<select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
<option></option>
<option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
@@ -122,7 +127,8 @@
<label class="group-name"><?= _t('conf.archiving.exception') ?></label>
<div class="group-controls">
<label class="checkbox" for="keep_favourites">
- <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_favourites') ?>
</label>
</div>
@@ -130,7 +136,8 @@
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="keep_labels">
- <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_labels') ?>
</label>
</div>
@@ -138,7 +145,8 @@
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="keep_unreads">
- <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $archiving['keep_unreads'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_unreads'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_unreads') ?>
</label>
</div>
@@ -146,7 +154,8 @@
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label for="keep_min"><?= _t('sub.feed.keep_min') ?>
- <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>" data-leave-validation="<?= $archiving['keep_min'] ?>">
+ <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
+ data-leave-validation="<?= $archiving['keep_min'] ?>">
</label>
</div>
</div>
diff --git a/app/views/helpers/configure/query.phtml b/app/views/helpers/configure/query.phtml
index 9c6e1da3d..7298a0a9a 100644
--- a/app/views/helpers/configure/query.phtml
+++ b/app/views/helpers/configure/query.phtml
@@ -26,19 +26,23 @@
<label class="group-name" for=""><?= _t('conf.query.filter.state') ?></label>
<div class="group-controls">
<label class="checkbox" for="show_read">
- <input type="checkbox" name="query[state][]" id="show_read" value="<?= FreshRSS_Entry::STATE_READ ?>" <?= FreshRSS_Entry::STATE_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
+ <input type="checkbox" name="query[state][]" id="show_read"
+ value="<?= FreshRSS_Entry::STATE_READ ?>" <?= FreshRSS_Entry::STATE_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.read') ?>
</label>
<label class="checkbox" for="show_not_read">
- <input type="checkbox" name="query[state][]" id="show_not_read" value="<?= FreshRSS_Entry::STATE_NOT_READ ?>" <?= FreshRSS_Entry::STATE_NOT_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
+ <input type="checkbox" name="query[state][]" id="show_not_read"
+ value="<?= FreshRSS_Entry::STATE_NOT_READ ?>" <?= FreshRSS_Entry::STATE_NOT_READ & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.unread') ?>
</label>
<label class="checkbox" for="show_favorite">
- <input type="checkbox" name="query[state][]" id="show_favorite" value="<?= FreshRSS_Entry::STATE_FAVORITE ?>" <?= FreshRSS_Entry::STATE_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
+ <input type="checkbox" name="query[state][]" id="show_favorite"
+ value="<?= FreshRSS_Entry::STATE_FAVORITE ?>" <?= FreshRSS_Entry::STATE_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.starred') ?>
</label>
<label class="checkbox" for="show_not_favorite">
- <input type="checkbox" name="query[state][]" id="show_not_favorite" value="<?= FreshRSS_Entry::STATE_NOT_FAVORITE ?>" <?= FreshRSS_Entry::STATE_NOT_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
+ <input type="checkbox" name="query[state][]" id="show_not_favorite"
+ value="<?= FreshRSS_Entry::STATE_NOT_FAVORITE ?>" <?= FreshRSS_Entry::STATE_NOT_FAVORITE & $this->query->getState() ? 'checked="checked"' : ''?> />
<?= _t('index.menu.non-starred') ?>
</label>
</div>
diff --git a/app/views/helpers/extension/configure.phtml b/app/views/helpers/extension/configure.phtml
index cb6ebd6bb..4a6dfe357 100644
--- a/app/views/helpers/extension/configure.phtml
+++ b/app/views/helpers/extension/configure.phtml
@@ -1,8 +1,7 @@
<div class="post">
<h1>
<?= $this->extension->getName() ?> (<?= $this->extension->getVersion() ?>) —
- <?php echo $this->extension->isEnabled() ? _t('admin.extensions.enabled')
- : _t('admin.extensions.disabled'); ?>
+ <?= $this->extension->isEnabled() ? _t('admin.extensions.enabled') : _t('admin.extensions.disabled') ?>
</h1>
<p class="alert alert-warn"><?= $this->extension->getDescription() ?> — <?= _t('gen.short.by_author'), ' ', $this->extension->getAuthor() ?></p>
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml
index 361f94ab8..06dc859e1 100644
--- a/app/views/helpers/feed/update.phtml
+++ b/app/views/helpers/feed/update.phtml
@@ -23,7 +23,7 @@
<div class="form-group">
<label class="group-name" for="name"><?= _t('sub.feed.title') ?></label>
<div class="group-controls">
- <input type="text" name="name" id="name" class="extend" value="<?= $this->feed->name() ?>" />
+ <input type="text" name="name" id="name" class="extend" value="<?= $this->feed->name() ?>" />
</div>
</div>
<div class="form-group">
@@ -49,7 +49,8 @@
<a class="btn" target="_blank" rel="noreferrer" href="<?= $this->feed->url() ?>"><?= _i('link') ?></a>
</div>
- <a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?= rawurlencode(htmlspecialchars_decode($this->feed->url(), ENT_QUOTES)) ?>"><?= _t('sub.feed.validator') ?></a>
+ <a class="btn" target="_blank" rel="noreferrer" href="https://validator.w3.org/feed/check.cgi?url=<?=
+ rawurlencode(htmlspecialchars_decode($this->feed->url(), ENT_QUOTES)) ?>"><?= _t('sub.feed.validator') ?></a>
</div>
</div>
<div class="form-group">
@@ -57,7 +58,7 @@
<div class="group-controls">
<select name="category" id="category">
<?php foreach ($this->categories as $cat) { ?>
- <option value="<?= $cat->id() ?>"<?= $cat->id()== $this->feed->category() ? ' selected="selected"' : '' ?>>
+ <option value="<?= $cat->id() ?>"<?= $cat->id() == $this->feed->category() ? ' selected="selected"' : '' ?>>
<?= $cat->name() ?>
</option>
<?php } ?>
@@ -68,9 +69,12 @@
<label class="group-name" for="priority"><?= _t('sub.feed.priority') ?></label>
<div class="group-controls">
<select name="priority" id="priority">
- <option value='<?= FreshRSS_Feed::PRIORITY_MAIN_STREAM ?>' <?php if (FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.main_stream') ?></option>
- <option value='<?= FreshRSS_Feed::PRIORITY_NORMAL ?>' <?php if (FreshRSS_Feed::PRIORITY_NORMAL === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.normal') ?></option>
- <option value='<?= FreshRSS_Feed::PRIORITY_ARCHIVED ?>' <?php if (FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.archived') ?></option>
+ <option value='<?= FreshRSS_Feed::PRIORITY_MAIN_STREAM ?>' <?php
+ if (FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.main_stream') ?></option>
+ <option value='<?= FreshRSS_Feed::PRIORITY_NORMAL ?>' <?php
+ if (FreshRSS_Feed::PRIORITY_NORMAL === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.normal') ?></option>
+ <option value='<?= FreshRSS_Feed::PRIORITY_ARCHIVED ?>' <?php
+ if (FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority()) {echo 'selected="selected"';}?>><?= _t('sub.feed.priority.archived') ?></option>
</select>
</div>
</div>
@@ -80,9 +84,9 @@
<button class="btn btn-important"><?= _t('gen.action.submit') ?></button>
<button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
<button class="btn btn-attention confirm"
- data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
- formaction="<?= _url('feed', 'delete', 'id', $this->feed->id()) ?>"
- formmethod="post"><?= _t('gen.action.remove') ?></button>
+ data-str-confirm="<?= _t('gen.js.confirm_action_feed_cat') ?>"
+ formaction="<?= _url('feed', 'delete', 'id', $this->feed->id()) ?>"
+ formmethod="post"><?= _t('gen.action.remove') ?></button>
</div>
</div>
@@ -143,7 +147,8 @@
<label class="group-name"><?= _t('conf.archiving.policy') ?></label>
<div class="group-controls">
<label class="checkbox">
- <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
+ <input type="checkbox" name="use_default_purge_options" id="use_default_purge_options" value="1"<?= $archiving['default'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['default'] ? 1 : 0 ?>" />
<?= _t('gen.short.by_default') ?>
</label>
</div>
@@ -151,18 +156,22 @@
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="enable_keep_max">
- <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?> data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
+ <input type="checkbox" name="enable_keep_max" id="enable_keep_max" value="1"<?= empty($archiving['keep_max']) ? '' : ' checked="checked"' ?>
+ data-leave-validation="<?= empty($archiving['keep_max']) ? 0 : 1 ?>"/>
<?= _t('conf.archiving.keep_max') ?>
- <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>" data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
+ <input type="number" id="keep_max" name="keep_max" min="0" value="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"
+ data-leave-validation="<?= empty($archiving['keep_max']) ? 200 : $archiving['keep_max'] ?>"/>
</label>
</div>
</div>
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="enable_keep_period">
- <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="enable_keep_period" id="enable_keep_period" value="1"<?= $volatile['enable_keep_period'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $volatile['enable_keep_period'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_period') ?>
- <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>" data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
+ <input type="number" id="keep_period_count" name="keep_period_count" min="0" value="<?= $volatile['keep_period_count'] ?>"
+ data-leave-validation="<?= $volatile['keep_period_count'] ?>"/>
<select class="number" name="keep_period_unit" id="keep_period_unit" data-leave-validation="<?= $volatile['keep_period_unit'] ?>">
<option></option>
<option value="P1Y" <?= 'P1Y' === $volatile['keep_period_unit'] ? 'selected="selected"' : '' ?>><?= _t('gen.period.years') ?></option>
@@ -178,7 +187,8 @@
<label class="group-name"><?= _t('conf.archiving.exception') ?></label>
<div class="group-controls">
<label class="checkbox" for="keep_favourites">
- <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="keep_favourites" id="keep_favourites" value="1"<?= $archiving['keep_favourites'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_favourites'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_favourites') ?>
</label>
</div>
@@ -186,7 +196,8 @@
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="keep_labels">
- <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
+ <input type="checkbox" name="keep_labels" id="keep_labels" value="1"<?= $archiving['keep_labels'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_labels'] ? 1 : 0 ?>"/>
<?= _t('conf.archiving.keep_labels') ?>
</label>
</div>
@@ -194,7 +205,8 @@
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label class="checkbox" for="keep_unreads">
- <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?> data-leave-validation="<?= $archiving['keep_unreads'] ?>"/>
+ <input type="checkbox" name="keep_unreads" id="keep_unreads" value="1"<?= $archiving['keep_unreads'] ? ' checked="checked"' : '' ?>
+ data-leave-validation="<?= $archiving['keep_unreads'] ?>"/>
<?= _t('conf.archiving.keep_unreads') ?>
</label>
</div>
@@ -202,7 +214,8 @@
<div class="form-group archiving"<?= $archiving['default'] ? ' hidden="hidden"' : '' ?>>
<div class="group-controls">
<label for="keep_min"><?= _t('sub.feed.keep_min') ?>
- <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>" data-leave-validation="<?= $archiving['keep_min'] ?>">
+ <input type="number" id="keep_min" name="keep_min" min="0" value="<?= $archiving['keep_min'] ?>"
+ data-leave-validation="<?= $archiving['keep_min'] ?>">
</label>
</div>
</div>
@@ -213,10 +226,10 @@
<select class="number" name="ttl" id="ttl" required="required"><?php
$found = false;
foreach (array(FreshRSS_Feed::TTL_DEFAULT => _t('gen.short.by_default'), 900 => '15min', 1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
- 3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
- 36000 => '10h', 43200 => '12h', 64800 => '18h',
- 86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
- 604800 => '1wk', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo') as $v => $t) {
+ 3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
+ 36000 => '10h', 43200 => '12h', 64800 => '18h',
+ 86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
+ 604800 => '1wk', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo') as $v => $t) {
echo '<option value="' . $v . ($this->feed->ttl() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
if ($this->feed->ttl() == $v) {
$found = true;
@@ -257,13 +270,15 @@
<div class="form-group">
<label class="group-name" for="http_user_feed<?= $this->feed->id() ?>"><?= _t('sub.feed.auth.username') ?></label>
<div class="group-controls">
- <input type="text" name="http_user_feed<?= $this->feed->id() ?>" id="http_user_feed<?= $this->feed->id() ?>" class="extend" value="<?= empty($auth['username']) ? ' ' : $auth['username'] ?>" autocomplete="off" />
+ <input type="text" name="http_user_feed<?= $this->feed->id() ?>" id="http_user_feed<?= $this->feed->id() ?>" class="extend" value="<?=
+ empty($auth['username']) ? ' ' : $auth['username'] ?>" autocomplete="off" />
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.auth.help') ?></p>
</div>
<label class="group-name" for="http_pass_feed<?= $this->feed->id() ?>"><?= _t('sub.feed.auth.password') ?></label>
<div class="group-controls">
- <input type="password" name="http_pass_feed<?= $this->feed->id() ?>" id="http_pass_feed<?= $this->feed->id() ?>" class="extend" value="<?= $auth['password'] ?>" autocomplete="new-password" />
+ <input type="password" name="http_pass_feed<?= $this->feed->id() ?>" id="http_pass_feed<?= $this->feed->id() ?>" class="extend" value="<?=
+ $auth['password'] ?>" autocomplete="new-password" />
</div>
</div>
@@ -279,8 +294,10 @@
<label class="group-name" for="path_entries"><?= _t('sub.feed.css_path') ?></label>
<div class="group-controls">
<div class="stick">
- <input type="text" name="path_entries" id="path_entries" class="extend" value="<?= $this->feed->pathEntries() ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
- <a id="popup-preview-selector" class="btn" href="<?= _url('feed', 'contentSelectorPreview', 'id', $this->feed->id(), 'selector', 'selector-token') ?>"><?= _i('look') ?></a>
+ <input type="text" name="path_entries" id="path_entries" class="extend" value="<?= $this->feed->pathEntries() ?>"
+ placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
+ <a id="popup-preview-selector" class="btn" href="<?=
+ _url('feed', 'contentSelectorPreview', 'id', $this->feed->id(), 'selector', 'selector-token') ?>"><?= _i('look') ?></a>
</div>
<p class="help"><?= _i('help') ?> <?= _t('sub.feed.css_help') ?></p>
</div>
@@ -290,8 +307,8 @@
<label class="group-name" for="path_entries"><?= _t('sub.feed.css_cookie') ?></label>
<div class="group-controls">
<div class="stick">
- <input type="text" name="curl_params_cookie" id="curl_params_cookie" class="extend" value="<?=
- is_array($this->feed->attributes('curl_params')) && !empty($this->feed->attributes('curl_params')[CURLOPT_COOKIE]) ?
+ <input type="text" name="curl_params_cookie" id="curl_params_cookie" class="extend" value="<?=
+ is_array($this->feed->attributes('curl_params')) && !empty($this->feed->attributes('curl_params')[CURLOPT_COOKIE]) ?
$this->feed->attributes('curl_params')[CURLOPT_COOKIE] : ''
?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
</div>
@@ -325,7 +342,7 @@
</select>
<div class="stick">
<input type="text" name="curl_params" id="curl_params" class="extend" value="<?=
- is_array($this->feed->attributes('curl_params')) && !empty($this->feed->attributes('curl_params')[CURLOPT_PROXY]) ?
+ is_array($this->feed->attributes('curl_params')) && !empty($this->feed->attributes('curl_params')[CURLOPT_PROXY]) ?
$this->feed->attributes('curl_params')[CURLOPT_PROXY] : ''
?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>" />
</div>
diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml
index 863062dd3..7ab2ff70b 100644
--- a/app/views/helpers/index/normal/entry_header.phtml
+++ b/app/views/helpers/index/normal/entry_header.phtml
@@ -45,5 +45,6 @@
endif;
?></a></li>
<?php if ($topline_date) { ?><li class="item date"><time datetime="<?= $this->entry->machineReadableDate() ?>"><?= $this->entry->date() ?></time>&nbsp;</li><?php } ?>
- <?php if ($topline_link) { ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" title="<?= _t('conf.shortcut.see_on_website') ?>"><?= _i('link') ?></a></li><?php } ?>
+ <?php if ($topline_link) { ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>" title="<?=
+ _t('conf.shortcut.see_on_website') ?>"><?= _i('link') ?></a></li><?php } ?>
</ul>
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml
index b7d62ceab..0022ba299 100755
--- a/app/views/helpers/pagination.phtml
+++ b/app/views/helpers/pagination.phtml
@@ -27,10 +27,10 @@
</a>
<?php } elseif ($url_mark_read) { ?>
<button id="bigMarkAsRead"
- class="as-link <?= FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : '' ?>"
- form="mark-read-pagination"
- formaction="<?= Minz_Url::display($url_mark_read) ?>"
- type="submit">
+ class="as-link <?= FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : '' ?>"
+ form="mark-read-pagination"
+ formaction="<?= Minz_Url::display($url_mark_read) ?>"
+ type="submit">
<?= _t('gen.pagination.nothing_to_load') ?><br />
<span class="bigTick">✓</span><br />
<?= _t('gen.pagination.mark_all_read') ?>
diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml
index af16a0bfa..e286d0946 100644
--- a/app/views/index/global.phtml
+++ b/app/views/index/global.phtml
@@ -27,7 +27,8 @@
if (!empty($feeds)) {
?>
<div class="box category" data-unread="<?= $cat->nbNotRead() ?>">
- <div class="box-title"><a class="title" data-unread="<?= format_number($cat->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $cat->name() ?></a></div>
+ <div class="box-title"><a class="title" data-unread="<?= format_number($cat->nbNotRead()) ?>"
+ href="<?= Minz_Url::display($url_base) ?>"><?= $cat->name() ?></a></div>
<ul class="box-content">
<?php
@@ -37,7 +38,8 @@
$empty = $feed->nbEntries() === 0 ? ' empty' : '';
$url_base['params']['get'] = 'f_' . $feed->id();
?>
- <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>">
+ <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>"
+ data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>">
<?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?>
<a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $feed->name() ?></a>
</li>
diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml
index 2deb1c315..3bbf233ac 100644
--- a/app/views/index/logs.phtml
+++ b/app/views/index/logs.phtml
@@ -15,10 +15,12 @@
<?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
<?php foreach ($items as $log) { ?>
- <div class="log <?= $log->level() ?>"><span class="date"><?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?></span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div>
+ <div class="log <?= $log->level() ?>"><span class="date">
+ <?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?>
+ </span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div>
<?php } ?>
- <?php $this->logsPaginator->render('logs_pagination.phtml','page'); ?>
+ <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
</div>
<?php } else { ?>
<p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index aee7246d0..ba941066e 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -61,10 +61,10 @@ $today = @strtotime('today');
?></div><?php
$display_others = false;
}
- ?><div class="flux<?php echo !$this->entry->isRead() ? ' not_read' : '';
- ?><?php echo $this->entry->isFavorite() ? ' favorite' : '';
- ?>" id="flux_<?php echo $this->entry->id();
- ?>" data-feed="<?php echo $this->feed->id();
+ ?><div class="flux<?= !$this->entry->isRead() ? ' not_read' : ''
+ ?><?= $this->entry->isFavorite() ? ' favorite' : ''
+ ?>" id="flux_<?= $this->entry->id()
+ ?>" data-feed="<?= $this->feed->id()
?>"><?php
$this->renderHelper('index/normal/entry_header');
@@ -74,7 +74,9 @@ $today = @strtotime('today');
<h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $this->entry->link() ?>"><?= $this->entry->title() ?></a></h1>
<div class="subtitle">
<div class="website"><a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>">
- <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?>
+ <?php if (FreshRSS_Context::$user_conf->show_favicons): ?>
+ <img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" loading="lazy" />
+ <?php endif; ?>
<span><?= $this->feed->name() ?></span></a>
</div>
<div class="date"><?= $this->entry->date() ?></div>
@@ -88,7 +90,9 @@ $today = @strtotime('today');
echo $first ? _t('gen.short.by_author') . ' ' : '· ';
$first = false;
?>
- <em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(['search' => 'author:"' . htmlspecialchars_decode($author, ENT_QUOTES) . '"'])) ?>"><?= $author ?></a></em>
+ <em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(
+ ['search' => 'author:"' . htmlspecialchars_decode($author, ENT_QUOTES) . '"'])
+ ) ?>"><?= $author ?></a></em>
<?php endforeach; ?>
</div><?php endif; ?>
</div>
diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml
index f2f76f8b6..9febbb52f 100644
--- a/app/views/index/reader.phtml
+++ b/app/views/index/reader.phtml
@@ -44,7 +44,9 @@ $content_width = FreshRSS_Context::$user_conf->content_width;
<?= _i($item->isFavorite() ? 'starred' : 'non-starred') ?>
</a>
<a class="website" href="<?= _url('index', 'reader', 'get', 'f_' . $feed->id()) ?>">
- <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?>
+ <?php if (FreshRSS_Context::$user_conf->show_favicons): ?>
+ <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" />
+ <?php endif; ?>
<span><?= $feed->name() ?></span>
</a>
<h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $item->link() ?>"><?= $item->title() ?></a></h1>
@@ -57,7 +59,9 @@ $content_width = FreshRSS_Context::$user_conf->content_width;
echo $first ? _t('gen.short.by_author') . ' ' : '· ';
$first = false;
?>
-<em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(['search' => 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))])) ?>"><?= $author ?></a></em>
+<em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(
+ ['search' => 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))])
+ ) ?>"><?= $author ?></a></em>
<?php
endforeach;
echo ' — ';
diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml
index 9421893fb..7834d23c7 100644
--- a/app/views/stats/idle.phtml
+++ b/app/views/stats/idle.phtml
@@ -26,11 +26,13 @@
<div class="stick">
<a class="btn" href="<?= _url('index', 'index', 'get', 'f_' . $feed['id']) ?>"><?= _i('link') ?> <?= _t('gen.action.filter') ?></a>
<a class="btn" href="<?= _url('subscription', 'index', 'id', $feed['id']) ?>"><?= _i('configure') ?> <?= _t('gen.action.manage') ?></a>
- <button class="btn btn-attention confirm" form="form-delete" formaction="<?= _url('feed', 'delete', 'id', $feed['id'], 'r', $current_url) ?>"><?= _t('gen.action.remove') ?></button>
+ <button class="btn btn-attention confirm" form="form-delete"
+ formaction="<?= _url('feed', 'delete', 'id', $feed['id'], 'r', $current_url) ?>"><?= _t('gen.action.remove') ?></button>
</div>
</li>
<li class="item">
- <span title="<?= timestamptodate($feed['last_date'], false) ?>"><?= $feed['name'] ?> (<?= _t('admin.stats.number_entries', $feed['nb_articles']) ?>)</span>
+ <span title="<?= timestamptodate($feed['last_date'], false) ?>"><?= $feed['name'] ?>
+ (<?= _t('admin.stats.number_entries', $feed['nb_articles']) ?>)</span>
</li>
</ul>
<?php } ?>
diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml
index 7b445a7cc..4ec843a10 100644
--- a/app/views/stats/repartition.phtml
+++ b/app/views/stats/repartition.phtml
@@ -13,9 +13,11 @@
echo '<optgroup label="', $category->name(), '">';
foreach ($feeds as $feed) {
if ($this->feed && $feed->id() == $this->feed->id()) {
- echo '<option value="', $feed->id(), '" selected="selected" data-url="', _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>';
+ echo '<option value="', $feed->id(), '" selected="selected" data-url="',
+ _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>';
} else {
- echo '<option value="', $feed->id(), '" data-url="', _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>';
+ echo '<option value="', $feed->id(), '" data-url="',
+ _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>';
}
}
echo '</optgroup>';
diff --git a/app/views/subscription/bookmarklet.phtml b/app/views/subscription/bookmarklet.phtml
index e6f311f58..6941a02e9 100644
--- a/app/views/subscription/bookmarklet.phtml
+++ b/app/views/subscription/bookmarklet.phtml
@@ -4,7 +4,9 @@
<a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
<legend><?= _t('sub.bookmarklet.title') ?></legend>
- <p><a class="btn btn-important" href="javascript:(function(){var%20url%20=%20location.href;var%20otherWindow=window.open('about:blank','_blank');otherWindow.opener=null;otherWindow.location='<?= Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true) ?>&amp;url_rss='+encodeURIComponent(url);})();"><?= _t('sub.bookmarklet.label') ?></a></p>
+ <p><a class="btn btn-important"
+ href="javascript:(function(){var%20url%20=%20location.href;var%20otherWindow=window.open('about:blank','_blank');otherWindow.opener=null;otherWindow.location='<?=
+ Minz_Url::display(array('c' => 'feed', 'a' => 'add'), 'html', true) ?>&amp;url_rss='+encodeURIComponent(url);})();"><?= _t('sub.bookmarklet.label') ?></a></p>
<?= _t('sub.bookmarklet.documentation') ?>
<legend><?= _t('sub.firefox.title') ?></legend>
diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml
index 131a1db91..7b36a02c1 100644
--- a/app/views/subscription/index.phtml
+++ b/app/views/subscription/index.phtml
@@ -42,10 +42,10 @@
$error = $feed->inError() ? ' error' : '';
$empty = $feed->nbEntries() == 0 ? ' empty' : '';
?>
- <li class="item feed<?= $error, $empty, $feed->mute() ? ' mute': '' ?>"
- draggable="true"
- data-feed-id="<?= $feed->id() ?>"
- dropzone="move">
+ <li class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>"
+ draggable="true"
+ data-feed-id="<?= $feed->id() ?>"
+ dropzone="move">
<a class="configure open-slider" href="<?= _url('subscription', 'feed', 'id', $feed->id()) ?>"><?= _i('configure') ?></a>
<?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?>
<?= $feed->name() ?>
diff --git a/app/views/user/details.phtml b/app/views/user/details.phtml
index b93cd4d72..582910285 100644
--- a/app/views/user/details.phtml
+++ b/app/views/user/details.phtml
@@ -5,82 +5,83 @@
<?php $enabled = $this->details['enabled']; ?>
<div class="post">
- <a href="<?= _url('user', 'manage'); ?>"><?= _t('admin.user.back_to_manage'); ?></a>
+ <a href="<?= _url('user', 'manage'); ?>"><?= _t('admin.user.back_to_manage'); ?></a>
- <legend><?= $this->username ?><?php if ($isAdmin) echo ' ― ', _t('admin.user.admin'); ?></legend>
- <form method="post" action="<?= _url('user', 'manage', 'username', $this->username); ?>">
- <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken(); ?>" />
+ <legend><?= $this->username ?><?php if ($isAdmin) echo ' ― ', _t('admin.user.admin'); ?></legend>
+ <form method="post" action="<?= _url('user', 'manage', 'username', $this->username); ?>">
+ <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken(); ?>" />
- <div class="form-group">
- <label class="group-name"><?= _t('admin.user.email') ?></label>
- <div class="group-controls">
- <?= $this->details['mail_login'] ?>
- </div>
- </div>
+ <div class="form-group">
+ <label class="group-name"><?= _t('admin.user.email') ?></label>
+ <div class="group-controls">
+ <?= $this->details['mail_login'] ?>
+ </div>
+ </div>
- <div class="form-group">
- <label class="group-name"><?= _t('admin.user.language') ?></label>
- <div class="group-controls">
- <?= _t("gen.lang.{$this->details['language']}") ?>
- </div>
- </div>
+ <div class="form-group">
+ <label class="group-name"><?= _t('admin.user.language') ?></label>
+ <div class="group-controls">
+ <?= _t("gen.lang.{$this->details['language']}") ?>
+ </div>
+ </div>
- <div class="form-group">
- <label class="group-name"><?= _t('admin.user.feed_count') ?></label>
- <div class="group-controls">
- <?= format_number($this->details['feed_count']) ?>
- </div>
- </div>
+ <div class="form-group">
+ <label class="group-name"><?= _t('admin.user.feed_count') ?></label>
+ <div class="group-controls">
+ <?= format_number($this->details['feed_count']) ?>
+ </div>
+ </div>
- <div class="form-group">
- <label class="group-name"><?= _t('admin.user.article_count') ?></label>
- <div class="group-controls">
- <?= format_number($this->details['article_count']) ?>
- </div>
- </div>
+ <div class="form-group">
+ <label class="group-name"><?= _t('admin.user.article_count') ?></label>
+ <div class="group-controls">
+ <?= format_number($this->details['article_count']) ?>
+ </div>
+ </div>
- <div class="form-group">
- <label class="group-name"><?= _t('admin.user.database_size') ?></label>
- <div class="group-controls">
- <?= format_bytes($this->details['database_size']) ?>
- </div>
- </div>
+ <div class="form-group">
+ <label class="group-name"><?= _t('admin.user.database_size') ?></label>
+ <div class="group-controls">
+ <?= format_bytes($this->details['database_size']) ?>
+ </div>
+ </div>
- <div class="form-group">
- <label class="group-name"><?= _t('admin.user.last_user_activity') ?></label>
- <div class="group-controls">
- <?= $this->details['last_user_activity'] ?>
- </div>
- </div>
+ <div class="form-group">
+ <label class="group-name"><?= _t('admin.user.last_user_activity') ?></label>
+ <div class="group-controls">
+ <?= $this->details['last_user_activity'] ?>
+ </div>
+ </div>
- <div class="form-group">
- <label class="group-name" for="newPasswordPlain"><?= _t('admin.user.password_form') ?></label>
- <div class="group-controls">
- <div class="stick">
- <input type="password" id="newPasswordPlain" name="newPasswordPlain" autocomplete="new-password" pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/>
- <a class="btn toggle-password" data-toggle="password-<?= $this->username; ?>"><?= _i('key') ?></a>
- </div>
- <p class="help"><?= _i('help'); ?> <?= _t('admin.user.password_format') ?></p>
- </div>
- </div>
+ <div class="form-group">
+ <label class="group-name" for="newPasswordPlain"><?= _t('admin.user.password_form') ?></label>
+ <div class="group-controls">
+ <div class="stick">
+ <input type="password" id="newPasswordPlain" name="newPasswordPlain" autocomplete="new-password"
+ pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/>
+ <a class="btn toggle-password" data-toggle="password-<?= $this->username; ?>"><?= _i('key') ?></a>
+ </div>
+ <p class="help"><?= _i('help'); ?> <?= _t('admin.user.password_format') ?></p>
+ </div>
+ </div>
- <div class="form-group form-actions">
- <noscript><b><?= _t('gen.js.should_be_activated'); ?></b></noscript>
- <div class="group-controls">
- <button type="submit" class="btn btn-important" name="action" value="update"><?= _t('gen.action.update') ?></button>
- <button type="submit" class="btn btn-attention confirm" name="action" value="purge"><?= _t('gen.action.purge') ?></button>
- <button type="submit" class="btn btn-attention confirm" name="action" value="delete"><?= _t('gen.action.remove') ?></button>
- <?php if ($isAdmin && !$isDefault): ?>
- <button type="submit" class="btn btn-attention confirm" name="action" value="demote"><?= _t('gen.action.demote') ?></button>
- <?php elseif (!$isAdmin): ?>
- <button type="submit" class="btn btn-attention confirm" name="action" value="promote"><?= _t('gen.action.promote') ?></button>
- <?php endif; ?>
- <?php if ($enabled && !$isDefault): ?>
- <button type="submit" class="btn btn-attention" name="action" value="disable"><?= _t('gen.action.disable') ?></button>
- <?php elseif (!$enabled): ?>
- <button type="submit" class="btn btn-attention" name="action" value="enable"><?= _t('gen.action.enable') ?></button>
- <?php endif; ?>
- <div>
- </div>
- </form>
+ <div class="form-group form-actions">
+ <noscript><b><?= _t('gen.js.should_be_activated'); ?></b></noscript>
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important" name="action" value="update"><?= _t('gen.action.update') ?></button>
+ <button type="submit" class="btn btn-attention confirm" name="action" value="purge"><?= _t('gen.action.purge') ?></button>
+ <button type="submit" class="btn btn-attention confirm" name="action" value="delete"><?= _t('gen.action.remove') ?></button>
+ <?php if ($isAdmin && !$isDefault): ?>
+ <button type="submit" class="btn btn-attention confirm" name="action" value="demote"><?= _t('gen.action.demote') ?></button>
+ <?php elseif (!$isAdmin): ?>
+ <button type="submit" class="btn btn-attention confirm" name="action" value="promote"><?= _t('gen.action.promote') ?></button>
+ <?php endif; ?>
+ <?php if ($enabled && !$isDefault): ?>
+ <button type="submit" class="btn btn-attention" name="action" value="disable"><?= _t('gen.action.disable') ?></button>
+ <?php elseif (!$enabled): ?>
+ <button type="submit" class="btn btn-attention" name="action" value="enable"><?= _t('gen.action.enable') ?></button>
+ <?php endif; ?>
+ <div>
+ </div>
+ </form>
</div>
diff --git a/app/views/user/manage.phtml b/app/views/user/manage.phtml
index cf053d918..4332562e9 100644
--- a/app/views/user/manage.phtml
+++ b/app/views/user/manage.phtml
@@ -13,7 +13,8 @@
<select name="new_user_language" id="new_user_language">
<?php $languages = Minz_Translate::availableLanguages(); ?>
<?php foreach ($languages as $lang) { ?>
- <option value="<?= $lang ?>"<?= FreshRSS_Context::$user_conf->language === $lang ? ' selected="selected"' : '' ?>><?= _t('gen.lang.' . $lang) ?></option>
+ <option value="<?= $lang ?>"<?= FreshRSS_Context::$user_conf->language === $lang ?
+ ' selected="selected"' : '' ?>><?= _t('gen.lang.' . $lang) ?></option>
<?php } ?>
</select>
</div>
@@ -22,7 +23,8 @@
<div class="form-group">
<label class="group-name" for="new_user_name"><?= _t('admin.user.username') ?></label>
<div class="group-controls">
- <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off" pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" placeholder="demo" />
+ <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" autocomplete="off"
+ pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" placeholder="demo" />
</div>
</div>
@@ -83,7 +85,7 @@
</thead>
<tbody>
<?php foreach ($this->users as $username => $values) : ?>
- <tr <?php if ($values['is_default']):?>class="default-user"<?php endif; ?>>
+ <tr <?= $values['is_default'] ? 'class="default-user"' : '' ?>>
<td><a href="<?= _url('user', 'details', 'username', $username) ?>"><?= $username ?></a></td>
<td><?= $values['enabled'] ? '✔' : ' ' ?></td>
<td><?= $values['is_admin'] ? '✔' : ' ' ?></td>
diff --git a/app/views/user/profile.phtml b/app/views/user/profile.phtml
index 9e272b20a..3fc79bb47 100644
--- a/app/views/user/profile.phtml
+++ b/app/views/user/profile.phtml
@@ -40,7 +40,8 @@
<label class="group-name" for="newPasswordPlain"><?= _t('conf.profile.password_form') ?></label>
<div class="group-controls">
<div class="stick">
- <input type="password" id="newPasswordPlain" name="newPasswordPlain" autocomplete="new-password" pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/>
+ <input type="password" id="newPasswordPlain" name="newPasswordPlain" autocomplete="new-password"
+ pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/>
<a class="btn toggle-password" data-toggle="newPasswordPlain"><?= _i('key') ?></a>
</div>
<p class="help"><?= _i('help') ?> <?= _t('conf.profile.password_format') ?></p>
@@ -56,7 +57,8 @@
<input type="text" id="token" name="token" value="<?= $token ?>" placeholder="<?= _t('gen.short.blank_to_disable') ?>"<?php
echo FreshRSS_Auth::accessNeedsAction() ? '' : ' disabled="disabled"'; ?> data-leave-validation="<?= $token ?>"/>
<p class="help"><?= _i('help') ?> <?= _t('admin.auth.token_help') ?></p>
- <kbd><?= Minz_Url::display(array('a' => 'rss', 'params' => array('user' => Minz_Session::param('currentUser'), 'token' => $token, 'hours' => FreshRSS_Context::$user_conf->since_hours_posts_per_rss)), 'html', true) ?></kbd>
+ <kbd><?= Minz_Url::display(array('a' => 'rss', 'params' => array('user' => Minz_Session::param('currentUser'),
+ 'token' => $token, 'hours' => FreshRSS_Context::$user_conf->since_hours_posts_per_rss)), 'html', true) ?></kbd>
</div>
</div>
<?php } ?>
@@ -78,7 +80,8 @@
<label class="group-name" for="apiPasswordPlain"><?= _t('conf.profile.password_api') ?></label>
<div class="group-controls">
<div class="stick">
- <input type="password" id="apiPasswordPlain" name="apiPasswordPlain" autocomplete="new-password" pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/>
+ <input type="password" id="apiPasswordPlain" name="apiPasswordPlain" autocomplete="new-password"
+ pattern=".{7,}" <?= cryptAvailable() ? '' : 'disabled="disabled" ' ?>/>
<a class="btn toggle-password" data-toggle="apiPasswordPlain"><?= _i('key') ?></a>
</div>
<p class="help"><?= _i('help') ?> <kbd><a href="../api/"><?= Minz_Url::display('/api/', 'html', true) ?></a></kbd></p>