From: vincent@cubedesigners.com Date: Mon, 28 Nov 2016 15:34:05 +0000 (+0000) Subject: done #994 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6a21f7c7159cd95205c752a8da946152cdd0394b;p=cubeextranet.git done #994 @0.25 --- diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index f4e6cbf6a..4d589e003 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -535,8 +535,8 @@ class wsDAOBook extends commonDAO { $c->update('WHERE book_id=\'' . $this->con->escape($book_id) . '\''); if ($json_chapters && $json_chapters != '[]') { - if(count($res)==1){ - if($res[0]['label']=='' && $res[0]['page']==''){ + if (count($res) == 1) { + if ($res[0]['label'] == '' && $res[0]['page'] == '') { return; } } @@ -1403,7 +1403,8 @@ class wsDAOBook extends commonDAO { $flex->addBitmap(cubeMedia::getFlagFile($flag), 'flag_' . $flag); $vuFlags[$flag] = true; } - $n = cubeText::ucfirst($iso[$mlang]); + $ll = explode('-', $mlang); + $n = cubeText::ucfirst($iso[$ll[0]]); $langNames[$mlang] = $n; $cn = cubeCountry::getCountryName($flag, $mlang); $countryNames[$mlang . '_' . $flag] = $cn; diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 535967bb0..473a52d54 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -674,9 +674,11 @@ class wsHTML5Compiler { $l = explode(',', $l1); $flag = $l[1]; + $ll = explode('-', $l[0]); + $this->copy(cubeMedia::getFlagFile($flag), $flagsDir . '/' . $flag . '.png'); $l[3] = cubeText::ucfirst($iso[$l[0]]); - $l[4] = cubeCountry::getCountryName($flag, $l[0]); + $l[4] = cubeCountry::getCountryName($flag, $ll[0]); $m[] = implode(',', $l); }