]> _ Git - cubeextranet.git/commitdiff
done #994 @0.25
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 28 Nov 2016 15:34:05 +0000 (15:34 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 28 Nov 2016 15:34:05 +0000 (15:34 +0000)
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Util/html5/class.ws.html5.compiler.php

index f4e6cbf6a0a0a98a2931f64fe0b18248471c4d22..4d589e003e582730d7384a36e2935063b8b8a8ab 100644 (file)
@@ -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;
index 535967bb0b55a1f50eabf560e2d22ecd65303b9c..473a52d544ee3b81a9871f95dd8b88d38ae421cd 100644 (file)
@@ -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);
                        }