aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_metadata.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-01-24 12:50:48 +0000
committermistic100 <mistic@piwigo.org>2014-01-24 12:50:48 +0000
commit1f448f9b1e731688133a943fe451c3d73a3ae0c4 (patch)
tree47f93c6796f356bf15adc7307503fe42721e8d17 /admin/include/functions_metadata.php
parent01324a50ad93d616a2b2ff3d0477ffbaa1a1ab95 (diff)
feature 2999; docblocks for history, install and metadata
git-svn-id: http://piwigo.org/svn/trunk@26946 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions_metadata.php48
1 files changed, 41 insertions, 7 deletions
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php
index 5bcbb12bf..d969d06b1 100644
--- a/admin/include/functions_metadata.php
+++ b/admin/include/functions_metadata.php
@@ -21,9 +21,21 @@
// | USA. |
// +-----------------------------------------------------------------------+
+/**
+ * @package functions\admin\metadata
+ */
+
+
include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
+/**
+ * Returns IPTC metadata to sync from a file, depending on IPTC mapping.
+ * @toto : clean code (factorize foreach)
+ *
+ * @param string $file
+ * @return array
+ */
function get_sync_iptc_data($file)
{
global $conf;
@@ -80,6 +92,12 @@ function get_sync_iptc_data($file)
return $iptc;
}
+/**
+ * Returns EXIF metadata to sync from a file, depending on EXIF mapping.
+ *
+ * @param string $file
+ * @return array
+ */
function get_sync_exif_data($file)
{
global $conf;
@@ -110,7 +128,11 @@ function get_sync_exif_data($file)
return $exif;
}
-
+/**
+ * Get all potential file metadata fields, including IPTC and EXIF.
+ *
+ * @return string[]
+ */
function get_sync_metadata_attributes()
{
global $conf;
@@ -139,6 +161,12 @@ function get_sync_metadata_attributes()
return array_unique($update_fields);
}
+/**
+ * Get all metadata of a file.
+ *
+ * @param array $infos - (path[, representative_ext])
+ * @return array - includes data provided in $infos
+ */
function get_sync_metadata($infos)
{
global $conf;
@@ -178,7 +206,12 @@ function get_sync_metadata($infos)
return $infos;
}
-
+/**
+ * Sync all metadata of a list of images.
+ * Metadata are fetched from original files and saved in database.
+ *
+ * @param int[] $ids
+ */
function sync_metadata($ids)
{
global $conf;
@@ -255,13 +288,13 @@ SELECT id, path, representative_ext
}
/**
- * returns an array associating element id (images.id) with its complete
+ * Returns an array associating element id (images.id) with its complete
* path in the filesystem
*
- * @param int id_uppercat
- * @param int site_id
- * @param boolean recursive ?
- * @param boolean only newly added files ?
+ * @param int $category_id
+ * @param int $site_id
+ * @param boolean $recursive
+ * @param boolean $only_new
* @return array
*/
function get_filelist($category_id = '', $site_id=1, $recursive = false,
@@ -317,4 +350,5 @@ SELECT id, path, representative_ext
;';
return hash_from_query($query, 'id');
}
+
?> \ No newline at end of file