Skip to content

Commit

Permalink
v1.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
optipic-io committed Aug 11, 2021
1 parent 5b0b65f commit 5d767d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/addons/optipic/ImgUrlConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,10 @@ public static function getDefaultSettings($settingKey = false)

public static function getCurrentDomain($trimWww = false)
{
if (is_null(self::$host) && !empty($_SERVER['HTTP_HOST'])) {
self::$host = $_SERVER['HTTP_HOST'];
}

if (empty(self::$host)) {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion app/addons/optipic/func.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function fn_optipic_settings_field_info() {

$settings = $optipic->getSettings();

$srcJs = 'https://optipic.io/api/cp/stat?domain='.$currentHost.'&sid='.$settings['site_id'].'&cms=cscart&stype=cdn&append_to=%23content_optipic&version=1.21.0';
$srcJs = 'https://optipic.io/api/cp/stat?domain='.$currentHost.'&sid='.$settings['site_id'].'&cms=cscart&stype=cdn&append_to=%23content_optipic_generic_settings&version=1.21.0';

$html = '';

Expand Down

0 comments on commit 5d767d2

Please sign in to comment.