Se corrige code style para CASESCHEDULER, FILESMANAGER, TASK, USER.

This commit is contained in:
Freddy Daniel Rojas Valda
2014-02-26 16:22:23 -04:00
parent 106e4d770b
commit 4c49fd96eb
8 changed files with 36 additions and 34 deletions

View File

@@ -346,7 +346,7 @@ class CaseScheduler
$nSW = 0;
$aData['SCH_DAYS_PERFORM_TASK'] = '';
switch ($sOption) {
case '1':
case '1': // If the option is zero, set by default 1
$aData['SCH_DAYS_PERFORM_TASK'] = '1';
$sValue = $aData['SCH_DAYS_PERFORM_TASK'];
switch ($sValue) {
@@ -637,7 +637,7 @@ class CaseScheduler
$nSW = 0;
$aData['SCH_DAYS_PERFORM_TASK'] = '';
switch ($sOption) {
case '1':
case '1': // If the option is zero, set by default 1
$aData['SCH_DAYS_PERFORM_TASK'] = '1';
$sValue = $aData['SCH_DAYS_PERFORM_TASK'];
switch ($sValue) {

View File

@@ -44,6 +44,10 @@ class FilesManager
public function getProcessFilesManagerPath($sProcessUID, $path)
{
try {
$checkPath = substr($path, -1);
if ($checkPath == '/') {
$path = substr($path, 0, -1);
}
$sMainDirectory = current(explode("/", $path));
if (strstr($path,'/')) {
$sSubDirectory = substr($path, strpos($path, "/")+1). PATH_SEP ;
@@ -84,10 +88,10 @@ class FilesManager
$arrayFileUid = $this->getFileManagerUid($sDirectory.$aFile['FILE']);
$fcontent = file_get_contents($sDirectory.$aFile['FILE']);
$fileUid = $arrayFileUid["PRF_UID"];
if ($fileUid) {
if ($fileUid != null) {
$oProcessFiles = \ProcessFilesPeer::retrieveByPK($fileUid);
$editable = $oProcessFiles->getPrfEditable();
if ($editable == 1){
if ($editable == '1') {
$editable = 'true';
} else {
$editable = 'false';
@@ -102,11 +106,10 @@ class FilesManager
'prf_create_date' => $oProcessFiles->getPrfCreateDate(),
'prf_update_date' => $oProcessFiles->getPrfUpdateDate(),
'prf_content' => $fcontent);
} else {
$extention = end(explode(".", $aFile['FILE']));
if ($extention == 'docx' || $extention == 'doc' || $extention == 'html' || $extention == 'php' || $extention == 'jsp' ||
$extention == 'xlsx' || $extention == 'xls' || $extention == 'js' || $extention == 'css' || $extention == 'txt') {
if ($extention == 'docx' || $extention == 'doc' || $extention == 'html' || $extention == 'php' || $extention == 'jsp'
|| $extention == 'xlsx' || $extention == 'xls' || $extention == 'js' || $extention == 'css' || $extention == 'txt') {
$editable = 'true';
} else {
$editable = 'false';
@@ -122,7 +125,6 @@ class FilesManager
'prf_update_date' => '',
'prf_content' => $fcontent);
}
}
return $aTheFiles;
} catch (Exception $e) {
@@ -199,6 +201,7 @@ class FilesManager
fwrite($fp, $content);
fclose($fp);
$oProcessFile = array('prf_uid' => $oProcessFiles->getPrfUid(),
'prf_filename' => $aData['prf_filename'],
'usr_uid' => $oProcessFiles->getUsrUid(),
'prf_update_usr_uid' => $oProcessFiles->getPrfUpdateUsrUid(),
'prf_path' => $sMainDirectory. PATH_SEP . $sSubDirectory,

View File

@@ -1027,7 +1027,6 @@ class Task
'aas_type' => "user" );
}
$oDataset->next();
}
if ($start) {
if ($start < 0) {
@@ -1933,7 +1932,8 @@ class Task
*
* @return array
*/
public function arrayPagination($display_array, $page, $show_per_page) {
public function arrayPagination($display_array, $page, $show_per_page)
{
$page = $page + 1;
$show_per_page = $show_per_page -1;
$start = ($page - 1) * ($show_per_page + 1);

View File

@@ -112,6 +112,5 @@ class User extends Api
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
}