mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-14 11:55:56 +00:00
when FORCE_ARTICLE_PURGE is defined, show relevant information in the UI
This commit is contained in:
@@ -363,22 +363,15 @@
|
|||||||
|
|
||||||
$purge_interval = db_fetch_result($result, 0, "purge_interval");
|
$purge_interval = db_fetch_result($result, 0, "purge_interval");
|
||||||
|
|
||||||
if (FORCE_ARTICLE_PURGE == 0) {
|
|
||||||
|
|
||||||
/* Purge intl */
|
/* Purge intl */
|
||||||
|
|
||||||
print "<hr/>";
|
print "<hr/>";
|
||||||
|
|
||||||
print __('Article purging:') . " ";
|
print __('Article purging:') . " ";
|
||||||
|
|
||||||
print_select_hash("purge_interval", $purge_interval, $purge_intervals,
|
print_select_hash("purge_interval", $purge_interval, $purge_intervals,
|
||||||
'dojoType="dijit.form.Select"');
|
'dojoType="dijit.form.Select" ' .
|
||||||
|
((FORCE_ARTICLE_PURGE == 0) ? "" : 'disabled="1"'));
|
||||||
} else {
|
|
||||||
print "<input style=\"display : none\" name='purge_interval'
|
|
||||||
dojoType=\"dijit.form.TextBox\" value='$purge_interval'>";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
print "<div class=\"dlgSec\">".__("Authentication")."</div>";
|
print "<div class=\"dlgSec\">".__("Authentication")."</div>";
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
"DEFAULT_UPDATE_INTERVAL", "USER_TIMEZONE", "SORT_HEADLINES_BY_FEED_DATE",
|
"DEFAULT_UPDATE_INTERVAL", "USER_TIMEZONE", "SORT_HEADLINES_BY_FEED_DATE",
|
||||||
"SSL_CERT_SERIAL");
|
"SSL_CERT_SERIAL");
|
||||||
|
|
||||||
if (FORCE_ARTICLE_PURGE != 0) {
|
/* if (FORCE_ARTICLE_PURGE != 0) {
|
||||||
array_push($prefs_blacklist, "PURGE_OLD_DAYS");
|
array_push($prefs_blacklist, "PURGE_OLD_DAYS");
|
||||||
array_push($prefs_blacklist, "PURGE_UNREAD_ARTICLES");
|
array_push($prefs_blacklist, "PURGE_UNREAD_ARTICLES");
|
||||||
}
|
} */
|
||||||
|
|
||||||
if ($subop == "change-password") {
|
if ($subop == "change-password") {
|
||||||
|
|
||||||
@@ -419,15 +419,30 @@
|
|||||||
$value = __("No");
|
$value = __("No");
|
||||||
}
|
}
|
||||||
|
|
||||||
print_radio($pref_name, $value, __("Yes"), array(__("Yes"), __("No")));
|
if ($pref_name == "PURGE_UNREAD_ARTICLES" && FORCE_ARTICLE_PURGE != 0) {
|
||||||
|
$disabled = "disabled=\"1\"";
|
||||||
|
$value = __("Yes");
|
||||||
|
} else {
|
||||||
|
$disabled = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
print_radio($pref_name, $value, __("Yes"), array(__("Yes"), __("No")),
|
||||||
|
$disabled);
|
||||||
|
|
||||||
} else if (array_search($pref_name, array('FRESH_ARTICLE_MAX_AGE', 'DEFAULT_ARTICLE_LIMIT',
|
} else if (array_search($pref_name, array('FRESH_ARTICLE_MAX_AGE', 'DEFAULT_ARTICLE_LIMIT',
|
||||||
'PURGE_OLD_DAYS', 'LONG_DATE_FORMAT', 'SHORT_DATE_FORMAT')) !== false) {
|
'PURGE_OLD_DAYS', 'LONG_DATE_FORMAT', 'SHORT_DATE_FORMAT')) !== false) {
|
||||||
|
|
||||||
$regexp = ($type_name == 'integer') ? 'regexp="^\d*$"' : '';
|
$regexp = ($type_name == 'integer') ? 'regexp="^\d*$"' : '';
|
||||||
|
|
||||||
|
if ($pref_name == "PURGE_OLD_DAYS" && FORCE_ARTICLE_PURGE != 0) {
|
||||||
|
$disabled = "disabled=\"1\"";
|
||||||
|
$value = FORCE_ARTICLE_PURGE;
|
||||||
|
} else {
|
||||||
|
$disabled = "";
|
||||||
|
}
|
||||||
|
|
||||||
print "<input dojoType=\"dijit.form.ValidationTextBox\"
|
print "<input dojoType=\"dijit.form.ValidationTextBox\"
|
||||||
required=\"1\" $regexp
|
required=\"1\" $regexp $disabled
|
||||||
name=\"$pref_name\" value=\"$value\">";
|
name=\"$pref_name\" value=\"$value\">";
|
||||||
|
|
||||||
} else if ($pref_name == "SSL_CERT_SERIAL") {
|
} else if ($pref_name == "SSL_CERT_SERIAL") {
|
||||||
|
|||||||
Reference in New Issue
Block a user