~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to scripts/precache-tiles/cacheTile.php

  • Committer: V. Keith Hughitt
  • Date: 2009-03-26 19:20:57 UTC
  • Revision ID: hughitt1@kore-20090326192057-u0x8rf8sf5lmmnwh
nightly build 03-26-2009: Using alpha-channel JPEG 2000 dataset

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/php
2
 
<?php
3
 
    /**
4
 
     * TODO 02/03/2010: Since cache directory creation is now done primarily during the
5
 
     * getClosestImage request, when precaching we must create cache directories as needed:
6
 
     *  
7
 
     *      if (!file_exists($filepath)) {
8
 
     *          mkdir($filepath, 0777, true);
9
 
     *          chmod($filepath, 0777);
10
 
     *      }
11
 
     *       
12
 
     * (It may be useful to limit amount of checks by doing once per directory, rather than once
13
 
     *  per tile)
14
 
     *  
15
 
     *  Note: Make sure /cache directory and it's children have proper ownship (e.g. user:www-data).
16
 
     */
17
 
        require_once('../../settings/Config.php');
18
 
        require('../../api/lib/helioviewer/Tile.php');
19
 
        $id      = $argv[1];
20
 
        $zoom    = $argv[2];
21
 
        $x       = $argv[3];
22
 
        $y       = $argv[4];
23
 
        $ts      = 512;
24
 
        $display = false;
25
 
 
26
 
        $trash = new Tile($id, $zoom, $x, $y, $ts, $display);
27
 
?>
28