[Scummvm-git-logs] scummvm-web master -> 5e74670b365e02f67711cd789584a3fe459b3496

lotharsm mail at serra.me
Mon Nov 1 05:52:42 UTC 2021


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:
b9ce5baf45 WEB: Removing file.getType() and related dead code
5e74670b36 I10N: Removing unused listItemsBuildFromRepo from en/strings.json


Commit: b9ce5baf45425a10f36aec3f2aeaf2038500fb70
    https://github.com/scummvm/scummvm-web/commit/b9ce5baf45425a10f36aec3f2aeaf2038500fb70
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2021-11-01T06:52:39+01:00

Commit Message:
WEB: Removing file.getType() and related dead code

It appears that at one point the data spreadsheet included a `type` field. This is no longer the case and so all of this is not used, providing unnecessary confusion and maintenance.

Changed paths:
    include/Objects/File.php
    scss/pages/_downloads.scss
    templates/components/list_items.tpl


diff --git a/include/Objects/File.php b/include/Objects/File.php
index 36c8bbd1..93d4952d 100644
--- a/include/Objects/File.php
+++ b/include/Objects/File.php
@@ -8,7 +8,6 @@ class File extends BasicObject
 {
     private $category_icon;
     private $url;
-    private $type;
     private $extra_info;
     private $user_agent;
 
@@ -17,7 +16,6 @@ class File extends BasicObject
         parent::__construct($data);
         $this->category_icon = $data['category_icon'];
         $this->extra_info = $data['extra_info'] ?? null;
-        $this->type = strtolower($data['type'] ?? '');
         $this->user_agent = isset($data["user_agent"]) ? $data["user_agent"] : "";
 
         $fname = "";
@@ -34,14 +32,6 @@ class File extends BasicObject
         if (!preg_match('/^((https?)|(ftp)):\/\//', $url)) {
             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;
-            } elseif ($attributes['type'] == 'daily') {
-                $url = DOWNLOADS_DAILY_URL . $url;
             } else {
                 $url = DOWNLOADS_URL . $url;
             }
@@ -116,12 +106,6 @@ class File extends BasicObject
         return $this->url;
     }
 
-    /* Get the type. */
-    public function getType()
-    {
-        return $this->type;
-    }
-
     /* Get the extra information. */
     public function getExtraInfo()
     {
diff --git a/scss/pages/_downloads.scss b/scss/pages/_downloads.scss
index 6011ca70..3efb6b65 100644
--- a/scss/pages/_downloads.scss
+++ b/scss/pages/_downloads.scss
@@ -14,12 +14,6 @@ ul.downloads {
 	}
 }
 
-span.daily_provider {
-	display: block;
-	font-size: 90%;
-	padding-left: 3em;
-}
-
 #downloadContainer {
 	position: relative;
 	width: 100%;
diff --git a/templates/components/list_items.tpl b/templates/components/list_items.tpl
index a6d8b943..ce07293c 100644
--- a/templates/components/list_items.tpl
+++ b/templates/components/list_items.tpl
@@ -10,26 +10,12 @@
                         <span class="download-extras">
                             {if is_array($data)}
                                 (
-                                {if $item->getType() == 'daily'}{#listItemsBuildFromRepo#} {/if}
                                 {$data.size} {if $data.ext == '.exe'}Win32 {/if}{$data.ext}{if $data.date != ""}{#listItemsDate#} {$data.date} {/if}
                                  
                                 {if $data.sha256 != ""} <span class="sha256-toggle" onclick="this.nextSibling.classList.toggle('hidden')"> sha256</span><span class="sha256-text hidden"> <a href="{{eval var=$item->getURL()}|release|download}.sha256">{$data.sha256}</a></span>{/if}
                                 ) {if $data.msg != ""}{$data.msg}{/if}
-                            {else}
-                                {if $item->getType() != 'daily'}
-                                    {eval var=$data|default:' '}
-                                {/if}
                             {/if}
                         </span>
-                        {if $item->getType() == 'daily'}
-                            <span class="daily_provider">
-                                {if is_array($data)}
-                                    {eval var=$data.info}
-                                {else}
-                                    {eval var=$data}
-                                {/if}
-                            </span>
-                        {/if}
                     {/strip}
                 </li>
             {elseif $item instanceof ScummVM\Objects\WebLink}


Commit: 5e74670b365e02f67711cd789584a3fe459b3496
    https://github.com/scummvm/scummvm-web/commit/5e74670b365e02f67711cd789584a3fe459b3496
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2021-11-01T06:52:39+01:00

Commit Message:
I10N: Removing unused listItemsBuildFromRepo from en/strings.json

Changed paths:
    data/en/strings.json


diff --git a/data/en/strings.json b/data/en/strings.json
index 5b720f5c..22c61065 100644
--- a/data/en/strings.json
+++ b/data/en/strings.json
@@ -125,7 +125,6 @@
   "linksContentTitle": "Links",
   "linksHeading": "Links",
   "linksIntro": "**Link to us:** If you want to link your site to us: please feel free to use this image.",
-  "listItemsBuildFromRepo": "build from repository,",
   "listItemsDate": ", last update:",
   "newsTitle": "Home",
   "newsContentTitle": "Latest Developments",




More information about the Scummvm-git-logs mailing list