Skip to content
Browse files

TY should be the first tag when writing records

  • Loading branch information...
1 parent 89f78c9 commit b15e77217d674195d06c2b5580553b8b6094645f @animungo animungo committed Mar 14, 2012
Showing with 4 additions and 1 deletion.
  1. +1 −1 CREDITS
  2. +3 −0 src/LibRIS/RISWriter.php
View
2 CREDITS
@@ -1,2 +1,2 @@
Matt Butcher [technosophos] <matt@aleph-null.tv> (lead)
-Karl-Philipp Wulfert [animungo] <animungu@example.com> (contributor)
+Karl-Philipp Wulfert [animungo] <animungu@gmail.com> (contributor)
View
3 src/LibRIS/RISWriter.php
@@ -50,6 +50,9 @@ public function writeRecord($tags) {
$buffer = array();
$fmt = '%s - %s';
+ $buffer[] = sprintf($fmt, 'TY', $tags['TY'][0]);
+ unset($tags['TY']);
+
foreach ($tags as $tag => $values) {
foreach ($values as $value) {
$buffer[] = sprintf($fmt, $tag, $value);

0 comments on commit b15e772

Please sign in to comment.
Something went wrong with that request. Please try again.