aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/include/functions.php91
-rw-r--r--admin/template/goto/element_set_global.tpl3
2 files changed, 0 insertions, 94 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index 2d8ae2ba6..8453dad73 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -1697,97 +1697,6 @@ SELECT image_id
}
/**
- * 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)
*
* @param void
diff --git a/admin/template/goto/element_set_global.tpl b/admin/template/goto/element_set_global.tpl
index fc5a92e70..3bdf5688c 100644
--- a/admin/template/goto/element_set_global.tpl
+++ b/admin/template/goto/element_set_global.tpl
@@ -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>