chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From teddy kossoko <kos_...@yahoo.fr>
Subject Contribution Apache CMIS PHP
Date Tue, 10 Mar 2015 08:34:11 GMT
        Hello, my name is KOSSOKO Teddy and I live in France. I am student incomputer
science in sandwich course in a research lab named INRA. For my sandwichcourse, I used the
CMIS version 1.8.1 PHP library to communicate with theAlfresco file manager, to upload files,
delete them, or read them from a webinterface. I met some problems I solved by modifying the
code of the library inthe file Cmis_Service.php. The initial code is in green. These changes
are listed below:         $hash_values['title'] = preg_replace("/[^A-Za-z0-9\s.&;\-!+=_']/",
'', htmlentities($objectName, null, mb_internal_encoding()));        //$hash_values['title']=
preg_replace("/[^A-Za-z0-9\s.&;\ ]/", '',htmlentities($objectName));        Parameters
have been added to the htmlentities in order to have the rightencoding of filesAnd to keep
the correct name of the folder or file, the regular expressionalso has been amended, the -
(hyphen) and other characters supported by windowshave been added in order to avoid their
deletion in file or folder names.          $varmap["path"] =urlencode($path);        //$varmap["path"]=
path;        We have added the urlencode because when the request is made to retrieve
afile, If the file contains a space or characters which are not interpretable bythe browserIt
is necessary to encode it. For to some browsers and also starting encoding, a space can be
encode by %20. In our test, it was encoded by + for example with the urlencode.         I
do not know if these changes can be taken into account in order to makeCMIS PHP fairly generic
to treat any format of files, any encoding, withoutchanges to the names of the files or folders. Yours
sincerely.   

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message