Update with base url changes and strict key requirements

This commit is contained in:
Matthew Exon 2020-10-13 18:39:01 +01:00 committed by Matthew Exon
parent 542185285b
commit 51ed5a3d5c

View file

@ -828,7 +828,7 @@ function retriever_content($a) {
} }
$template = Renderer::getMarkupTemplate('/help.tpl', 'addon/retriever/'); $template = Renderer::getMarkupTemplate('/help.tpl', 'addon/retriever/');
$a->page['content'] .= Renderer::replaceMacros($template, array( $a->page['content'] .= Renderer::replaceMacros($template, array(
'$config' => $a->getBaseUrl . '/settings/addon', '$config' => DI::baseUrl()->get(true) . '/settings/addon',
'$allow_images' => DI::config()->get('retriever', 'allow_images'), '$allow_images' => DI::config()->get('retriever', 'allow_images'),
'$feeds' => $feeds)); '$feeds' => $feeds));
return; return;
@ -877,27 +877,27 @@ function retriever_content($a) {
'$enable' => array( '$enable' => array(
'retriever_enable', 'retriever_enable',
DI::l10n()->t('Enabled'), DI::l10n()->t('Enabled'),
$retriever_rule['data']['enable']), array_key_exists('enable', $retriever_rule['data']) ? $retriever_rule['data']['enable'] : ""),
'$modurl' => array( '$modurl' => array(
'retriever_modurl', 'retriever_modurl',
DI::l10n()->t('Modify URL'), DI::l10n()->t('Modify URL'),
$retriever_rule['data']['modurl'], array_key_exists('modurl', $retriever_rule['data']) ? $retriever_rule['data']['modurl'] : "",
DI::l10n()->t("Modify each article's URL with regular expressions before retrieving.")), DI::l10n()->t("Modify each article's URL with regular expressions before retrieving.")),
'$pattern' => array( '$pattern' => array(
'retriever_pattern', 'retriever_pattern',
DI::l10n()->t('URL Pattern'), DI::l10n()->t('URL Pattern'),
$retriever_rule['data']['pattern'], array_key_exists('pattern', $retriever_rule['data']) ? $retriever_rule['data']['pattern'] : "",
DI::l10n()->t('Regular expression matching part of the URL to replace')), DI::l10n()->t('Regular expression matching part of the URL to replace')),
'$replace' => array( '$replace' => array(
'retriever_replace', 'retriever_replace',
DI::l10n()->t('URL Replace'), DI::l10n()->t('URL Replace'),
$retriever_rule['data']['replace'], array_key_exists('replace', $retriever_rule['data']) ? $retriever_rule['data']['replace'] : "",
DI::l10n()->t('Text to replace matching part of above regular expression')), DI::l10n()->t('Text to replace matching part of above regular expression')),
'$allow_images' => DI::config()->get('retriever', 'allow_images'), '$allow_images' => DI::config()->get('retriever', 'allow_images'),
'$images' => array( '$images' => array(
'retriever_images', 'retriever_images',
DI::l10n()->t('Download Images'), DI::l10n()->t('Download Images'),
$retriever_rule['data']['images']), array_key_exists('images', $retriever_rule['data']) ? $retriever_rule['data']['images'] : ""),
'$retrospective' => array( '$retrospective' => array(
'retriever_retrospective', 'retriever_retrospective',
DI::l10n()->t('Retrospectively Apply'), DI::l10n()->t('Retrospectively Apply'),
@ -906,20 +906,20 @@ function retriever_content($a) {
'storecookies' => array( 'storecookies' => array(
'retriever_storecookies', 'retriever_storecookies',
DI::l10n()->t('Store cookies'), DI::l10n()->t('Store cookies'),
$retriever_rule['data']['storecookies'], array_key_exists('storecookies', $retriever_rule['data']) ? $retriever_rule['data']['storecookies'] : "",
DI::l10n()->t("Preserve cookie data across fetches.")), DI::l10n()->t("Preserve cookie data across fetches.")),
'$cookiedata' => array( '$cookiedata' => array(
'retriever_cookiedata', 'retriever_cookiedata',
DI::l10n()->t('Cookie Data'), DI::l10n()->t('Cookie Data'),
$retriever_rule['data']['cookiedata'], array_key_exists('cookiedata', $retriever_rule['data']) ? $retriever_rule['data']['cookiedata'] : "",
DI::l10n()->t("Latest cookie data for this feed. Netscape cookie file format.")), DI::l10n()->t("Latest cookie data for this feed. Netscape cookie file format.")),
'$customxslt' => array( '$customxslt' => array(
'retriever_customxslt', 'retriever_customxslt',
DI::l10n()->t('Custom XSLT'), DI::l10n()->t('Custom XSLT'),
$retriever_rule['data']['customxslt'], array_key_exists('customxslt', $retriever_rule['data']) ? $retriever_rule['data']['customxslt'] : "",
DI::l10n()->t("When standard rules aren't enough, apply custom XSLT to the article")), DI::l10n()->t("When standard rules aren't enough, apply custom XSLT to the article")),
'$title' => DI::l10n()->t('Retrieve Feed Content'), '$title' => DI::l10n()->t('Retrieve Feed Content'),
'$help' => $a->getBaseUrl . '/retriever/help', '$help' => DI::baseUrl()->get(true) . '/retriever/help',
'$help_t' => DI::l10n()->t('Get Help'), '$help_t' => DI::l10n()->t('Get Help'),
'$submit_t' => DI::l10n()->t('Submit'), '$submit_t' => DI::l10n()->t('Submit'),
'$submit' => DI::l10n()->t('Save Settings'), '$submit' => DI::l10n()->t('Save Settings'),
@ -991,7 +991,7 @@ function retriever_addon_settings(&$a, &$s) {
$template = Renderer::getMarkupTemplate('/settings.tpl', 'addon/retriever/'); $template = Renderer::getMarkupTemplate('/settings.tpl', 'addon/retriever/');
$config = array('$submit' => DI::l10n()->t('Save Settings'), $config = array('$submit' => DI::l10n()->t('Save Settings'),
'$title' => DI::l10n()->t('Retriever Settings'), '$title' => DI::l10n()->t('Retriever Settings'),
'$help' => $a->getBaseUrl . '/retriever/help', '$help' => DI::baseUrl()->get(true) . '/retriever/help',
'$allow_images' => DI::config()->get('retriever', 'allow_images')); '$allow_images' => DI::config()->get('retriever', 'allow_images'));
$config['$allphotos'] = array('retriever_all_photos', $config['$allphotos'] = array('retriever_all_photos',
DI::l10n()->t('All Photos'), DI::l10n()->t('All Photos'),