[Linpha-cvs] SF.net SVN: linpha: [4705] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <bz...@us...> - 2007-03-20 11:48:43
|
Revision: 4705 http://svn.sourceforge.net/linpha/?rev=4705&view=rev Author: bzrudi Date: 2007-03-20 04:48:41 -0700 (Tue, 20 Mar 2007) Log Message: ----------- Argh, after hours of boring debugging, AJAX stuff is working again when using exiftool instead of PJMT. Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/install/sql/sql.data.php trunk/linpha2/lib/classes/linpha.exiftool.class.php trunk/linpha2/lib/classes/linpha.imgview.class.php trunk/linpha2/lib/classes/linpha.metadata.class.php trunk/linpha2/lib/classes/pjmt/EXIF.php trunk/linpha2/templates/default/global.html.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2007-03-18 18:30:49 UTC (rev 4704) +++ trunk/linpha2/ChangeLog 2007-03-20 11:48:41 UTC (rev 4705) @@ -1,3 +1,11 @@ +2007-03-12 bzrudi + * Argh, after hours of boring debugging, AJAX stuff is working again when + using exiftool instead of PJMT. The images were not showing due to an + additional empty!!!! line at the end of linpha.exiftool.class.php. + So if you ever find something like "xml declaration not at start of + external entity" in the JS console, watch your files for empty lines + before php opening tag <?php and after the closing tag ?> !!!!! + 2007-03-18 bzrudi * linpha.import.class.php: Make PJMT tool of choice while running import, as it faster and we just need basic exif information here. Namely exifdate and Modified: trunk/linpha2/install/sql/sql.data.php =================================================================== --- trunk/linpha2/install/sql/sql.data.php 2007-03-18 18:30:49 UTC (rev 4704) +++ trunk/linpha2/install/sql/sql.data.php 2007-03-20 11:48:41 UTC (rev 4705) @@ -36,7 +36,7 @@ 'sys_import_autoimport' => '1', 'sys_import_exif' => '1', 'sys_import_exif_autorot' => '1', - 'sys_import_use_exiftool' => '0', + 'sys_import_use_exiftool' => '1', 'sys_image_exif' => '1', 'sys_image_iptc' => '0', Modified: trunk/linpha2/lib/classes/linpha.exiftool.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.exiftool.class.php 2007-03-18 18:30:49 UTC (rev 4704) +++ trunk/linpha2/lib/classes/linpha.exiftool.class.php 2007-03-20 11:48:41 UTC (rev 4705) @@ -28,7 +28,7 @@ class LinExifTool extends LinMetaData { -private $exiftool, $filename; +public $exiftool, $filename; /** * Constructor @@ -117,11 +117,8 @@ */ function saveMetaData($filename, $md5sum, $tag) { - include_once(LINPHA_DIR.'/lib/classes/linpha.exiftool.class.php'); - $objExifTool = new LinExifTool; - $objExifTool->setMetaFields($tag); - $dataArray = $this->readMetaDataFromFile($tag, $filename); + $dataArray = LinExifTool::readMetaDataFromFile($tag, $filename); // echo '<pre>', print_r($dataArray), '</pre>'; @@ -453,4 +450,3 @@ /* vi: set ts=4 sw=4 sts=4 */ ?> - Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2007-03-18 18:30:49 UTC (rev 4704) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2007-03-20 11:48:41 UTC (rev 4705) @@ -991,7 +991,9 @@ */ $min_year = substr($data[0],0,4); $max_year = substr($data[1],0,4); - + include_once(LINPHA_DIR.'/lib/classes/pjmt/Unicode.php'); + echo HTML_UTF8_escape("Rüdi"); + error_log(HTML_UTF8_Escape('Rüdi'), "0"); /** * get years between */ @@ -1313,7 +1315,6 @@ $array_meta = array('exif','iptc','xmp'); foreach($array_meta AS $value) { - if(!isset($MetaData)) { $MetaData = new LinMetaData(); Modified: trunk/linpha2/lib/classes/linpha.metadata.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.metadata.class.php 2007-03-18 18:30:49 UTC (rev 4704) +++ trunk/linpha2/lib/classes/linpha.metadata.class.php 2007-03-20 11:48:41 UTC (rev 4705) @@ -341,9 +341,16 @@ $value = '(EXIF) '; if($show_metadata_extra_info) { - //TODO make exiftool proof - $value .= LinPjmtTool::$metaTags['exif'][$last_part]['name']; - } + //TODO make exiftool proof in an clean way + if($GLOBALS['linpha']->sql->config->value['sys_import_use_exiftool']) + { + $value .= LinExifTool::$metaTags['exif'][$last_part]; + } + else + { + $value .= LinPjmtTool::$metaTags['exif'][$last_part]['name']; + } + } break; case 'iptc' : @@ -748,12 +755,12 @@ "FROM " . LIN_PREFIX . "meta_" . $what . " " . "WHERE md5sum = '" . $md5sum . "'"); - if ($query->EOF) // not a single value returned + if($query->EOF) // not a single value returned { /** * define tags to index if not already done */ - if (!isset ($this->defined_fields[$what])) + if(!isset ($this->defined_fields[$what])) { $this->objMetaTool->setMetaFields($what); } Modified: trunk/linpha2/lib/classes/pjmt/EXIF.php =================================================================== --- trunk/linpha2/lib/classes/pjmt/EXIF.php 2007-03-18 18:30:49 UTC (rev 4704) +++ trunk/linpha2/lib/classes/pjmt/EXIF.php 2007-03-20 11:48:41 UTC (rev 4705) @@ -1297,7 +1297,7 @@ if ( $Data_Count > 100000 ) { - echo "<p>Error: huge EXIF data count - EXIF is probably Corrupted</p>\n"; + //echo "<p>Error: huge EXIF data count - EXIF is probably Corrupted</p>\n"; // Some Casio files have no Next IFD pointer, hence cause errors Modified: trunk/linpha2/templates/default/global.html.php =================================================================== --- trunk/linpha2/templates/default/global.html.php 2007-03-18 18:30:49 UTC (rev 4704) +++ trunk/linpha2/templates/default/global.html.php 2007-03-20 11:48:41 UTC (rev 4705) @@ -6,7 +6,7 @@ */ global $linTpl; ?> -<?php /*header('Content-type: text/html; charset='.$html_charset);*/ ?> +<?php header('Content-type: text/html; charset=utf8'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |