mirror of https://github.com/FreshRSS/FreshRSS.git
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
This commit is contained in:
parent
bf2718cada
commit
947e918f05
|
@ -17,7 +17,7 @@ jobs:
|
|||
- if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
|
||||
- COMPOSER_BIN=$(composer global config --absolute bin-dir)
|
||||
- $COMPOSER_BIN/phpunit --bootstrap ./tests/bootstrap.php --verbose ./tests
|
||||
- $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
|
||||
- $COMPOSER_BIN/phpcs . -p -s
|
||||
- name: "PHP 7.4 Syntax, linter and tests"
|
||||
php: "7.4"
|
||||
install:
|
||||
|
@ -29,7 +29,7 @@ jobs:
|
|||
- if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
|
||||
- COMPOSER_BIN=$(composer global config --absolute bin-dir)
|
||||
- $COMPOSER_BIN/phpunit --bootstrap ./tests/bootstrap.php --verbose ./tests
|
||||
- $COMPOSER_BIN/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
|
||||
- $COMPOSER_BIN/phpcs . -p -s
|
||||
- name: "PHP 5.6 Syntax"
|
||||
php: "5.6"
|
||||
script:
|
||||
|
|
4
Makefile
4
Makefile
|
@ -61,11 +61,11 @@ test: bin/phpunit ## Run the test suite
|
|||
|
||||
.PHONY: lint
|
||||
lint: bin/phpcs ## Run the linter on the PHP files
|
||||
$(PHP) ./bin/phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
|
||||
$(PHP) ./bin/phpcs . -p -s
|
||||
|
||||
.PHONY: lint-fix
|
||||
lint-fix: bin/phpcbf ## Fix the errors detected by the linter
|
||||
$(PHP) ./bin/phpcbf . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
|
||||
$(PHP) ./bin/phpcbf . -p -s
|
||||
|
||||
bin/phpunit:
|
||||
mkdir -p bin/
|
||||
|
|
|
@ -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' ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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' ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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' ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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' ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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=?';
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -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]))) {
|
||||
|
|
|
@ -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,
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 } ?>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 } ?>
|
||||
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 } ?>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -45,5 +45,6 @@
|
|||
endif;
|
||||
?></a></li>
|
||||
<?php if ($topline_date) { ?><li class="item date"><time datetime="<?= $this->entry->machineReadableDate() ?>"><?= $this->entry->date() ?></time> </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>
|
||||
|
|
|
@ -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') ?>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 ' — ';
|
||||
|
|
|
@ -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 } ?>
|
||||
|
|
|
@ -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>';
|
||||
|
|
|
@ -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) ?>&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) ?>&url_rss='+encodeURIComponent(url);})();"><?= _t('sub.bookmarklet.label') ?></a></p>
|
||||
<?= _t('sub.bookmarklet.documentation') ?>
|
||||
|
||||
<legend><?= _t('sub.firefox.title') ?></legend>
|
||||
|
|
|
@ -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() ?>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -17,8 +17,7 @@ class Minz_Configuration {
|
|||
* @param $default_filename a filename containing default values for the configuration
|
||||
* @param $configuration_setter an optional helper to set values in configuration
|
||||
*/
|
||||
public static function register($namespace, $config_filename, $default_filename = null,
|
||||
$configuration_setter = null) {
|
||||
public static function register($namespace, $config_filename, $default_filename = null, $configuration_setter = null) {
|
||||
self::$config_list[$namespace] = new Minz_Configuration(
|
||||
$namespace, $config_filename, $default_filename, $configuration_setter
|
||||
);
|
||||
|
@ -103,8 +102,7 @@ class Minz_Configuration {
|
|||
* @param $default_filename the file containing default values, null by default.
|
||||
* @param $configuration_setter an optional helper to set values in configuration
|
||||
*/
|
||||
private function __construct($namespace, $config_filename, $default_filename = null,
|
||||
$configuration_setter = null) {
|
||||
private function __construct($namespace, $config_filename, $default_filename = null, $configuration_setter = null) {
|
||||
$this->namespace = $namespace;
|
||||
$this->config_filename = $config_filename;
|
||||
$this->default_filename = $default_filename;
|
||||
|
@ -206,8 +204,7 @@ class Minz_Configuration {
|
|||
@rename($this->config_filename, $back_filename);
|
||||
|
||||
if (file_put_contents($this->config_filename,
|
||||
"<?php\nreturn " . var_export($this->data, true) . ';',
|
||||
LOCK_EX) === false) {
|
||||
"<?php\nreturn " . var_export($this->data, true) . ';', LOCK_EX) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
class Minz_ControllerNotActionControllerException extends Minz_Exception {
|
||||
public function __construct ($controller_name, $code = self::ERROR) {
|
||||
$message = 'Controller `' . $controller_name
|
||||
. '` isn\'t instance of ActionController';
|
||||
$message = 'Controller `' . $controller_name . '` isn’t instance of ActionController';
|
||||
|
||||
parent::__construct ($message, $code);
|
||||
}
|
||||
|
|
|
@ -3,11 +3,9 @@
|
|||
class Minz_ExtensionException extends Minz_Exception {
|
||||
public function __construct ($message, $extension_name = false, $code = self::ERROR) {
|
||||
if ($extension_name) {
|
||||
$message = 'An error occured in `' . $extension_name
|
||||
. '` extension with the message: ' . $message;
|
||||
$message = 'An error occured in `' . $extension_name . '` extension with the message: ' . $message;
|
||||
} else {
|
||||
$message = 'An error occured in an unnamed '
|
||||
. 'extension with the message: ' . $message;
|
||||
$message = 'An error occured in an unnamed extension with the message: ' . $message;
|
||||
}
|
||||
|
||||
parent::__construct($message, $code);
|
||||
|
|
|
@ -15,63 +15,63 @@ class Minz_ExtensionManager {
|
|||
|
||||
// List of available hooks. Please keep this list sorted.
|
||||
private static $hook_list = array(
|
||||
'check_url_before_add' => array( // function($url) -> Url | null
|
||||
'check_url_before_add' => array( // function($url) -> Url | null
|
||||
'list' => array(),
|
||||
'signature' => 'OneToOne',
|
||||
),
|
||||
'entry_before_display' => array( // function($entry) -> Entry | null
|
||||
'entry_before_display' => array( // function($entry) -> Entry | null
|
||||
'list' => array(),
|
||||
'signature' => 'OneToOne',
|
||||
),
|
||||
'entry_before_insert' => array( // function($entry) -> Entry | null
|
||||
'entry_before_insert' => array( // function($entry) -> Entry | null
|
||||
'list' => array(),
|
||||
'signature' => 'OneToOne',
|
||||
),
|
||||
'feed_before_actualize' => array( // function($feed) -> Feed | null
|
||||
'feed_before_actualize' => array( // function($feed) -> Feed | null
|
||||
'list' => array(),
|
||||
'signature' => 'OneToOne',
|
||||
),
|
||||
'feed_before_insert' => array( // function($feed) -> Feed | null
|
||||
'feed_before_insert' => array( // function($feed) -> Feed | null
|
||||
'list' => array(),
|
||||
'signature' => 'OneToOne',
|
||||
),
|
||||
'freshrss_init' => array( // function() -> none
|
||||
'freshrss_init' => array( // function() -> none
|
||||
'list' => array(),
|
||||
'signature' => 'NoneToNone',
|
||||
),
|
||||
'freshrss_user_maintenance' => array( // function() -> none
|
||||
'freshrss_user_maintenance' => array( // function() -> none
|
||||
'list' => array(),
|
||||
'signature' => 'NoneToNone',
|
||||
),
|
||||
'js_vars' => array( // function($vars = array) -> array | null
|
||||
'js_vars' => array( // function($vars = array) -> array | null
|
||||
'list' => array(),
|
||||
'signature' => 'OneToOne',
|
||||
),
|
||||
'menu_admin_entry' => array( // function() -> string
|
||||
'menu_admin_entry' => array( // function() -> string
|
||||
'list' => array(),
|
||||
'signature' => 'NoneToString',
|
||||
),
|
||||
'menu_configuration_entry' => array( // function() -> string
|
||||
'menu_configuration_entry' => array( // function() -> string
|
||||
'list' => array(),
|
||||
'signature' => 'NoneToString',
|
||||
),
|
||||
'menu_other_entry' => array( // function() -> string
|
||||
'menu_other_entry' => array( // function() -> string
|
||||
'list' => array(),
|
||||
'signature' => 'NoneToString',
|
||||
),
|
||||
'nav_menu' => array( // function() -> string
|
||||
'nav_menu' => array( // function() -> string
|
||||
'list' => array(),
|
||||
'signature' => 'NoneToString',
|
||||
),
|
||||
'nav_reading_modes' => array( // function($readingModes = array) -> array | null
|
||||
'nav_reading_modes' => array( // function($readingModes = array) -> array | null
|
||||
'list' => array(),
|
||||
'signature' => 'OneToOne',
|
||||
),
|
||||
'post_update' => array( // function(none) -> none
|
||||
'post_update' => array( // function(none) -> none
|
||||
'list' => array(),
|
||||
'signature' => 'NoneToNone',
|
||||
),
|
||||
'simplepie_before_init' => array( // function($simplePie, $feed) -> none
|
||||
'simplepie_before_init' => array( // function($simplePie, $feed) -> none
|
||||
'list' => array(),
|
||||
'signature' => 'PassArguments',
|
||||
),
|
||||
|
@ -144,9 +144,7 @@ class Minz_ExtensionManager {
|
|||
*/
|
||||
public static function isValidMetadata($meta) {
|
||||
$valid_chars = array('_');
|
||||
return !(empty($meta['name']) ||
|
||||
empty($meta['entrypoint']) ||
|
||||
!ctype_alnum(str_replace($valid_chars, '', $meta['entrypoint'])));
|
||||
return !(empty($meta['name']) || empty($meta['entrypoint']) || !ctype_alnum(str_replace($valid_chars, '', $meta['entrypoint'])));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,8 +161,7 @@ class Minz_ExtensionManager {
|
|||
|
||||
// Test if the given extension class exists.
|
||||
if (!class_exists($ext_class_name)) {
|
||||
Minz_Log::warning('`' . $ext_class_name .
|
||||
'` cannot be found in `' . $entry_point_filename . '`');
|
||||
Minz_Log::warning("`{$ext_class_name}` cannot be found in `{$entry_point_filename}`");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -174,14 +171,13 @@ class Minz_ExtensionManager {
|
|||
$extension = new $ext_class_name($info);
|
||||
} catch (Exception $e) {
|
||||
// We cannot load the extension? Invalid!
|
||||
Minz_Log::warning('Invalid extension `' . $ext_class_name . '`: ' . $e->getMessage());
|
||||
Minz_Log::warning("Invalid extension `{$ext_class_name}`: " . $e->getMessage());
|
||||
return null;
|
||||
}
|
||||
|
||||
// Test if class is correct.
|
||||
if (!($extension instanceof Minz_Extension)) {
|
||||
Minz_Log::warning('`' . $ext_class_name .
|
||||
'` is not an instance of `Minz_Extension`');
|
||||
Minz_Log::warning("`{$ext_class_name}` is not an instance of `Minz_Extension`");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,9 +30,7 @@ class Minz_Log {
|
|||
}
|
||||
}
|
||||
|
||||
if (! ($env === 'silent'
|
||||
|| ($env === 'production'
|
||||
&& ($level >= LOG_NOTICE)))) {
|
||||
if (! ($env === 'silent' || ($env === 'production' && ($level >= LOG_NOTICE)))) {
|
||||
$username = Minz_Session::param('currentUser', '');
|
||||
if ($username == '') {
|
||||
$username = '_';
|
||||
|
@ -61,9 +59,7 @@ class Minz_Log {
|
|||
$level_label = 'info';
|
||||
}
|
||||
|
||||
$log = '[' . date('r') . ']'
|
||||
. ' [' . $level_label . ']'
|
||||
. ' --- ' . $information . "\n";
|
||||
$log = '[' . date('r') . '] [' . $level_label . '] --- ' . $information . "\n";
|
||||
|
||||
if (defined('COPY_LOG_TO_SYSLOG') && COPY_LOG_TO_SYSLOG) {
|
||||
syslog($level, '[' . $username . '] ' . trim($log));
|
||||
|
|
|
@ -144,7 +144,7 @@ class Minz_Paginator {
|
|||
|
||||
return $array;
|
||||
}
|
||||
public function nbItemsPerPage () {
|
||||
public function nbItemsPerPage () {
|
||||
return $this->nbItemsPerPage;
|
||||
}
|
||||
public function currentPage () {
|
||||
|
|
|
@ -68,7 +68,7 @@ function checkRequirements($dbType = '') {
|
|||
'favicons' => $favicons ? 'ok' : 'ko',
|
||||
'message' => $message ?: '',
|
||||
'all' => $php && $curl && $pdo && $pcre && $ctype && $dom && $xml &&
|
||||
$data && $cache && $tmp && $users && $favicons && $message == '' ? 'ok' : 'ko'
|
||||
$data && $cache && $tmp && $users && $favicons && $message == '' ? 'ok' : 'ko'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ function escapeToUnicodeAlternative($text, $extended = true) {
|
|||
|
||||
function format_number($n, $precision = 0) {
|
||||
// number_format does not seem to be Unicode-compatible
|
||||
return str_replace(' ', ' ', //Espace fine insécable
|
||||
return str_replace(' ', ' ', //Espace fine insécable
|
||||
number_format($n, $precision, '.', ' ')
|
||||
);
|
||||
}
|
||||
|
@ -358,8 +358,8 @@ function get_user_configuration($username) {
|
|||
$namespace = 'user_' . $username;
|
||||
try {
|
||||
Minz_Configuration::register($namespace,
|
||||
join_path(USERS_PATH, $username, 'config.php'),
|
||||
join_path(FRESHRSS_PATH, 'config-user.default.php'));
|
||||
USERS_PATH . '/' . $username . '/config.php',
|
||||
FRESHRSS_PATH . '/config-user.default.php');
|
||||
} catch (Minz_ConfigurationNamespaceException $e) {
|
||||
// namespace already exists, do nothing.
|
||||
Minz_Log::warning($e->getMessage(), USERS_PATH . '/_/log.txt');
|
||||
|
@ -572,7 +572,8 @@ function errorMessage($errorTitle, $error = '') {
|
|||
<h1>{$errorTitle}</h1>
|
||||
{$error}
|
||||
<h2>Common problems</h2>
|
||||
<p>A typical problem leading to this message is wrong file permissions in the <code>./FreshRSS/data/</code> folder so make sure the Web server can write there and in sub-directories.</p>
|
||||
<p>A typical problem leading to this message is wrong file permissions in the <code>./FreshRSS/data/</code> folder
|
||||
so make sure the Web server can write there and in sub-directories.</p>
|
||||
<h2>Common locations for additional logs</h2>
|
||||
<p><strong>N.B.:</strong> Adapt names and paths according to your local setup.</p>
|
||||
<ul>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
// ================================================================================================
|
||||
// BOOTSTRAP FreshRSS
|
||||
require(__DIR__ . '/../../constants.php');
|
||||
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
|
||||
require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader
|
||||
FreshRSS_Context::initSystem();
|
||||
|
||||
// check if API is enabled globally
|
||||
|
@ -506,7 +506,7 @@ class FeverAPI
|
|||
if (!ctype_digit($max_id)) {
|
||||
$max_id = null;
|
||||
}
|
||||
} else if (isset($_REQUEST['with_ids'])) {
|
||||
} elseif (isset($_REQUEST['with_ids'])) {
|
||||
$entry_ids = explode(',', $_REQUEST['with_ids']);
|
||||
} else {
|
||||
// use the since_id argument to request the next $item_limit items
|
||||
|
|
|
@ -147,7 +147,8 @@ function checkCompatibility() {
|
|||
}
|
||||
|
||||
function authorizationToUser() {
|
||||
$headerAuth = headerVariable('Authorization', 'GoogleLogin_auth'); //Input is 'GoogleLogin auth', but PHP replaces spaces by '_' http://php.net/language.variables.external
|
||||
//Input is 'GoogleLogin auth', but PHP replaces spaces by '_' http://php.net/language.variables.external
|
||||
$headerAuth = headerVariable('Authorization', 'GoogleLogin_auth');
|
||||
if ($headerAuth != '') {
|
||||
$headerAuthX = explode('/', $headerAuth, 2);
|
||||
if (count($headerAuthX) === 2) {
|
||||
|
@ -864,7 +865,7 @@ function editTag($e_ids, $a, $r) {
|
|||
|
||||
function renameTag($s, $dest) {
|
||||
if ($s != '' && strpos($s, 'user/-/label/') === 0 &&
|
||||
$dest != '' && strpos($dest, 'user/-/label/') === 0) {
|
||||
$dest != '' && strpos($dest, 'user/-/label/') === 0) {
|
||||
$s = substr($s, 13);
|
||||
$s = htmlspecialchars($s, ENT_COMPAT, 'UTF-8');
|
||||
$dest = substr($dest, 13);
|
||||
|
@ -990,8 +991,10 @@ if ($pathInfos[1] === 'accounts') {
|
|||
* request, but xt appears in other listing requests). */
|
||||
$exclude_target = isset($_GET['xt']) ? $_GET['xt'] : '';
|
||||
$filter_target = isset($_GET['it']) ? $_GET['it'] : '';
|
||||
$count = isset($_GET['n']) ? intval($_GET['n']) : 20; //n=[integer] : The maximum number of results to return.
|
||||
$order = isset($_GET['r']) ? $_GET['r'] : 'd'; //r=[d|n|o] : Sort order of item results. d or n gives items in descending date order, o in ascending order.
|
||||
//n=[integer] : The maximum number of results to return.
|
||||
$count = isset($_GET['n']) ? intval($_GET['n']) : 20;
|
||||
//r=[d|n|o] : Sort order of item results. d or n gives items in descending date order, o in ascending order.
|
||||
$order = isset($_GET['r']) ? $_GET['r'] : 'd';
|
||||
/* ot=[unix timestamp] : The time from which you want to retrieve
|
||||
* items. Only items that have been crawled by Google Reader after
|
||||
* this time will be returned. */
|
||||
|
@ -1030,7 +1033,8 @@ if ($pathInfos[1] === 'accounts') {
|
|||
if ($pathInfos[9] === 'com.google' && isset($pathInfos[10])) {
|
||||
if ($pathInfos[10] === 'reading-list' || $pathInfos[10] === 'starred') {
|
||||
$include_target = '';
|
||||
streamContents($pathInfos[10], $include_target, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation);
|
||||
streamContents($pathInfos[10], $include_target, $start_time, $stop_time, $count, $order,
|
||||
$filter_target, $exclude_target, $continuation);
|
||||
}
|
||||
}
|
||||
} elseif ($pathInfos[8] === 'label') {
|
||||
|
|
|
@ -79,7 +79,8 @@ function is_valid_path_extension($path, $extensionPath, $isStatic = true) {
|
|||
*
|
||||
*/
|
||||
function is_valid_path($path) {
|
||||
return is_valid_path_extension($path, CORE_EXTENSIONS_PATH) || is_valid_path_extension($path, THIRDPARTY_EXTENSIONS_PATH) || is_valid_path_extension($path, USERS_PATH, $false);
|
||||
return is_valid_path_extension($path, CORE_EXTENSIONS_PATH) || is_valid_path_extension($path, THIRDPARTY_EXTENSIONS_PATH)
|
||||
|| is_valid_path_extension($path, USERS_PATH, $false);
|
||||
}
|
||||
|
||||
function sendBadRequestResponse(string $message = null) {
|
||||
|
|
|
@ -17,7 +17,7 @@ function hide_password(ev) {
|
|||
return false;
|
||||
}
|
||||
const toggles = document.getElementsByClassName('toggle-password');
|
||||
for (let i = 0 ; i < toggles.length ; i++) {
|
||||
for (let i = 0; i < toggles.length; i++) {
|
||||
toggles[i].addEventListener('mousedown', show_password);
|
||||
toggles[i].addEventListener('mouseup', hide_password);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ function ask_confirmation(ev) {
|
|||
}
|
||||
}
|
||||
const confirms = document.getElementsByClassName('confirm');
|
||||
for (let i = 0 ; i < confirms.length ; i++) {
|
||||
for (let i = 0; i < confirms.length; i++) {
|
||||
confirms[i].addEventListener('click', ask_confirmation);
|
||||
}
|
||||
// @license-end
|
||||
|
|
|
@ -9,41 +9,41 @@ const init_integration = function() {
|
|||
}
|
||||
setTimeout(init_integration, 50);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let shares = document.querySelectorAll('.group-share').length;
|
||||
document.querySelector('.share.add').addEventListener('click', event => {
|
||||
const shareTypes = event.target.closest('.group-controls').querySelector('select');
|
||||
const shareType = shareTypes.options[shareTypes.selectedIndex];
|
||||
let newShare = event.target.closest('form').getAttribute(`data-${shareType.getAttribute('data-form')}`);
|
||||
newShare = newShare.replace(/##label##/g, shareType.text);
|
||||
newShare = newShare.replace(/##type##/g, shareType.value);
|
||||
newShare = newShare.replace(/##help##/g, shareType.getAttribute('data-help'));
|
||||
newShare = newShare.replace(/##key##/g, shares);
|
||||
newShare = newShare.replace(/##method##/g, shareType.getAttribute('data-method'));
|
||||
newShare = newShare.replace(/##field##/g, shareType.getAttribute('data-field'));
|
||||
event.target.closest('.form-group').insertAdjacentHTML('beforebegin', newShare);
|
||||
shares++;
|
||||
});
|
||||
let shares = document.querySelectorAll('.group-share').length;
|
||||
document.querySelector('.share.add').addEventListener('click', event => {
|
||||
const shareTypes = event.target.closest('.group-controls').querySelector('select');
|
||||
const shareType = shareTypes.options[shareTypes.selectedIndex];
|
||||
let newShare = event.target.closest('form').getAttribute('data-' + shareType.getAttribute('data-form'));
|
||||
newShare = newShare.replace(/##label##/g, shareType.text);
|
||||
newShare = newShare.replace(/##type##/g, shareType.value);
|
||||
newShare = newShare.replace(/##help##/g, shareType.getAttribute('data-help'));
|
||||
newShare = newShare.replace(/##key##/g, shares);
|
||||
newShare = newShare.replace(/##method##/g, shareType.getAttribute('data-method'));
|
||||
newShare = newShare.replace(/##field##/g, shareType.getAttribute('data-field'));
|
||||
event.target.closest('.form-group').insertAdjacentHTML('beforebegin', newShare);
|
||||
shares++;
|
||||
});
|
||||
|
||||
document.querySelector('.post').addEventListener('click', event => {
|
||||
if (!event.target || !event.target.closest) {
|
||||
return;
|
||||
}
|
||||
document.querySelector('.post').addEventListener('click', event => {
|
||||
if (!event.target || !event.target.closest) {
|
||||
return;
|
||||
}
|
||||
|
||||
const deleteButton = event.target.closest('a.remove');
|
||||
if (null === deleteButton || !deleteButton.closest) {
|
||||
return;
|
||||
}
|
||||
const deleteButton = event.target.closest('a.remove');
|
||||
if (null === deleteButton || !deleteButton.closest) {
|
||||
return;
|
||||
}
|
||||
|
||||
const share = deleteButton.closest('.group-share');
|
||||
const form = deleteButton.closest('form');
|
||||
if (!share.remove || !form.submit) {
|
||||
return;
|
||||
}
|
||||
share.remove();
|
||||
form.submit();
|
||||
});
|
||||
const share = deleteButton.closest('.group-share');
|
||||
const form = deleteButton.closest('form');
|
||||
if (!share.remove || !form.submit) {
|
||||
return;
|
||||
}
|
||||
share.remove();
|
||||
form.submit();
|
||||
});
|
||||
};
|
||||
|
||||
if (document.readyState && document.readyState !== 'loading') {
|
||||
|
|
|
@ -21,8 +21,11 @@ if (!Element.prototype.remove) Element.prototype.remove = function () { if (this
|
|||
function xmlHttpRequestJson(req) {
|
||||
let json = req.response;
|
||||
if (req.responseType !== 'json') { //IE11
|
||||
try { json = JSON.parse(req.responseText); }
|
||||
catch (ex) { json = null; }
|
||||
try {
|
||||
json = JSON.parse(req.responseText);
|
||||
} catch (ex) {
|
||||
json = null;
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
@ -81,7 +84,7 @@ function numberFormat(nStr) {
|
|||
rgx = /(\d+)(\d{3})/;
|
||||
let x1 = x[0];
|
||||
while (rgx.test(x1)) {
|
||||
x1 = x1.replace(rgx, '$1' + ' ' + '$2');
|
||||
x1 = x1.replace(rgx, '$1 $2');
|
||||
}
|
||||
return x1 + x2;
|
||||
}
|
||||
|
@ -908,7 +911,7 @@ function init_shortcuts() {
|
|||
if (k === s.reading_view) { delayedClick(document.querySelector('#nav_menu_views .view-reader')); return false; }
|
||||
if (k === s.global_view) { delayedClick(document.querySelector('#nav_menu_views .view-global')); return false; }
|
||||
if (k === s.rss_view) { delayedClick(document.querySelector('#nav_menu_views .view-rss')); return false; }
|
||||
if (k === s.toggle_media) { toggle_media(); return false;}
|
||||
if (k === s.toggle_media) { toggle_media(); return false; }
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ function initStats() {
|
|||
grid: {verticalLines: false},
|
||||
xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0, min: -30.75, max: -0.25},
|
||||
yaxis: {min: 0},
|
||||
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}}
|
||||
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function (obj) { return numberFormat(obj.y); }},
|
||||
});
|
||||
// Feed per category
|
||||
Flotr.draw(document.getElementById('statsFeedPerCategory'),
|
||||
|
@ -42,7 +42,9 @@ function initStats() {
|
|||
pie: {explode: 10, show: true, labelFormatter: function(){return '';}},
|
||||
xaxis: {showLabels: false},
|
||||
yaxis: {showLabels: false},
|
||||
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ numberFormat(obj.y) + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}},
|
||||
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function (obj) {
|
||||
return obj.series.label + ' - ' + numberFormat(obj.y) + ' (' + (obj.fraction * 100).toFixed(1) + '%)';
|
||||
}},
|
||||
legend: {container: document.getElementById('statsFeedPerCategoryLegend'), noColumns: 3}
|
||||
});
|
||||
// Entry per category
|
||||
|
@ -50,10 +52,12 @@ function initStats() {
|
|||
stats.entryByCategory,
|
||||
{
|
||||
grid: {verticalLines: false, horizontalLines: false},
|
||||
pie: {explode: 10, show: true, labelFormatter: function(){return '';}},
|
||||
pie: {explode: 10, show: true, labelFormatter: function () { return ''; }},
|
||||
xaxis: {showLabels: false},
|
||||
yaxis: {showLabels: false},
|
||||
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ numberFormat(obj.y) + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}},
|
||||
mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function (obj) {
|
||||
return obj.series.label + ' - ' + numberFormat(obj.y) + ' (' + (obj.fraction * 100).toFixed(1) + '%)';
|
||||
}},
|
||||
legend: {container: document.getElementById('statsEntryPerCategoryLegend'), noColumns: 3}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -695,7 +695,7 @@ a.btn {
|
|||
.prompt .stick,
|
||||
.prompt input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.prompt .btn.btn-important {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -804,7 +804,7 @@ a.btn {
|
|||
.prompt .stick,
|
||||
.prompt input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.prompt input#username,.prompt input#passwordPlain {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -767,7 +767,7 @@ a.btn,
|
|||
.prompt .stick,
|
||||
.prompt input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.prompt .btn.btn-important {
|
||||
|
|
|
@ -725,7 +725,7 @@ a.btn {
|
|||
.prompt .stick,
|
||||
.prompt input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.prompt .btn.btn-important {
|
||||
|
|
|
@ -732,7 +732,7 @@ a.btn {
|
|||
.prompt .stick,
|
||||
.prompt input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.prompt .btn.btn-important {
|
||||
|
|
|
@ -793,7 +793,7 @@ a.btn {
|
|||
.prompt input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.prompt input#username,.prompt input#passwordPlain {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
37
phpcs.xml
37
phpcs.xml
|
@ -1,15 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="FreshRSS Ruleset">
|
||||
<description>Created with the PHP Coding Standard Generator. https://edorian.github.com/php-coding-standard-generator/</description>
|
||||
<!-- to circumvent https://github.com/squizlabs/PHP_CodeSniffer/pull/1404 -->
|
||||
<arg name="tab-width" value="40"/>
|
||||
<arg name="extensions" value="php,phtml,css,js"/>
|
||||
<arg name="tab-width" value="4"/>
|
||||
<exclude-pattern>./lib/SimplePie/</exclude-pattern>
|
||||
<exclude-pattern>./lib/PHPMailer/</exclude-pattern>
|
||||
<exclude-pattern>./lib/http-conditional.php</exclude-pattern>
|
||||
<exclude-pattern>./lib/lib_phpQuery.php</exclude-pattern>
|
||||
<exclude-pattern>./node_modules/</exclude-pattern>
|
||||
<exclude-pattern>./data/config.php</exclude-pattern>
|
||||
<exclude-pattern>./data/users/*/config.php</exclude-pattern>
|
||||
<exclude-pattern>./extensions/</exclude-pattern>
|
||||
<exclude-pattern>*.min.js$</exclude-pattern>
|
||||
<!-- Duplicate class names are not allowed -->
|
||||
<rule ref="Generic.Classes.DuplicateClassName"/>
|
||||
<!-- Statements must not be empty -->
|
||||
|
@ -20,19 +22,15 @@
|
|||
<rule ref="Generic.CodeAnalysis.UnnecessaryFinalModifier"/>
|
||||
<!-- Do not override methods to call their parent -->
|
||||
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
|
||||
<!-- One line should not have more than 80 characters -->
|
||||
<!-- One line must never exceed 120 characters -->
|
||||
<!-- Maximum line length -->
|
||||
<rule ref="Generic.Files.LineLength">
|
||||
<!-- For language strings maximum line lengths make little sense. -->
|
||||
<exclude-pattern>./app/i18n/</exclude-pattern>
|
||||
<!-- Don't enforce line length on the HTML; the point is to improve legibility, not reduce it -->
|
||||
<exclude-pattern>./app/install.php</exclude-pattern>
|
||||
<!-- @todo remove test exclusion -->
|
||||
<exclude-pattern>./tests/app/</exclude-pattern>
|
||||
<exclude-pattern>*.phtml$</exclude-pattern>
|
||||
<properties>
|
||||
<property name="lineLimit" value="100"/>
|
||||
<!-- needs to be large to accomodate extra large tab width to circumvent https://github.com/squizlabs/PHP_CodeSniffer/pull/1404 -->
|
||||
<property name="absoluteLineLimit" value="500"/>
|
||||
<property name="lineLimit" value="165"/>
|
||||
<property name="absoluteLineLimit" value="190"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<!-- When calling a function: -->
|
||||
|
@ -92,9 +90,26 @@
|
|||
<!-- Do not add spaces when casting -->
|
||||
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
|
||||
<!-- Operators must have a space around them -->
|
||||
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
|
||||
<properties>
|
||||
<property name="ignoreNewlines" value="true" />
|
||||
</properties>
|
||||
</rule>
|
||||
<!-- Do not add a whitespace before a semicolon -->
|
||||
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
|
||||
<!-- Do not add whitespace at start or end of a file or end of a line -->
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
|
||||
<!-- Expected space after closing parenthesis -->
|
||||
<rule ref="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis">
|
||||
<exclude-pattern>.phtml$</exclude-pattern>
|
||||
</rule>
|
||||
<!-- Newline required after opening brace -->
|
||||
<rule ref="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace">
|
||||
<exclude-pattern>.phtml$</exclude-pattern>
|
||||
<exclude-pattern>.js$</exclude-pattern>
|
||||
</rule>
|
||||
<!-- No PHP code was found in this file -->
|
||||
<rule ref="Internal.NoCodeFound">
|
||||
<exclude-pattern>.phtml$</exclude-pattern>
|
||||
</rule>
|
||||
</ruleset>
|
||||
|
|
|
@ -25,7 +25,8 @@ class CategoryTest extends PHPUnit\Framework\TestCase {
|
|||
array(' this string needs trimming on left', 'this string needs trimming on left'),
|
||||
array('this string needs trimming on right ', 'this string needs trimming on right'),
|
||||
array(' this string needs trimming on both ends ', 'this string needs trimming on both ends'),
|
||||
array(str_repeat('This string needs to be shortened because its length is way too long. ', 4), str_repeat('This string needs to be shortened because its length is way too long. ', 3) . 'This string needs to be shortened because its'),
|
||||
array(str_repeat('This string needs to be shortened because its length is way too long. ', 4),
|
||||
str_repeat('This string needs to be shortened because its length is way too long. ', 3) . 'This string needs to be shortened because its'),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -228,7 +228,8 @@ class SearchTest extends PHPUnit\Framework\TestCase {
|
|||
* @param array $tags_value
|
||||
* @param string|null $search_value
|
||||
*/
|
||||
public function test__construct_whenInputContainsMultipleKeywords_setsValues($input, $author_value, $min_date_value, $max_date_value, $intitle_value, $inurl_value, $min_pubdate_value, $max_pubdate_value, $tags_value, $search_value) {
|
||||
public function test__construct_whenInputContainsMultipleKeywords_setsValues($input, $author_value, $min_date_value,
|
||||
$max_date_value, $intitle_value, $inurl_value, $min_pubdate_value, $max_pubdate_value, $tags_value, $search_value) {
|
||||
$search = new FreshRSS_Search($input);
|
||||
$this->assertEquals($author_value, $search->getAuthor());
|
||||
$this->assertEquals($min_date_value, $search->getMinDate());
|
||||
|
|
Loading…
Reference in New Issue