Merge branch 'master' of bitbucket.org:colosa/processmaker

This commit is contained in:
Freddy Daniel Rojas Valda
2014-05-14 11:43:29 -04:00
3 changed files with 11 additions and 6 deletions

View File

@@ -145,7 +145,8 @@ Scenario Outline: Import a process
Scenario Outline: Get a List DynaForms of a Project Process Complete BPMN
Given I request "project/prj_uid/dynaforms" with the key "prj_uid" stored in session array as variable "prj_uid_<prj_uid_number>"
And the content type is "application/json"se status code should be 200
And the content type is "application/json"
Then the response status code should be 200
And the response charset is "UTF-8"
And the type is "array"
And the response has <records> records
@@ -157,8 +158,7 @@ Scenario Outline: Get a List DynaForms of a Project Process Complete BPMN
| disable | 3 | 1455892245368ebeb11c1a5001393784 | 26 |
| keep | 4 | 1455892245368ebeb11c1a5001393784 | 26 |
Then the respon
Scenario Outline: Get the Input Documents List when there are exactly zero input documents
Given I request "project/prj_uid/input-documents" with the key "prj_uid" stored in session array as variable "prj_uid_<prj_uid_number>"
And the content type is "application/json"

View File

@@ -203,7 +203,7 @@ class Table
$pro_uid = $this->validateProUid($pro_uid);
$dataValidate['TAB_UID'] = (isset($dataValidate['REP_UID'])) ? $dataValidate['REP_UID'] : '';
$dataValidate['PRO_UID'] = $pro_uid;
$dataValidate['REP_TAB_NAME'] = $this->validateTabName($dataValidate['REP_TAB_NAME']);
$dataValidate['REP_TAB_NAME'] = $this->validateTabName($dataValidate['REP_TAB_NAME'], $reportFlag);
$tempRepTabName = $dataValidate['REP_TAB_CONNECTION'];
$dataValidate['REP_TAB_CONNECTION'] = $this->validateRepConnection($tempRepTabName, $pro_uid);
if ($dataValidate['REP_TAB_TYPE'] == 'GRID') {
@@ -969,11 +969,12 @@ class Table
*
* @return string
*/
public function validateTabName ($rep_tab_name)
public function validateTabName ($rep_tab_name, $reportFlag = false)
{
$rep_tab_name = trim($rep_tab_name);
$nametype = ($reportFlag == false) ? 'pmt_tab_name' : 'rep_tab_name';
if ((strpos($rep_tab_name, ' ')) || (strlen($rep_tab_name) < 4)) {
throw (new \Exception("The property pmt_tab_name: '$rep_tab_name' is incorrect."));
throw (new \Exception("The property $nametype: '$rep_tab_name' is incorrect."));
}
$rep_tab_name = G::toUpper($rep_tab_name);
if (substr($rep_tab_name, 0, 4) != 'PMT_') {

View File

@@ -210,6 +210,10 @@ abstract class Importer
throw new \Exception("Error while uploading file. Error code: {$data["error"]}");
}
if (! is_dir($this->getSaveDir())) {
Util\Common::mk_dir($this->getSaveDir());
}
$this->filename = $this->getSaveDir() . $data["name"];
$oldUmask = umask(0);