From: Santiago Torres Batan <santi73@gmail.com>
Date: Fri, 20 Oct 2014 21:21:40 -0300
Subject: Remove Geolocations download function due to insecured connection and possibly
 security hazard.

--- fotoxx.orig/f.meta.cc
+++ fotoxx/f.meta.cc
@@ -2253,60 +2253,16 @@
 
 void m_download_geolocs(GtkWidget *, cchar *)
 {
-   int      yn, err;
-   char     scriptfile[200];
-   char     destfile1[200], sourcefile1[200];
-   char     destfile2[200], sourcefile2[200];
-   FILE     *fid;
-
-   F1_help_topic = "download_geolocs";
-
-   if (Ngeolocs) zfree(geolocs);
-   Ngeolocs = 0;
-
-   yn = zmessageYN(Mwin,ZTX("Download geolocations data (18 megabytes). \n"
-                            "Save in %s \n"
-                            "Proceed?"),geotags_dirk);
-   if (! yn) return;
-
-   if (checkpend("all")) return;                                           //  check nothing pending
-
-   snprintf(sourcefile1,200,"http://www.kornelix.com/uploads/1/3/0/3/13035936/world-map-20k.jpg");
-   snprintf(destfile1,200,"%s/world-map-20K.jpg",geotags_dirk);
-   snprintf(sourcefile2,200,"http://www.kornelix.com/uploads/1/3/0/3/13035936/cities-geotags");
-   snprintf(destfile2,200,"%s/cities-geotags",geotags_dirk);
-   snprintf(scriptfile,200,"%s/download.scr",geotags_dirk);
-   
-   fid = fopen(scriptfile,"w");
-   if (! fid) { 
-      zmessageACK(Mwin,0,"cannot create script file \n %s",strerror(errno)); 
+   char     geotagsfile[200];
+   STATB    statbuf;
+   int       err;
+
+   snprintf(geotagsfile,200,"%s/cities-geotags",geotags_dirk);             //  read cities-geotags file
+   err = stat(geotagsfile,&statbuf);
+   if (err) {
+      zmessageACK(Mwin,0,ZTX("no geolocations data"));
       return;
    }
-   
-   fprintf(fid,"#! /bin/bash \n");                                         //  build bash script
-   fprintf(fid,"#  download geotags data \n");
-   fprintf(fid,"# \n");
-   fprintf(fid,"echo DOWNLOAD WORLD MAP \n");
-   fprintf(fid,"wget --progress=dot:mega -O %s %s 2>&1 \n",destfile1,sourcefile1);
-   fprintf(fid,"err=$? \n");
-   fprintf(fid,"if [ $err -ne 0 ]; then exit $err; fi \n");
-   fprintf(fid,"echo DOWNLOAD GEOTAGS FILE \n");
-   fprintf(fid,"wget -O %s %s 2>&1 \n",destfile2,sourcefile2);
-   fprintf(fid,"err=$? \n");
-   fprintf(fid,"if [ $err -ne 0 ]; then exit $err; fi \n");
-   fprintf(fid,"echo DONE \n");
-   fprintf(fid,"exit 0 \n");
-   fclose(fid);
-
-   chmod(scriptfile,0744);
-   
-   Ffuncbusy++;  
-   snprintf(command,ccc,"bash %s",scriptfile);                             //  run the script
-   err = popup_command(command,800,600,Mwin);
-   if (err) zmessageACK(Mwin,0,ZTX("download failed"));
-   Ffuncbusy--;  
-
-   return;
 }
 
 
