From df416439534406a3d4f3dba9a2ed8ec5785ad0fe Mon Sep 17 00:00:00 2001 From: ArmandBahi <armand.bahi@veremes.com> Date: Thu, 18 Oct 2018 16:18:07 +0200 Subject: [PATCH] Squashed 'src/vitis/' changes from 7a1818a..7b55e67 7b55e67 Utilisation de dirname($_SERVER['SCRIPT_FILENAME']) au dlieu de __DIR__ 24ea0f3 pull subtree f4326e8 Squashed 'src/module_vm4ms/' changes from 4d95a3da..af1a2e36 c0b73f0 Squashed 'src/module_vm4ms/' changes from 373ef426..4d95a3da 906a716 Modify client symlinks 1dccb17 Modify vas symlinks 07db5ec Update Readme 0bb9b2f pull subtree 1475871 Squashed 'src/module_cadastreV2/' changes from e678ee10..8158b9a2 a9b2699 pull subtree c499cef Squashed 'src/module_anc/' changes from b55c5e85..4321adc4 d82d485 pull subtree 1ad8c84 Squashed 'src/module_vm4ms/' changes from 4f506db7..373ef426 6702c1f pull subtree 94998ed Squashed 'src/module_vmap/' changes from cf75b106..e7dabee0 3a2b6fe pull subtree 97c993d Squashed 'src/vitis/' changes from 01d199ce..7a1818a4 213795d Resolve require problems c23b658 Rights on write folders 4ac589a Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME']) bc0e083 Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME']) b51e622 Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME']) 3bd1ab1 Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME']) 53d5453 Change __DIR__ by dirname($_SERVER['SCRIPT_FILENAME']) 2d9fd6a Get rights to vas/server 0602efd Compilation grunt 75c89c8 Try on push subtrees 246ebd0 Add pull.sh 2e026c1 Add pull.sh 37d37d0 Add grunt to the install 5b9cffc Update readme 3f86c34 Ignore properties files 02a3be3 gitignore 578f982 Ingore properties files d1327b3 add subtree 59431f9 Squashed 'src/module_cadastre/' content from commit ee26cf16 950e5a1 Squashed 'src/module_cadastreV2/' content from commit e678ee10 c2e686c add subtree 92d769c Squashed 'src/module_anc/' content from commit b55c5e85 63a0562 add subtree 829e4cf Squashed 'src/module_vm4ms/' content from commit 4f506db7 3630a46 add subtree 8792eb7 Squashed 'src/module_vmap/' content from commit cf75b10 4fe41d6 add subtree 974b9dd add subtree 92032b6 Squashed 'src/closure/' content from commit 622066d 646709a Squashed 'src/vitis/' content from commit 01d199c 416c2c2 add subtree 06cc1a2 ignore properties files 192389a Get files from SVN 86c2aff Initial commit git-subtree-dir: src/vitis git-subtree-split: 7b55e678e5ba95a300d95cbb4ddbf8762db97d7b --- vas/rest/ws/vitis/Properties.class.inc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/vas/rest/ws/vitis/Properties.class.inc b/vas/rest/ws/vitis/Properties.class.inc index d363c986..c7f65b41 100755 --- a/vas/rest/ws/vitis/Properties.class.inc +++ b/vas/rest/ws/vitis/Properties.class.inc @@ -14,7 +14,7 @@ require_once(__DIR__ . '/../../class/vmlib/BdDataAccess.inc'); * \brief This file contains the Properties php class * * This class defines the rest api for properties - * + * */ class Properties extends Vitis { /** @@ -53,7 +53,7 @@ class Properties extends Vitis { } /** - * @SWG\Get(path="/properties", + * @SWG\Get(path="/properties", * tags={"Properties"}, * summary="Get properties", * description="Request to get properties", @@ -75,7 +75,7 @@ class Properties extends Vitis { */ /** - * + * * @return properties */ function GET() { @@ -85,19 +85,19 @@ class Properties extends Vitis { } else { $this->aFields = $this->aProperties; } - require_once __DIR__ . "/../../conf/version.inc"; + require_once dirname($_SERVER['SCRIPT_FILENAME']) . "/conf/version.inc"; if (VM_STATUS != "STABLE") { $this->aFields['VM_STATUS'] = "UNSTABLE"; } else { $this->aFields['VM_STATUS'] = "STABLE"; - if ($pointeur = opendir(__DIR__ . "/../../conf/")) { + if ($pointeur = opendir(dirname($_SERVER['SCRIPT_FILENAME']) . "/conf/")) { while (($fichier = readdir($pointeur)) !== false) { if (($fichier != '.') && ($fichier != '..')) { - if (is_dir(__DIR__ . "/../../conf/" . $fichier)) { - $sTexte = file_get_contents(__DIR__ . "/../../conf/" . $fichier . "/version.inc"); + if (is_dir(dirname($_SERVER['SCRIPT_FILENAME']) . "/conf/" . $fichier)) { + $sTexte = file_get_contents(dirname($_SERVER['SCRIPT_FILENAME']) . "/conf/" . $fichier . "/version.inc"); if (strpos($sTexte, "define (\"VM_STATUS\", \"STABLE\");") == false) { $this->aFields['VM_STATUS'] = "UNSTABLE"; @@ -216,7 +216,7 @@ class Properties extends Vitis { * description="Poprerties Response", * @SWG\Schema(ref="#/definitions/properties") * ), - * + * * ) */ @@ -299,7 +299,7 @@ class Properties extends Vitis { // Message de retour $aMessage = array('status' => REQUEST_SUCCESS); - // Ouverture de php + // Ouverture de php $sPropertiesFile = PHP_START . PHP_EOL; // Texte à ajouter avant le tableau des properties @@ -343,14 +343,14 @@ class Properties extends Vitis { $sPropertiesFile .= PROPERTIES_FOOTER . PHP_EOL; } - // Fermeture de php + // Fermeture de php $sPropertiesFile .= PHP_END; // Sauve le fichier (LOCK_EX = accés exclusif au fichier) if ($this->aValues['module_name'] == 'vitis') - $sPathProperties = __DIR__ . '/../../conf/properties.inc'; + $sPathProperties = dirname($_SERVER['SCRIPT_FILENAME']) . '/conf/properties.inc'; else - $sPathProperties = __DIR__ . '/../../conf/' . $this->aValues['module_name'] . '/properties.inc'; + $sPathProperties = dirname($_SERVER['SCRIPT_FILENAME']) . '/conf/' . $this->aValues['module_name'] . '/properties.inc'; // if (file_put_contents($sPathProperties, $sPropertiesFile, LOCK_EX) === false) $aReturn = array('status' => 0, 'message' => "FORM_ERROR_FILE_WRITING_CONFIGURATION"); @@ -424,4 +424,4 @@ class Properties extends Vitis { } -?> \ No newline at end of file +?> -- GitLab