} $sDsmUsername = $arDsmUser[1]; if (file_exists(SYNO_HOMES_PATH . $sDsmUsername . '/photo/' . SYNO_PHOTO_USER_DB)) { $arPSUserlist[] = $sDsmUsername; } } foreach ($arPSUserlist as $sUsername) { if ($sUsername == 'COMMON') { $sUserPath = ''; } else { $sUserPath = SYNO_HOMES_PATH . $sUsername . '/photo/'; } echo "\nUsername: "******"\n"; try { $oDBH = new DatabaseHandler($sUserPath); $oDBH->prepare(); } catch (RuntimeException $e) { echo $e->getMessage() . "\n"; continue; } $arPhotos = $oDBH->getPhotos(); foreach ($arPhotos as $arPhoto) { echo $arPhoto['path'] . ': '; $oImage = new PSImage($sUserPath, $arPhoto); $oImage->prepare(); if (!$oImage->isPicasaXMP()) { echo "No Picasa face information\n"; $oDBH->setPhotoMerged($oImage->getIId()); continue; } if ($oImage->isMicrosoftXMP()) {