album) || ! isset($gallery->session->albumName)) {
printPopupStart(gTranslate('core', "Rebuilding capture dates"));
showInvalidReqMesg();
exit;
}
// Hack check
if (!$gallery->user->canWriteToAlbum($gallery->album)) {
printPopupStart(gTranslate('core', "Rebuilding capture dates"));
showInvalidReqMesg(gTranslate('core', "You are not allowed to perform this action!"));
exit;
}
printPopupStart(sprintf(gTranslate('core', "Rebuilding capture dates: %s"), $gallery->album->fields["title"]), '', 'left');
echo '
' . $gallery->album->getHighlightAsThumbnailTag() . '
';
if(!empty($rebuild)) {
if($gallery->album->rebuildCaptureDates($recursive)) {
echo '';
echo "\n\n";
echo gButton('close', gTranslate('core', "Close"), 'parent.close()');
echo "";
}
else {
$error = true;
}
}
if(empty($rebuild) || isset($error)) {
echo gTranslate('core', "Here you can rebuild all capture dates of your photos.");
echo "\n
";
echo gTranslate('core', "This is usefull when something went wrong, of you enabled jhead/exiftags after you upload items.");
echo makeFormIntro('rebuild_capture_dates.php', array(), array('type' => 'popup'));
echo gTranslate('core', "Do you also want to rebuild the capture dates of items in subalbums?");
echo gInput('radio', 'recursive', gTranslate('core', "Yes"), false, 1);
echo gInput('radio', 'recursive', gTranslate('core', "No"), false, 0, array('checked' => null));
echo "\n
";
echo "\n";
echo gSubmit('rebuild', gTranslate('core', "Start"));
echo gButton('close', gTranslate('core', "Close"), 'parent.close()');
echo "
";
echo "\n";
}
?>