[Scummvm-git-logs] scummvm-web master -> 9d98a5991e2ac7f943c59c20077625e63a7fd00d

Mataniko mataniko at gmail.com
Wed Jan 23 11:21:15 CET 2019


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .

Summary:
e916b2b7e3 WEB: Fix download URLs
9d98a5991e WEB: Disable Smarty caching


Commit: e916b2b7e3d77c878b022602247e3c4e52c1209d
    https://github.com/scummvm/scummvm-web/commit/e916b2b7e3d77c878b022602247e3c4e52c1209d
Author: Matan Bareket (mataniko at gmail.com)
Date: 2019-01-23T05:18:28-05:00

Commit Message:
WEB: Fix download URLs

Changed paths:
    data/downloads.xml
    data/games.xml
    include/Constants.php
    include/Objects/DownloadsSection.php
    include/Objects/File.php


diff --git a/data/downloads.xml b/data/downloads.xml
index 08b95a2..e93c93a 100644
--- a/data/downloads.xml
+++ b/data/downloads.xml
@@ -536,10 +536,10 @@
 
 	<section>
 		<title>{#downloadsOldBinaries#}</title>
-		<baseurl>/frs/scummvm/</baseurl>
 		<subsection>
 			<title>{#downloadsOld#}</title>
 			<anchor>older</anchor>
+			<baseurl>/frs/scummvm/</baseurl>
 			<notes>
 				{#downloadsOldBinariesNote#}
 			</notes>
diff --git a/data/games.xml b/data/games.xml
index 39e288e..7a6382d 100644
--- a/data/games.xml
+++ b/data/games.xml
@@ -4,19 +4,18 @@
 		<title>
 			{#gamesXMLTitle#} <h:span style="color: rgb(170, 170, 170);">{'/\x7brelease\x7d/'|preg_replace:$release:#downloadsXMLVersion#}</h:span>
 		</title>
-		<baseurl>/frs/extras/</baseurl>
 		<subsection>
 			<title>Beneath a Steel Sky</title>
 			<anchor>sky</anchor>
 			<entries>
 				<file>
 					<category_icon>sky</category_icon>
-					<url>Beneath a Steel Sky/bass-cd-1.2.zip</url>
+					<url type="extras">Beneath a Steel Sky/bass-cd-1.2.zip</url>
 					<name>Beneath a Steel Sky, Freeware CD Version</name>
 				</file>
 				<file>
 					<category_icon>sky</category_icon>
-					<url>Beneath a Steel Sky/BASS-Floppy-1.3.zip</url>
+					<url type="extras">Beneath a Steel Sky/BASS-Floppy-1.3.zip</url>
 					<name>Beneath a Steel Sky, Freeware Floppy Version</name>
 				</file>
 			</entries>
@@ -28,7 +27,7 @@
 			<entries>
 				<file>
 					<category_icon>sword</category_icon>
-					<url>Broken Sword 2.5/sword25-v1.0.zip</url>
+					<url type="extras">Broken Sword 2.5/sword25-v1.0.zip</url>
 					<name>Broken Sword 2.5, Freeware Version</name>
 				</file>
 			</entries>
@@ -40,47 +39,47 @@
 			<entries>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-uk-1.1.zip</url>
+					<url type="extras">Dreamweb/dreamweb-uk-1.1.zip</url>
 					<name>Dreamweb, Freeware Floppy DOS Version (English UK)</name>
 				</file>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-cd-uk-1.1.zip</url>
+					<url type="extras">Dreamweb/dreamweb-cd-uk-1.1.zip</url>
 					<name>Dreamweb, Freeware CD DOS Version (English UK)</name>
 				</file>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-cd-us-1.1.zip</url>
+					<url type="extras">Dreamweb/dreamweb-cd-us-1.1.zip</url>
 					<name>Dreamweb, Freeware CD DOS Version (English US)</name>
 				</file>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-cd-fr-1.1.zip</url>
+					<url type="extras">Dreamweb/dreamweb-cd-fr-1.1.zip</url>
 					<name>Dreamweb, Freeware CD DOS Version (French)</name>
 				</file>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-cd-de-1.1.zip</url>
+					<url type="extras">Dreamweb/dreamweb-cd-de-1.1.zip</url>
 					<name>Dreamweb, Freeware CD DOS Version (German)</name>
 				</file>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-cd-it-1.1.zip</url>
+					<url type="extras">Dreamweb/dreamweb-cd-it-1.1.zip</url>
 					<name>Dreamweb, Freeware CD DOS Version (Italian)</name>
 				</file>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-cd-es-1.1.zip</url>
+					<url type="extras">Dreamweb/dreamweb-cd-es-1.1.zip</url>
 					<name>Dreamweb, Freeware CD DOS Version (Spanish)</name>
 				</file>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-manuals-en-highres.zip</url>
+					<url type="extras">Dreamweb/dreamweb-manuals-en-highres.zip</url>
 					<name>Dreamweb, Manuals (English High Resolution)</name>
 				</file>
 				<file>
 					<category_icon>dreamweb</category_icon>
-					<url>Dreamweb/dreamweb-manuals-en-lores.zip</url>
+					<url type="extras">Dreamweb/dreamweb-manuals-en-lores.zip</url>
 					<name>Dreamweb, Manuals (English Low Resolution)</name>
 				</file>
 			</entries>
@@ -92,38 +91,38 @@
 			<entries>
 				<file>
 					<category_icon>mp3</category_icon>
-					<url>Flight of the Amazon Queen/FOTAQ_Talkie-1.1.zip</url>
+					<url type="extras">Flight of the Amazon Queen/FOTAQ_Talkie-1.1.zip</url>
 					<name>Flight of the Amazon Queen, Freeware CD Version (mp3 compressed sfx/speech)</name>
 				</file>
 				<file>
 					<category_icon>queen</category_icon>
-					<url>http://www.lysator.liu.se/~zino/scummvm/queen/</url>
+					<url type="extras">http://www.lysator.liu.se/~zino/scummvm/queen/</url>
 					<name>Flight of the Amazon Queen, Freeware CD Version (unmodified original)</name>
 					<extra_info>(87M) download this version if your ScummVM doesn't have mp3 support</extra_info>
 				</file>
 				<file>
 					<category_icon>queen</category_icon>
-					<url>Flight of the Amazon Queen/FOTAQ_Fr_Talkie_1.0.zip</url>
+					<url type="extras">Flight of the Amazon Queen/FOTAQ_Fr_Talkie_1.0.zip</url>
 					<name>Flight of the Amazon Queen, Freeware CD Version (<h:i>French</h:i> voices and subtitles, ogg compressed sfx/speech)</name>
 				</file>
 				<file>
 					<category_icon>queen</category_icon>
-					<url>Flight of the Amazon Queen/FOTAQ_Ger_talkie-1.0.zip</url>
+					<url type="extras">Flight of the Amazon Queen/FOTAQ_Ger_talkie-1.0.zip</url>
 					<name>Flight of the Amazon Queen, Freeware CD Version (<h:i>German</h:i> voices and subtitles, ogg compressed sfx/speech)</name>
 				</file>
 				<file>
 					<category_icon>queen</category_icon>
-					<url>Flight of the Amazon Queen/FOTAQ_Heb_talkie.zip</url>
+					<url type="extras">Flight of the Amazon Queen/FOTAQ_Heb_talkie.zip</url>
 					<name>Flight of the Amazon Queen, Freeware CD Version (<h:i>Hebrew</h:i> subtitles, English voices, ogg compressed sfx/speech)</name>
 				</file>
 				<file>
 					<category_icon>queen</category_icon>
-					<url>Flight of the Amazon Queen/FOTAQ_It_Talkie_1.0.zip</url>
+					<url type="extras">Flight of the Amazon Queen/FOTAQ_It_Talkie_1.0.zip</url>
 					<name>Flight of the Amazon Queen, Freeware CD Version (<h:i>Italian</h:i> subtitles, English voices, ogg compressed sfx/speech)</name>
 				</file>
 				<file>
 					<category_icon>queen</category_icon>
-					<url>Flight of the Amazon Queen/FOTAQ_Floppy.zip</url>
+					<url type="extras">Flight of the Amazon Queen/FOTAQ_Floppy.zip</url>
 					<name>Flight of the Amazon Queen, Freeware Floppy Version</name>
 				</file>
 			</entries>
@@ -135,27 +134,27 @@
 			<entries>
 				<file>
 					<category_icon>lure</category_icon>
-					<url>Lure of the Temptress/lure-1.1.zip</url>
+					<url type="extras">Lure of the Temptress/lure-1.1.zip</url>
 					<name>Lure of the Temptress, Freeware Version (English)</name>
 				</file>
 				<file>
 					<category_icon>lure</category_icon>
-					<url>Lure of the Temptress/lure-fr-1.1.zip</url>
+					<url type="extras">Lure of the Temptress/lure-fr-1.1.zip</url>
 					<name>Lure of the Temptress, Freeware Version (French)</name>
 				</file>
 				<file>
 					<category_icon>lure</category_icon>
-					<url>Lure of the Temptress/lure-de-1.1.zip</url>
+					<url type="extras">Lure of the Temptress/lure-de-1.1.zip</url>
 					<name>Lure of the Temptress, Freeware Version (German)</name>
 				</file>
 				<file>
 					<category_icon>lure</category_icon>
-					<url>Lure of the Temptress/lure-it-1.1.zip</url>
+					<url type="extras">Lure of the Temptress/lure-it-1.1.zip</url>
 					<name>Lure of the Temptress, Freeware Version (Italian)</name>
 				</file>
 				<file>
 					<category_icon>lure</category_icon>
-					<url>Lure of the Temptress/lure-es-1.1.zip</url>
+					<url type="extras">Lure of the Temptress/lure-es-1.1.zip</url>
 					<name>Lure of the Temptress, Freeware Version (Spanish)</name>
 				</file>
 			</entries>
@@ -167,32 +166,32 @@
 			<entries>
 				<file>
 					<category_icon>drascula</category_icon>
-					<url>Drascula_ The Vampire Strikes Back/drascula-1.0.zip</url>
+					<url type="extras">Drascula_ The Vampire Strikes Back/drascula-1.0.zip</url>
 					<name>Drascula: The Vampire Strikes Back, Freeware Version (English)</name>
 				</file>
 				<file>
 					<category_icon>mp3</category_icon>
-					<url>Drascula_ The Vampire Strikes Back/drascula-audio-mp3-2.0.zip</url>
+					<url type="extras">Drascula_ The Vampire Strikes Back/drascula-audio-mp3-2.0.zip</url>
 					<name>Drascula: The Vampire Strikes Back, Freeware Version (Music AddOn, MP3 format)</name>
 				</file>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Drascula_ The Vampire Strikes Back/drascula-audio-flac-2.0.zip</url>
+					<url type="extras">Drascula_ The Vampire Strikes Back/drascula-audio-flac-2.0.zip</url>
 					<name>Drascula: The Vampire Strikes Back, Freeware Version (Music AddOn, FLAC format)</name>
 				</file>
 				<file>
 					<category_icon>ogg</category_icon>
-					<url>Drascula_ The Vampire Strikes Back/drascula-audio-2.0.zip</url>
+					<url type="extras">Drascula_ The Vampire Strikes Back/drascula-audio-2.0.zip</url>
 					<name>Drascula: The Vampire Strikes Back, Freeware Version (Music AddOn, OGG format)</name>
 				</file>
 				<file>
 					<category_icon>drascula</category_icon>
-					<url>Drascula_ The Vampire Strikes Back/drascula-int-1.0.zip</url>
+					<url type="extras">Drascula_ The Vampire Strikes Back/drascula-int-1.0.zip</url>
 					<name>Drascula: The Vampire Strikes Back, Freeware Version (Spanish, German, French and Italian AddOn)</name>
 				</file>
 				<file>
 					<category_icon>drascula</category_icon>
-					<url>Drascula_ The Vampire Strikes Back/drascula-int-1.1.zip</url>
+					<url type="extras">Drascula_ The Vampire Strikes Back/drascula-int-1.1.zip</url>
 					<name>Drascula: The Vampire Strikes Back, Freeware Version (Updated Spanish, German, French and Italian AddOn) - requires ScummVM 1.3.0 or more</name>
 				</file>
 			</entries>
@@ -204,12 +203,12 @@
 			<entries>
 				<file>
 					<category_icon>sfinx</category_icon>
-					<url>Sfinx/sfinx-en-v1.1.zip</url>
+					<url type="extras">Sfinx/sfinx-en-v1.1.zip</url>
 					<name>Sfinx, Freeware Version (English, v1.1)</name>
 				</file>
 				<file>
 					<category_icon>sfinx</category_icon>
-					<url>Sfinx/sfinx-pl-v1.1.zip</url>
+					<url type="extras">Sfinx/sfinx-pl-v1.1.zip</url>
 					<name>Sfinx, Freeware Version (Polish, v1.1)</name>
 				</file>
 			</entries>
@@ -221,17 +220,17 @@
 			<entries>
 				<file>
 					<category_icon>soltys</category_icon>
-					<url>Soltys/soltys-en-v1.0.zip</url>
+					<url type="extras">Soltys/soltys-en-v1.0.zip</url>
 					<name>Soltys, Freeware Version (English)</name>
 				</file>
 				<file>
 					<category_icon>soltys</category_icon>
-					<url>Soltys/soltys-pl-v1.0.zip</url>
+					<url type="extras">Soltys/soltys-pl-v1.0.zip</url>
 					<name>Soltys, Freeware Version (Polish)</name>
 				</file>
 				<file>
 					<category_icon>soltys</category_icon>
-					<url>Soltys/soltys-es-v1.0.zip</url>
+					<url type="extras">Soltys/soltys-es-v1.0.zip</url>
 					<name>Soltys, Freeware Version (Spanish)</name>
 				</file>
 			</entries>
@@ -243,7 +242,7 @@
 			<entries>
 				<file>
 					<category_icon>mysthous</category_icon>
-					<url>Mystery House/MYSTHOUS.zip</url>
+					<url type="extras">Mystery House/MYSTHOUS.zip</url>
 					<name>Mystery House, public domain version (Apple II)</name>
 				</file>
 			</entries>
@@ -264,85 +263,85 @@
 			<entries>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Broken Sword I and II/Sword1_DXA_Cutscenes.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_DXA_Cutscenes.zip</url>
 					<name>Broken Sword Cutscene Pack (English, DXA compression)</name>
 					<extra_msg>- Requires ScummVM 0.10.0</extra_msg>
 				</file>
 				<file>
 					<category_icon>ogg</category_icon>
-					<url>http://downloads.scummbr.com/Sword1_Cutscenes_BRA_Complete.zip</url>
+					<url type="extras">http://downloads.scummbr.com/Sword1_Cutscenes_BRA_Complete.zip</url>
 					<name>Broken Sword Cutscene Pack (Brazilian)</name>
 					<extra_info>(38M) This is an offsite package with both Brazillian videos and audio</extra_info>
 				</file>
 				<file>
 					<category_icon>sword</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_Subtitles-1.0.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_Subtitles-1.0.zip</url>
 					<name>Broken Sword Cutscene Pack (all languages, Subtitles AddOn)</name>
 					<extra_msg>Cutscene subtitles pack. All languages</extra_msg>
 				</file>
 				<file>
 					<category_icon>sword</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_Subtitles-1.1.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_Subtitles-1.1.zip</url>
 					<name>Broken Sword Cutscene Pack (all languages, Updated Subtitles AddOn) - requires ScummVM 1.5.0 or more</name>
 					<extra_msg>Cutscene subtitles pack. All languages</extra_msg>
 				</file>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_DXA_FRE_AddOn.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_DXA_FRE_AddOn.zip</url>
 					<name>Broken Sword Cutscene Pack (French AddOn)</name>
 					<extra_msg>Overwrite files in English Pack with files from this archive</extra_msg>
 				</file>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_DXA_GER_AddOn.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_DXA_GER_AddOn.zip</url>
 					<name>Broken Sword Cutscene Pack (German AddOn)</name>
 					<extra_msg>Overwrite files in English Pack with files from this archive</extra_msg>
 				</file>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_DXA_ITA_AddOn.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_DXA_ITA_AddOn.zip</url>
 					<name>Broken Sword Cutscene Pack (Italian AddOn)</name>
 					<extra_msg>Overwrite files in English Pack with files from this archive</extra_msg>
 				</file>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_DXA_ESP_AddOn.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_DXA_ESP_AddOn.zip</url>
 					<name>Broken Sword Cutscene Pack (Spanish AddOn)</name>
 					<extra_msg>Overwrite files in English Pack with files from this archive</extra_msg>
 				</file>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Broken Sword I and II/Sword1_Demo_Cutscenes.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Demo_Cutscenes.zip</url>
 					<name>Broken Sword Demo Cutscene Pack</name>
 					<extra_msg>- Requires ScummVM 0.10.0</extra_msg>
 				</file>
 				<file>
 					<category_icon>ogg</category_icon>
-					<url>Broken Sword I and II/Sword1_OGG_Cutscenes.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_OGG_Cutscenes.zip</url>
 					<name>Broken Sword Cutscene Pack (English OGG AddOn)</name>
 					<extra_msg>Alternative English audio pack, for ports without FLAC support</extra_msg>
 				</file>
 				<file>
 					<category_icon>ogg</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_FRE_AddOn.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_FRE_AddOn.zip</url>
 					<name>Broken Sword Cutscene Pack (French OGG AddOn)</name>
 					<extra_msg>Alternative French audio pack, for ports without FLAC support</extra_msg>
 				</file>
 				<file>
 					<category_icon>ogg</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_GER_AddOn.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_GER_AddOn.zip</url>
 					<name>Broken Sword Cutscene Pack (German OGG AddOn)</name>
 					<extra_msg>Alternative German audio pack, for ports without FLAC support</extra_msg>
 				</file>
 				<file>
 					<category_icon>ogg</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_ITA_AddOn.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_ITA_AddOn.zip</url>
 					<name>Broken Sword Cutscene Pack (Italian OGG AddOn)</name>
 					<extra_msg>Alternative Italian audio pack, for ports without FLAC support</extra_msg>
 				</file>
 				<file>
 					<category_icon>ogg</category_icon>
-					<url>Broken Sword I and II/Sword1_Cutscenes_ESP_AddOn.zip</url>
+					<url type="extras">Broken Sword I and II/Sword1_Cutscenes_ESP_AddOn.zip</url>
 					<name>Broken Sword Cutscene Pack (Spanish OGG AddOn)</name>
 					<extra_msg>Alternative Spanish audio pack, for ports without FLAC support</extra_msg>
 				</file>
@@ -358,19 +357,19 @@
 			<entries>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Broken Sword I and II/Sword2_DXA_Cutscenes.zip</url>
+					<url type="extras">Broken Sword I and II/Sword2_DXA_Cutscenes.zip</url>
 					<name>Broken Sword II Cutscene Pack (all languages, DXA compression)</name>
 					<extra_msg>- Requires ScummVM 0.10.0</extra_msg>
 				</file>
 				<file>
 					<category_icon>ogg</category_icon>
-					<url>Broken Sword I and II/Sword2_OGG_Cutscenes.zip</url>
+					<url type="extras">Broken Sword I and II/Sword2_OGG_Cutscenes.zip</url>
 					<name>Broken Sword II Cutscene Pack (all languages, OGG AddOn)</name>
 					<extra_msg>Alternative audio pack, for ports without FLAC support</extra_msg>
 				</file>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Broken Sword I and II/Sword2_Demo_Cutscenes.zip</url>
+					<url type="extras">Broken Sword I and II/Sword2_Demo_Cutscenes.zip</url>
 					<name>Broken Sword II Demo Cutscene Pack</name>
 					<extra_msg>- Requires ScummVM 0.10.0</extra_msg>
 				</file>
@@ -383,7 +382,7 @@
 			<entries>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>Elvira 2/elvira2_pc_sfx.zip</url>
+					<url type="extras">Elvira 2/elvira2_pc_sfx.zip</url>
 					<name>Elvira 2 - Digital samples for sound effects in the PC version</name>
 					<extra_msg>- Requires ScummVM 1.8.0</extra_msg>
 				</file>
@@ -396,7 +395,7 @@
 			<entries>
 				<file>
 					<category_icon>flac</category_icon>
-					<url>The Feeble Files/Feeble_OmniTV_Cutscenes.zip</url>
+					<url type="extras">The Feeble Files/Feeble_OmniTV_Cutscenes.zip</url>
 					<name>The Feeble Files - Omni TV and epilogue cutscenes for the Amiga and Macintosh versions</name>
 					<extra_msg>- Requires ScummVM 0.10.0</extra_msg>
 				</file>
diff --git a/include/Constants.php b/include/Constants.php
index ddfac61..f90ae71 100644
--- a/include/Constants.php
+++ b/include/Constants.php
@@ -43,6 +43,7 @@ class Constants
         /* Downloads */
         define('DOWNLOADS_URL', '/frs/scummvm/{$release}/');
         define('DOWNLOADS_TOOLS_URL', '/frs/scummvm-tools/{$release}/');
+        define('DOWNLOADS_EXTRAS_URL', '/frs/extras/');
 
         /**
          * Smarty configuration. The Smarty team does not recommend putting any of the
diff --git a/include/Objects/DownloadsSection.php b/include/Objects/DownloadsSection.php
index 7feb796..d047a17 100644
--- a/include/Objects/DownloadsSection.php
+++ b/include/Objects/DownloadsSection.php
@@ -11,6 +11,7 @@ class DownloadsSection extends BasicSection
     private $files;
     private $links;
     private $items;
+    private $baseUrl;
 
     public function __construct($data)
     {
@@ -18,12 +19,16 @@ class DownloadsSection extends BasicSection
         $this->notes = $data['notes'];
         $this->items = array();
 
+        if (isset($data['baseurl'])) {
+            $this->baseUrl = $data['baseurl'];
+        }
+
         if (isset($data['entries'])) {
             foreach ($data['entries'] as $type => $item) {
                 parent::toArray($item);
                 if ($type == 'file') {
                     foreach ($item as $file) {
-                        $this->items[] = new File($file);
+                        $this->items[] = new File($file, $this->baseUrl);
                     }
                 } elseif ($type == 'link') {
                     foreach ($item as $link) {
diff --git a/include/Objects/File.php b/include/Objects/File.php
index f3de35f..ee819a3 100644
--- a/include/Objects/File.php
+++ b/include/Objects/File.php
@@ -12,7 +12,7 @@ class File extends BasicObject
     private $extra_info;
     private $user_agent;
 
-    public function __construct($data)
+    public function __construct($data, $baseUrl = null)
     {
         parent::__construct($data);
         $this->category_icon = $data['category_icon'];
@@ -32,10 +32,14 @@ class File extends BasicObject
         }
 
         if (!preg_match('/^((https?)|(ftp)):\/\//', $url)) {
-            if ($attributes['type'] == 'downloads') {
+            if ($baseUrl !== null) {
+                $url = $baseUrl . $url;
+            } elseif ($attributes['type'] == 'downloads') {
                 $url = DIR_DOWNLOADS . "/{$url}";
             } elseif ($attributes['type'] == 'tools') {
                 $url = DOWNLOADS_TOOLS_URL . $url;
+            } elseif ($attributes['type'] == 'extras') {
+                $url = DOWNLOADS_EXTRAS_URL . $url;
             } else {
                 $url = DOWNLOADS_URL . $url;
             }


Commit: 9d98a5991e2ac7f943c59c20077625e63a7fd00d
    https://github.com/scummvm/scummvm-web/commit/9d98a5991e2ac7f943c59c20077625e63a7fd00d
Author: Matan Bareket (mataniko at gmail.com)
Date: 2019-01-23T05:21:02-05:00

Commit Message:
WEB: Disable Smarty caching

Changed paths:
    include/Controller.php


diff --git a/include/Controller.php b/include/Controller.php
index be482cd..be6c995 100644
--- a/include/Controller.php
+++ b/include/Controller.php
@@ -31,6 +31,7 @@ class Controller
         /* Configure smarty. */
         $this->smarty->setCompileDir(SMARTY_DIR_COMPILE);
         $this->smarty->setCacheDir(SMARTY_DIR_CACHE);
+        $this->smarty->setCaching(Smarty::CACHING_OFF);
         $this->smarty->setTemplateDir(array("templates_$lang", 'templates'));
         $this->smarty->compile_id = $lang;
 





More information about the Scummvm-git-logs mailing list