Projekt

Allgemein

Profil

Aktionen

GX-Bug #63332

geschlossen

Der Ordner /admin/html/assets/images/legacy/ wird im Gambio Updater umbenannt

Von Timo Backhaus vor fast 5 Jahren hinzugefügt. Vor fast 5 Jahren aktualisiert.

Status:
Erledigt
Priorität:
Sofort
Zugewiesen an:
Moritz Bunjes
Kategorie:
Updater
Zielversion:
% erledigt:

100%

Geschätzter Aufwand:
Steps to reproduce:
Betroffene Versionen:
3.13.2.0
Release Notes Langtext:

Der Updater führt nun das Verschieben von Dateien aus admin/images nach admin/html/assets/images/legacy/ korrekt durch, wenn man von älteren Shopversionen aus aktualisiert


Beschreibung

Der Gambio Updater "sichert" den neu hochgeladenen Ordner "/admin/html/assets/images/legacy/" und benennt ihn dabei um (/admin/html/assets/images/legacy-bak/). Im Anschluss wird der Ordner "/admin/images/" in "/admin/html/assets/images/legacy/" umbenannt.

Problem:
Der alte Ordner "/admin/images/" beinhaltet nicht alle relevanten Dateien, sodass nach einem Update diverse Grafiken fehlen:

admin/html/assets/images/legacy/OnOffSprite.png
admin/html/assets/images/legacy/PAYONE_Logo_Claim_transparent.png
admin/html/assets/images/legacy/ajax-loader.gif
admin/html/assets/images/legacy/buttons/index.html
admin/html/assets/images/legacy/closedhand.cur
admin/html/assets/images/legacy/export_schemes/bg_field_column.jpg
admin/html/assets/images/legacy/export_schemes/bg_field_column_hover.jpg
admin/html/assets/images/legacy/export_schemes/export_progress_marker.png
admin/html/assets/images/legacy/export_schemes/icon_checkboxes.png
admin/html/assets/images/legacy/export_schemes/icon_column_delete.png
admin/html/assets/images/legacy/export_schemes/icon_column_move.png
admin/html/assets/images/legacy/export_schemes/icon_copy.png
admin/html/assets/images/legacy/export_schemes/icon_cronjob_status.png
admin/html/assets/images/legacy/export_schemes/icon_delete.png
admin/html/assets/images/legacy/export_schemes/icon_download.png
admin/html/assets/images/legacy/export_schemes/icon_edit.png
admin/html/assets/images/legacy/export_schemes/icon_export.png
admin/html/assets/images/legacy/export_schemes/icon_preview.png
admin/html/assets/images/legacy/export_schemes/index.html
admin/html/assets/images/legacy/export_schemes/overview_headline_delimiter.png
admin/html/assets/images/legacy/feature_set_arrow_down.png
admin/html/assets/images/legacy/feature_set_arrow_up.png
admin/html/assets/images/legacy/feature_set_show_all.png
admin/html/assets/images/legacy/gm_icons/admingr/index.html
admin/html/assets/images/legacy/gm_icons/gm_modules_icon_minus.gif
admin/html/assets/images/legacy/gm_icons/gm_modules_icon_plus.gif
admin/html/assets/images/legacy/gm_icons/index.html
admin/html/assets/images/legacy/graphs/index.html
admin/html/assets/images/legacy/heidelpay.gif
admin/html/assets/images/legacy/hermes_labels/index.html
admin/html/assets/images/legacy/icon_delete.png
admin/html/assets/images/legacy/icon_download.png
admin/html/assets/images/legacy/icon_edit.png
admin/html/assets/images/legacy/icon_progress_marker.png
admin/html/assets/images/legacy/icon_tooltip_arrows.gif
admin/html/assets/images/legacy/icon_tooltip_info.png
admin/html/assets/images/legacy/icons/mailbeez_gambio_icon.png
admin/html/assets/images/legacy/icons/withdrawal-on.png
admin/html/assets/images/legacy/info-icon.png
admin/html/assets/images/legacy/info_icon.png
admin/html/assets/images/legacy/janolaw/index.html
admin/html/assets/images/legacy/lightbox_icons/index.html
admin/html/assets/images/legacy/lightbox_icons/lightbox_button_close.png
admin/html/assets/images/legacy/lightbox_icons/lightbox_navigation_button_next.png
admin/html/assets/images/legacy/lightbox_icons/lightbox_navigation_button_prev.png
admin/html/assets/images/legacy/lightbox_icons/lightbox_progress_marker.png
admin/html/assets/images/legacy/loading.gif
admin/html/assets/images/legacy/plus_icon.png

Aktionen #1

Von Timo Backhaus vor fast 5 Jahren aktualisiert

Lösungsansatz:

src/gambio_updater/updates/v3.1.1.0/move.txt
Folgende Zeile entfernen:

'admin/images' => 'admin/html/assets/images/legacy'

src/gambio_updater/updates/v3.13.2.0/to_delete.txt
Folgende Zeile hinzufügen:

admin/images/*

src/gambio_updater/updates/v3.7.2.0/move.txt
Folgende Zeile entfernen:

'cache/status_icons' => 'images/icons/status'

src/gambio_updater/updates/v3.7.2.0/dependent.inc.php
Folgenden Code entfernen:

// Get all shipping status icons from database to move them to images/icons/status
$statusImages = $this->query('SELECT `shipping_status_image` FROM `shipping_status`');
if(!empty($statusImages))
{
    $imagesOldPath = DIR_FS_CATALOG . 'admin/html/assets/images/legacy/icons/';
    $imagesTmpPath = DIR_FS_CATALOG . 'cache/status_icons/';

    // Create new folder 'status' if it is not existent in images/icons
    if(!is_dir($imagesTmpPath))
    {
        mkdir($imagesTmpPath);
    }

    // Iterate over found images and move them to new destination
    foreach ($statusImages as $image)
    {
        if($image['shipping_status_image'] !== '' && file_exists($imagesOldPath.$image['shipping_status_image']) && !file_exists($imagesTmpPath.$image['shipping_status_image']))
        {
            rename($imagesOldPath.$image['shipping_status_image'], $imagesTmpPath.$image['shipping_status_image']);
        }
    }

    // Always move the gray.png to new destination because it is not saved in the database
    if(file_exists($imagesOldPath.'gray.png') && !file_exists($imagesTmpPath.'gray.png'))
    {
        rename($imagesOldPath.'gray.png', $imagesTmpPath.'gray.png');
    }
}

src/gambio_updater/updates/v3.13.2.0/dependent.inc.php
Folgenden Code hinzufügen:

// Get all shipping status icons from database to move them to images/icons/status
$statusImages = $this->query('SELECT `shipping_status_image` FROM `shipping_status`');
if (!empty($statusImages))
{
    $oldImagePathsArray = array(DIR_FS_CATALOG . 'admin/images/icons/', DIR_FS_CATALOG . 'admin/html/assets/images/legacy/icons/');
    $newImagePath = DIR_FS_CATALOG . 'images/icons/status/';

    foreach($oldImagePathsArray as $oldImagePath)
    {
        // Iterate over found images and move them to new destination
        foreach($statusImages as $image)
        {
            if($image['shipping_status_image'] !== '' && file_exists($oldImagePath . $image['shipping_status_image']))
            {
                rename($oldImagePath . $image['shipping_status_image'], $newImagePath . $image['shipping_status_image']);
            }
        }

        // Always move the gray.png to new destination because it is not saved in the database
        if(file_exists($oldImagePath . 'gray.png'))
        {
            rename($oldImagePath . 'gray.png', $newImagePath . 'gray.png');
        }
    }
}
Aktionen #2

Von Moritz Bunjes vor fast 5 Jahren aktualisiert

  • Status wurde von Gemeldet zu In Bearbeitung geändert
  • Zugewiesen an wurde auf Moritz Bunjes gesetzt
Aktionen #3

Von Moritz Bunjes vor fast 5 Jahren aktualisiert

  • Status wurde von In Bearbeitung zu Testing geändert
  • Zugewiesen an wurde von Moritz Bunjes zu Core-Entwickler geändert
  • Zielversion wurde von 133 zu 3.13.2.0 geändert
  • Release Notes Langtext aktualisiert (Vergleich)
Aktionen #4

Von Moritz Bunjes vor fast 5 Jahren aktualisiert

  • Status wurde von Testing zu Erledigt geändert
  • Zugewiesen an wurde von Core-Entwickler zu Moritz Bunjes geändert
  • % erledigt wurde von 0 zu 100 geändert
Aktionen

Auch abrufbar als: Atom PDF