Commit b7741da913add627767e7f7ac6432b1c9e295b94

Authored by Benjamin Renard
1 parent 5d78fbba

Define DDService address only once

php/RemoteDataCenter/RemoteParamManager.php
... ... @@ -188,7 +188,7 @@ class RemoteParamManager
188 188  
189 189 if (!$status) return false;
190 190  
191   - $remoteDatasetInfo = INFOSITE."/INFO/bases/".$this->center->baseID."/".$this->center->infoFile;
  191 + $remoteDatasetInfo = DDSERVICE."/BASE/INFO/bases/".$this->center->baseID."/".$this->center->infoFile;
192 192 $localDatasetInfo = RemoteData.$this->center->baseID."/".$this->center->infoFile;
193 193  
194 194 if (!copy($remoteDatasetInfo,$localDatasetInfo)) return false;
... ... @@ -335,4 +335,4 @@ class RemoteParamManager
335 335  
336 336 }
337 337 }
338   -?>
339 338 \ No newline at end of file
  339 +?>
... ...
php/RemoteDataCenter/getRemoteDDBaseProxies.php
... ... @@ -16,10 +16,11 @@
16 16  
17 17 // only "DDBASE" Bases.xml
18 18 if (!file_exists(DATAPATH."/RemoteData/Bases.xml")) {
  19 + if (!is_dir(DATAPATH."/RemoteData")) mkdir(DATAPATH."/RemoteData");
19 20 echo 'No Bases.xml file : Will use Bases.xml from DDBase'.PHP_EOL;
20 21 $basesDom = new DomDocument("1.0");
21 22  
22   - if (!@$basesDom->load(INFOSITE."INFO/Bases.xml"))
  23 + if (!@$basesDom->load(DDSERVICE."/BASE/INFO/Bases.xml"))
23 24 exit("No Bases.xml file at DDBase/INFO ? no Remote bases at all".PHP_EOL);
24 25  
25 26 $bases = $basesDom->getElementsByTagName("dataCenter");
... ... @@ -27,10 +28,8 @@
27 28 $baseId = $base->getAttribute("xml:id");
28 29  
29 30 $baseDir = DATAPATH."/RemoteData/$baseId";
30   - $baseDirRemote = INFOSITE."INFO/bases/$baseId";
31   -
  31 + $baseDirRemote = DDSERVICE."/BASE/INFO/bases/$baseId";
32 32 if (!is_dir($baseDir)) mkdir($baseDir);
33   -
34 33 if (!copy("$baseDirRemote/base.xml", "$baseDir/base.xml"))
35 34 echo "Cannot copy base.xml for $baseId".PHP_EOL;
36 35 }
... ... @@ -41,18 +40,17 @@
41 40 $basesDom->load(DATAPATH."/RemoteData/Bases.xml");
42 41  
43 42 $basesDomRemote = new DomDocument("1.0");
44   - if (!@$basesDomRemote->load(INFOSITE."INFO/Bases.xml"))
  43 + if (!@$basesDomRemote->load(DDSERVICE."/BASE/INFO/Bases.xml"))
45 44 exit("No Bases.xml file at DDBase/INFO ? IMPEX only".PHP_EOL);
46 45  
47 46 $basesRemote = $basesDomRemote->getElementsByTagName("dataCenter");
48   - echo INFOSITE.PHP_EOL;
49 47 foreach ($basesRemote as $baseRemote) {
50 48 $baseId = $baseRemote->getAttribute("xml:id");
51 49  
52 50 // add remote base if it doesn't exist
53 51 if (!$basesDom->getElementById($baseId)) {
54 52 $baseDir = DATAPATH."/RemoteData/$baseId";
55   - $baseDirRemote = INFOSITE."INFO/bases/$baseId";
  53 + $baseDirRemote = DDSERVICE."/BASE/INFO/bases/$baseId";
56 54 if (!is_dir($baseDir)) mkdir($baseDir);
57 55 if (!copy("$baseDirRemote/base.xml", "$baseDir/base.xml")) {
58 56 echo "Cannot copy base.xml for $baseId".PHP_EOL;
... ... @@ -72,4 +70,4 @@
72 70  
73 71 $basesDom->save(DATAPATH."/RemoteData/Bases.xml");
74 72  
75   -?>
76 73 \ No newline at end of file
  74 +?>
... ...
php/config.php
... ... @@ -107,6 +107,8 @@ $SERVER_NAME = $_SERVER['SERVER_NAME'] ? $_SERVER['SERVER_NAME'] : gethostname(
107 107 define('webAlias',"http://".$SERVER_NAME.APACHE_ALIAS);
108 108 define('wsdl_AMDA', webAlias."public/wsdl/Methods_AMDA.wsdl");
109 109  
  110 +define('DD_WSDL',DDSERVICE.'/dd.wsdl');
  111 +
110 112 // AKKA - KERNELBIN is now the new kernel bin dir
111 113 define('KERNELBIN',NEWKERNEL_INSTALL_DIR.'bin/');
112 114  
... ...
php/my_config.php
... ... @@ -9,7 +9,7 @@
9 9 define('INTEGRATION_BASE_PATH', '/home/brenard/AMDA-GIT/AMDA_Integration/');
10 10  
11 11 //DD WebServices
12   -define('INFOSITE', 'http://amdadev.fr/DDService/BASE/');
  12 +define('DDSERVICE', 'http://amdadev.fr/DDService/');
13 13 // User apache
14 14 define('APACHE_USER', 'apache');
15 15 // Alias for name of AMDA
... ... @@ -17,8 +17,6 @@ define('APACHE_ALIAS', '');
17 17 //email to send errors from AmdaUpdate/AmdaInstall
18 18 define('email','ebudnik@irap.omp.eu');
19 19  
20   -// for updateAmda
21   -define('DD_WSDL','http://amdadev.fr/DDService/dd.wsdl');
22 20 define('TITLE', 'AMDANEW-Test');
23 21  
24 22 // real upload_max_filesize is defined in /etc/php.ini : ini_get('upload_max_filesize')
... ...