[Linpha-cvs] SF.net SVN: linpha: [4700] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <bz...@us...> - 2007-03-18 12:57:59
|
Revision: 4700 http://svn.sourceforge.net/linpha/?rev=4700&view=rev Author: bzrudi Date: 2007-03-18 05:57:57 -0700 (Sun, 18 Mar 2007) Log Message: ----------- more metadata fixes and cleanups in classes, exif should work again Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/admin/metadata_define.php trunk/linpha2/admin/metadata_define_post.php trunk/linpha2/admin/metadata_select.php trunk/linpha2/lib/classes/linpha.imgview.class.php trunk/linpha2/lib/classes/linpha.import.class.php trunk/linpha2/lib/classes/linpha.metadata.class.php trunk/linpha2/lib/classes/linpha.pjmt.class.php trunk/linpha2/templates/default/view_albmeta.html.php trunk/linpha2/templates/default/view_img_static.html.php Property Changed: ---------------- trunk/linpha2/albums/ Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/ChangeLog 2007-03-18 12:57:57 UTC (rev 4700) @@ -1,3 +1,13 @@ +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 + orientation for use in linpha_photos. + However, it may be a wise choice to fall back to exiftool if we are low + on PHP memory limit, let's say 8MB or so. (Installer Task) + * More MetaData improvements in Admin section. EXIF should now be fully + functional again (PJMT) + * linpha.metadata.class: more cleanups and improvements + 2007-03-17 bzrudi * PJMT is working again and the default for now, even so exiftool also works fine for EXIF data right now. ;-) @@ -2,3 +12,3 @@ Status: Currently EXIF should work again using PJMT and exiftool. No IPTC, - no XMP, no searching and tons of other littel bugs and + no XMP, no searching and tons of other little bugs and improvements left open. Modified: trunk/linpha2/admin/metadata_define.php =================================================================== --- trunk/linpha2/admin/metadata_define.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/admin/metadata_define.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -72,19 +72,52 @@ show_add_data(); break; case 'exif': - echo i18n("EXIF data is usually created by the any Digital Camera. These values will be indexed for searching and displaying them, but can't be edited with LinPHA."); + echo i18n("EXIF data is usually created by the any Digital Camera. " . + "These values will be indexed for searching and displaying them, " . + "but can't be edited with LinPHA."); echo '<br />'; - echo i18n("Hint: You should't choose all available EXIF tags because the database table may get to large (MySQL) and therefore could result in an error."); + echo i18n("Hint: You should't choose all available EXIF tags because " . + "the database table may get to large (MySQL) and therefore could " . + "result in an error."); echo '<br /><br /><br />'; show_metadata(); break; case 'iptc': + if($GLOBALS['linpha']->sql->config->value['sys_import_use_exiftool']) + { + echo i18n("IPTC/XMP data is usually not available by default."); + echo i18n("It needs to be filled up either with LinPHA, or with any " . + "other external program which allows IPTC/XMP editing like " . + "Photoshop. IPTC/XMP is a standard within professional " . + "Photographer business."); + echo '<br /><br />'; + show_metadata(); + } + else + { + echo i18n("IPTC disabled due missing dependencies. Exiftool can't " . + "be used in your configuration. Please see the LinPHA FAQ " . + "for details"); + } +break; case 'xmp': - echo i18n("IPTC/XMP data is usually not available by default."); - echo i18n("It needs to be filled up either with LinPHA, or with any external program which allows IPTC/XMP editing like Photoshop. IPTC/XMP is a standard within professional Photographer business."); - echo '<br /><br />'; - show_metadata(); - break; + if($GLOBALS['linpha']->sql->config->value['sys_import_use_exiftool']) + { + echo i18n("IPTC/XMP data is usually not available by default."); + echo i18n("It needs to be filled up either with LinPHA, or with any " . + "other external program which allows IPTC/XMP editing like " . + "Photoshop. IPTC/XMP is a standard within professional " . + "Photographer business."); + echo '<br /><br />'; + show_metadata(); + } + else + { + echo i18n("XMP is disabled due missing dependencies. Exiftool can't " . + "be used in your configuration. Please see the LinPHA FAQ " . + "for details"); + } +break; } function show_own_fields() Modified: trunk/linpha2/admin/metadata_define_post.php =================================================================== --- trunk/linpha2/admin/metadata_define_post.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/admin/metadata_define_post.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -133,8 +133,7 @@ } else { @$linpha->db->Execute("DROP TABLE ".LIN_PREFIX."meta_$cat3"); } - $MetaData = new LinMetaData(); - $linpha->db->Execute($MetaData->createMetaDataTable( $_POST['selected_fields'], $cat3)); + $linpha->db->Execute(LinMetaData::createMetaDataTable( $_POST['selected_fields'], $cat3)); } break; Modified: trunk/linpha2/admin/metadata_select.php =================================================================== --- trunk/linpha2/admin/metadata_select.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/admin/metadata_select.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -200,7 +200,6 @@ <?php $MetaData->setMetaFields('iptc'); foreach($MetaData->defined_fields['iptc'] AS $key=>$value) - //foreach(LinExifTool::$metaTags['iptc'] AS $key=>$value) { echo '<option value="iptc_'.$key.'">'.$value.'</option>'; } Property changes on: trunk/linpha2/albums ___________________________________________________________________ Name: svn:ignore - 20* test* alb* lost+found special + 20* test* alb* lost+found special ausfluege haus_und_garten mbesa Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -1147,7 +1147,7 @@ /** * save modified MetaData */ - LinMetaDataModificate::saveModifiedMetaData(); + LinMetaData::saveModifiedMetaData(); } @@ -1240,7 +1240,7 @@ while($data = $GLOBALS['linpha']->template->output['image_comments']->FetchRow()) { ?> <comment> - <time><?php echo linStrftime($data['meta_time']); ?></time> + <time><?php echo htmlspecialchars(linStrftime($data['meta_time'])); ?></time> <author><?php echo htmlspecialchars($data['meta_author'],ENT_QUOTES); ?></author> <text><?php echo str_replace('<','<',linHtmlTag($data['meta_comment'],ENT_QUOTES) ); ?></text> </comment> @@ -1280,11 +1280,10 @@ * save comment */ if( isset( $_POST['cmd'] ) && $_POST['cmd']=='add_comment' - && isset($_POST['inputAddCommentAuthor']) && !empty($_POST['inputAddCommentAuthor']) - && ( ( isset($_POST['inputAddCommentText']) && !empty($_POST['inputAddCommentText']) ) - || ( isset($_POST['inputAddCommentTextarea']) && !empty($_POST['inputAddCommentTextarea']) ) - ) - ) + && isset($_POST['inputAddCommentAuthor']) + && !empty($_POST['inputAddCommentAuthor']) + && ((isset($_POST['inputAddCommentText']) && !empty($_POST['inputAddCommentText'])) + || (isset($_POST['inputAddCommentTextarea']) && !empty($_POST['inputAddCommentTextarea'])))) { if( !empty($_POST['inputAddCommentTextarea'])) { $comment = $_POST['inputAddCommentTextarea']; @@ -1325,7 +1324,7 @@ */ if($GLOBALS['linpha']->sql->config->value['sys_image_'.$value]) { - $MetaData->saveData( $value, $this->src_file, $this->md5sum ); + $MetaData->saveData($value, $this->src_file, $this->md5sum ); } } } @@ -1437,7 +1436,7 @@ /** * save modified MetaData */ - LinMetaDataModificate::saveModifiedMetaData(); + LinMetaData::saveModifiedMetaData(); $this->viewImgCommon(); } Modified: trunk/linpha2/lib/classes/linpha.import.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.import.class.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/lib/classes/linpha.import.class.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -478,41 +478,53 @@ /** * Get EXIF date and orientation tag from image if avail + * I found that PJMT is faster than exiftool for this purpose + * about ten times, so we only make use of PJMT for performance + * reasons here. + * However, it may be a wise choice to fall back to exiftool if + * we are low on PHP memory limit, let's say 8MB or so. + * TODO make use if low on memory and exiftool is avail */ - list($time_exif, $rotate) = $MetaData->getBasicMeta($dirname, $filename); - - - /* + //list($time_exif, $rotate) = + //$MetaData->getBasicMeta($dirname, $filename); + include_once( LINPHA_DIR.'/lib/classes/pjmt/EXIF.php' ); $meta = get_EXIF_JPEG($dirname.'/'.$filename); - */ + /** * get date */ - /* - if( isset($meta[0][34665]['Data'][0][36867]['Data'][0]) ) { - $time_exif = $MetaData->convertExifDateToUnix( $meta[0][34665]['Data'][0][36867]['Data'][0] ); + if(isset($meta[0][34665]['Data'][0][36867]['Data'][0])) + { + $date = $meta[0][34665]['Data'][0][36867]['Data'][0]; + + $year = substr($date, 0, 4); + $month = substr($date, 5, 2); + $day = substr($date, 8, 2); + $hour = substr($date, 11, 2); + $min = substr($date, 14, 2); + $sec = substr($date, 17, 2); + + $time_exif = mktime($hour, $min, $sec, $month, $day, $year); } - */ - + /** * get rotate information * turn off exif autorotate using 'sys_import_exif_autorot' */ - /* - if( $GLOBALS['linpha']->sql->config->value['sys_import_exif_autorot'] && isset($meta[0][274]['Data'][0]) ) + if($GLOBALS['linpha']->sql->config->value['sys_import_exif_autorot'] + && isset($meta[0][274]['Data'][0]) ) { - $rotate = 0; - //$rotate = $MetaData->getRotationByExifTag( $meta[0][274]['Data'][0] ); + $rotate = $MetaData->getRotationByExifTag($meta[0][274]['Data'][0] ); } - */ + } } } else // this should not happen { - linSysLog(i18n("Import").': Error: what am i? '.htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)); - linLog(LOG_TYPE_IMPORT,LOG_NOTICE,'import_fileinfo','Error: what am i? '.htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)); + linSysLog(i18n("Import").': Error: Filename? '.htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)); + linLog(LOG_TYPE_IMPORT,LOG_NOTICE,'import_fileinfo','Error: Filename? '.htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)); } return array($md5sum,$file_type,$org_width,$org_height,$stats_number,$time_exif,$rotate,$filesize); Modified: trunk/linpha2/lib/classes/linpha.metadata.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.metadata.class.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/lib/classes/linpha.metadata.class.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -1,5 +1,4 @@ <?php - /* * Copyright (c) 2005 Heiko Rutenbeck <bz...@tu...> * Florian Angehrn @@ -19,204 +18,14 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +if (!defined('LINPHA_DIR')) { exit (1); } + /** * This is the baseclass to handle all the EXIF/IPTC/XMP stuff used in LinPHA * It is extended by LinExifTool and LinPjmtTool class * @package MetaData - * @author flo, bzrudi + * @author bzrudi,flo */ - -if (!defined('LINPHA_DIR')) { exit (1); } - -/** - * Modificate MetaData and save the information back to the file (IPTC and XMP) - */ -class LinMetaDataModificate extends LinMetaData { - function showEditMetaData() { - /** - * set meta linpha - */ - $GLOBALS['linpha']->template->output['meta_linpha'] = ''; - - $query = $GLOBALS['linpha']->db->Execute("SELECT id, name, field_type, flags " . - "FROM " . LIN_PREFIX . "meta_fields " . - "WHERE flags = '5' OR flags = '7' ORDER by id"); - while ($data = $query->FetchRow()) { - $GLOBALS['linpha']->template->output['meta_linpha'] .= '<tr><td width="150" valign="top">'; - - if ($data['flags'] == 5) { - $GLOBALS['linpha']->template->output['meta_linpha'] .= LinMetaData :: getNameOfField('builtin_' . $data['name'], false); - } - elseif ($data['flags'] == 7) { - $GLOBALS['linpha']->template->output['meta_linpha'] .= LinMetaData :: getNameOfField('id_' . $data['id'], false); - } - $GLOBALS['linpha']->template->output['meta_linpha'] .= '</td><td>'; - - $meta_data = $GLOBALS['linpha']->db->GetRow("SELECT meta_data FROM " . LIN_PREFIX . "meta_data " . - "WHERE md5sum = '" . $GLOBALS['linpha']->imgview->md5sum . "'" . - "AND field_id = '" . $data['id'] . "'"); - - switch ($data['field_type']) { - case 1 : - if (isset ($meta_data['meta_data'])) { - $value = htmlspecialchars($meta_data['meta_data'], ENT_QUOTES); - } else { - $value = ''; - } - $GLOBALS['linpha']->template->output['meta_linpha'] .= '<input type="text" class="linForms" name="linMetaField[' . - $data['id'] . ']" ' . - 'value="' . $value . '" style="width: 250px;" maxlength="255" />'; - break; - case 3 : - if (isset ($meta_data['meta_data'])) { - $value = htmlspecialchars($meta_data['meta_data'], ENT_QUOTES); - } else { - $value = ''; - } - $GLOBALS['linpha']->template->output['meta_linpha'] .= '<input type="text" class="linForms" name="linMetaField[' . - $data['id'] . ']" id="linField' . $data['id'] . '" value="' . $value . '" style="width: 150px;" maxlength="255" />' . - ' <a href="javascript:void(0);" onclick="var loginWin = window.open(\'' . LINPHA_CLIENT . '/lib/include/calendar.php?form=linField' . $data['id'] . '\'' . - ',\'Calendar\',\'height=250,width=300,scrollbars=no,menubar=no,status=no\');" target="_top">' . i18n("Calendar") . '</a>'; - - break; - case 2 : - if (isset ($meta_data['meta_data'])) { - $array_pieces = linExplodeAndSlice(';', $meta_data['meta_data']); - } else { - $array_pieces = Array (); - } - - $GLOBALS['linpha']->template->output['meta_linpha'] .= '<select name="linMetaField[' . $data['id'] . '][]" class="linForms" size="7" multiple="multiple" style="width: 250px;">'; - - $cat_query = $GLOBALS['linpha']->db->Execute("SELECT id, name " . - "FROM " . LIN_PREFIX . "meta_category " . - "WHERE field_id = '" . $data['id'] . "'"); - while ($cat_data = $cat_query->FetchRow()) { - if (in_array($cat_data['id'], $array_pieces)) { - $checked = ' selected="selected"'; - } else { - $checked = ''; - } - - $GLOBALS['linpha']->template->output['meta_linpha'] .= '<option value="' . $cat_data['id'] . '"' . $checked . '>' . htmlspecialchars($cat_data['name'], ENT_QUOTES) . '</option>' . "\n"; - } - $GLOBALS['linpha']->template->output['meta_linpha'] .= '</select>' . "\n" . - '<br /><span style="font-size: smaller;">' . i18n("For Multiple Select Use CTRL") . '</span>'; - - if ($GLOBALS['linpha']->sql->isAdmin()) { - $GLOBALS['linpha']->template->output['meta_linpha'] .= '<br /><span style="font-size: smaller;"><a href="' . LINPHA_CLIENT . '/admin/?cat=metadata_define_adddata">' . i18n("Add More Options") . '</a><br /><br /></span>'; - } - - break; - } - - $GLOBALS['linpha']->template->output['meta_linpha'] .= '</td></tr>'; - } - - /** - * set meta IPTC - */ - if ($GLOBALS['linpha']->sql->config->value['sys_image_iptc'] || $GLOBALS['linpha']->sql->config->value['sys_image_xmp']) { - if (isset ($GLOBALS['linpha']->imgview->src_file) && file_exists($GLOBALS['linpha']->imgview->src_file)) { - if (is_writable($GLOBALS['linpha']->imgview->src_file)) { - $meta_edit_possible = true; - $filename = $GLOBALS['linpha']->imgview->src_file; // used in IPTC Edit_File_Info.php - } else { - $meta_edit_possible = false; - } - } else { - $meta_edit_possible = false; - } - } - /** - * build the meta data view - */ - $fragment = 'edit_meta'; - global $linTpl; - include (LINPHA_DIR . '/templates/' . $this->template_name . '/fragments.php'); - - } // end function showEditMetaData() - - /** - * save meta linpha and meta iptc separetaly - */ - function saveModifiedMetaData() { - if ($GLOBALS['linpha']->sql->checkPermission('metadata_edit')) { - /** - * write linpha meta data - */ - if (isset ($_POST['linCmd']) && $_POST['linCmd'] == 'linInsertMetaLinpha') { - LinMetaDataModificate :: saveModifiedMetaDataLinpha(); - linSysLog(i18n("Successfully updated data.")); - } - - /** - * write iptc data - */ - if (isset ($_POST['linCmd']) && $_POST['linCmd'] == 'linInsertMetaIptc' && $GLOBALS['linpha']->sql->config->value['sys_image_iptc'] && isset ($GLOBALS['linpha']->imgview->src_file) && file_exists($GLOBALS['linpha']->imgview->src_file)) { - global $new_ps_file_info_array; - $new_ps_file_info_array = $GLOBALS['_POST']; - - /** - * important! - * remove other POST data from this array, because pjmt just takes all values and this will generate unexpected results!!! - * we got problems because $_POST['linMetaField'] is an array and pjmt couldnt handle this - */ - unset ($new_ps_file_info_array['linCmd']); - unset ($new_ps_file_info_array['linMetaField']); - unset ($new_ps_file_info_array['submit']); - - /** - * if the backup went wrong, the saveModifiedMetaDataIptc() would most probably also fail - */ - if (LinFilesys :: backupFile($GLOBALS['linpha']->imgview->src_file)) { - if (LinMetaDataModificate :: saveModifiedMetaDataIptc($new_ps_file_info_array, $GLOBALS['linpha']->imgview->src_file)) // error handling already done - { - /** - * force read data from file again if write was successful - */ - unset ($new_ps_file_info_array); - LinImport :: updateEntry($GLOBALS['linpha']->template->idCurrent, dirname($GLOBALS['linpha']->imgview->src_file), basename($GLOBALS['linpha']->imgview->src_file)); - } - } else { - linSysLog(sprintf(i18n("Error: Cannot create backup of: %s"), $GLOBALS['linpha']->imgview->src_file)); - linLog(LOG_TYPE_META, LOG_ERR, 'meta_iptc', "Error: Cannot create backup of:" . ' ' . $GLOBALS['linpha']->imgview->src_file); - } - } - } - } - - /** - * save modified linpha meta data to database - */ - function saveModifiedMetaDataLinpha() { - if (isset ($_POST['linMetaField']) && is_array($_POST['linMetaField'])) { - /** - * delete existing entries - */ - $query = $GLOBALS['linpha']->db->Execute("DELETE FROM " . LIN_PREFIX . "meta_data " . - "WHERE md5sum = '" . $GLOBALS['linpha']->imgview->md5sum . "'"); - - /** - * insert new entries - */ - foreach ($_POST['linMetaField'] AS $key => $value) { - if (is_array($value)) // coming from a select (categories etc.) - { - $value = ';' . implode(';', $value) . ';'; - } - - if (!empty ($value)) { - $GLOBALS['linpha']->db->Execute("INSERT into " . LIN_PREFIX . "meta_data " . - "(field_id, md5sum, meta_data) VALUES " . - "('" . LinSql :: linAddslashes($key) . "','" . $GLOBALS['linpha']->imgview->md5sum . "','" . LinSql :: linAddslashes($value) . "')"); - } - } - } - } -} - - class LinMetaData { @@ -242,22 +51,21 @@ } /** - * read image information from database - * and escape data with htmlspecialchars() if necessary - * + * Read image information from database and escape data using + * htmlspecialchars() if necessary * @param array array_src_infos array containing needed source file - * informations, same as LIN_SELECT_FIELDS - * + * informations, same as LIN_SELECT_FIELDS (edit bzrudi ????) + * @author flo,bzrudi */ public function readInformations($array_src_infos, $flag_nr) { /** - * cache field names if not already done - * readInformations() is executed for each thumbnail on a folder - * save a lot of time if do it only once! + * Cache field names if not already done as readInformations() is + * executed for each thumbnail on a folder this should save a lot of + * time if do it only once! */ if (!isset ($this->cachedSelectedFieldNames) - OR !is_array($this->cachedSelectedFieldNames)) + OR !is_array($this->cachedSelectedFieldNames)) { $query = $GLOBALS['linpha']->db->Execute("SELECT name " . "FROM " . LIN_PREFIX . "meta_fields " . @@ -275,6 +83,11 @@ $name = LinMetaData::getNameOfField($field_name, false); $value = ''; + /** + * Example exif_orientation will become + * $first_part = exif + * $last_part = orientation + */ $pos = strpos($field_name, '_'); $first_part = substr($field_name, 0, $pos); $last_part = substr($field_name, $pos +1); @@ -282,230 +95,498 @@ switch ($first_part) { case 'builtin' : - switch ($last_part) { case 'filename' : - $value = $array_src_infos['name']; // already escaped - break; + $value = $array_src_infos['name']; // already esc. + break; case 'imagesize' : - $value = LinFilesys :: niceFilesize($array_src_infos['filesize'], 2); - break; + $value = LinFilesys::niceFilesize($array_src_infos['filesize'], 2); + break; case 'dimension' : $value = $array_src_infos['width'] . 'x' . $array_src_infos['height']; - break; + break; case 'thumbnail' : $value = 'thumbnail'; - break; + break; case 'time_add' : $name = i18n("Date Added"); $value = linStrftime($array_src_infos['time_add']); - break; + break; case 'time_mod' : $name = i18n("Date Modified"); $value = linStrftime($array_src_infos['time_mod']); - break; + break; case 'time_exif' : $name = i18n("Date Taken"); $value = linStrftime($array_src_infos['time_exif']); - break; + break; case 'stats_numbers' : $name = i18n("Photos"); $value = $array_src_infos['stats_numbers']; - break; + break; case 'stats_views' : $name = i18n("Nr Of Views"); $value = $array_src_infos['stats_views']; - break; + break; case 'stats_downloads' : $name = i18n("Nr Of Downloads"); $value = $array_src_infos['stats_downloads']; - break; + break; case 'first_comment' : $name = i18n("First Comment"); $value = linHtmlTag($GLOBALS['linpha']->db->GetOne("SELECT meta_comment FROM " . - LIN_PREFIX . "meta_comments " . - "WHERE md5sum = '" . LinSql :: linAddslashes($array_src_infos['md5sum']) . "' " . - "ORDER by meta_time ASC")); - break; + LIN_PREFIX . "meta_comments " . + "WHERE md5sum = '".LinSql::linAddslashes($array_src_infos['md5sum'])."' " . + "ORDER by meta_time ASC")); + break; + /** + * description, category, persons, date (field + * entries which are stored in linpha_meta_data) + */ default : /** - * description, category, persons, - * date (field entries which are stored in linpha_meta_data) - */ - /** * get field id, and cache it */ - if (!isset ($this->cachedFieldIds[$last_part])) { - $this->cachedFieldIds[$last_part] = $GLOBALS['linpha']->db->GetOne("SELECT id " . - "FROM " . LIN_PREFIX . "meta_fields WHERE name = '" . $last_part . "'"); + if(!isset ($this->cachedFieldIds[$last_part])) + { + $this->cachedFieldIds[$last_part] = + $GLOBALS['linpha']->db->GetOne("SELECT id " . + "FROM ".LIN_PREFIX."meta_fields " . + "WHERE name = '".$last_part."'"); } /** * get data */ $meta_data = $GLOBALS['linpha']->db->GetOne("SELECT meta_data " . - "FROM " . LIN_PREFIX . "meta_data " . - "WHERE field_id = '" . $this->cachedFieldIds[$last_part] . "' " . - "AND md5sum = '" . $array_src_infos['md5sum'] . "'"); + "FROM ".LIN_PREFIX."meta_data " . + "WHERE field_id = '".$this->cachedFieldIds[$last_part]."' " . + "AND md5sum = '".$array_src_infos['md5sum']."'"); - if (!empty ($meta_data)) { + if(!empty ($meta_data)) + { $value = htmlspecialchars($meta_data, ENT_QUOTES); } - break; - } // end switch($last_part) - break; // end case 'builtin' + break; + } + break; // end case 'builtin' case 'id' : // own fields - /** * get data */ $meta_data = $GLOBALS['linpha']->db->GetOne("SELECT meta_data " . - "FROM " . LIN_PREFIX . "meta_data " . - "WHERE field_id = '" . $last_part . "' " . - "AND md5sum = '" . $array_src_infos['md5sum'] . "'"); + "FROM ".LIN_PREFIX."meta_data " . + "WHERE field_id = '".$last_part."' " . + "AND md5sum = '".$array_src_infos['md5sum']."'"); - if (isset ($meta_data) && !empty ($meta_data)) { + if(isset($meta_data) && !empty($meta_data)) + { $value = htmlspecialchars($meta_data, ENT_QUOTES); } - break; + break; case 'exif' : - if ($GLOBALS['linpha']->sql->config->value['sys_image_exif']) { - $exif_data = $GLOBALS['linpha']->db->GetRow("SELECT " . $last_part . " " . - "FROM " . LIN_PREFIX . "meta_exif " . - "WHERE md5sum = '" . $array_src_infos['md5sum'] . "'"); + if($GLOBALS['linpha']->sql->config->value['sys_image_exif']) + { + $exif_data = $GLOBALS['linpha']->db->GetRow("SELECT ".$last_part." " . + "FROM ".LIN_PREFIX."meta_exif " . + "WHERE md5sum = '".$array_src_infos['md5sum']."'"); - if (isset ($exif_data[$last_part])) { + if(isset ($exif_data[$last_part])) + { $value = htmlspecialchars($exif_data[$last_part], ENT_QUOTES); } } - break; + break; + case 'iptc' : - if ($GLOBALS['linpha']->sql->config->value['sys_image_iptc']) { - $iptc_data = $GLOBALS['linpha']->db->GetRow("SELECT " . $last_part . " " . - "FROM " . LIN_PREFIX . "meta_iptc " . - "WHERE md5sum = '" . $array_src_infos['md5sum'] . "'"); + if($GLOBALS['linpha']->sql->config->value['sys_image_iptc']) + { + $iptc_data = $GLOBALS['linpha']->db->GetRow("SELECT ".$last_part." " . + "FROM ".LIN_PREFIX."meta_iptc " . + "WHERE md5sum = '".$array_src_infos['md5sum']."'"); - if (isset ($iptc_data[$last_part])) { + if(isset ($iptc_data[$last_part])) + { $value = htmlspecialchars($iptc_data[$last_part], ENT_QUOTES); } } - break; + break; + case 'xmp' : - if ($GLOBALS['linpha']->sql->config->value['sys_image_xmp']) { - $xmp_data = $GLOBALS['linpha']->db->GetRow("SELECT " . $last_part . " " . - "FROM " . LIN_PREFIX . "meta_xmp " . - "WHERE md5sum = '" . $array_src_infos['md5sum'] . "'"); + if($GLOBALS['linpha']->sql->config->value['sys_image_xmp']) + { + $xmp_data = $GLOBALS['linpha']->db->GetRow("SELECT ".$last_part." " . + "FROM ".LIN_PREFIX."meta_xmp " . + "WHERE md5sum = '".$array_src_infos['md5sum']."'"); - if (isset ($xmp_data[$last_part])) { + if(isset ($xmp_data[$last_part])) + { $value = htmlspecialchars($xmp_data[$last_part], ENT_QUOTES); } } - break; + break; } - if ($value != '') { - /** - * get category names if the data looks like ';5;4;44;' or at least ';2;' - */ - if (preg_match('/^;[0-9;]*;$/', $value)) { + /** + * Get category names if the data looks like ';5;4;44;' + * or at least ';2;' + * TODO explain what is going on here + */ + if ($value != '') + { + if(preg_match('/^;[0-9;]*;$/', $value)) + { $array_catids = linExplodeAndSlice(';', $value); $str_catnames = ''; $isValidCategory = true; - for ($i = 1; list ($key, $catid) = each($array_catids); $i++) { + + for($i = 1; list($key, $catid) = each($array_catids); $i++) + { $str_catnames .= $GLOBALS['linpha']->db->GetOne("SELECT name " . - "FROM " . LIN_PREFIX . "meta_category " . - "WHERE id = '" . LinSql :: linAddslashes($catid) . "'"); + "FROM ".LIN_PREFIX."meta_category " . + "WHERE id = '".LinSql::linAddslashes($catid)."'"); /** - * was this a valid category id? - * maybe someone just added ;nice; as a description + * Was this a valid category id? + * Maybe someone just added ;nice; as a description * - * this will only check the first category id, but thats okay + * This will only check the first category id, but + * thats okay + * TODO explain what is going on here */ - if (empty ($str_catnames)) { + if(empty ($str_catnames)) + { $isValidCategory = false; break; } - if ($i < count($array_catids)) { + if($i < count($array_catids)) + { $str_catnames .= ', '; } } - if ($isValidCategory) { + if($isValidCategory) + { $value = $str_catnames; } } - $output_array[$field_name] = Array ( + $output_array[$field_name] = array ( 'name' => $name, 'value' => $value ); } } - - return $output_array; + return $output_array; } /** - * show nice name for exif, iptc, xmp, builtin and own fields, - * for example: convert "exif_datetimeoriginal" to "DateTime Original" + * This method is used to show nice names for EXIF, IPTC, XMP, builtin + * and own fields, for example: "exif_datetimeoriginal" is displayed + * as "Date Time Original" + * @param string $key something like builtin_xyz or exif_xyz + * @param bool $show_metadata_extra_info if true entries will look like: + * "(EXIF) Orientation" or just + * "Orientation" if false + * @return string $value the niced field value + * @author flo, bzrudi */ - public function getNameOfField($key, $show_metadata_extra_info) { + public function getNameOfField($key, $show_metadata_extra_info) + { $pos = strpos($key, '_'); $first_part = substr($key, 0, $pos); $last_part = substr($key, $pos +1); - switch ($first_part) { - case 'builtin' : // builtin and special fields like filename, imagesize and dimension - $value = i18n(ucfirst($last_part)); // i18n already called in sql.data.php - break; + + switch($first_part) + { + /** + * Builtin and special fields like filename, imagesize and dimension + */ + case 'builtin' : + $value = i18n(ucfirst($last_part)); + break; - case 'id' : // own fields - + /** + * Own fileds + */ + case 'id' : /** - * enable cache (only possible in object context) - * we dont want have to read this for each thumbnail + * Enable cache (only possible in object context) + * We dont want have to read this for each thumbnail */ - if (isset ($this->cachedFieldNames[$last_part])) { - $value = i18n(ucfirst($this->cachedFieldNames[$last_part])); // i18n already called in sql.data.php - } else { - $data = $GLOBALS['linpha']->db->GetRow("SELECT name FROM " . LIN_PREFIX . "meta_fields WHERE id = '" . $last_part . "'"); - $value = i18n(ucfirst($data['name'])); // i18n already called in sql.data.php + if(isset($this->cachedFieldNames[$last_part])) + { + $value = i18n(ucfirst($this->cachedFieldNames[$last_part])); + } + else + { + $data = $GLOBALS['linpha']->db->GetRow("SELECT name " . + "FROM ".LIN_PREFIX."meta_fields " . + "WHERE id = '".$last_part."'"); + $value = i18n(ucfirst($data['name'])); - if (isset ($this)) // cache entry, but only in object context - { + if(isset($this)) //cache entry, but only in object context + { $this->cachedFieldNames[$last_part] = $data['name']; } } - break; + break; + case 'exif' : -// $value = $this->objMetaTool->metaTags['exif'][$last_part]['name']; - $value = $this->objMetaTool->metaTags['exif'][$last_part]; - - if ($show_metadata_extra_info) { - $value .= ' (EXIF Resource)'; + $value = '(EXIF) '; + if($show_metadata_extra_info) + { + //TODO make exiftool proof + $value .= LinPjmtTool::$metaTags['exif'][$last_part]['name']; } - break; + break; + case 'iptc' : - $value = $this->objMetaTool->metaTags['iptc'][$last_part]; - if ($show_metadata_extra_info) { - $value .= ' (IPTC Resource)'; + $value = '(IPTC) '; + if($show_metadata_extra_info) + { + $value .= $this->objMetaTool->metaTags['iptc'][$last_part]; } - break; + break; + case 'xmp' : - $value = $this->objMetaTool->metaTags['xmp'][$last_part]; - if ($show_metadata_extra_info) { - $value .= ' (XMP Resource)'; + $value = '(XMP) '; + if($show_metadata_extra_info) + { + $value = $this->objMetaTool->metaTags['xmp'][$last_part]; } - break; + break; + + default: + linLog(LOG_TYPE_IMPORT,LOG_ERR,'import_others', + "Error in getNameOfField(); linpha.metadata.class.php"); + $value = ""; + break; } return $value; } + + + /** + * This method takes care of storing modified MetaData. It takes care + * whether we are trying to save "own" LinPHA MetaData or MetaData found + * in images (EXIF,IPTC,XMP) + * @param none + * @return none + * @author flo, bzrudi + */ + public function saveModifiedMetaData() + { + if($GLOBALS['linpha']->sql->checkPermission('metadata_edit')) + { + /** + * Write "own" linpha MetaData fields + */ + if(isset($_POST['linCmd']) + && $_POST['linCmd'] == 'linInsertMetaLinpha') + { + LinMetaData::saveModifiedMetaDataLinpha(); + linSysLog(i18n("Successfully updated data.")); + } + + /** + * Write iptc data + * TODO rewrite! + */ + if(isset($_POST['linCmd']) + && $_POST['linCmd'] == 'linInsertMetaIptc' + && $GLOBALS['linpha']->sql->config->value['sys_image_iptc'] + && isset ($GLOBALS['linpha']->imgview->src_file) + && file_exists($GLOBALS['linpha']->imgview->src_file)) + { + global $new_ps_file_info_array; + $new_ps_file_info_array = $GLOBALS['_POST']; + + /** + * important! + * remove other POST data from this array, because pjmt just takes all values and this will generate unexpected results!!! + * we got problems because $_POST['linMetaField'] is an array and pjmt couldnt handle this + */ + unset ($new_ps_file_info_array['linCmd']); + unset ($new_ps_file_info_array['linMetaField']); + unset ($new_ps_file_info_array['submit']); + + /** + * if the backup went wrong, the saveModifiedMetaDataIptc() would most probably also fail + */ + if (LinFilesys :: backupFile($GLOBALS['linpha']->imgview->src_file)) { + if (LinMetaDataModificate :: saveModifiedMetaDataIptc($new_ps_file_info_array, $GLOBALS['linpha']->imgview->src_file)) // error handling already done + { + /** + * force read data from file again if write was successful + */ + unset ($new_ps_file_info_array); + LinImport :: updateEntry($GLOBALS['linpha']->template->idCurrent, dirname($GLOBALS['linpha']->imgview->src_file), basename($GLOBALS['linpha']->imgview->src_file)); + } + } else { + linSysLog(sprintf(i18n("Error: Cannot create backup of: %s"), $GLOBALS['linpha']->imgview->src_file)); + linLog(LOG_TYPE_META, LOG_ERR, 'meta_iptc', "Error: Cannot create backup of:" . ' ' . $GLOBALS['linpha']->imgview->src_file); + } + } + } + } + + + /** + * This method is used to store changed MetaData to database. Note + * this applies only to "own" LinPHA fields and has nothing todo with + * EXIF and friends MetaData! + * @param none + * @return none + * @author flo + */ + public function saveModifiedMetaDataLinpha() + { + if(isset($_POST['linMetaField']) + && is_array($_POST['linMetaField'])) + { + /** + * Delete existing entries + */ + $query = $GLOBALS['linpha']->db->Execute("DELETE FROM " . + "".LIN_PREFIX."meta_data " . + "WHERE md5sum = '".$GLOBALS['linpha']->imgview->md5sum."'"); + + /** + * Insert new entries + */ + foreach($_POST['linMetaField'] AS $key => $value) + { + if(is_array($value)) // coming from a select (categories etc.) + { + $value = ';' . implode(';', $value) . ';'; + } + + if(!empty ($value)) + { + $GLOBALS['linpha']->db->Execute("INSERT " . + "INTO ".LIN_PREFIX."meta_data (field_id, md5sum, meta_data) " . + "VALUES ('".LinSql::linAddslashes($key)."','".$GLOBALS['linpha']->imgview->md5sum."','".LinSql::linAddslashes($value)."')"); + } + } + } + } + + + /** + * + */ + public function showEditMetaData() + { + /** + * set meta linpha + */ + $GLOBALS['linpha']->template->output['meta_linpha'] = ''; + + $query = $GLOBALS['linpha']->db->Execute("SELECT id, name, field_type, flags " . + "FROM " . LIN_PREFIX . "meta_fields " . + "WHERE flags = '5' OR flags = '7' ORDER by id"); + while ($data = $query->FetchRow()) { + $GLOBALS['linpha']->template->output['meta_linpha'] .= '<tr><td width="150" valign="top">'; + + if ($data['flags'] == 5) { + $GLOBALS['linpha']->template->output['meta_linpha'] .= LinMetaData :: getNameOfField('builtin_' . $data['name'], false); + } + elseif ($data['flags'] == 7) { + $GLOBALS['linpha']->template->output['meta_linpha'] .= LinMetaData :: getNameOfField('id_' . $data['id'], false); + } + $GLOBALS['linpha']->template->output['meta_linpha'] .= '</td><td>'; + + $meta_data = $GLOBALS['linpha']->db->GetRow("SELECT meta_data FROM " . LIN_PREFIX . "meta_data " . + "WHERE md5sum = '" . $GLOBALS['linpha']->imgview->md5sum . "'" . + "AND field_id = '" . $data['id'] . "'"); + + switch ($data['field_type']) { + case 1 : + if (isset ($meta_data['meta_data'])) { + $value = htmlspecialchars($meta_data['meta_data'], ENT_QUOTES); + } else { + $value = ''; + } + $GLOBALS['linpha']->template->output['meta_linpha'] .= '<input type="text" class="linForms" name="linMetaField[' . + $data['id'] . ']" ' . + 'value="' . $value . '" style="width: 250px;" maxlength="255" />'; + break; + case 3 : + if (isset ($meta_data['meta_data'])) { + $value = htmlspecialchars($meta_data['meta_data'], ENT_QUOTES); + } else { + $value = ''; + } + $GLOBALS['linpha']->template->output['meta_linpha'] .= '<input type="text" class="linForms" name="linMetaField[' . + $data['id'] . ']" id="linField' . $data['id'] . '" value="' . $value . '" style="width: 150px;" maxlength="255" />' . + ' <a href="javascript:void(0);" onclick="var loginWin = window.open(\'' . LINPHA_CLIENT . '/lib/include/calendar.php?form=linField' . $data['id'] . '\'' . + ',\'Calendar\',\'height=250,width=300,scrollbars=no,menubar=no,status=no\');" target="_top">' . i18n("Calendar") . '</a>'; + + break; + case 2 : + if (isset ($meta_data['meta_data'])) { + $array_pieces = linExplodeAndSlice(';', $meta_data['meta_data']); + } else { + $array_pieces = Array (); + } + + $GLOBALS['linpha']->template->output['meta_linpha'] .= '<select name="linMetaField[' . $data['id'] . '][]" class="linForms" size="7" multiple="multiple" style="width: 250px;">'; + + $cat_query = $GLOBALS['linpha']->db->Execute("SELECT id, name " . + "FROM " . LIN_PREFIX . "meta_category " . + "WHERE field_id = '" . $data['id'] . "'"); + while ($cat_data = $cat_query->FetchRow()) { + if (in_array($cat_data['id'], $array_pieces)) { + $checked = ' selected="selected"'; + } else { + $checked = ''; + } + + $GLOBALS['linpha']->template->output['meta_linpha'] .= '<option value="' . $cat_data['id'] . '"' . $checked . '>' . htmlspecialchars($cat_data['name'], ENT_QUOTES) . '</option>' . "\n"; + } + $GLOBALS['linpha']->template->output['meta_linpha'] .= '</select>' . "\n" . + '<br /><span style="font-size: smaller;">' . i18n("For Multiple Select Use CTRL") . '</span>'; + + if ($GLOBALS['linpha']->sql->isAdmin()) { + $GLOBALS['linpha']->template->output['meta_linpha'] .= '<br /><span style="font-size: smaller;"><a href="' . LINPHA_CLIENT . '/admin/?cat=metadata_define_adddata">' . i18n("Add More Options") . '</a><br /><br /></span>'; + } + + break; + } + + $GLOBALS['linpha']->template->output['meta_linpha'] .= '</td></tr>'; + } + + /** + * set meta IPTC + */ + if ($GLOBALS['linpha']->sql->config->value['sys_image_iptc'] || $GLOBALS['linpha']->sql->config->value['sys_image_xmp']) { + if (isset ($GLOBALS['linpha']->imgview->src_file) && file_exists($GLOBALS['linpha']->imgview->src_file)) { + if (is_writable($GLOBALS['linpha']->imgview->src_file)) { + $meta_edit_possible = true; + $filename = $GLOBALS['linpha']->imgview->src_file; // used in IPTC Edit_File_Info.php + } else { + $meta_edit_possible = false; + } + } else { + $meta_edit_possible = false; + } + } + /** + * build the meta data view + */ + $fragment = 'edit_meta'; + global $linTpl; + include (LINPHA_DIR . '/templates/' . $this->template_name . '/fragments.php'); + + } /** * This method is used to setup the initial most useful defaults for the @@ -573,7 +654,6 @@ return array(); break; } - } @@ -590,7 +670,15 @@ $this->available_fields = $this->objMetaTool->available_fields; } - + + /** + * This method is used to create any required MEtaData table + * @param array $array array of fields (columns) to create + * @param string $metatype exif,iptc,xmp + * @return none + * @author bzrudi,flo + * TODO cleanup + set required indexes! + */ public function createMetaDataTable($array, $metatype) { if (!is_array($array)) @@ -642,18 +730,23 @@ /** - * wrapper function for saveExifData, saveIptcData and saveXmpData - * for easier access + * Simple wrapper method for saveMetaData() + * @param string $what meta type exif,iptc,xmp + * @param string $filename filename + * @param string $md5sum md5sum of image + * @return none + * @author bzrudi,flo */ - function saveData($what, $filename, $md5sum) { + public function saveData($what, $filename, $md5sum) { /** - * no double entries - * do this check at very first position to improve performance! - * also do not setMetaFields in the __contruct() because they may never be used + * Prevent double entries. We do this check at very first position + * to improve performance! + * Also we do not setMetaFields in the __contruct() because they may + * never be used */ $query = $GLOBALS['linpha']->db->Execute("SELECT md5sum " . - "FROM " . LIN_PREFIX . "meta_" . $what . " " . - "WHERE md5sum = '" . $md5sum . "'"); + "FROM " . LIN_PREFIX . "meta_" . $what . " " . + "WHERE md5sum = '" . $md5sum . "'"); if ($query->EOF) // not a single value returned { @@ -676,7 +769,6 @@ $this->objMetaTool->saveMetaData($filename, $md5sum, $what); break; } - } } @@ -684,10 +776,13 @@ * Simple wrapper method to convert an exif date to an unix timestamp * and also return orientation tag if avail * example: 2004:02:14 18:24:19 -> 11167594589 + * HINT: Not yet used, as it only makes sense, once installer takes care + * of exiftool avail and PHP memory limit. See linpha.import.class.php-> + * getFileInformation() for details * * @param string $date * @return int unix timestamp - * @author flo,bzrudi + * @author bzrudi **/ public function getBasicMeta($dirname, $filename) { @@ -699,76 +794,105 @@ { $rotate = $this->getRotationByExifTag($rotate); } - return array($time_exif, $rotate); - + return array($time_exif, $rotate); } /** - * Autorotate Images via EXIF tag - * Most Images contain an orientation tag which shows if and how to rotate + * Autorotate images via EXIF tag + * Most images contain an orientation tag which shows if and how to rotate * the images * @param int exif rotation tag * @return degrees to rotate * @author bzrudi */ - protected function getRotationByExifTag($rotation) { - if(is_numeric($rotation)) { - switch ($rotation) { - //No Rotation, No Flip Row 0 is at the visual top of the - //image, and column 0 is the visual left-hand side + public function getRotationByExifTag($rotation) + { + if(is_numeric($rotation)) + { + switch($rotation) + { case "1" : + /** + * No Rotation, No Flip Row 0 is at the visual top of the + * image, and column 0 is the visual left-hand side + */ $rotate = "0"; - break; - //No Rotation, Flipped Horizontally Row 0 is at the visual - //top of the image,and column 0 is the visual right-hand side + break; + case "2" : + /** + * No Rotation, Flipped Horizontally Row 0 is at the + * visual top of the image,and column 0 is the visual + * right-hand side + */ $rotate = "0"; - break; - //Rotated 180 degrees, No Flip Row 0 is at the visual - //bottom of the image, and column 0 is the visual right-hand side + break; + case "3" : + /** + * Rotated 180 degrees, No Flip Row 0 is at the visual + * bottom of the image, and column 0 is the visual + * right-hand side + */ $rotate = "180"; - break; - //No Rotation, Flipped Vertically Row 0 is at the visual - //bottom of the image, and column 0 is the visual left-hand side + break; + case "4" : - $rotate = "0"; - break; - //Flipped Horizontally, Rotated 90 degrees counter clockwise - //Row 0 is at the visual left-hand side of of the image, - //and column 0 is the visual top + /** + * No Rotation, Flipped Vertically Row 0 is at the visual + * bottom of the image, and column 0 is the visual + * left-hand side + */ + $rotate = "0"; + break; + case "5" : + /** + * Flipped Horizontally, Rotated 90 degrees counter + * clockwise Row 0 is at the visual left-hand side of of + * the image, and column 0 is the visual top + */ $rotate = "0"; - break; - //No Flip, Rotated 90 degrees clockwise Row 0 is at the visual - //right-hand side of of the image, and column 0 is the visual top + break; + case "6" : + /** + * No Flip, Rotated 90 degrees clockwise Row 0 is at the + * visual right-hand side of of the image, and column 0 + * is the visual top + */ $rotate = "90"; - break; - //Flipped Horizontally, Rotated 90 degrees clockwise Row 0 is - //at the visual right-hand side of of the image, and - //column 0 is the visual bottom + break; + case "7" : + /** + * Flipped Horizontally, Rotated 90 degrees clockwise + * Row 0 is at the visual right-hand side of of the + * image, and column 0 is the visual bottom + */ $rotate = "0"; - break; - //No Flip, Rotated 90 degrees counter clockwise Row 0 is at - //the visual left-hand side of of the image, and column 0 is - //the visual bottom + break; + case "8" : + /** + * No Flip, Rotated 90 degrees counter clockwise Row 0 + * is at the visual left-hand side of of the image, and + * column 0 is the visual bottom + */ $rotate = "-90"; - break; + break; + default : $rotate = "0"; - break; - + break; } - } else // no rotation data is found, default to "0" - { + } + else + { $rotate = "0"; } - return $rotate; + return $rotate; } - } /* vi: set ts=4 sw=4 sts=4 */ ?> Modified: trunk/linpha2/lib/classes/linpha.pjmt.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.pjmt.class.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/lib/classes/linpha.pjmt.class.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -26,6 +26,7 @@ */ class LinPjmtTool extends LinMetaData { + /** * Constructor */ Modified: trunk/linpha2/templates/default/view_albmeta.html.php =================================================================== --- trunk/linpha2/templates/default/view_albmeta.html.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/templates/default/view_albmeta.html.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -18,7 +18,7 @@ <br /> <h1 class="linStyle"><?php echo i18n("Edit Album Informations"); ?></h1> - <?php LinMetaDataModificate::showEditMetaData(); ?> + <?php LinMetaData::showEditMetaData(); ?> </div> Modified: trunk/linpha2/templates/default/view_img_static.html.php =================================================================== --- trunk/linpha2/templates/default/view_img_static.html.php 2007-03-17 16:29:01 UTC (rev 4699) +++ trunk/linpha2/templates/default/view_img_static.html.php 2007-03-18 12:57:57 UTC (rev 4700) @@ -39,7 +39,7 @@ <a href="<?php echo $linTpl->URL_full.'&view=img'; ?>"><?php echo i18n("<< Back To Default View");?></a> <br /><br /> <h1 class="linStyle"><?php echo i18n("Edit Image Imformation")?></h1> - <?php LinMetaDataModificate::showEditMetaData(); + <?php LinMetaData::showEditMetaData(); } else { ?> <!-- show image --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |