From f683ba72eaa664bad2f58157b7b47bcf4b1dffca Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sat, 18 Jul 2015 18:27:12 +0200 Subject: [PATCH] Add site editable maxheadersiteration. Rename the setting name from max.headers.iteration to maxheadersiteration. --- misc/update_scripts/update_binaries.php | 2 +- newznab/build/newznab.xml | 4 ++-- resources/db/patches/0162~settings.sql | 1 + www/templates_shared/views/admin/site-edit.tpl | 9 ++++++++- 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 resources/db/patches/0162~settings.sql diff --git a/misc/update_scripts/update_binaries.php b/misc/update_scripts/update_binaries.php index 9273f525d..f46d0bd74 100644 --- a/misc/update_scripts/update_binaries.php +++ b/misc/update_scripts/update_binaries.php @@ -6,7 +6,7 @@ use newznab\db\Settings; $pdo = new Settings(); -$maxHeaders = $pdo->getSetting('max.headers.iteration') ?: 1000000; +$maxHeaders = $pdo->getSetting('maxheadersiteration'); // Create the connection here and pass $nntp = new \NNTP(['Settings' => $pdo]); diff --git a/newznab/build/newznab.xml b/newznab/build/newznab.xml index e5e223757..01445b771 100644 --- a/newznab/build/newznab.xml +++ b/newznab/build/newznab.xml @@ -2,8 +2,8 @@ - 161 - 161 + 162 + 162 0.4.1 diff --git a/resources/db/patches/0162~settings.sql b/resources/db/patches/0162~settings.sql new file mode 100644 index 000000000..0f0f000e1 --- /dev/null +++ b/resources/db/patches/0162~settings.sql @@ -0,0 +1 @@ +UPDATE settings SET setting = 'maxheadersiteration' WHERE settings.section = 'max' AND settings.subsection = 'headers' AND settings.name = 'iteration'; \ No newline at end of file diff --git a/www/templates_shared/views/admin/site-edit.tpl b/www/templates_shared/views/admin/site-edit.tpl index 76ab8b823..e982bc2b9 100644 --- a/www/templates_shared/views/admin/site-edit.tpl +++ b/www/templates_shared/views/admin/site-edit.tpl @@ -2,7 +2,7 @@
-{if $error != ''} +{if isset ($error) && $error != ''}
{$error}
{/if} @@ -648,6 +648,13 @@
The maximum number of messages to process for a group in one run of update_binaries.
+ + : + + +
The maximum number of headers that update binaries sees as the total range. This ensure that a total of no more than this is attempted to be downloaded at one time per group.
+ + :