pwg_db_real_escape_string($matches[1]), 'comment' => pwg_db_real_escape_string($matches[2]), // TODO right trim ) ); } mass_updates( IMAGES_TABLE, array( 'primary' => array('file'), 'update' => array('comment'), ), $updates ); $endtime = get_moment(); $elapsed = ($endtime - $starttime); array_push( $page['infos'], sprintf( l10n('%d photos updated'), count($updates) ) ); if (count($missing_files) > 0) { array_push( $page['errors'], sprintf( l10n('%d photos are missing in Piwigo: %s'), count($missing_files), implode(', ', array_keys($missing_files)) ) ); } } } else { array_push($page['errors'], $_FILES['mascarille_update']['error']); } } // +-----------------------------------------------------------------------+ // | form options | // +-----------------------------------------------------------------------+ // image level options $selected_level = isset($_POST['level']) ? $_POST['level'] : 0; $template->assign( array( 'level_options'=> get_privacy_level_options(), 'level_options_selected' => array($selected_level) ) ); ?>