From: vincent@cubedesigners.com Date: Thu, 24 Jun 2010 15:50:49 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=fbc24431bb8fcb565cbc88246d479d79b7254bd5;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/class.ws.flash.php b/inc/ws/Controlleur/class.ws.flash.php index 1b5c3c3e5..4b44ce9c9 100644 --- a/inc/ws/Controlleur/class.ws.flash.php +++ b/inc/ws/Controlleur/class.ws.flash.php @@ -176,7 +176,7 @@ class wsFlash extends cubeFlashGateway { } $dao = new wsDAOTheme($core->con); - $themes = $dao->getAllThemes($core->user, 'ORDER BY theme_id DESC'); + $themes = $dao->getAllThemes($core->user, 'ORDER BY FIELD (theme_id,1) DESC, theme_id DESC'); foreach($themes as $theme) { $t = $this->xml->addChild('theme'); $t->addAttribute('id', $theme->theme_id); diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index dd34a4689..98ef30a46 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -84,7 +84,7 @@ class wsUrl { if ($book_id == 'new') { $dao = new wsDAOBook($core->con); - $book = $dao->creeEmpty($core->user->utilisateur_id); + $book = $dao->creeEmpty($core->user->utilisateur_id,$core->user->lang); http::redirect(SITE_PATH . 'editbook/' . $book->book_id); } diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 9a99c5f54..78b8c987b 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -124,7 +124,7 @@ class wsDAOBook extends extranetDAO { return $this->selectById($book_id); } - public function creeEmpty($createur) + public function creeEmpty($createur,$lang) { $c = $this->con->openCursor('books'); $c->proprietaire = $createur; @@ -135,7 +135,7 @@ class wsDAOBook extends extranetDAO { $c->date_status = TIME; $c->parametres = serialize(new wsParametres()); $c->theme = 1; - $c->lang = 1; + $c->lang = $lang; $book_id = $c->book_id = $this->getNextId(); $c->insert(); return $this->selectById($book_id);