51 Commits

Author SHA1 Message Date
Le Philousophe 93d3aa56a1 WEB: Handle null cases
Sometimes variables may be null. Handle the cases when passing to
functions expecting something non-null.
2025-08-24 12:32:47 +02:00
Le Philousophe cc9fa80181 WEB: Add typing 2025-08-24 12:32:47 +02:00
Le Philousophe 3d37c952a8 WEB: Use null instead of false when no data is available
This allows to use the ? type prefix.
2025-08-24 12:32:46 +02:00
Le Philousophe 1c9380ef3e JANITORIAL: Fix code style
This should not have any behavioral changes
2025-08-24 12:32:46 +02:00
Thunderforge f25dbcc8fa WEB: Removing unused imports 2023-05-24 18:42:56 -05:00
Thunderforge 264624f0f3 DATA: Removing constants for Android & Ubuntu versions (#200)
Now that we have the "version" column on the spreadsheet, the constants are unnecessary. This was a holdover from back when versions were determined by the file names and these URLs didn't have them.
2022-01-17 18:10:13 -06:00
Thunderforge e0c85807b6 DATA: Restoring extra info on downloads page
This involved renaming the spreadsheet column from "Description" to "Notes"
2022-01-17 20:55:39 +01:00
Thunderforge 1fdd6fd18f WEB: Changing category from "tools" to "scummvm-tools"
This allows for simpler URL generation
2022-01-11 22:11:30 -06:00
Thunderforge 732df0df4a WEB: Ensuring daily category takes priority
Daily builds should always be in the "Daily" category, regardless of which they are.
2022-01-11 22:04:56 -06:00
Thunderforge 5e82b7570c WEB: Simplifying how source URLs are constructed 2022-01-11 21:32:35 -06:00
Thunderforge 9795706cba WEB: Renaming recommended download variables 2022-01-11 19:50:23 -06:00
Thunderforge 30fd00126b WEB: Recommended download link
When I did refactoring for FileUtils, it seems it resulted in a bad copy/paste.
2022-01-11 13:09:44 -06:00
Thunderforge 453e74263b WEB: Adding file size and extension to recommended downloads (#191)
* WEB: Refactor reading files into FileUtils

Refactoring code in `include/Objects/File` into `FileUtils`. This not only makes the code much cleaner, but also allows it to be used in other places of the app, such as the `DownloadsModel`.

* WEB: Adding file size and extension to recommended downloads
2022-01-10 15:39:01 -06:00
Thunderforge d7162fa558 WEB: Removing Win32 label in extra info (#189)
Now that we have .exe files for 64-bit Windows, it's no longer accurate to say `Win32 .exe`. This was also unique behavior for Windows; we did not indicate bitness in this way for any other operating system.
2022-01-09 18:39:34 -06:00
masbaehr c5a6691368 WEB: Update DownloadsModel.php (#187)
fix wrong url for macos. download did not work because link is like this:
https://downloads.scummvm.orgfrs/scummvm/2.5.1/scummvm-2.5.1-macosx.dmg
2022-01-09 17:34:17 -06:00
Eugene Sandulenko 39398a2670 WEB: Put tools to the current category regardless of their version 2022-01-02 19:04:24 +01:00
Thunderforge 5b5564c8d1 WEB: Removing version sort from DownloadQuery
We now sort versions at a later point, and this avoids the issue of the Daily section appearing before the release section.
2021-11-27 11:57:00 -06:00
Thunderforge 359d84ec05 WEB: Removing code related to Extras
Extras have been removed from the `scummvm_downloads` tab of the data spreadsheet. Removing related code and localization data related to it.
2021-11-25 14:55:35 +01:00
Thunderforge a4f0e15a6f WEB: Fixing lint errors 2021-11-21 20:00:54 -06:00
Thunderforge 2ceb90ef78 WEB: Replacing is_null with !==
Codacy recommends this way
2021-11-21 20:00:17 -06:00
Thunderforge 0de6a475d3 WEB: Fixing when the recommended download link is an external URL (#182) 2021-11-21 19:52:16 -06:00
Thunderforge ac98bb341e WEB: Fixing when there is no download link for the user agent (#181) 2021-11-21 19:44:32 -06:00
Thunderforge c95bf5715e WEB: Sort downloads by version (#177) 2021-11-18 17:06:46 -06:00
Thunderforge 60e02dbf54 DATA: Changing downloads table to use version column (#174)
In order to simplify the process of updating version downloads, [downloads spreadsheet table](https://docs.google.com/spreadsheets/d/1QzwFleEKXOsE59cYMOcQB7C2f0Np48uAQOCG8kicX_s/edit#gid=1057392663) now includes a `version` column and the `url` field is much simpler. In order to update a new version, simply change the value in the `version` field.

Further improvements can be made, but for now this is an improvement that keeps parity with the previous code.
2021-11-18 16:04:20 -06:00
SupSuper 0eeb279c31 WEB: Combine daily downloads into a single list 2021-09-20 07:31:07 +01:00
SupSuper 3099c653a2 WEB: Update news buildbot links 2021-06-11 17:44:42 +01:00
Mataniko ef20da2ede WEB: Fix PHP array key warnings 2021-04-02 22:01:06 -04:00
Mataniko cf5b7b8431 WEB: Rename Database tables 2020-12-31 04:49:44 -05:00
Mataniko c71dce7702 WEB: Move downloads page to use the ORM 2020-12-31 04:49:44 -05:00
Mataniko ebe03e04d6 DATA: Update downloads filenames 2020-11-24 14:51:10 -05:00
Mataniko 8b036bed3f WEB: Update downloads page to use the new data model 2020-11-24 14:51:10 -05:00
Mataniko 08fffe6dd0 WEB: Load localized data in models 2020-10-10 01:34:06 -04:00
Mataniko 08ea2cfcde WEB: Lint and static analysis cleanup 2020-09-27 22:08:07 -04:00
Mataniko c0eb021126 WEB: Add caching to all models 2020-09-27 22:08:07 -04:00
Mataniko 4471b291a1 WEB: Convert all models to not be static objects
This is a first step towards moving to a dependency injection model.
2020-09-27 22:08:07 -04:00
Thunderforge 73958c69d5 BUILD: Standardizing the variable names for parsing data
Fixes the following Codacy issues:

* Avoid variables with short names like `$a`. Configured minimum length is 3.
* Avoid unused local variables such as '$key'.
2020-04-03 13:47:28 +02:00
Lothar Serra Mari aa1b1c4de4 DATA: Remove the workaround for providing the Win32 and Mac version by variable 2020-04-01 00:00:30 +02:00
Lothar Serra Mari 1444fd65b0 DATA: Override Win32 and Mac recommended download version 2020-03-31 21:15:58 +02:00
Lothar Serra Mari f40628a471 WEB: Fix formatting for the additional snap information 2020-03-23 22:53:51 +01:00
Lothar Serra Mari 5552f936fd WEB: Add additional install information to the snap package 2020-03-23 22:52:17 +01:00
Lothar Serra Mari 396a8eebab WEB: Fix indentation 2020-03-10 11:13:30 +01:00
Lothar Serra Mari 3da67ae86b WEB: Add version constants for Android and Snap Store releases
Since we can't use the filenames for stripping out the version information,
we have to rely on set values in Constants.php like we do for the Debian
and Tools packages.

Fixes empty version string for the recommended downloads offered
for Android users.
2020-03-10 10:00:31 +00:00
mataniko 68e0ca2d7b WEB: Escape user agent in DownloadsModel preg_match 2020-01-31 17:37:10 -05:00
mataniko c8fbbe8380 WEB: Fix static call to non-static method error. 2020-01-23 07:26:43 -05:00
Matan Bareket a5722c8ca0 WEB: Move the Recommended Download logic to the DownloadsModel 2019-05-09 00:28:27 -04:00
Matan Bareket 8a51f21f0c WEB: Rename Section objects 2019-01-22 19:49:58 -05:00
Matan Bareket 97262c4b2f WEB: Convert require statements to psr-4 style use statements 2019-01-22 19:49:58 -05:00
Matan Bareket 85328f2997 WEB: Use PSR-4 autoloading 2019-01-22 19:49:58 -05:00
Matan Bareket cfbeebb8dc WEB: Add namespaces to all PHP files 2019-01-22 19:49:58 -05:00
Matan Bareket 851bb41bb7 WEB: Auto-fix to PSR-2 standard 2019-01-22 19:49:58 -05:00