This commit is contained in:
jennylee
2013-03-28 16:00:10 -04:00
parent 43ba2efccd
commit b668474c8a
2 changed files with 1903 additions and 1907 deletions

View File

@@ -200,12 +200,11 @@ function deleteObject($alfrescoServerUrl, $objetcId, $user, $pwd)
* @param string | $pathFolder | Folder Name
* @param string | $user | Valid Admin username to connect to Alfresco server
* @param string | $pwd | Valid Admin password to connect to Alfresco server
* @param string | $mainFolder | The main folder in alfreco to save the files
*
* @return string | $result | Response
*
*/
function downloadDoc($alfrescoServerUrl, $pathFile, $pathFolder, $user, $pwd, $mainFolder = 'Sites')
function downloadDoc($alfrescoServerUrl, $pathFile, $pathFolder, $user, $pwd)
{
if (!(G::verifyPath($pathFolder))) {
G::SendTemporalMessage('ID_FILE_PLUGIN_NOT_EXISTS', 'error', 'labels', null, null, array('pluginFile' => $pathFolder));
@@ -216,7 +215,7 @@ function downloadDoc($alfrescoServerUrl, $pathFile, $pathFolder, $user, $pwd, $m
$dataPathFile = pathinfo($pathFile);
$nameFile = $dataPathFile['basename'];
$alfresco_url = "$alfrescoServerUrl" . PATH_SEP . "s" . PATH_SEP . "cmis" . PATH_SEP . "p" . PATH_SEP . $mainFolder . PATH_SEP . "$pathFile";
$alfresco_url = "$alfrescoServerUrl" . PATH_SEP . "s" . PATH_SEP . "cmis" . PATH_SEP . "p" . PATH_SEP . "Sites" . PATH_SEP . "$pathFile";
$alfresco_exec = RestClient::get($alfresco_url, $user, $pwd, 'application/atom+xml');
$sXmlArray = $alfresco_exec->getResponse();
$sXmlArray = eregi_replace("[\n|\r|\n\r]", '', $sXmlArray);
@@ -315,12 +314,11 @@ function getFolderChildren($alfrescoServerUrl, $folderId, $user, $pwd)
* @param string | $user | Valid Admin username to connect to Alfresco server
* @param string | $pwd | Valid Admin password to connect to Alfresco server
* @param string | $path | Path of document to be Uploaded
* @param string | $mainFolder | The main folder in alfreco to save the files
*
* @return string | $result | Response
*
*/
function uploadDoc($alfrescoServerUrl, $fileSource, $title, $description, $docType, $user, $pwd, $path = '', $mainFolder= 'Sites')
function uploadDoc($alfrescoServerUrl, $fileSource, $title, $description, $docType, $user, $pwd, $path = '')
{
if (!(file_exists($fileSource))) {
G::SendTemporalMessage('ID_FILE_PLUGIN_NOT_EXISTS', 'error', 'labels', null, null, array('pluginFile' => $fileSource));
@@ -333,11 +331,11 @@ function uploadDoc($alfrescoServerUrl, $fileSource, $title, $description, $docTy
$fileContent = base64_encode($fileContent);
if ($path != '') {
createFolder($alfrescoServerUrl, $mainFolder, $path, $user, $pwd);
createFolder($alfrescoServerUrl, 'Sites', $path, $user, $pwd);
$path = $path . PATH_SEP;
}
$alfresco_url = "$alfrescoServerUrl/s/cmis/p/$mainFolder/" . $path . "children";
$alfresco_url = "$alfrescoServerUrl/s/cmis/p/Sites/" . $path . "children";
$xmlData = array();
$xmlData = '<?xml version="1.0" encoding="utf-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"><title>' . $title . '</title><summary>' . $description . '</summary><content type="application/' . $docType . '">' . $fileContent . '</content><cmisra:object><cmis:properties><cmis:propertyId propertyDefinitionId="cmis:objectTypeId"><cmis:value>cmis:document</cmis:value></cmis:propertyId></cmis:properties></cmisra:object></entry>';

View File

@@ -307,8 +307,6 @@ class pmTablesProxy extends HttpProxyController
FieldsPeer::doDelete( $oCriteria );
}
$addTabData['ADD_TAB_UID'] = $addTabUid;
// Updating pmtable fields
foreach ($columns as $i => $column) {
$field = array ('FLD_UID' => $column->uid,'FLD_INDEX' => $i,'ADD_TAB_UID' => $addTabUid,'FLD_NAME' => $column->field_name,'FLD_DESCRIPTION' => $column->field_label,'FLD_TYPE' => $column->field_type,'FLD_SIZE' => $column->field_size == '' ? null : $column->field_size,'FLD_NULL' => $column->field_null ? 1 : 0,'FLD_AUTO_INCREMENT' => $column->field_autoincrement ? 1 : 0,'FLD_KEY' => $column->field_key ? 1 : 0,'FLD_FOREIGN_KEY' => 0,'FLD_FOREIGN_KEY_TABLE' => '','FLD_DYN_NAME' => $column->field_dyn,'FLD_DYN_UID' => $column->field_uid,'FLD_FILTER' => (isset( $column->field_filter ) && $column->field_filter) ? 1 : 0