Permalink
Browse files

Merge pull request #5 from animungo/master

TY should be the first tag when writing records
  • Loading branch information...
2 parents 89f78c9 + b15e772 commit 5b6628ece0e57e90bd54f3b2d8de922dc4cc662c @technosophos 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 5b6628e

Please sign in to comment.