Dodanie obsługi kuponów rabatowych w szczegółach zamówienia oraz aktualizacja adresów URL do zasobów aktualizacji

This commit is contained in:
2025-03-11 23:56:31 +01:00
parent 8adeb8eb10
commit 2184e285b1
15 changed files with 126 additions and 98 deletions

View File

@@ -9,7 +9,7 @@ class Update
\S::delete_session( 'new-version' );
$versions = file_get_contents( 'http://www.shoppro.project-dc.pl/updates/versions.php?key=' . $settings['update_key'] );
$versions = file_get_contents( 'https://shoppro.project-dc.pl/updates/versions.php?key=' . $settings['update_key'] );
$versions = explode( PHP_EOL, $versions );
foreach ( $versions as $ver )
@@ -22,7 +22,7 @@ class Update
else
$dir = substr( $ver, 0, strlen( $ver ) - 1 ) . 0;
$file = file_get_contents( 'http://www.shoppro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '.zip' );
$file = file_get_contents( 'https://shoppro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '.zip' );
$dlHandler = fopen( 'update.zip' , 'w' );
if ( !fwrite( $dlHandler, $file ) )
@@ -34,10 +34,10 @@ class Update
else
{
/* aktualizacja bazy danych */
$url = 'http://www.shoppro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '_sql.txt';
$url = 'https://shoppro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '_sql.txt';
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HEADER, true );
curl_setopt( $ch, CURLOPT_HEADER, false );
$response = curl_exec( $ch );
$content_type = curl_getinfo( $ch, CURLINFO_CONTENT_TYPE );
@@ -53,10 +53,10 @@ class Update
}
/* usuwanie zbędnych plików */
$url = 'http://www.shoppro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '_files.txt';
$url = 'https://shoppro.project-dc.pl/updates/' . $dir . '/ver_' . $ver . '_files.txt';
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_HEADER, true );
curl_setopt( $ch, CURLOPT_HEADER, false );
$response = curl_exec( $ch );
$content_type = curl_getinfo( $ch, CURLINFO_CONTENT_TYPE );