import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
* @subpackage Document
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Xlsx.php 16971 2009-07-22 18:05:45Z mikaelkael $
|
||||
* @version $Id: Xlsx.php 19035 2009-11-19 14:34:11Z alexander $
|
||||
*/
|
||||
|
||||
|
||||
@ -77,6 +77,7 @@ class Zend_Search_Lucene_Document_Xlsx extends Zend_Search_Lucene_Document_OpenX
|
||||
*
|
||||
* @param string $fileName
|
||||
* @param boolean $storeContent
|
||||
* @throws Zend_Search_Lucene_Exception
|
||||
*/
|
||||
private function __construct($fileName, $storeContent)
|
||||
{
|
||||
@ -91,7 +92,12 @@ class Zend_Search_Lucene_Document_Xlsx extends Zend_Search_Lucene_Document_OpenX
|
||||
$package->open($fileName);
|
||||
|
||||
// Read relations and search for officeDocument
|
||||
$relations = simplexml_load_string($package->getFromName("_rels/.rels"));
|
||||
$relationsXml = $package->getFromName('_rels/.rels');
|
||||
if ($relationsXml === false) {
|
||||
require_once 'Zend/Search/Lucene/Exception.php';
|
||||
throw new Zend_Search_Lucene_Exception('Invalid archive or corrupted .xlsx file.');
|
||||
}
|
||||
$relations = simplexml_load_string($relationsXml);
|
||||
foreach ($relations->Relationship as $rel) {
|
||||
if ($rel["Type"] == Zend_Search_Lucene_Document_OpenXml::SCHEMA_OFFICEDOCUMENT) {
|
||||
// Found office document! Read relations for workbook...
|
||||
|
Reference in New Issue
Block a user