Skip to content

Commit b15e772

Browse files
committed
TY should be the first tag when writing records
1 parent 89f78c9 commit b15e772

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CREDITS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Matt Butcher [technosophos] <[email protected]> (lead)
2-
Karl-Philipp Wulfert [animungo] <animungu@example.com> (contributor)
2+
Karl-Philipp Wulfert [animungo] <animungu@gmail.com> (contributor)

src/LibRIS/RISWriter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public function writeRecord($tags) {
5050
$buffer = array();
5151
$fmt = '%s - %s';
5252

53+
$buffer[] = sprintf($fmt, 'TY', $tags['TY'][0]);
54+
unset($tags['TY']);
55+
5356
foreach ($tags as $tag => $values) {
5457
foreach ($values as $value) {
5558
$buffer[] = sprintf($fmt, $tag, $value);

0 commit comments

Comments
 (0)