Skip to content
Snippets Groups Projects
Commit 77d47104 authored by llaffont's avatar llaffont
Browse files

CVSLink: CVS_SOURCEXPIRATIONTIME en constante de classe

parent 7ad74199
Branches
Tags
No related merge requests found
......@@ -20,6 +20,7 @@
*/
class Class_CVSLink {
const CVS_SOURCEXPIRATIONTIME = 30;
protected $_user;
......@@ -29,7 +30,6 @@ class Class_CVSLink {
public function __construct($user) {
define('CVS_SOURCEXPIRATIONTIME',30);
$this->_user = $user;
}
......@@ -55,7 +55,14 @@ class Class_CVSLink {
// paramètres d'authentification
$adhid = $this->_user->getIdabon();
$time = time();
$key = md5($adhid.$this->bmid.$this->bmkey.$this->sourceName.$this->sourceId.$this->sourceKey.$this->sourcePassword.$time.CVS_SOURCEXPIRATIONTIME);
$key = md5($adhid
.$this->bmid
.$this->bmkey
.$this->sourceName
.$this->sourceId
.$this->sourceKey
.$this->sourcePassword
.$time.static::CVS_SOURCEXPIRATIONTIME);
// construction du XML
$xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>
......@@ -94,7 +101,7 @@ class Class_CVSLink {
$ret = curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($params));
$ret = curl_setopt($ch, CURLOPT_HEADER, 0);
$ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$ret = curl_setopt($ch, CURLOPT_TIMEOUT, CVS_SOURCEXPIRATIONTIME);
$ret = curl_setopt($ch, CURLOPT_TIMEOUT, static::CVS_SOURCEXPIRATIONTIME);
$ret = curl_exec($ch);
$infos = curl_getinfo($ch);
curl_close($ch);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment