Révision 9f05628b
Ajouté par Jocelyn Dealande il y a presque 10 ans
ajax/all_points.php | ||
---|---|---|
2 | 2 |
require_once('../class/site_point.class.php'); |
3 | 3 |
|
4 | 4 |
function get_ref_points() { |
5 |
$ref_points_filename = '../ref_points.local.php'; |
|
6 |
if (file_exists($ref_points_filename)) { |
|
7 |
include $ref_points_filename; |
|
5 |
if (file_exists(REF_POINTS_PATH)) { |
|
6 |
include REF_POINTS_PATH; |
|
8 | 7 |
return $ref_points; |
9 | 8 |
} else { |
10 | 9 |
return array(); |
class/RefPoint.class.php | ||
---|---|---|
18 | 18 |
|
19 | 19 |
public static function load_if_needed() { |
20 | 20 |
if (!isset(self::$all_ref_points_cache)) { |
21 |
$ref_points_filename = '../ref_points.local.php'; |
|
22 |
if (file_exists($ref_points_filename)) { |
|
23 |
require($ref_points_filename); |
|
21 |
if (file_exists(REF_POINTS_PATH)) { |
|
22 |
require(REF_POINTS_PATH); |
|
24 | 23 |
self::$all_ref_points_cache = $ref_points; |
25 |
return $ref_points;
|
|
26 |
} else {
|
|
27 |
return array();
|
|
24 |
return $ref_points;
|
|
25 |
} else {
|
|
26 |
return array();
|
|
28 | 27 |
} |
29 | 28 |
} |
30 | 29 |
return self::$all_ref_points_cache; |
constants.inc.php | ||
---|---|---|
3 | 3 |
define('PANORAMA_FOLDER', 'tiles' ); |
4 | 4 |
define('PANORAMA_PATH', CELUTZ_PATH.'/'.PANORAMA_FOLDER ); |
5 | 5 |
define('UPLOAD_PATH', CELUTZ_PATH.'/upload' ); |
6 |
define('REF_POINTS_PATH', CELUTZ_PATH.'/'.'ref_points.local.php'); |
|
6 | 7 |
?> |
panorama.php | ||
---|---|---|
95 | 95 |
} |
96 | 96 |
|
97 | 97 |
$ref_points = array (); |
98 |
$ref_points_filename = 'ref_points.local.php'; |
|
99 |
if (file_exists($ref_points_filename)) { |
|
100 |
include $ref_points_filename; |
|
98 |
if (file_exists(REF_POINTS_PATH)) { |
|
99 |
include REF_POINTS_PATH; |
|
101 | 100 |
} |
102 | 101 |
$extra_names = array(); |
103 | 102 |
$ref_names = array(); |
Formats disponibles : Unified diff
moved the ref_points path to a constant.