@@ 444-450 (lines=7) @@ | ||
441 | } |
|
442 | ||
443 | // 1 FILE |
|
444 | if (preg_match('/\n\d (FILE.*)/', $gedrec, $match)) { |
|
445 | $gedfile = $match[1]; |
|
446 | } elseif ($filename) { |
|
447 | $gedfile = 'FILE ' . $filename; |
|
448 | } else { |
|
449 | $gedfile = 'FILE'; |
|
450 | } |
|
451 | ||
452 | if ($gedfile == 'FILE') { |
|
453 | // Box for user to choose to upload file from local computer |
@@ 692-698 (lines=7) @@ | ||
689 | $gedrec = self::convertInlineMedia($tree, $gedrec); |
|
690 | ||
691 | $record = new Source($xref, $gedrec, null, $tree); |
|
692 | if (preg_match('/\n1 TITL (.+)/', $gedrec, $match)) { |
|
693 | $name = $match[1]; |
|
694 | } elseif (preg_match('/\n1 ABBR (.+)/', $gedrec, $match)) { |
|
695 | $name = $match[1]; |
|
696 | } else { |
|
697 | $name = $xref; |
|
698 | } |
|
699 | Database::prepare( |
|
700 | "INSERT INTO `##sources` (s_id, s_file, s_name, s_gedcom) VALUES (?, ?, LEFT(?, 255), ?)" |
|
701 | )->execute(array( |