diff --git a/lib/alfresco/README_MOODLE.txt b/lib/alfresco/README_MOODLE.txt index 83179f07fdb..aaf6400c32c 100644 --- a/lib/alfresco/README_MOODLE.txt +++ b/lib/alfresco/README_MOODLE.txt @@ -34,6 +34,8 @@ - AlfrescoWebService::__soapCall() arguments do not match SoapClient::__soapCall() - AlfrescoWebService::__doRequest() arguments do not match SoapClient::__soapCall() +6. Apply the changes from MDL-41975 in regard with the timestamp + == Alfresco PHP Library == Installation and developer documentation for the Alfresco PHP Library can be found on the Alfresco Wiki. diff --git a/lib/alfresco/Service/WebService/AlfrescoWebService.php b/lib/alfresco/Service/WebService/AlfrescoWebService.php index b549755b467..898dcdf73db 100644 --- a/lib/alfresco/Service/WebService/AlfrescoWebService.php +++ b/lib/alfresco/Service/WebService/AlfrescoWebService.php @@ -79,8 +79,8 @@ class AlfrescoWebService extends SoapClient // Construct Timestamp Header $timeStamp = $dom->createElementNS($this->wsUtilityNS, "Timestamp"); - $createdDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+24, date("i"), date("s"), date("m"), date("d"), date("Y"))); - $expiresDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+25, date("i"), date("s"), date("m"), date("d"), date("Y"))); + $createdDate = gmdate("Y-m-d\TH:i:s\Z", gmmktime(gmdate("H"), gmdate("i"), gmdate("s"), gmdate("m"), gmdate("d"), gmdate("Y"))); + $expiresDate = gmdate("Y-m-d\TH:i:s\Z", gmmktime(gmdate("H")+1, gmdate("i"), gmdate("s"), gmdate("m"), gmdate("d"), gmdate("Y"))); $created = new DOMElement("Created", $createdDate, $this->wsUtilityNS); $expires = new DOMElement("Expires", $expiresDate, $this->wsUtilityNS); $timeStamp->appendChild($created); diff --git a/repository/alfresco/lang/en/repository_alfresco.php b/repository/alfresco/lang/en/repository_alfresco.php index fe75bd5beb7..1bcc0e0c981 100644 --- a/repository/alfresco/lang/en/repository_alfresco.php +++ b/repository/alfresco/lang/en/repository_alfresco.php @@ -24,7 +24,7 @@ */ $string['alfresco_url'] = 'Alfresco URL'; -$string['alfrescourltext'] = 'Afresco API url should be: http://yoursite.com/alfresco/api'; +$string['alfrescourltext'] = 'Afresco API URL should be: http://yoursite.com/alfresco/api or http://yoursite.com/alfresco/soapapi for Alfresco 4.2.d or greater.'; $string['alfresco:view'] = 'View alfresco repository'; $string['configplugin'] = 'Alfresco configuration'; $string['notitle'] = 'notitle';