function handle_add_map()
 {
     $defaults = array('title' => '', 'game_id' => 0, 'id' => 0);
     $data = Utils::extract_args(stripslashes_deep($_POST), $defaults);
     extract($data);
     if (empty($title)) {
         Flash::error(__('Map title is a required field.', WP_CLANWARS_TEXTDOMAIN));
         return;
     }
     $upload_id = $this->handle_upload('screenshot_file');
     if (is_wp_error($upload_id) && $upload_id->get_error_code() !== self::ErrorUploadNoFile) {
         Flash::error($upload_id->get_error_message());
         return;
     } else {
         if (is_int($upload_id)) {
             $data['screenshot'] = $upload_id;
         }
     }
     if (\WP_Clanwars\Maps::add_map($data) !== false) {
         Flash::success(__('Added a map.', WP_CLANWARS_TEXTDOMAIN));
         wp_redirect(admin_url(sprintf('admin.php?page=wp-clanwars-games&act=maps&game_id=%d', $game_id)));
         exit;
     } else {
         Flash::error(__('Failed to add a map.', WP_CLANWARS_TEXTDOMAIN));
     }
 }