. 'FROM projets_vue_hf p, clients_entreprise e '\r
. 'WHERE p.client_id=e.utilisateur_id '\r
. 'GROUP BY e.type, p.annee_fin');\r
-\r
$this->views->createView('signatures', 'SELECT * FROM fluidbook_toolbox.signature');\r
//cubeDb::mysqlConvert($this->con, 'UTF8', 'utf8_general_ci', 'MYISAM');\r
touch($cache);\r
{
file_get_contents('https://workshop.fluidbook.com/services/facebook_thumbnail?cid=' . $cid . '&j=' . TIME);
}
+
+ public static function mergeLangs()
+ {
+ global $core;
+ $r = $core->con->select('SELECT * FROM extranet_a.langues');
+ $langs = [];
+ while ($r->fetch()) {
+ $langs[$r->lang_id] = json_decode($r->traductions, true);
+ }
+
+ $r = $core->con->select('SELECT * FROM langues');
+ while ($r->fetch()) {
+ if (!isset($langs[$r->lang_id])) {
+ $langs[$r->lang_id] = [];
+ }
+ $langs[$r->lang_id] = array_merge($langs[$r->lang_id], json_decode($r->traductions, true));
+ }
+
+ foreach ($langs as $lang => $traductions) {
+ $cursor = $core->con->openCursor('langues');
+ $cursor->traductions = json_encode($traductions);
+ $cursor->update('WHERE lang_id=\'' . $lang . '\'');
+ }
+ }
}