Merged in darojas/processmaker (pull request #208)
Se adiciona el filtro 'type' para assignee y adhoc. Se modifica updload image en PMUSER. Se modifica upload (incompleto) para FILESMANAGER
This commit is contained in:
@@ -112,6 +112,7 @@ class FilesManager
|
||||
public function addProcessFilesManager($sProcessUID, $userUID, $aData)
|
||||
{
|
||||
try {
|
||||
|
||||
$aData['path'] = rtrim($aData['path'], '/') . '/';
|
||||
$sMainDirectory = current(explode("/", $aData['path']));
|
||||
if ($sMainDirectory != 'public' && $sMainDirectory != 'templates') {
|
||||
@@ -145,7 +146,7 @@ class FilesManager
|
||||
}
|
||||
\G::verifyPath($sCheckDirectory, true);
|
||||
if (file_exists(PATH_SEP.$sDirectory)) {
|
||||
throw (new \Exception( 'The file: '. $sDirectory . ' exists.'));
|
||||
throw (new \Exception( 'The file: '. $sDirectory . ' already exists.'));
|
||||
}
|
||||
$sPkProcessFiles = \G::generateUniqueID();
|
||||
$oProcessFiles = new \ProcessFiles();
|
||||
@@ -181,15 +182,23 @@ class FilesManager
|
||||
/**
|
||||
* Return the Process Files Manager
|
||||
*
|
||||
* @param string $sProcessUID {@min 32} {@max 32}
|
||||
* @param string $aData {@min 32} {@max 32}
|
||||
*
|
||||
* return array
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function uploadProcessFilesManager($sProcessUID)
|
||||
public function uploadProcessFilesManager($aData)
|
||||
{
|
||||
try {
|
||||
$prfUid = str_replace('"','',$aData['prf_uid']);
|
||||
// $oProcessFiles = \ProcessFilesPeer::retrieveByPK($prfUid);
|
||||
// if (is_null($oProcessFiles)) {
|
||||
if ($_FILES['my_file']['error'] != 1) {
|
||||
if ($_FILES['my_file']['tmp_name'] != '') {
|
||||
\G::uploadFile($_FILES['my_file']['tmp_name'], 'public/1265557095225ff5c688f46031700471', $_FILES['my_file']['name']);
|
||||
}
|
||||
}
|
||||
// }
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
@@ -392,7 +401,7 @@ class FilesManager
|
||||
break;
|
||||
}
|
||||
$url = $sDirectory;
|
||||
$sPath = $sfile;//path to
|
||||
$sPath = PATH_DOCUMENT.$sfile;//path to
|
||||
set_time_limit(0);
|
||||
ini_set('display_errors',true);//Just in case we get some errors, let us know
|
||||
$fp = fopen ($sPath, 'w');//This is the file where we save the information
|
||||
|
||||
@@ -651,12 +651,13 @@ class Task
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
* return array
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function getTaskAssignees($sProcessUID, $sTaskUID, $filter, $start, $limit)
|
||||
public function getTaskAssignees($sProcessUID, $sTaskUID, $filter, $start, $limit, $type)
|
||||
{
|
||||
try {
|
||||
require_once (PATH_RBAC_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "RbacUsers.php");
|
||||
@@ -749,14 +750,16 @@ class Task
|
||||
$oDataset2->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset2->next();
|
||||
$aRow2 = $oDataset2->getRow();
|
||||
$aUsers[] = array('aas_uid' => $results['GRP_UID'],
|
||||
'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
|
||||
' (' . $aRow2['MEMBERS_NUMBER'] . ' ' .
|
||||
((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')).
|
||||
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
|
||||
'aas_lastname' => "",
|
||||
'aas_username' => "",
|
||||
'aas_type' => "group" );
|
||||
if ($type == '' || $type == 'group') {
|
||||
$aUsers[] = array('aas_uid' => $results['GRP_UID'],
|
||||
'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
|
||||
' (' . $aRow2['MEMBERS_NUMBER'] . ' ' .
|
||||
((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')).
|
||||
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
|
||||
'aas_lastname' => "",
|
||||
'aas_username' => "",
|
||||
'aas_type' => "group" );
|
||||
}
|
||||
}
|
||||
}
|
||||
$oCriteria = new \Criteria('workflow');
|
||||
@@ -797,11 +800,13 @@ class Task
|
||||
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aUsers[] = array('aas_uid' => $aRow['USR_UID'],
|
||||
'aas_name' => $aRow['USR_FIRSTNAME'],
|
||||
'aas_lastname' => $aRow['USR_LASTNAME'],
|
||||
'aas_username' => $aRow['USR_USERNAME'],
|
||||
'aas_type' => "user" );
|
||||
if ($type == '' || $type == 'user') {
|
||||
$aUsers[] = array('aas_uid' => $aRow['USR_UID'],
|
||||
'aas_name' => $aRow['USR_FIRSTNAME'],
|
||||
'aas_lastname' => $aRow['USR_LASTNAME'],
|
||||
'aas_username' => $aRow['USR_USERNAME'],
|
||||
'aas_type' => "user" );
|
||||
}
|
||||
$oDataset->next();
|
||||
}
|
||||
return $aUsers;
|
||||
@@ -818,12 +823,13 @@ class Task
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
* return array
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function getTaskAvailableAssignee($sProcessUID, $sTaskUID, $filter, $start, $limit)
|
||||
public function getTaskAvailableAssignee($sProcessUID, $sTaskUID, $filter, $start, $limit, $type)
|
||||
{
|
||||
try {
|
||||
require_once (PATH_RBAC_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "RbacUsers.php");
|
||||
@@ -913,14 +919,16 @@ class Task
|
||||
$oDataset2->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset2->next();
|
||||
$aRow2 = $oDataset2->getRow();
|
||||
$aUsers[] = array('aas_uid' => $results['GRP_UID'],
|
||||
'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
|
||||
' (' . $aRow2['MEMBERS_NUMBER'] . ' ' .
|
||||
((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')).
|
||||
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
|
||||
'aas_lastname' => "",
|
||||
'aas_username' => "",
|
||||
'aas_type' => "group" );
|
||||
if ($type == '' || $type == 'group') {
|
||||
$aUsers[] = array('aas_uid' => $results['GRP_UID'],
|
||||
'aas_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
|
||||
' (' . $aRow2['MEMBERS_NUMBER'] . ' ' .
|
||||
((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')).
|
||||
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
|
||||
'aas_lastname' => "",
|
||||
'aas_username' => "",
|
||||
'aas_type' => "group" );
|
||||
}
|
||||
}
|
||||
}
|
||||
$sDelimiter = \DBAdapter::getStringDelimiter();
|
||||
@@ -957,12 +965,15 @@ class Task
|
||||
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aUsers[] = array('aas_uid' => $aRow['USR_UID'],
|
||||
'aas_name' => $aRow['USR_FIRSTNAME'],
|
||||
'aas_lastname' => $aRow['USR_LASTNAME'],
|
||||
'aas_username' => $aRow['USR_USERNAME'],
|
||||
'aas_type' => "user" );
|
||||
if ($type == '' || $type == 'user') {
|
||||
$aUsers[] = array('aas_uid' => $aRow['USR_UID'],
|
||||
'aas_name' => $aRow['USR_FIRSTNAME'],
|
||||
'aas_lastname' => $aRow['USR_LASTNAME'],
|
||||
'aas_username' => $aRow['USR_USERNAME'],
|
||||
'aas_type' => "user" );
|
||||
}
|
||||
$oDataset->next();
|
||||
|
||||
}
|
||||
return $aUsers;
|
||||
} catch (Exception $e) {
|
||||
@@ -1229,12 +1240,16 @@ class Task
|
||||
*
|
||||
* @param string $sProcessUID {@min 32} {@max 32}
|
||||
* @param string $sTaskUID {@min 32} {@max 32}
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
* return array
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function getTaskAdhocAssignees($sProcessUID, $sTaskUID, $filter, $start, $limit)
|
||||
public function getTaskAdhocAssignees($sProcessUID, $sTaskUID, $filter, $start, $limit, $type)
|
||||
{
|
||||
try {
|
||||
require_once (PATH_RBAC_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "RbacUsers.php");
|
||||
@@ -1327,14 +1342,16 @@ class Task
|
||||
$oDataset2->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset2->next();
|
||||
$aRow2 = $oDataset2->getRow();
|
||||
$aUsers[] = array('ada_uid' => $results['GRP_UID'],
|
||||
'ada_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
|
||||
' (' . $aRow2['MEMBERS_NUMBER'] . ' ' .
|
||||
((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')).
|
||||
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
|
||||
'ada_lastname' => "",
|
||||
'ada_username' => "",
|
||||
'ada_type' => "group" );
|
||||
if ($type == '' || $type == 'group') {
|
||||
$aUsers[] = array('ada_uid' => $results['GRP_UID'],
|
||||
'ada_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
|
||||
' (' . $aRow2['MEMBERS_NUMBER'] . ' ' .
|
||||
((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')).
|
||||
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
|
||||
'ada_lastname' => "",
|
||||
'ada_username' => "",
|
||||
'ada_type' => "group" );
|
||||
}
|
||||
}
|
||||
}
|
||||
$oCriteria = new \Criteria('workflow');
|
||||
@@ -1375,11 +1392,13 @@ class Task
|
||||
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aUsers[] = array('ada_uid' => $aRow['USR_UID'],
|
||||
'ada_name' => $aRow['USR_FIRSTNAME'],
|
||||
'ada_lastname' => $aRow['USR_LASTNAME'],
|
||||
'ada_username' => $aRow['USR_USERNAME'],
|
||||
'ada_type' => "user" );
|
||||
if ($type == '' || $type == 'user') {
|
||||
$aUsers[] = array('ada_uid' => $aRow['USR_UID'],
|
||||
'ada_name' => $aRow['USR_FIRSTNAME'],
|
||||
'ada_lastname' => $aRow['USR_LASTNAME'],
|
||||
'ada_username' => $aRow['USR_USERNAME'],
|
||||
'ada_type' => "user" );
|
||||
}
|
||||
$oDataset->next();
|
||||
}
|
||||
return $aUsers;
|
||||
@@ -1393,12 +1412,16 @@ class Task
|
||||
*
|
||||
* @param string $sProcessUID {@min 32} {@max 32}
|
||||
* @param string $sTaskUID {@min 32} {@max 32}
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
* return array
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function getTaskAvailableAdhocAssignee($sProcessUID, $sTaskUID, $filter, $start, $limit)
|
||||
public function getTaskAvailableAdhocAssignee($sProcessUID, $sTaskUID, $filter, $start, $limit, $type)
|
||||
{
|
||||
try {
|
||||
require_once (PATH_RBAC_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "RbacUsers.php");
|
||||
@@ -1488,14 +1511,16 @@ class Task
|
||||
$oDataset2->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset2->next();
|
||||
$aRow2 = $oDataset2->getRow();
|
||||
$aUsers[] = array('ada_uid' => $results['GRP_UID'],
|
||||
'ada_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
|
||||
' (' . $aRow2['MEMBERS_NUMBER'] . ' ' .
|
||||
((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')).
|
||||
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
|
||||
'ada_lastname' => "",
|
||||
'ada_username' => "",
|
||||
'ada_type' => "group" );
|
||||
if ($type == '' || $type == 'group') {
|
||||
$aUsers[] = array('ada_uid' => $results['GRP_UID'],
|
||||
'ada_name' => (!isset($aRow2['GROUP_INACTIVE']) ? $results['GRP_TITLE'] .
|
||||
' (' . $aRow2['MEMBERS_NUMBER'] . ' ' .
|
||||
((int) $aRow2['MEMBERS_NUMBER'] == 1 ? \G::LoadTranslation('ID_USER') : \G::LoadTranslation('ID_USERS')).
|
||||
')' . '' : $aRow['GRP_TITLE'] . ' ' . $aRow2['GROUP_INACTIVE']),
|
||||
'ada_lastname' => "",
|
||||
'ada_username' => "",
|
||||
'ada_type' => "group" );
|
||||
}
|
||||
}
|
||||
}
|
||||
$sDelimiter = \DBAdapter::getStringDelimiter();
|
||||
@@ -1532,11 +1557,13 @@ class Task
|
||||
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$aUsers[] = array('ada_uid' => $aRow['USR_UID'],
|
||||
'ada_name' => $aRow['USR_FIRSTNAME'],
|
||||
'ada_lastname' => $aRow['USR_LASTNAME'],
|
||||
'ada_username' => $aRow['USR_USERNAME'],
|
||||
'ada_type' => "user" );
|
||||
if ($type == '' || $type == 'user') {
|
||||
$aUsers[] = array('ada_uid' => $aRow['USR_UID'],
|
||||
'ada_name' => $aRow['USR_FIRSTNAME'],
|
||||
'ada_lastname' => $aRow['USR_LASTNAME'],
|
||||
'ada_username' => $aRow['USR_USERNAME'],
|
||||
'ada_type' => "user" );
|
||||
}
|
||||
$oDataset->next();
|
||||
}
|
||||
return $aUsers;
|
||||
|
||||
@@ -601,17 +601,7 @@ class User
|
||||
$oUser->update($aData);
|
||||
// photo file comment
|
||||
/*
|
||||
if ($_FILES['USR_PHOTO']['error'] != 1) {
|
||||
if ($_FILES['USR_PHOTO']['tmp_name'] != '') {
|
||||
$aAux = explode('.', $_FILES['USR_PHOTO']['name']);
|
||||
\G::uploadFile($_FILES['USR_PHOTO']['tmp_name'], PATH_IMAGES_ENVIRONMENT_USERS, $aData['USR_UID'] . '.' . $aAux[1]);
|
||||
\G::resizeImage(PATH_IMAGES_ENVIRONMENT_USERS . $aData['USR_UID'] . '.' . $aAux[1], 96, 96, PATH_IMAGES_ENVIRONMENT_USERS . $aData['USR_UID'] . '.gif');
|
||||
}
|
||||
} else {
|
||||
$result->success = false;
|
||||
$result->fileError = true;
|
||||
throw new \Exception($result);
|
||||
}*/
|
||||
*/
|
||||
/* Saving preferences comment */
|
||||
/*$def_lang = $form['PREF_DEFAULT_LANG'];
|
||||
$def_menu = $form['PREF_DEFAULT_MENUSELECTED'];
|
||||
@@ -785,5 +775,30 @@ class User
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload image User
|
||||
*
|
||||
* @param string $userUid Unique id of User
|
||||
*
|
||||
*/
|
||||
public function uploadImage($userUid)
|
||||
{
|
||||
try {
|
||||
if ($_FILES['USR_PHOTO']['error'] != 1) {
|
||||
if ($_FILES['USR_PHOTO']['tmp_name'] != '') {
|
||||
$aAux = explode('.', $_FILES['USR_PHOTO']['name']);
|
||||
\G::uploadFile($_FILES['USR_PHOTO']['tmp_name'], PATH_IMAGES_ENVIRONMENT_USERS, $userUid . '.' . $aAux[1]);
|
||||
\G::resizeImage(PATH_IMAGES_ENVIRONMENT_USERS . $userUid . '.' . $aAux[1], 96, 96, PATH_IMAGES_ENVIRONMENT_USERS . $userUid . '.gif');
|
||||
}
|
||||
} else {
|
||||
$result->success = false;
|
||||
$result->fileError = true;
|
||||
throw (new \Exception($result));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,14 +19,15 @@ class Assignee extends Api
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAssignees($prjUid, $actUid, $filter = '', $start = null, $limit = null)
|
||||
public function doGetActivityAssignees($prjUid, $actUid, $filter = '', $start = null, $limit = null, $type = '')
|
||||
{
|
||||
$response = array();
|
||||
try {
|
||||
$task = new \BusinessModel\Task();
|
||||
$arrayData = $task->getTaskAssignees($prjUid, $actUid, $filter, $start, $limit);
|
||||
$arrayData = $task->getTaskAssignees($prjUid, $actUid, $filter, $start, $limit, $type);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
@@ -44,14 +45,15 @@ class Assignee extends Api
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAvailableAssignee($prjUid, $actUid, $filter = '', $start = null, $limit = null)
|
||||
public function doGetActivityAvailableAssignee($prjUid, $actUid, $filter = '', $start = null, $limit = null, $type = '')
|
||||
{
|
||||
$response = array();
|
||||
try {
|
||||
$task = new \BusinessModel\Task();
|
||||
$arrayData = $task->getTaskAvailableAssignee($prjUid, $actUid, $filter, $start, $limit);
|
||||
$arrayData = $task->getTaskAvailableAssignee($prjUid, $actUid, $filter, $start, $limit, $type);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
@@ -132,14 +134,15 @@ class Assignee extends Api
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAdhocAssignees($prjUid, $actUid, $filter = '', $start = null, $limit = null)
|
||||
public function doGetActivityAdhocAssignees($prjUid, $actUid, $filter = '', $start = null, $limit = null, $type = '')
|
||||
{
|
||||
$response = array();
|
||||
try {
|
||||
$task = new \BusinessModel\Task();
|
||||
$arrayData = $task->getTaskAdhocAssignees($prjUid, $actUid, $filter, $start, $limit);
|
||||
$arrayData = $task->getTaskAdhocAssignees($prjUid, $actUid, $filter, $start, $limit, $type);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
@@ -157,14 +160,15 @@ class Assignee extends Api
|
||||
* @param string $filter
|
||||
* @param int $start
|
||||
* @param int $limit
|
||||
* @param string $type
|
||||
*
|
||||
*/
|
||||
public function doGetActivityAvailableAdhocAssignee($prjUid, $actUid, $filter = '', $start = null, $limit = null)
|
||||
public function doGetActivityAvailableAdhocAssignee($prjUid, $actUid, $filter = '', $start = null, $limit = null, $type = '')
|
||||
{
|
||||
$response = array();
|
||||
try {
|
||||
$task = new \BusinessModel\Task();
|
||||
$arrayData = $task->getTaskAvailableAdhocAssignee($prjUid, $actUid, $filter, $start, $limit);
|
||||
$arrayData = $task->getTaskAvailableAdhocAssignee($prjUid, $actUid, $filter, $start, $limit, $type);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -60,22 +60,19 @@ class FilesManager extends Api
|
||||
|
||||
/**
|
||||
* @param string $prjUid {@min 32} {@max 32}
|
||||
* @param array $request_data
|
||||
*
|
||||
* @header Accept: application/octet-stream
|
||||
* @url POST /:prjUid/process-file-manager/upload
|
||||
*/
|
||||
public function doPostProcessFilesManagerUpload($prjUid)
|
||||
public function doPostProcessFilesManagerUpload($prjUid, $request_data)
|
||||
{
|
||||
try {
|
||||
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP . "Extension" . PATH_SEP . "Restler" . PATH_SEP . "UploadFormat.php");
|
||||
$userUid = $this->getUserId();
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
$filesManager = new \BusinessModel\FilesManager();
|
||||
$filesManager->uploadProcessFilesManager($request_data);
|
||||
} catch (\Exception $e) {
|
||||
//response
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -168,11 +165,3 @@ class ProcessFilesManagerStructurePut
|
||||
public $content;
|
||||
}
|
||||
|
||||
class ProcessFilesManagerStructureUpload
|
||||
{
|
||||
/**
|
||||
* @var string {@from body}
|
||||
*/
|
||||
public $url;
|
||||
|
||||
}
|
||||
|
||||
@@ -63,7 +63,6 @@ class User extends Api
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @url PUT /:usr_uid
|
||||
*
|
||||
@@ -97,5 +96,22 @@ class User extends Api
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $usr_uid {@min 32} {@max 32}
|
||||
*
|
||||
* @url POST /image-upload
|
||||
*/
|
||||
public function doPostUserImageUpload($usr_uid)
|
||||
{
|
||||
try {
|
||||
$user = new \BusinessModel\User();
|
||||
$user->uploadImage($usr_uid);
|
||||
} catch (\Exception $e) {
|
||||
//response
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user