comparison mgtool.php @ 342:4dd202fffdf7

Cosmetics.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 27 Aug 2023 01:45:44 +0300
parents 9210052bb649
children d6422e856ecd
comparison
equal deleted inserted replaced
341:9210052bb649 342:4dd202fffdf7
497 if (($xres = $xmpOb->xpath("RDF/Description/subject/li")) !== FALSE) 497 if (($xres = $xmpOb->xpath("RDF/Description/subject/li")) !== FALSE)
498 $xmpData["keywords"] = array_map(function($xkw) { return (string) $xkw; }, $xres); 498 $xmpData["keywords"] = array_map(function($xkw) { return (string) $xkw; }, $xres);
499 499
500 // Get image title 500 // Get image title
501 if (($xres = $xmpOb->xpath("RDF/Description/title/li")) !== FALSE) 501 if (($xres = $xmpOb->xpath("RDF/Description/title/li")) !== FALSE)
502 {
503 $xmpData["title"] = implode(" ", array_map(function($xe) { return (string) $xe; }, $xres)); 502 $xmpData["title"] = implode(" ", array_map(function($xe) { return (string) $xe; }, $xres));
504 }
505 503
506 return $xmpData; 504 return $xmpData;
507 } 505 }
508 506
509 507
562 if (!array_key_exists($skey, $tmp)) 560 if (!array_key_exists($skey, $tmp))
563 { 561 {
564 // Key didn't exist, try for default 562 // Key didn't exist, try for default
565 if ($default !== NULL) 563 if ($default !== NULL)
566 $dst[$dkey] = $default; 564 $dst[$dkey] = $default;
565
567 return FALSE; 566 return FALSE;
568 } 567 }
569 else 568 else
570 $tmp = &$tmp[$skey]; 569 $tmp = &$tmp[$skey];
571 } 570 }
572 571
573 // Optionally convert the input value 572 // Optionally convert the input value
574 $dst[$dkey] = mgConvertExifData($tmp, $vtype); 573 $dst[$dkey] = mgConvertExifData($tmp, $vtype);
574
575 return TRUE; 575 return TRUE;
576 } 576 }
577 577
578 578
579 // 579 //