]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 3 May 2012 18:50:23 +0000 (18:50 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 3 May 2012 18:50:23 +0000 (18:50 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/DAO/class.ws.dao.book.php

index 01f5edbfaec73840619de7d5f5467e24deb96e11..c7c080130ed91a9610d8c9950c5293449d4bda08 100644 (file)
@@ -248,7 +248,7 @@ class wsMaintenance {
                $tolinks = array_merge($tolinks, $fromlinks);\r
                $torulers = array_merge($torulers, $fromrulers);\r
 \r
-               $dao->setLinksAndRulers($to, $tolinks, $torulers, 'Copy links from #' . $from . '  to #' . $to,$core->user->utilisateur_id);\r
+               $dao->setLinksAndRulers($to, $tolinks, $torulers, 'Copy links from #' . $from . '  to #' . $to, $core->user->utilisateur_id);\r
        }\r
 \r
        public static function importBooks($oldBooks) {\r
@@ -652,6 +652,14 @@ class wsMaintenance {
                wsLang::getV1Translations();\r
        }\r
 \r
+       public static function appendDocument($args) {\r
+               global $core;\r
+               $book_id = $args[0];\r
+               $document_id = $args[1];\r
+               $dao=new wsDAOBook($core->con);\r
+               $dao->appendDocument($book_id, $document_id);\r
+       }\r
+\r
        public static function reprocessVideos($args) {\r
                global $core;\r
 \r
index ff305017edc75d106d74463f233c19bf7d5fbaa0..505b1f236753260524567719de8a8819da5a0eb1 100644 (file)
@@ -889,6 +889,17 @@ class wsDAOBook extends commonDAO {
                                copy($source, $localPath);\r
                        }\r
                }\r
+\r
+               $workingDir = WS_BOOKS . '/working/' . $book_id . '/';\r
+               if (file_exists($workingDir . 'media')) {\r
+                       $cp = new cubeCommandLine('cp');\r
+                       $cp->setPath(CONVERTER_PATH);\r
+                       $cp->setArg('r');\r
+                       $cp->setArg(null, $workingDir . 'media');\r
+                       $cp->setArg(null, $finalDir . 'data');\r
+                       $cp->execute();\r
+               }\r
+\r
                return $res;\r
        }\r
 \r