\r
$r = $core->con->select('SELECT * FROM books ORDER by book_id');\r
while ($r->fetch()) {\r
- $dao->saveCompositionVersion($r->book_id,$r->composition_update);\r
+ $dao->saveCompositionVersion($r->book_id, $r->composition_update);\r
}\r
}\r
\r
}\r
}\r
\r
+ public static function mergeEntreprise($args) {\r
+ global $core;\r
+\r
+ $from = $args[0];\r
+ $to = $args[1];\r
+\r
+ $c = $core->con->openCursor('utilisateurs');\r
+ $c->entreprise = $to;\r
+ $c->update('WHERE entreprise=' . $from);\r
+\r
+ $core->con->execute('DELETE FROM entreprises WHERE entreprise_id=' . $from);\r
+\r
+ $core->refreshWSUsersTree();\r
+ }\r
+\r
}\r
\r
?>
\ No newline at end of file