]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 24 Jun 2010 15:50:49 +0000 (15:50 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 24 Jun 2010 15:50:49 +0000 (15:50 +0000)
inc/ws/Controlleur/class.ws.flash.php
inc/ws/Controlleur/class.ws.url.php
inc/ws/DAO/class.ws.dao.book.php

index 1b5c3c3e50f63f765d27ddd9ca98c8190a9e0304..4b44ce9c9502b278c85c7149753ca86d19856a87 100644 (file)
@@ -176,7 +176,7 @@ class wsFlash extends cubeFlashGateway {
                }\r
 \r
                $dao = new wsDAOTheme($core->con);\r
-               $themes = $dao->getAllThemes($core->user, 'ORDER BY theme_id DESC');\r
+               $themes = $dao->getAllThemes($core->user, 'ORDER BY FIELD (theme_id,1) DESC, theme_id DESC');\r
                foreach($themes as $theme) {\r
                        $t = $this->xml->addChild('theme');\r
                        $t->addAttribute('id', $theme->theme_id);\r
index dd34a4689cbfed93d386a2fb4191f4115004d76b..98ef30a4625c8634201951a71f8d8172e67fb97e 100644 (file)
@@ -84,7 +84,7 @@ class wsUrl {
 \r
                if ($book_id == 'new') {\r
                        $dao = new wsDAOBook($core->con);\r
-                       $book = $dao->creeEmpty($core->user->utilisateur_id);\r
+                       $book = $dao->creeEmpty($core->user->utilisateur_id,$core->user->lang);\r
                        http::redirect(SITE_PATH . 'editbook/' . $book->book_id);\r
                }\r
 \r
index 9a99c5f548bb95a6f9020117245b5dd0e11aadf5..78b8c987b3f192e2fd9e206030b37ec8a4d5c112 100644 (file)
@@ -124,7 +124,7 @@ class wsDAOBook extends extranetDAO {
                return $this->selectById($book_id);\r
        }\r
 \r
-       public function creeEmpty($createur)\r
+       public function creeEmpty($createur,$lang)\r
        {\r
                $c = $this->con->openCursor('books');\r
                $c->proprietaire = $createur;\r
@@ -135,7 +135,7 @@ class wsDAOBook extends extranetDAO {
                $c->date_status = TIME;\r
                $c->parametres = serialize(new wsParametres());\r
                $c->theme = 1;\r
-               $c->lang = 1;\r
+               $c->lang = $lang;\r
                $book_id = $c->book_id = $this->getNextId();\r
                $c->insert();\r
                return $this->selectById($book_id);\r