Se corrige code style para CASESCHEDULER, FILESMANAGER, TASK, USER.
This commit is contained in:
@@ -346,7 +346,7 @@ class CaseScheduler
|
|||||||
$nSW = 0;
|
$nSW = 0;
|
||||||
$aData['SCH_DAYS_PERFORM_TASK'] = '';
|
$aData['SCH_DAYS_PERFORM_TASK'] = '';
|
||||||
switch ($sOption) {
|
switch ($sOption) {
|
||||||
case '1':
|
case '1': // If the option is zero, set by default 1
|
||||||
$aData['SCH_DAYS_PERFORM_TASK'] = '1';
|
$aData['SCH_DAYS_PERFORM_TASK'] = '1';
|
||||||
$sValue = $aData['SCH_DAYS_PERFORM_TASK'];
|
$sValue = $aData['SCH_DAYS_PERFORM_TASK'];
|
||||||
switch ($sValue) {
|
switch ($sValue) {
|
||||||
@@ -637,7 +637,7 @@ class CaseScheduler
|
|||||||
$nSW = 0;
|
$nSW = 0;
|
||||||
$aData['SCH_DAYS_PERFORM_TASK'] = '';
|
$aData['SCH_DAYS_PERFORM_TASK'] = '';
|
||||||
switch ($sOption) {
|
switch ($sOption) {
|
||||||
case '1':
|
case '1': // If the option is zero, set by default 1
|
||||||
$aData['SCH_DAYS_PERFORM_TASK'] = '1';
|
$aData['SCH_DAYS_PERFORM_TASK'] = '1';
|
||||||
$sValue = $aData['SCH_DAYS_PERFORM_TASK'];
|
$sValue = $aData['SCH_DAYS_PERFORM_TASK'];
|
||||||
switch ($sValue) {
|
switch ($sValue) {
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ class FilesManager
|
|||||||
public function getProcessFilesManagerPath($sProcessUID, $path)
|
public function getProcessFilesManagerPath($sProcessUID, $path)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$checkPath = substr($path, -1);
|
||||||
|
if ($checkPath == '/') {
|
||||||
|
$path = substr($path, 0, -1);
|
||||||
|
}
|
||||||
$sMainDirectory = current(explode("/", $path));
|
$sMainDirectory = current(explode("/", $path));
|
||||||
if (strstr($path,'/')) {
|
if (strstr($path,'/')) {
|
||||||
$sSubDirectory = substr($path, strpos($path, "/")+1). PATH_SEP ;
|
$sSubDirectory = substr($path, strpos($path, "/")+1). PATH_SEP ;
|
||||||
@@ -84,10 +88,10 @@ class FilesManager
|
|||||||
$arrayFileUid = $this->getFileManagerUid($sDirectory.$aFile['FILE']);
|
$arrayFileUid = $this->getFileManagerUid($sDirectory.$aFile['FILE']);
|
||||||
$fcontent = file_get_contents($sDirectory.$aFile['FILE']);
|
$fcontent = file_get_contents($sDirectory.$aFile['FILE']);
|
||||||
$fileUid = $arrayFileUid["PRF_UID"];
|
$fileUid = $arrayFileUid["PRF_UID"];
|
||||||
if ($fileUid) {
|
if ($fileUid != null) {
|
||||||
$oProcessFiles = \ProcessFilesPeer::retrieveByPK($fileUid);
|
$oProcessFiles = \ProcessFilesPeer::retrieveByPK($fileUid);
|
||||||
$editable = $oProcessFiles->getPrfEditable();
|
$editable = $oProcessFiles->getPrfEditable();
|
||||||
if ($editable == 1){
|
if ($editable == '1') {
|
||||||
$editable = 'true';
|
$editable = 'true';
|
||||||
} else {
|
} else {
|
||||||
$editable = 'false';
|
$editable = 'false';
|
||||||
@@ -102,11 +106,10 @@ class FilesManager
|
|||||||
'prf_create_date' => $oProcessFiles->getPrfCreateDate(),
|
'prf_create_date' => $oProcessFiles->getPrfCreateDate(),
|
||||||
'prf_update_date' => $oProcessFiles->getPrfUpdateDate(),
|
'prf_update_date' => $oProcessFiles->getPrfUpdateDate(),
|
||||||
'prf_content' => $fcontent);
|
'prf_content' => $fcontent);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$extention = end(explode(".", $aFile['FILE']));
|
$extention = end(explode(".", $aFile['FILE']));
|
||||||
if ($extention == 'docx' || $extention == 'doc' || $extention == 'html' || $extention == 'php' || $extention == 'jsp' ||
|
if ($extention == 'docx' || $extention == 'doc' || $extention == 'html' || $extention == 'php' || $extention == 'jsp'
|
||||||
$extention == 'xlsx' || $extention == 'xls' || $extention == 'js' || $extention == 'css' || $extention == 'txt') {
|
|| $extention == 'xlsx' || $extention == 'xls' || $extention == 'js' || $extention == 'css' || $extention == 'txt') {
|
||||||
$editable = 'true';
|
$editable = 'true';
|
||||||
} else {
|
} else {
|
||||||
$editable = 'false';
|
$editable = 'false';
|
||||||
@@ -122,7 +125,6 @@ class FilesManager
|
|||||||
'prf_update_date' => '',
|
'prf_update_date' => '',
|
||||||
'prf_content' => $fcontent);
|
'prf_content' => $fcontent);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return $aTheFiles;
|
return $aTheFiles;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
@@ -199,6 +201,7 @@ class FilesManager
|
|||||||
fwrite($fp, $content);
|
fwrite($fp, $content);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),
|
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),
|
||||||
|
'prf_filename' => $aData['prf_filename'],
|
||||||
'usr_uid' => $oProcessFiles->getUsrUid(),
|
'usr_uid' => $oProcessFiles->getUsrUid(),
|
||||||
'prf_update_usr_uid' => $oProcessFiles->getPrfUpdateUsrUid(),
|
'prf_update_usr_uid' => $oProcessFiles->getPrfUpdateUsrUid(),
|
||||||
'prf_path' => $sMainDirectory. PATH_SEP . $sSubDirectory,
|
'prf_path' => $sMainDirectory. PATH_SEP . $sSubDirectory,
|
||||||
|
|||||||
@@ -1027,7 +1027,6 @@ class Task
|
|||||||
'aas_type' => "user" );
|
'aas_type' => "user" );
|
||||||
}
|
}
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($start) {
|
if ($start) {
|
||||||
if ($start < 0) {
|
if ($start < 0) {
|
||||||
@@ -1933,7 +1932,8 @@ class Task
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function arrayPagination($display_array, $page, $show_per_page) {
|
public function arrayPagination($display_array, $page, $show_per_page)
|
||||||
|
{
|
||||||
$page = $page + 1;
|
$page = $page + 1;
|
||||||
$show_per_page = $show_per_page -1;
|
$show_per_page = $show_per_page -1;
|
||||||
$start = ($page - 1) * ($show_per_page + 1);
|
$start = ($page - 1) * ($show_per_page + 1);
|
||||||
|
|||||||
@@ -112,6 +112,5 @@ class User extends Api
|
|||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user