From: vincent@cubedesigners.com Date: Mon, 6 Feb 2023 14:43:00 +0000 (+0000) Subject: wip #5714 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4170030660088b51b5854675f25b00abd86b21eb;p=cubeextranet.git wip #5714 @0.75 --- diff --git a/.docker/images/php/Dockerfile b/.docker/images/php/Dockerfile index 3301714eb..b3dd96f07 100644 --- a/.docker/images/php/Dockerfile +++ b/.docker/images/php/Dockerfile @@ -49,6 +49,7 @@ RUN apt update && apt -y --no-install-recommends install \ php7.2-xsl \ php7.2-curl \ php7.2-mcrypt \ + php7.2-mailparse \ less nano wget bash lynx COPY --from=composer:2 /usr/bin/composer /usr/bin/composer diff --git a/composer.json b/composer.json index 59017d416..83616219f 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "jaybizzle/crawler-detect": "^1.2", "hollodotme/fast-cgi-client": "^3.1", "cubist/azuretts": "dev-master", - "ext-zip": "*" + "ext-zip": "*", + "cubist/matomo": "dev-master" } } diff --git a/composer.lock b/composer.lock index 9b3f22343..ce8a3520a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8bbf55ec7405127ece297cb6165bf626", + "content-hash": "a296915488637decdddbe768c1d14d8d", "packages": [ { "name": "cubist/azuretts", @@ -12,13 +12,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_azuretts.git", - "reference": "2a05ca6b82d3ecc1c033ccff09b454e9d6114050" + "reference": "af71b539a83a5bdcb1414e8e7556ab30c9b3f52f" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/azuretts/cubist-azuretts-dev-master-8a9d19.tar", - "reference": "2a05ca6b82d3ecc1c033ccff09b454e9d6114050", - "shasum": "8d366ea46ec657789f0ec090f83d3508d8261f6b" + "url": "https://composer.cubedesigners.com/dist/cubist/azuretts/cubist-azuretts-dev-master-b10a09.tar", + "reference": "af71b539a83a5bdcb1414e8e7556ab30c9b3f52f", + "shasum": "9b2b9f54d7cade2774dda284d6afa722125c9a18" }, "require": { "ext-json": "*", @@ -26,6 +26,9 @@ "guzzlehttp/guzzle": "^7.4", "php": ">=7.2.5" }, + "suggest": { + "laravel/framework": "^5.8|^6.0|^7.0|^8.0" + }, "default-branch": true, "type": "library", "autoload": { @@ -43,7 +46,45 @@ } ], "description": "Azure TTS REST API", - "time": "2022-01-31T18:34:38+00:00" + "time": "2022-10-12T14:55:04+00:00" + }, + { + "name": "cubist/matomo", + "version": "dev-master", + "source": { + "type": "git", + "url": "git://git.cubedesigners.com/cubist_matomo.git", + "reference": "16b89dc9bd52116a343a0ef120311e06c0f3112f" + }, + "dist": { + "type": "tar", + "url": "https://composer.cubedesigners.com/dist/cubist/matomo/cubist-matomo-dev-master-484885.tar", + "reference": "16b89dc9bd52116a343a0ef120311e06c0f3112f", + "shasum": "c8855c22c5d8a21bbdcdbcfd0c12bcbfea86544b" + }, + "require": { + "ext-json": "*", + "guzzlehttp/guzzle": "^7.4.1", + "php": ">=7.2" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Cubist\\Matomo\\": "src" + } + }, + "license": [ + "proprietary" + ], + "authors": [ + { + "name": "Vincent Vanwaelscappel", + "email": "vincent@cubedesigners.com" + } + ], + "description": "Matomo API", + "time": "2022-09-21T16:20:01+00:00" }, { "name": "guzzlehttp/guzzle", @@ -265,12 +306,12 @@ "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379" + "reference": "ddb46aeea6423f504136cff6989ae39064301eef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/69568e4293f4fa993f3b0e51c9723e1e17c41379", - "reference": "69568e4293f4fa993f3b0e51c9723e1e17c41379", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/ddb46aeea6423f504136cff6989ae39064301eef", + "reference": "ddb46aeea6423f504136cff6989ae39064301eef", "shasum": "" }, "require": { @@ -361,7 +402,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.1" + "source": "https://github.com/guzzle/psr7/tree/master" }, "funding": [ { @@ -377,7 +418,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:45:39+00:00" + "time": "2022-12-27T19:02:55+00:00" }, { "name": "hollodotme/fast-cgi-client", @@ -431,16 +472,16 @@ }, { "name": "jaybizzle/crawler-detect", - "version": "v1.2.111", + "version": "v1.2.113", "source": { "type": "git", "url": "https://github.com/JayBizzle/Crawler-Detect.git", - "reference": "d572ed4a65a70a2d2871dc5137c9c5b7e69745ab" + "reference": "6710b75871da2b718550c2bc33388315a3b20151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/d572ed4a65a70a2d2871dc5137c9c5b7e69745ab", - "reference": "d572ed4a65a70a2d2871dc5137c9c5b7e69745ab", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/6710b75871da2b718550c2bc33388315a3b20151", + "reference": "6710b75871da2b718550c2bc33388315a3b20151", "shasum": "" }, "require": { @@ -477,9 +518,9 @@ ], "support": { "issues": "https://github.com/JayBizzle/Crawler-Detect/issues", - "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.111" + "source": "https://github.com/JayBizzle/Crawler-Detect/tree/v1.2.113" }, - "time": "2022-03-15T22:19:01+00:00" + "time": "2023-02-02T21:01:40+00:00" }, { "name": "php-mime-mail-parser/php-mime-mail-parser", @@ -778,12 +819,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "4912000e79dc2d6df029d35d8755be1ed79b6691" + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/4912000e79dc2d6df029d35d8755be1ed79b6691", - "reference": "4912000e79dc2d6df029d35d8755be1ed79b6691", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "shasum": "" }, "require": { @@ -793,7 +834,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.2-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -822,7 +863,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/main" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" }, "funding": [ { @@ -838,22 +879,24 @@ "type": "tidelift" } ], - "time": "2022-05-20T13:56:22+00:00" + "time": "2022-11-25T10:21:52+00:00" } ], "packages-dev": [], "aliases": [], "minimum-stability": "dev", "stability-flags": { - "cubist/azuretts": 20 + "cubist/azuretts": 20, + "cubist/matomo": 20 }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "7.2.*", + "php": "^7.2", "ext-mbstring": "*", "ext-simplexml": "*", - "ext-curl": "*" + "ext-curl": "*", + "ext-zip": "*" }, "platform-dev": [], "plugin-api-version": "2.1.0" diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 4dcca7ffc..bd70cc29b 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -1717,13 +1717,11 @@ class wsMaintenance public static function matomo() { + require_once ROOT.'/vendor/autoload.php'; set_time_limit(0); - $reporting4 = new \Cubist\Matomo\Reporting('https://stats4.fluidbook.com/', '93e4c1a34e3ead33e85a8171dc4fd3ed'); - $reporting5 = new \Cubist\Matomo\Reporting('https://stats5.fluidbook.com/', '93e4c1a34e3ead33e85a8171dc4fd3ed'); -// $reporting = new \Cubist\Matomo\Reporting('https://v3.stats.fluidbook.com/', 'ebe362f44c01bda1ddedb75d7726ff78'); + $reporting6 = new \Cubist\Matomo\Reporting('https://stats6.fluidbook.com/', '16f4c1d77cdc4792b807718388db96a0'); for ($i = 2; $i <= 40000; $i++) { - $reporting4->createSite('Fluidbook #' . $i, 'https://' . $i . '.fluidbook'); - $reporting5->createSite('Fluidbook #' . $i, 'https://' . $i . '.fluidbook'); + $reporting6->createSite('Fluidbook #' . $i, 'https://' . $i . '.fluidbook'); } } diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index a4089f6fc..fd06bd0ac 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1231,6 +1231,15 @@ class wsHTML5Compiler if ($this->book_id >= 21210) { $this->config->statsMatomoServer = 4 + ($this->book_id % 2); } + if ($this->book->region == 'US') { + $this->config->statsMatomoServer = 6; + $this->config->stats = false; + } + + set_time_limit(0); + + + } else { $this->config->statsMatomo = false; } @@ -1286,7 +1295,6 @@ height="0" width="0" style="display:none;visibility:hidden"> } } - protected function _wdirOrAbsolute($path) { $path = commonTools::fixpath($path); @@ -1682,7 +1690,7 @@ height="0" width="0" style="display:none;visibility:hidden"> $socialDescription = html::escapeHTML($this->book->parametres->facebook_description ? $this->book->parametres->facebook_description : $this->book->parametres->seoDescription); $socialImage = 'https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $this->book->cid; - $sizeFile = wsBook::getRegionDir($this->book->book_id).'social_image/' . $this->book->book_id . '.size'; + $sizeFile = wsBook::getRegionDir($this->book->book_id) . 'social_image/' . $this->book->book_id . '.size'; if (!file_exists($sizeFile)) { $dim = CubeIT_Image::getimagesize($socialImage); file_put_contents($sizeFile, json_encode($dim)); @@ -2830,7 +2838,7 @@ height="0" width="0" style="display:none;visibility:hidden"> public function writeTexts() { $cache = sha1($this->book->parametres->highlightResults . '/--/' . $this->book->parametres->searchWordSelectionAlgorithm . '///' . $this->book->parametres->textExtraction . '|--|' . $this->book->parametres->ignoreSearchSeparators . '|||' . $this->book->composition_update . '()()()' . filemtime(WS_TOOLS . '/fwstk/out/artifacts/fwstk_jar/fwstk.jar')); - $cacheDir = wsBook::getDir( $this->book_id,'index').'cache/'; + $cacheDir = wsBook::getDir($this->book_id, 'index') . 'cache/'; if (!file_exists($cacheDir)) { mkdir($cacheDir, 0777, true);