deletion: function export_pwg_data was inadvertently added with r1817 while

the development was not finished.


git-svn-id: http://piwigo.org/svn/trunk@2551 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2008-09-19 21:18:40 +00:00
commit f3c2080767
7 changed files with 4 additions and 103 deletions

View file

@ -1696,97 +1696,6 @@ SELECT image_id
associate_images_to_categories($images, $destinations);
}
/**
* Create an XML file with Piwigo informations about a list of
* pictures.
*
* The goal of the export feature is to make easier the reading of
* informations related to pictures outside of Piwigo.
*
* @param array image_ids
*/
function export_pwg_data($image_ids)
{
global $conf;
if (count($image_ids) == 0)
{
return;
}
$fp = fopen($conf['export_file'], 'w');
$xml_string = '<export>'."\n";
$query = '
SELECT tag_id,
image_id
FROM '.IMAGE_TAG_TABLE.'
WHERE image_id IN ('.implode(',', $image_ids).')
;';
$result = pwg_query($query);
$tags_of = array();
$all_tag_ids = array();
$tag_name_of = array();
if (mysql_num_rows($result))
{
while ($row = mysql_fetch_array($result))
{
array_push($all_tag_ids, $row['tag_id']);
if (!isset($tags_of[ $row['image_id'] ])) {
$tags_of[ $row['image_id'] ] = array();
}
array_push(
$tags_of[ $row['image_id'] ],
$row['tag_id']
);
}
$all_tag_ids = array_unique($all_tag_ids);
$query = '
SELECT id,
name
FROM '.TAGS_TABLE.'
WHERE id IN ('.implode(',', $all_tag_ids).')
;';
$result = pwg_query($query);
while ($row = mysql_fetch_array($result))
{
$tag_name_of[ $row['id'] ] = $row['name'];
}
}
$query = '
SELECT id,
path
FROM '.IMAGES_TABLE.'
WHERE id IN ('.implode(',', $image_ids).')
;';
$result = pwg_query($query);
while ($row = mysql_fetch_array($result))
{
$xml_string.= " <photo>\n";
$xml_string.= " <id>".$row['id']."</id>\n";
$xml_string.= " <path>".$row['path']."</path>\n";
foreach ($tags_of[ $row['id'] ] as $tag_id)
{
$xml_string.= " <tag>".$tag_name_of[$tag_id]."</tag>\n";
}
$xml_string.= " </photo>\n";
}
$xml_string.= '</export>';
fwrite($fp, $xml_string);
fclose($fp);
}
/**
* Refer main Piwigo URLs (currently PHPWG_DOMAIN domain)
*

View file

@ -174,9 +174,6 @@
{else}
<li><label><input type="radio" name="caddie_action" value="add_selected" /> {'Add selected elements to caddie'|@translate}</label></li>
{/if}
<li><label><input type="radio" name="caddie_action" value="export" /> {'Export data'|@translate}</label></li>
</ul>
<p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit_caddie" /></p>

View file

@ -468,7 +468,6 @@ $lang['Elements_not_linked'] = 'Not linked elements';
$lang['special_admin_menu'] = 'Specials';
$lang['Duplicates'] = 'Files with same name in more than one physical category';
$lang['Export data'] = 'Export data';
$lang['Overall'] = 'Overall';
$lang['Year'] = 'Year';
$lang['Month'] = 'Month';

View file

@ -468,7 +468,6 @@ $lang['Elements_not_linked'] = 'Elementos no atados';
$lang['special_admin_menu'] = 'Clases de matemáticas superiores';
$lang['Duplicates'] = 'Ficheros que llevan el mismo nombre en varias categorías físicas';
$lang['Export data'] = 'Exportar los datos';
$lang['Overall'] = 'Vista global';
$lang['Year'] = 'Año';
$lang['Month'] = 'Mes';

View file

@ -468,7 +468,6 @@ $lang['Elements_not_linked'] = 'Eléments non liés';
$lang['special_admin_menu'] = 'Spéciales';
$lang['Duplicates'] = 'Fichiers portant le même nom dans plusieurs catégories physiques';
$lang['Export data'] = 'Exporter les données';
$lang['Overall'] = 'Vue globale';
$lang['Year'] = 'Année';
$lang['Month'] = 'Mois';

View file

@ -468,7 +468,6 @@ $lang['Elements_not_linked'] = 'Elementi sciolti';
$lang['special_admin_menu'] = 'Speciale';
$lang['Duplicates'] = 'File con stesso nome in più di una categoria fisica';
$lang['Export data'] = 'Esportare i dati';
$lang['Overall'] = 'Vista globale';
$lang['Year'] = 'Anno';
$lang['Month'] = 'Mese';

View file

@ -468,7 +468,6 @@ $lang['Elements_not_linked'] = 'Niet gelinkte elementen';
$lang['special_admin_menu'] = 'Speciaal';
$lang['Duplicates'] = 'Bestanden met de zelfde naam in meer dan één physieke categorie';
$lang['Export data'] = 'Exporteer data';
$lang['Overall'] = 'Totaal';
$lang['Year'] = 'Jaar';
$lang['Month'] = 'Maand';