From 286b1bab68fab32b723bcc18203ea424c0fe92e5 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Mon, 16 Sep 2013 14:51:51 -0400
Subject: [PATCH] Upgrade to File_MARC library.

---
 composer.lock                                 |  8 +--
 vendor/autoload.php                           |  2 +-
 vendor/composer/autoload_real.php             |  6 +-
 vendor/composer/include_paths.php             |  2 +-
 vendor/composer/installed.json                | 58 +++++++++----------
 .../pear-pear.php.net/File_MARC/File/MARC.php |  2 +-
 .../File_MARC/File/MARC/Control_Field.php     |  2 +-
 .../File_MARC/File/MARC/Data_Field.php        |  2 +-
 .../File_MARC/File/MARC/Exception.php         |  2 +-
 .../File_MARC/File/MARC/Field.php             |  2 +-
 .../File_MARC/File/MARC/List.php              |  2 +-
 .../File_MARC/File/MARC/Record.php            | 16 +++--
 .../File_MARC/File/MARC/Subfield.php          |  2 +-
 .../File_MARC/File/MARCXML.php                |  2 +-
 14 files changed, 57 insertions(+), 51 deletions(-)

diff --git a/composer.lock b/composer.lock
index a160911639a..9ba073ee11b 100644
--- a/composer.lock
+++ b/composer.lock
@@ -91,10 +91,10 @@
         },
         {
             "name": "pear-pear.php.net/File_MARC",
-            "version": "0.7.1",
+            "version": "0.7.3",
             "dist": {
                 "type": "file",
-                "url": "http://pear.php.net/get/File_MARC-0.7.1.tgz",
+                "url": "http://pear.php.net/get/File_MARC-0.7.3.tgz",
                 "reference": null,
                 "shasum": null
             },
@@ -103,7 +103,7 @@
                 "php": ">=5.2.0.0"
             },
             "replace": {
-                "pear-pear/file_marc": "== 0.7.1.0"
+                "pear-pear/file_marc": "== 0.7.3.0"
             },
             "type": "pear-library",
             "autoload": {
@@ -114,7 +114,7 @@
             "include-path": [
                 "/"
             ],
-            "description": "The standard for machine-readable cataloging (MARC) records is documented at http://loc.gov/marc/. This package enables you to read existing MARC records from a file, string, or (using the YAZ extension), from a Z39.50 source. You can also use this package to create new MARC records.\n\nThis package is based on the PHP MARC package, originally called &quot;php-marc&quot;, that is part of the Emilda Project (http://www.emilda.org).  Christoffer Landtman generously agreed to make the &quot;php-marc&quot; code available under the GNU LGPL so it could be used as the basis of this PEAR package."
+            "description": "The standard for machine-readable cataloging (MARC) records is documented at http://loc.gov/marc/. This package enables you to read existing MARC records from a file, string, or (using the YAZ extension), from a Z39.50 source. You can also use this package to create new MARC records.\n\nThis package is based on the PHP MARC package, originally called \"php-marc\", that is part of the Emilda Project (http://www.emilda.org).  Christoffer Landtman generously agreed to make the \"php-marc\" code available under the GNU LGPL so it could be used as the basis of this PEAR package."
         },
         {
             "name": "pear-pear.php.net/PEAR",
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 4fbc9aebc36..3dc9591adfa 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInitaef96982a170922c421c15d4d5215531::getLoader();
+return ComposerAutoloaderInite06f82407c4bb1da9bf31e7b3aeb8f10::getLoader();
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index 3ddf6f43f86..dd4fce7faad 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php generated by Composer
 
-class ComposerAutoloaderInitaef96982a170922c421c15d4d5215531
+class ComposerAutoloaderInite06f82407c4bb1da9bf31e7b3aeb8f10
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitaef96982a170922c421c15d4d5215531
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInitaef96982a170922c421c15d4d5215531', 'loadClassLoader'), true, true);
+        spl_autoload_register(array('ComposerAutoloaderInite06f82407c4bb1da9bf31e7b3aeb8f10', 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInitaef96982a170922c421c15d4d5215531', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInite06f82407c4bb1da9bf31e7b3aeb8f10', 'loadClassLoader'));
 
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname($vendorDir);
diff --git a/vendor/composer/include_paths.php b/vendor/composer/include_paths.php
index 4eb4309de6f..812b0a19f77 100644
--- a/vendor/composer/include_paths.php
+++ b/vendor/composer/include_paths.php
@@ -7,7 +7,6 @@ $baseDir = dirname($vendorDir);
 
 return array(
     $vendorDir . '/pear-pear.php.net/Structures_LinkedList',
-    $vendorDir . '/pear-pear.php.net/File_MARC',
     $vendorDir . '/pear-pear.php.net/XML_Util',
     $vendorDir . '/pear-pear.php.net/Console_Getopt',
     $vendorDir . '/pear-pear.php.net/Structures_Graph',
@@ -15,4 +14,5 @@ return array(
     $vendorDir . '/pear-pear.php.net/PEAR',
     $vendorDir . '/pear-pear.php.net/Validate',
     $vendorDir . '/pear-pear.php.net/Validate_ISPN',
+    $vendorDir . '/pear-pear.php.net/File_MARC',
 );
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 89672457e7d..22ee295c2f1 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -63,35 +63,6 @@
         ],
         "description": "A singly-linked list offers the ability to insert or delete\n nodes at any point within the list. A doubly-linked list also offers the\n ability to request previous nodes in the list."
     },
-    {
-        "name": "pear-pear.php.net/File_MARC",
-        "version": "0.7.1",
-        "version_normalized": "0.7.1.0",
-        "dist": {
-            "type": "file",
-            "url": "http://pear.php.net/get/File_MARC-0.7.1.tgz",
-            "reference": null,
-            "shasum": null
-        },
-        "require": {
-            "pear-pear.php.net/structures_linkedlist": "*",
-            "php": ">=5.2.0.0"
-        },
-        "replace": {
-            "pear-pear/file_marc": "== 0.7.1.0"
-        },
-        "type": "pear-library",
-        "installation-source": "dist",
-        "autoload": {
-            "classmap": [
-                ""
-            ]
-        },
-        "include-path": [
-            "/"
-        ],
-        "description": "The standard for machine-readable cataloging (MARC) records is documented at http://loc.gov/marc/. This package enables you to read existing MARC records from a file, string, or (using the YAZ extension), from a Z39.50 source. You can also use this package to create new MARC records.\n\nThis package is based on the PHP MARC package, originally called &quot;php-marc&quot;, that is part of the Emilda Project (http://www.emilda.org).  Christoffer Landtman generously agreed to make the &quot;php-marc&quot; code available under the GNU LGPL so it could be used as the basis of this PEAR package."
-    },
     {
         "name": "pear-pear.php.net/XML_Util",
         "version": "1.2.1",
@@ -611,5 +582,34 @@
             "source": "https://github.com/summon/Summon.php/tree/master",
             "issues": "https://github.com/summon/Summon.php/issues"
         }
+    },
+    {
+        "name": "pear-pear.php.net/File_MARC",
+        "version": "0.7.3",
+        "version_normalized": "0.7.3.0",
+        "dist": {
+            "type": "file",
+            "url": "http://pear.php.net/get/File_MARC-0.7.3.tgz",
+            "reference": null,
+            "shasum": null
+        },
+        "require": {
+            "pear-pear.php.net/structures_linkedlist": "*",
+            "php": ">=5.2.0.0"
+        },
+        "replace": {
+            "pear-pear/file_marc": "== 0.7.3.0"
+        },
+        "type": "pear-library",
+        "installation-source": "dist",
+        "autoload": {
+            "classmap": [
+                ""
+            ]
+        },
+        "include-path": [
+            "/"
+        ],
+        "description": "The standard for machine-readable cataloging (MARC) records is documented at http://loc.gov/marc/. This package enables you to read existing MARC records from a file, string, or (using the YAZ extension), from a Z39.50 source. You can also use this package to create new MARC records.\n\nThis package is based on the PHP MARC package, originally called \"php-marc\", that is part of the Emilda Project (http://www.emilda.org).  Christoffer Landtman generously agreed to make the \"php-marc\" code available under the GNU LGPL so it could be used as the basis of this PEAR package."
     }
 ]
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARC.php b/vendor/pear-pear.php.net/File_MARC/File/MARC.php
index 43de35bb4ed..561c6d92701 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARC.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARC.php
@@ -32,7 +32,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2003-2010 Oy Realnode Ab, Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: MARC.php 308144 2011-02-08 20:28:20Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  * @example   read.php Retrieve specific fields and subfields from a record
  * @example   subfields.php Create new subfields and add them in specific order
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARC/Control_Field.php b/vendor/pear-pear.php.net/File_MARC/File/MARC/Control_Field.php
index bd29f94804c..30c0f6bbf70 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARC/Control_Field.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARC/Control_Field.php
@@ -32,7 +32,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2003-2008 Oy Realnode Ab, Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: Control_Field.php 301737 2010-07-31 04:14:44Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  */
 
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARC/Data_Field.php b/vendor/pear-pear.php.net/File_MARC/File/MARC/Data_Field.php
index 691e243c282..f5889a64174 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARC/Data_Field.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARC/Data_Field.php
@@ -32,7 +32,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2003-2008 Oy Realnode Ab, Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: Data_Field.php 301737 2010-07-31 04:14:44Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  */
 
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARC/Exception.php b/vendor/pear-pear.php.net/File_MARC/File/MARC/Exception.php
index 48f521c2c30..c2ded302af8 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARC/Exception.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARC/Exception.php
@@ -32,7 +32,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2003-2008 Oy Realnode Ab, Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: Exception.php 268035 2008-10-30 17:01:14Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  */
 
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARC/Field.php b/vendor/pear-pear.php.net/File_MARC/File/MARC/Field.php
index 85883b24486..672e39478b8 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARC/Field.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARC/Field.php
@@ -32,7 +32,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2003-2008 Oy Realnode Ab, Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: Field.php 301737 2010-07-31 04:14:44Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  */
 
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARC/List.php b/vendor/pear-pear.php.net/File_MARC/File/MARC/List.php
index 878b62fea80..909b9fee1d2 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARC/List.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARC/List.php
@@ -32,7 +32,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2003-2008 Oy Realnode Ab, Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: List.php 268035 2008-10-30 17:01:14Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  */
 
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARC/Record.php b/vendor/pear-pear.php.net/File_MARC/File/MARC/Record.php
index 43e91a08edd..b8056e68713 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARC/Record.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARC/Record.php
@@ -32,7 +32,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2003-2008 Oy Realnode Ab, Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: Record.php 308146 2011-02-08 20:36:20Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  */
 
@@ -629,9 +629,14 @@ class File_MARC_Record
     {
         $this->marcxml->setIndent($indent);
         if ($single) {
-            $this->marc->toXMLHeader();
+            $this->marcxml->startElement("collection");
+            $this->marcxml->writeAttribute("xmlns", "http://www.loc.gov/MARC21/slim");
+            $this->marcxml->startElement("record");
+        } else {
+            $this->marcxml->startElement("record");
+            $this->marcxml->writeAttribute("xmlns", "http://www.loc.gov/MARC21/slim");
         }
-        $this->marcxml->startElement("record");
+        
 
         // MARCXML schema has some strict requirements
         // We'll set reasonable defaults to avoid invalid MARCXML
@@ -680,10 +685,11 @@ class File_MARC_Record
 
         $this->marcxml->endElement(); // end record
         if ($single) {
-            return $this->marc->toXMLFooter();
+            $this->marcxml->endElement(); // end collection
+            $this->marcxml->endDocument();
         }
+        return $this->marcxml->outputMemory();
     }
-
     // }}}
 
 }
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARC/Subfield.php b/vendor/pear-pear.php.net/File_MARC/File/MARC/Subfield.php
index 9654a20f8cf..cf8a7b9efd4 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARC/Subfield.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARC/Subfield.php
@@ -32,7 +32,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2003-2008 Oy Realnode Ab, Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: Subfield.php 301737 2010-07-31 04:14:44Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  */
 
diff --git a/vendor/pear-pear.php.net/File_MARC/File/MARCXML.php b/vendor/pear-pear.php.net/File_MARC/File/MARCXML.php
index 991c72a8a92..c08e9729f95 100644
--- a/vendor/pear-pear.php.net/File_MARC/File/MARCXML.php
+++ b/vendor/pear-pear.php.net/File_MARC/File/MARCXML.php
@@ -31,7 +31,7 @@
  * @author    Dan Scott <dscott@laurentian.ca>
  * @copyright 2007-2010 Dan Scott
  * @license   http://www.gnu.org/copyleft/lesser.html  LGPL License 2.1
- * @version   CVS: $Id: MARCXML.php 302267 2010-08-15 13:42:59Z dbs $
+ * @version   CVS: $Id$
  * @link      http://pear.php.net/package/File_MARC
  * @example   read.php Retrieve specific fields and subfields from a record
  * @example   subfields.php Create new subfields and add them in specific order
-- 
GitLab