Use external catalog as fallback when there is no native catalog.

This commit is contained in:
ccd0 2019-07-21 21:00:58 -07:00
parent 898c8e0df9
commit 6a9508371e
2 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,7 @@
<fieldset>
<legend>External Catalog</legend>
<div class="warning" data-feature="External Catalog"><code>External Catalog</code> is disabled.</div>
<div class="warning" data-feature="External Catalog"><code>External Catalog</code> is disabled. This will be used only as a fallback.</div>
<div>
URLs of external catalog sites, where <code>%board</code> is to be replaced by the board name.<br>
Each URL should be followed by <code>;boards:</code> and optionally <code>;exclude:</code> and a list of supported/excluded boards in the format explained in the Filter guide.

View File

@ -108,8 +108,10 @@ CatalogLinks =
external
else if Index.enabledOn(board) and Conf['Use <%= meta.name %> Catalog']
CatalogLinks.jsonIndex board, '#catalog'
else if (nativeCatalog = Get.url 'catalog', board)
nativeCatalog
else
Get.url 'catalog', board
CatalogLinks.external board
index: (board=g.BOARD) ->
if Index.enabledOn(board)