/** * Special conversion function - takes the details in the old cms switches it over the the new cms **/ public function port_ids() { $file = new CmsFile(); $files = $file->find_all(); foreach ($files as $file) { $new = new WildfireFile(); $s_path = rtrim(str_replace("public/", "", strrchr($file->path, "public/files")), "/"); $new_file = $new->filter("filename = '{$file->filename}' AND rpath LIKE '%{$s_path}%'")->first(); if ($new_file->id) { $new_file->oldid = $file->id; $new_file->description = $file->caption; $new_file->save(); } } exit; }