Changeset 2166

Show
Ignore:
Timestamp:
11/25/10 21:09:57 (18 months ago)
Author:
paparazzia
Message:

allow use of master tiles server (see #31)
useful if you can't get the tiles_g binary to work on your server ;)

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/base/scripts/upgrade-v0.15.sql

    r2119 r2166  
    2828#On mets à standard tous les _boats_ admins 
    2929UPDATE users SET class = 'standard' WHERE class = 'admin'; 
     30 
     31#Meilleure indexation de races 
     32ALTER TABLE `races` ADD INDEX filter (started, deptime, closetime); 
  • trunk/hosting/conf/param.php.dist

    r1766 r2166  
    4242//define("MAIL_PREFIX", "VLM_".SERVER_NAME); 
    4343 
    44  
     44//TILES PREFS - DEFINE ONLY IF YOUR VLM INSTANCE HAS NOT PROPER TILES_G BINARY 
     45//define("TILES_SOURCE_SERVER", "http://testing.virtual-loup-de-mer.org"); 
    4546 
    4647?> 
  • trunk/site/cache.php

    r2130 r2166  
    22    function headeranddie($h) { 
    33        header("Cache-Control: no-cache"); // no cache for dummy answer 
    4 //        header("Status: 302 Moved Temporarily", false, 302); 
     4        header("Status: 302 Moved Temporarily", false, 302); 
    55        header("Location: $h"); 
    66        exit(); 
  • trunk/site/gshhstiles.php

    r2129 r2166  
    77    $force = get_cgi_var('force', 'no'); 
    88 
    9     if ( $tilez < 0 && $tilez > 20 ) die("bad z index"); 
     9    if ( $tilez < 0 && $tilez > 20 ) die("Bad z index"); 
    1010    $sizetile = pow(2, $tilez); 
    1111    $tilex = $tilex % $sizetile; 
     
    2020    if ( ( ! file_exists($original) ) ||  ($force == 'yes') ) { 
    2121        if (!is_dir($originaldir)) mkdir($originaldir, 0777, True); 
    22         $execcmd = sprintf("%s %d %d %d %s %s", TILES_G_PATH, pow(2, $tilez), $tilex, $tiley, GSHHS_CLIPPED_FILENAME, $original); 
    23         shell_exec($execcmd); 
     22        if (defined("TILES_SOURCE_SERVER")) { 
     23            copy(sprintf("%s/%s", TILES_SOURCE_SERVER, $original), $original); 
     24        } else { 
     25            $execcmd = sprintf("%s %d %d %d %s %s", TILES_G_PATH, pow(2, $tilez), $tilex, $tiley, GSHHS_CLIPPED_FILENAME, $original); 
     26            shell_exec($execcmd); 
     27        } 
    2428    } 
    2529    header("Content-Type: image/png");