From: vincent@cubedesigners.com Date: Tue, 15 Mar 2011 12:05:30 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=80c30fce42162d175aea8cf5fd24fff556d4570d;p=cubeextranet.git --- diff --git a/inc/commons/class.common.core.php b/inc/commons/class.common.core.php index c9b93a0cb..b25c6c677 100644 --- a/inc/commons/class.common.core.php +++ b/inc/commons/class.common.core.php @@ -290,13 +290,6 @@ class commonCore extends cubeCore { $db->themes->index('index_themes_date', 'BTREE', 'date'); $db->themes->reference('fk_themes_icones', 'icones', 'icones', 'icone_id'); $db->themes->reference('fk_themes_proprietaires', 'proprietaire', 'utilisateurs', 'utilisateur_id'); - // Table des droits des themes - // $db->themes_droits->theme_id('integer', 0, false); - // $db->themes_droits->utilisateur_id('integer', 0, false); - // Clés - // $db->themes_droits->primary('pk_themes_droits', 'theme_id', 'utilisateur_id'); - // $db->themes_droits->reference('fk_themes_droits_theme_id', 'theme_id', 'themes', 'theme_id'); - // $db->themes_droits->reference('fk_themes_droits_utilisateur_id', 'utilisateur_id', 'utilisateurs', 'utilisateur_id'); // Table des langues $db->langues->lang_id('varchar', 20, false); $db->langues->font('varchar', 64, false); diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 6cedf57fe..c8b736afa 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -14,11 +14,6 @@ class wsMaintenance { public static function importFromOldWS($args) { global $core; - - self::importLangs(); - self::importThemes(); - self::importDocs(); - self::importBooks(); // Import des fluidbooks // Donc le dernier importé est le max dont le numéro est inférieur à 10000 $r = $core->con->select('SELECT MAX(book_id) FROM books WHERE book<10000'); @@ -29,20 +24,13 @@ class wsMaintenance { while ($r->fetch()) { $oldBooks[] = $r->bid; } - } - protected static function _sqlIn($tab) - { - return ' IN(\'' . implode('\',\'', $tab) . '\') '; - } + self::importLangs($oldBooks); + self::importThemes($oldBooks); + self::importDocs($oldBooks); + self::importBooks($oldBooks); - protected static function _getLangCode($lang) - { - $lang = strtolower($lang); - if ($lang == 'cz') { - $lang = 'cs'; - } - return $lang; + $core->refreshWSUsersTree(); } public static function importLangs($oldBooks) @@ -116,17 +104,6 @@ class wsMaintenance { $c->parametres = serialize($parametres); $c->insert(); } - $r = $core->con->select('SELECT * FROM ws.theme_user'); - $c = $core->con->openCursor('themes_droits'); - while ($r->fetch()) { - $c->utilisateur_id = $r->uid; - $c->theme_id = $r->tid; - try { - $c->insert(); - } - catch(Exception $e) { - } - } } public static function importDocs($oldBooks) @@ -153,7 +130,6 @@ class wsMaintenance { } catch(Exception $e) { } - $docs[$r->did] = true; } } @@ -161,7 +137,7 @@ class wsMaintenance { { } - public static function _oldIconesToColor($iid, &$parametres) + protected static function _oldIconesToColor($iid, &$parametres) { global $oldIconesColors; if (!isset($oldIconesColors)) { @@ -191,7 +167,7 @@ class wsMaintenance { return 1; } - public static function _getWsUser($oldid) + protected static function _getWsUser($oldid) { global $ws2ext; if (!isset($ws2ext[$oldid])) { @@ -199,6 +175,20 @@ class wsMaintenance { } return $ws2ext[$oldid]; } + + protected static function _sqlIn($tab) + { + return ' IN(\'' . implode('\',\'', $tab) . '\') '; + } + + protected static function _getLangCode($lang) + { + $lang = strtolower($lang); + if ($lang == 'cz') { + $lang = 'cs'; + } + return $lang; + } } ?> \ No newline at end of file