- Timestamp:
- Sep 19, 2008, 11:18:40 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r2502 r2551 1698 1698 1699 1699 /** 1700 * Create an XML file with Piwigo informations about a list of1701 * pictures.1702 *1703 * The goal of the export feature is to make easier the reading of1704 * informations related to pictures outside of Piwigo.1705 *1706 * @param array image_ids1707 */1708 function export_pwg_data($image_ids)1709 {1710 global $conf;1711 1712 if (count($image_ids) == 0)1713 {1714 return;1715 }1716 1717 $fp = fopen($conf['export_file'], 'w');1718 $xml_string = '<export>'."\n";1719 1720 $query = '1721 SELECT tag_id,1722 image_id1723 FROM '.IMAGE_TAG_TABLE.'1724 WHERE image_id IN ('.implode(',', $image_ids).')1725 ;';1726 $result = pwg_query($query);1727 $tags_of = array();1728 $all_tag_ids = array();1729 $tag_name_of = array();1730 1731 if (mysql_num_rows($result))1732 {1733 while ($row = mysql_fetch_array($result))1734 {1735 array_push($all_tag_ids, $row['tag_id']);1736 1737 if (!isset($tags_of[ $row['image_id'] ])) {1738 $tags_of[ $row['image_id'] ] = array();1739 }1740 1741 array_push(1742 $tags_of[ $row['image_id'] ],1743 $row['tag_id']1744 );1745 }1746 1747 $all_tag_ids = array_unique($all_tag_ids);1748 1749 $query = '1750 SELECT id,1751 name1752 FROM '.TAGS_TABLE.'1753 WHERE id IN ('.implode(',', $all_tag_ids).')1754 ;';1755 $result = pwg_query($query);1756 1757 while ($row = mysql_fetch_array($result))1758 {1759 $tag_name_of[ $row['id'] ] = $row['name'];1760 }1761 }1762 1763 $query = '1764 SELECT id,1765 path1766 FROM '.IMAGES_TABLE.'1767 WHERE id IN ('.implode(',', $image_ids).')1768 ;';1769 $result = pwg_query($query);1770 1771 while ($row = mysql_fetch_array($result))1772 {1773 $xml_string.= " <photo>\n";1774 $xml_string.= " <id>".$row['id']."</id>\n";1775 $xml_string.= " <path>".$row['path']."</path>\n";1776 1777 foreach ($tags_of[ $row['id'] ] as $tag_id)1778 {1779 $xml_string.= " <tag>".$tag_name_of[$tag_id]."</tag>\n";1780 }1781 1782 $xml_string.= " </photo>\n";1783 }1784 1785 $xml_string.= '</export>';1786 fwrite($fp, $xml_string);1787 fclose($fp);1788 }1789 1790 /**1791 1700 * Refer main Piwigo URLs (currently PHPWG_DOMAIN domain) 1792 1701 * -
trunk/admin/template/goto/element_set_global.tpl
r2531 r2551 175 175 <li><label><input type="radio" name="caddie_action" value="add_selected" /> {'Add selected elements to caddie'|@translate}</label></li> 176 176 {/if} 177 178 <li><label><input type="radio" name="caddie_action" value="export" /> {'Export data'|@translate}</label></li>179 180 177 </ul> 181 178 -
trunk/language/en_UK/admin.lang.php
r2522 r2551 469 469 $lang['Duplicates'] = 'Files with same name in more than one physical category'; 470 470 471 $lang['Export data'] = 'Export data';472 471 $lang['Overall'] = 'Overall'; 473 472 $lang['Year'] = 'Year'; -
trunk/language/es_ES/admin.lang.php
r2516 r2551 469 469 $lang['Duplicates'] = 'Ficheros que llevan el mismo nombre en varias categorías físicas'; 470 470 471 $lang['Export data'] = 'Exportar los datos';472 471 $lang['Overall'] = 'Vista global'; 473 472 $lang['Year'] = 'Año'; -
trunk/language/fr_FR/admin.lang.php
r2540 r2551 469 469 $lang['Duplicates'] = 'Fichiers portant le même nom dans plusieurs catégories physiques'; 470 470 471 $lang['Export data'] = 'Exporter les données';472 471 $lang['Overall'] = 'Vue globale'; 473 472 $lang['Year'] = 'Année'; -
trunk/language/it_IT/admin.lang.php
r2539 r2551 469 469 $lang['Duplicates'] = 'File con stesso nome in più di una categoria fisica'; 470 470 471 $lang['Export data'] = 'Esportare i dati';472 471 $lang['Overall'] = 'Vista globale'; 473 472 $lang['Year'] = 'Anno'; -
trunk/language/nl_NL/admin.lang.php
r2516 r2551 469 469 $lang['Duplicates'] = 'Bestanden met de zelfde naam in meer dan één physieke categorie'; 470 470 471 $lang['Export data'] = 'Exporteer data';472 471 $lang['Overall'] = 'Totaal'; 473 472 $lang['Year'] = 'Jaar';
Note: See TracChangeset
for help on using the changeset viewer.