Esempio n. 1
0
         // unable to save
         continue;
     }
 }
 if (!$publication instanceof Publication) {
     // something went wrong
     continue;
 }
 $publication->bibtext_reference = $ref;
 $publication->pubtype = $type;
 // set forwarding
 $count++;
 if ($forward_to_edit) {
     $forward_url = "publications/edit/{$publication->getGUID()}";
 } else {
     $forward_url = $publication->getURL();
 }
 // start handling some custom fields
 // start/end page
 $pages = $entry->getPages();
 if (is_array($pages)) {
     $publication->page_from = elgg_extract('0', $pages);
     $publication->page_to = elgg_extract('1', $pages);
 } else {
     $publication->page_from = $pages;
 }
 // authors
 $authors = $entry->getRawAuthors();
 if (!empty($authors)) {
     $new_authors = [];
     foreach ($authors as $author) {