Commit f8315d1b379c6254954076bc5ae4879a279e909a

Authored by Elena.Budnik
1 parent 605e4bfd

modif env vars according to AMDA_Install

Showing 1 changed file with 5 additions and 6 deletions   Show diff stats
update_amda/makeTree.php
... ... @@ -5,15 +5,14 @@
5 5 */
6 6  
7 7 error_reporting(E_ERROR);
8   - define("AMDA_SPASE_INTERFACE", getenv("AMDA_SPASE_INTERFACE"));
9 8  
10   - if ( AMDA_SPASE_INTERFACE == "" )
  9 + if (getenv("AMDA_SPASE_INTERFACE") === false)
11 10 require_once("./config.php");
12 11 else
13   - require_once(AMDA_SPASE_INTERFACE."/config.php");
14   -
15   - if (defined("DATAPATH") && file_exists(DATAPATH.'rank.json'))
16   - $cmpArr = json_decode(file_get_contents(DATAPATH.'rank.json'), true);
  12 + require_once(getenv("AMDA_SPASE_INTERFACE")."/config.php");
  13 +
  14 + if (getenv("DATAPATH") !== false && file_exists(getenv("DATAPATH")."rank.json"))
  15 + $cmpArr = json_decode(file_get_contents(getenv("DATAPATH")."rank.json"), true);
17 16 else
18 17 $cmpArr = null;
19 18  
... ...