diff --git a/catalog/controller/extension/d_vuefront/common/home.php b/catalog/controller/extension/d_vuefront/common/home.php index 8431c26..9fd69fb 100755 --- a/catalog/controller/extension/d_vuefront/common/home.php +++ b/catalog/controller/extension/d_vuefront/common/home.php @@ -22,8 +22,9 @@ public function searchUrl($args) return $result; } - public function version() { - return "1.0.0"; + public function version() + { + return "1.0.0"; } public function updateApp($args) @@ -36,18 +37,18 @@ public function updateApp($args) public function updateSite($args) { - try { - $rootFolder = realpath(DIR_APPLICATION.'../'); - $tmpFile = tempnam(sys_get_temp_dir(), 'TMP_'); - rename($tmpFile, $tmpFile .= '.tar'); - file_put_contents($tmpFile, file_get_contents("https://vuefront2019.s3.amazonaws.com/sites/".$args['number']."/vuefront-app.tar")); - $this->removeDir($rootFolder.'/vuefront'); - $phar = new PharData($tmpFile); - $phar->extractTo($rootFolder.'/vuefront'); - return true; - } catch (\Exception $e) { - } - return false; + try { + $rootFolder = realpath(DIR_APPLICATION.'../'); + $tmpFile = tempnam(sys_get_temp_dir(), 'TMP_'); + rename($tmpFile, $tmpFile .= '.tar'); + file_put_contents($tmpFile, file_get_contents("https://vuefront2019.s3.amazonaws.com/sites/".$args['number']."/vuefront-app.tar")); + $this->removeDir($rootFolder.'/vuefront'); + $phar = new PharData($tmpFile); + $phar->extractTo($rootFolder.'/vuefront'); + return true; + } catch (\Exception $e) { + } + return false; } private function removeDir($dir) diff --git a/catalog/controller/extension/module/d_vuefront.php b/catalog/controller/extension/module/d_vuefront.php index 692ed89..6245e9e 100755 --- a/catalog/controller/extension/module/d_vuefront.php +++ b/catalog/controller/extension/module/d_vuefront.php @@ -23,7 +23,7 @@ public function __construct($registry) } header('Access-Control-Allow-Methods: POST, OPTIONS'); header('Access-Control-Allow-Credentials: true'); - header('Access-Control-Allow-Headers: accept,Referer,content-type,x-forwarded-for,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Token,token,Cookie,cookie,content-type'); + header('Access-Control-Allow-Headers: accept,Referer,content-type,x-forwarded-for,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Token,token,Cookie,cookie,content-type,Authorization'); } catch (Exception $e) { } } diff --git a/catalog/view/theme/default/template/extension/module/d_vuefront.twig b/catalog/view/theme/default/template/extension/module/d_vuefront.twig index 0b40510..513ff90 100755 --- a/catalog/view/theme/default/template/extension/module/d_vuefront.twig +++ b/catalog/view/theme/default/template/extension/module/d_vuefront.twig @@ -1,488 +1,31 @@ -
- - -