array('' $conditions = array('_id' => $user['_id']); $result = User::update($updateData, $conditions, array('atomic' => false)); } public function importManga() { } public static function importAnimeXML{$user, $file} { $xml = ungzip($file); $list = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); foreach ($list->animelist as $entry) { $user->animelist[] = Entry::create($entry); } return $user->save(null, array('validate' => false)); } /* public function importAnime($user, $malun, $malpass) { //This method assumes we are importing from mal at the moment. //1. Parse Mal for the download link //1.1 Login to MAL $cmd = "curl -c cookie.txt -d \"username=$malun&password=$malpass\" http://myanimelist.net/login.php"; $result = shell_exec($cmd); //If the request went ok if (empty($result)) { //1.2 Request a list export $cmd_getList = "curl -b cookie.txt -d \"value=1&subexport=Export My List\" http://myanimelist.net/panel.php?go=export"; $malreturn = shell_exec($cmd_getList); //Initate a new document for phpQuery. $doc = phpQuery::newDocument($malreturn); //Grab the div with the content in it, (should be goodresult actually