Fix notice CASE SCHEDULER.
This commit is contained in:
@@ -464,7 +464,7 @@ class CaseScheduler
|
||||
$sStartDay = date('Y-m-d');
|
||||
} else {
|
||||
$size = strlen($aData['SCH_START_DAY']);
|
||||
if ($size > 4) {
|
||||
if ( $size > 4 ) {
|
||||
$aaStartDay = explode( "|", $aData['SCH_START_DAY'] );
|
||||
$aaStartDay[0] = $aaStartDay[0];
|
||||
$aaStartDay[1] = $aaStartDay[1];
|
||||
@@ -754,7 +754,7 @@ class CaseScheduler
|
||||
$sStartDay = date('Y-m-d');
|
||||
} else {
|
||||
$size = strlen($aData['SCH_START_DAY']);
|
||||
if ($size > 4) {
|
||||
if ( $size > 4 ) {
|
||||
$aaStartDay = explode( "|", $aData['SCH_START_DAY'] );
|
||||
$aaStartDay[0] = $aaStartDay[0];
|
||||
$aaStartDay[1] = $aaStartDay[1];
|
||||
|
||||
@@ -35,20 +35,25 @@ class FilesManager
|
||||
* Return the Process Files Manager Path
|
||||
*
|
||||
* @param string $sProcessUID {@min 32} {@max 32}
|
||||
* @param string $sMainDirectory
|
||||
* @param string $path
|
||||
*
|
||||
* return array
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function getProcessFilesManagerPath($sProcessUID, $sMainDirectory)
|
||||
public function getProcessFilesManagerPath($sProcessUID, $path)
|
||||
{
|
||||
try {
|
||||
$sMainDirectory = current(explode("/", $path));
|
||||
if ($path)
|
||||
$sSubDirectory = substr($path, strpos($path, "/"));
|
||||
switch ($sMainDirectory) {
|
||||
case 'mailTemplates':
|
||||
case 'templates':
|
||||
//$sDirectory = PATH_DATA_MAILTEMPLATES . $sProcessUID . PATH_SEP . $sSubDirectory;
|
||||
$sDirectory = PATH_DATA_MAILTEMPLATES . $sProcessUID . PATH_SEP;
|
||||
break;
|
||||
case 'public':
|
||||
case 'folder':
|
||||
//$sDirectory = PATH_DATA_PUBLIC . $sProcessUID . PATH_SEP . $sSubDirectory;
|
||||
$sDirectory = PATH_DATA_PUBLIC . $sProcessUID . PATH_SEP;
|
||||
break;
|
||||
default:
|
||||
@@ -59,13 +64,16 @@ class FilesManager
|
||||
$aTheFiles = array();
|
||||
$aDirectories = array();
|
||||
$aFiles = array();
|
||||
$sCurrentDirectory = $sSubDirectory;
|
||||
$oDirectory = dir($sDirectory);
|
||||
while ($sObject = $oDirectory->read()) {
|
||||
if (($sObject !== '.') && ($sObject !== '..')) {
|
||||
$sPath = $sDirectory . $sObject;
|
||||
$sCurrentDirectory = end(explode("/",$sPath));
|
||||
if (is_dir($sPath)) {
|
||||
$aDirectories[] = array('PATH' => ($sCurrentDirectory != '' ? $sCurrentDirectory . PATH_SEP : '') . $sObject, 'DIRECTORY' => $sObject );
|
||||
$aTheFiles[] = array('name' => $sObject,
|
||||
'type' => "folder",
|
||||
//'path' => $sDirectory);
|
||||
'path' => ($sCurrentDirectory != '' ? $sCurrentDirectory . PATH_SEP : '') . $sObject);
|
||||
} else {
|
||||
$aAux = pathinfo($sPath);
|
||||
$aAux['extension'] = (isset($aAux['extension'])?$aAux['extension']:'');
|
||||
@@ -83,7 +91,7 @@ class FilesManager
|
||||
}
|
||||
$aTheFiles[] = array('name' => $aFile['FILE'],
|
||||
'type' => "file",
|
||||
'path' => $sDirectory.$aFile['FILE'],
|
||||
'path' => $sDirectory,
|
||||
'editable' => $sEditable);
|
||||
}
|
||||
return $aTheFiles;
|
||||
|
||||
@@ -22,11 +22,6 @@ class FilesManager extends Api
|
||||
try {
|
||||
$filesManager = new \BusinessModel\FilesManager();
|
||||
if ($path != '') {
|
||||
if ($path == 'templates') {
|
||||
$path = 'mailTemplates';
|
||||
} else {
|
||||
$path = 'public';
|
||||
}
|
||||
$arrayData = $filesManager->getProcessFilesManagerPath($prjUid, $path);
|
||||
} else {
|
||||
$arrayData = $filesManager->getProcessFilesManager($prjUid);
|
||||
|
||||
Reference in New Issue
Block a user