Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid overwriting favicon.ico when installing package. #23

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/Installer/Package/ShopPackageInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ShopPackageInstaller extends AbstractPackageInstaller
public const SHOP_SOURCE_DIRECTORY = 'source';
public const FILE_TO_CHECK_IF_PACKAGE_INSTALLED = 'index.php';
public const SHOP_SOURCE_CONFIGURATION_FILE = 'config.inc.php';
public const FAVICON_FILE = 'favicon.ico';
public const OFFLINE_FILE = 'offline.html';
public const DISTRIBUTION_FILE_EXTENSION_MARK = '.dist';
public const SHOP_SOURCE_SETUP_DIRECTORY = 'Setup';
Expand Down Expand Up @@ -92,6 +93,7 @@ private function copyPackage($packagePath)
$this->copySetupFiles($packagePath);
$this->copyConfigurationDistFileWithinTarget();
$this->copyHtaccessFiles($packagePath);
$this->copyFaviconFile($packagePath);
$this->copyOfflineFile($packagePath);
$this->copyRobotsExclusionFiles($packagePath);
}
Expand All @@ -108,6 +110,7 @@ private function copyShopSourceFromPackageToTarget($packagePath)
[self::HTACCESS_FILTER],
[self::ROBOTS_EXCLUSION_FILTER],
[self::SETUP_FILES_FILTER],
[self::FAVICON_FILE],
[self::OFFLINE_FILE],
$this->getVCSFilter(),
];
Expand Down Expand Up @@ -144,7 +147,20 @@ private function copyHtaccessFiles($packagePath)
}

/**
* Copy shop's offline/maintenange page from package.
* Copy shop's favicon from package.
*
* @param string $packagePath Absolute path which points to shop's package directory.
*/
private function copyFaviconFile($packagePath)
{
$this->copyFilesFromSourceToInstallationByFilter(
$packagePath,
self::FAVICON_FILE
);
}

/**
* Copy shop's offline/maintenance page from package.
*
* @param string $packagePath Absolute path which points to shop's package directory.
*/
Expand Down