1) Unzip the new version in the modules dir but not in dir leonardo/ but something other like  leo/

If you are running phpbb copy also the following files (from the new dir you just made )

doc/install/phpbb2Files/mainfile.php -> main phpbb dir
doc/install/phpbb2Files/modules.php -> main phpbb dir
doc/install/phpbb2Files/page_header_leonardo.php -> includes/ dir under the main phpbb dir
doc/install/phpbb2Files/page_tail_leonardo.php -> includes/ dir under the main phpbb dir


2) run the provided SQL on your main DB. ALL SQL upgrades are HARMLESS to existing data AND functionality

The SQL to run is in file /doc/install/upgrade_2.0.0_fixes/upgrade_2.0.0_fixes.sql

The problem is that some of the sql commands in this file are already executed in your DB.

So you must find from which point on you must execute the commands by executing each sql command by itself starting from the begining. Commands that are already in the DB will give an error but they do no harm. When you find a command that gives no error you can probably execute all the rest of the commands in one go.

3) copy the site/ files from provided zip file avalable at the download area.

Have a good look at them all and copy the config values from your current site/ files.

DO NOT copy over your site/ files but instead PLEASE take the time to go through each new file and edit it to your old config values.
This is beacuse new values have been added and some config values had their name changed.

** By this time your new version will be available at /modules.php?name=leo
Test the basic functionality. because the fligths/ and maps/ dir are not yet moved the fligth display screen
will not display maps/ and charts. **



4) MOVE (or copy but it is not nessasary) the


files from the leonardo/ dir to leo/ (no backup is really needed)

** By this time your new version will be available at /modules.php?name=leo
Test ALL the functionality now that the fligths/ and maps/ dir are moved to the right place.. **

5) rename leonardo/ to leonardo_old/ ?(or anything you wish)

6) rename leo/  to leonardo/ and you are done!

** Test again all features on new version, if big problems,
revert to old by using the steps in reverse order.
(NO NEED TO REVERSE SQL commands) **

This is a fail safe method, no need to duplicate/backup db, no data can be lost,
the 2 versions can also run in paralell  using the same db but storing flights in
different place ( not recommended !!!!)


Use only when the upgrade is done and WELL tested !!!!

1. Add 3d maps so that ground elevation is plotted in the altitude chart.


Get the zip files from the aera you want to cover from


In order to figure out which zip files you need consult the map at



is a total of 13 gb for world wide coverage (5 gb for eurasia, around 2GB for europe)


if you have a linux shell you can try :

    nohup wget  --limit-rate=150k -q -b -nd -r ftp://e0srp01u.ecs.nasa.gov/srtm/version2/SRTM3/Eurasia/* & 


  1. You must put these files in maps\hgt\ dir but there is a config value in site/config_custom.php file that lets you change the location
  2. You must put the zip files with the exact filenames you got them
  3. You must put them all in this dir (no subdirs).
  4. Also after adding new 3d zip files remember to use "Clean files related to Google maps (use it after installing new 3d maps)"
    it deletes the relevant files used to display the ground altitude per flight that are then autocreated on demand.

If you dont do that flights that were previously submitted when no 3d files were available will not display ground elevation

2. Clean up old files

Use the 3 options under the "Clean up files" category in the "ADMIN" menu

This is needed so the old and google earth and maps files are deleted becuase they are not compatible with the new code

3. Detect the glider brands

In older version the pilots put the glider name and brand in one field which often caused trouble beacuse they left out or mispelled the brand of the glider.

Starting from 2.9.0 the pilot enters the brand from a drop down menu and you must convert the mixed "glider name + glider brand" field into separate fields

**** DONT WORRY IT IS EASY !!!! *****

1. Select in admin menu : "Detect / Guess glider brands"

2. Follow the steps one by one , no changes will be done in the db except for creating a temp table.

3. In step 6a you must copy the output into an csv (excel) file

4. Open the csv file in an Exel and make any corrections there.

field A is the glider name as it should be ( with no brand name , corrected abrevations , spellings etc...)
so must correct this when wrong.

field B is the brand id which you can find by look ing at file FN_brands.php or in the file itself at column C
you must correct this also when wrong

field C is the brand name with 1-1 relationship with column B
change this also when correcting column B

field D is the original field and mus not be changed in any means. is the key on which later we will update the flights table

you can sort the cvs in any way you like mainting the column order or course.

When ready you feed the cvs (not excel) into  the admin interface with option 6c to get the required sql to run into the DB .

5. Continue with steps 6c 6d Note that you must manually execute the sql commands from step 6c in your DB

NOTE: when you execute the sql from step 6c your DB will become incompatible with previous versions of leoanrdo.
The incompatibility is that if you use older code with the new DB the glider brands wont be displayed at all

4. Make the hashes

Use the option "Make hashes for all flights" under the "Migration to newer DB schemes operations" in "admin" menu

This is required so no flight can be netered twice in the system.

5. Do some house keeping

Use the "Fix Takeoff names" from "admin" menu just in case. It wont do any harm anyway!

6. Rebuild the logs (MUST BE PERFORMED LAST ! )

Use the 2 options under "Sync Log oparations"

Use "Clean sync-log" one time and then
Use "Remake sync-log" in batches of 500 until it reports no other flights

This will prepare a log table that can be used to sync your server with other leonardo servers.
Contact me if you want to use this option with paraglidingforum.



1. Language files

You only need this if working on the source and want to add some new text to the interface

Language files structure is changed in v.2.9.0.

The files that you can edit are located in language/source/ folder. These are descibed as source files because they are used to generate 2 versions
one in iso encoding and one in UTF encoding which are the ones really used.

So when you want to add some new language string (if you are doing custom development) you

1.Add this string to your local language file in the source/ dir and PLEASE add it also in the english language at least.

2. Run the script "Admionister Language translations". This will create files in iso/ and utf8/ folders and also fill in the missing defines in the other languages based on the defines found in the english file.

Example: your local language is german and want to add a string _PLEASE_GIVE_A_CORRECT_EMAIL

Open the source/language-german.php and add at the end the line

define("_PLEASE_GIVE_A_CORRECT_EMAIL","the german phrase");

AND also the language-english.php and add


By running the script the rest resulting files will have also the english translation in place so at least it is displayed something meaningfull until an proper translation is offer for this phrase to all other languages.