}\r
}\r
\r
+ public function uploadLinkContent()\r
+ {\r
+ foreach($_FILES as $varname => $infos) {\r
+ if ($infos['error']) {\r
+ continue;\r
+ }\r
+ $fname = cubeFiles::tidyName($infos['name']);\r
+ $dir = '/books/working/' . $this->args['book_id'] . '/' ;\r
+ if (!file_exists(ROOT.$dir)) {\r
+ mkdir(ROOT.$dir, 0777, true);\r
+ }\r
+ $dest = $dir . $fname;\r
+ move_uploaded_file($infos['tmp_name'], ROOT . $dest);\r
+ $this->xml->addChild('file', $fname);\r
+ return;\r
+ }\r
+ }\r
+\r
public function testDocuments()\r
{\r
$toload = $this->xml->addChild('toLoad');\r