Mercurial > hg > mgallery
changeset 315:8a69e693e08c
Add (unused) helper function mgConvertAttribute().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 06 Apr 2020 19:05:49 +0300 |
parents | 020d155a179d |
children | af5ce7bf7eeb |
files | mgtool.php |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mgtool.php Mon Apr 06 19:05:13 2020 +0300 +++ b/mgtool.php Mon Apr 06 19:05:49 2020 +0300 @@ -436,6 +436,13 @@ } +function mgConvertAttribute(&$dst, &$src, $dstName, $srcName) +{ + if (isset($src[$srcName])) + $dst[$dstName] = (string) $src[$srcName]; +} + + function mgParseXMPData($xmpStr) { // SimpleXML apparently can't handle namespaces,