From 01ce3144f6e4aa11efaddf4f541cf8c118991b18 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 23 Sep 2019 11:34:55 +0000 Subject: [PATCH] done #3042 @0:10 --- inc/commons/DAO/class.common.dao.fichier.php | 2 +- inc/postconfig.inc.php | 2 +- inc/ws/Controlleur/class.ws.flash.php | 2 +- inc/ws/Controlleur/class.ws.maintenance.php | 1 + inc/ws/Controlleur/class.ws.services.php | 3 +++ inc/ws/Controlleur/class.ws.stats.php | 4 ++-- inc/ws/Metier/_common.php | 1 - inc/ws/Metier/class.ws.document.php | 2 +- .../Util/html5/master/class.ws.html5.compiler.php | 13 +++++++++---- index.php | 2 +- 10 files changed, 20 insertions(+), 12 deletions(-) diff --git a/inc/commons/DAO/class.common.dao.fichier.php b/inc/commons/DAO/class.common.dao.fichier.php index 24cba5aab..fefe3f9db 100644 --- a/inc/commons/DAO/class.common.dao.fichier.php +++ b/inc/commons/DAO/class.common.dao.fichier.php @@ -129,7 +129,7 @@ class commonDAOFichier extends commonDAO public function deleteOldFiles() { - cubeFiles::deleteFilesOlderThan(FTPROOT, 60, array('(.*)\.ipa', '(.*)\.apk')); + //cubeFiles::deleteFilesOlderThan(FTPROOT, 60, array('(.*)\.ipa', '(.*)\.apk')); } } \ No newline at end of file diff --git a/inc/postconfig.inc.php b/inc/postconfig.inc.php index 33566e2a2..2525e2a1a 100644 --- a/inc/postconfig.inc.php +++ b/inc/postconfig.inc.php @@ -25,7 +25,7 @@ if ($_SERVER['SERVER_ADDR'] == '91.121.74.76') { } else { define('SERVER', 'alien'); - define('DB_HOST', 'localhost'); + define('DB_HOST', '127.0.0.1'); define('AMARCORD', false); } diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index b3760528b..d56f06741 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -16,7 +16,7 @@ class wsFlash extends cubeFlashGateway $gateway->addAttribute('creation', $droits->creation ? '1' : '0'); $gateway->addAttribute('revendeur', $droits->revendeur ? '1' : '0'); $gateway->addAttribute('admin', $droits->admin ? '1' : '0'); - if (null !== $core->user) { + if (null !== $core->user || !is_object($core->user)) { $grade = -1; } else { $grade = $core->user->ws_grade; diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index a7b024bcf..48a41a423 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -624,6 +624,7 @@ class wsMaintenance self::_moveDocs(WS_DOCS, '/data/extranet/www/fluidbook/docs1', 250); self::_moveDocs('/data/extranet/www/fluidbook/docs1', '/data/extranet/www/fluidbook/docs2', 2000); + self::_moveDocs('/data/extranet/www/fluidbook/docs2', '/data/extranet/www/fluidbook/docs3', 7000); } protected static function _moveDocs($from, $to, $keep, $batch = 250) diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 2c74f16ad..acc6c5564 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -1418,6 +1418,9 @@ class wsServices extends cubeFlashGateway $xml = simplexml_import_dom($doc); $links = $xml->xpath("//a"); + if(null===$xml){ + + } foreach ($links as $link) { $h = parse_url($link['href']); if (trim($h['path']) != 'subtest_results_of_device.jsp') { diff --git a/inc/ws/Controlleur/class.ws.stats.php b/inc/ws/Controlleur/class.ws.stats.php index 2894b2a75..cdab98dfd 100644 --- a/inc/ws/Controlleur/class.ws.stats.php +++ b/inc/ws/Controlleur/class.ws.stats.php @@ -56,7 +56,7 @@ class wsStats self::forceComputation($bid); - cubePHP::set_memory('4G'); + cubePHP::set_memory('12G'); self::$xls = new PHPExcel(); self::$xls->removeSheetByIndex(0); @@ -126,7 +126,7 @@ class wsStats $writer = new PHPExcel_Writer_Excel2007(); $writer->setPHPExcel(self::$xls); $xlsfile = self::_getXLSFile($bid, $annee, $mois); - cubePHP::set_memory('4G'); + cubePHP::set_memory('12G'); $writer->save($xlsfile); } catch (Exception $e) { die($e->getMessage()); diff --git a/inc/ws/Metier/_common.php b/inc/ws/Metier/_common.php index 306fcd88c..5430af6a5 100644 --- a/inc/ws/Metier/_common.php +++ b/inc/ws/Metier/_common.php @@ -15,4 +15,3 @@ $__autoload['wsIcone'] = dirname(__FILE__) . '/class.ws.icone.php'; $__autoload['wsLang'] = dirname(__FILE__) . '/class.ws.lang.php'; $__autoload['wsSignature'] = dirname(__FILE__) . '/class.ws.signature.php'; $__autoload['wsDemande'] = dirname(__FILE__) . '/class.ws.demande.php'; -?> \ No newline at end of file diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index 9d2477c4c..adab7979b 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -249,7 +249,7 @@ class wsDocument extends cubeMetier public function parseInfos($data) { - cubePHP::set_memory('4G'); + cubePHP::set_memory('12G'); // This function get general infos (pages sizes, boxes, number sections and // bookmarks // Init arrays 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 0c28e635f..b107d2b63 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -124,6 +124,8 @@ class wsHTML5Compiler 'js/widget.js' ); + public $jsFiles = []; + // Collection of LESS files to be compiled // Filename with no extension, relative to the /style directory in the player build folder public $lessFiles = ['fluidbook']; @@ -233,7 +235,7 @@ class wsHTML5Compiler $this->appcache = $appcache; $this->widget = !$this->phonegap; - cubePHP::set_memory('4G'); + cubePHP::set_memory('12G'); if (trim($book_id) == '') { return; @@ -553,7 +555,6 @@ class wsHTML5Compiler protected function loadPlugins() { $e = explode("\n", $this->book->parametres->mobilePlugins); - $main = array_pop($this->jsFiles); $plugins = array(); @@ -1106,6 +1107,10 @@ class wsHTML5Compiler $e = explode("\n", $ml); $m = array(); foreach ($e as $l1) { + $l1=trim($l1); + if($l1==''){ + continue; + } $l = explode(',', $l1); $flag = $l[1]; @@ -1777,8 +1782,8 @@ class wsHTML5Compiler $lessVariables['z'] = $this->z; $lessVariables['book-page-width'] = $w; if ($this->book->parametres->correctCenter) { - $lessVariables['book-page-correct-width'] = ceil($w + 1); - $lessVariables['book-page-correct-height'] = ceil($h + 1); + $lessVariables['book-page-correct-width'] = ceil($w) + 1; + $lessVariables['book-page-correct-height'] = ceil($h) + 1; } else { $lessVariables['book-page-correct-width'] = $w; $lessVariables['book-page-correct-height'] = $h; diff --git a/index.php b/index.php index d943374df..66b0f77c3 100644 --- a/index.php +++ b/index.php @@ -30,7 +30,7 @@ $standard = 'XHTML 1.0 Transitional'; echo $core->url->getDocument(); $buffer = ob_get_contents(); -cubePHP::set_memory('6G'); +cubePHP::set_memory('12G'); ob_clean(); echo cubePage::page($buffer, $js, $jsvar, $css, array(), 9, false, $meta, array(), $standard); -- 2.39.5