Révision 9f05628b
Ajouté par Jocelyn Dealande il y a presque 10 ans
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; |
Formats disponibles : Unified diff
moved the ref_points path to a constant.