Fixing Bpmn::getEvent()
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
},
|
||||
"require-dev":{
|
||||
"guzzle/guzzle":"~3.1.1",
|
||||
"behat/behat":"2.4.*@stable"
|
||||
"behat/behat":"2.4.*@stable",
|
||||
"lisachenko/go-aop-php": "*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,19 +314,15 @@ class Bpmn extends Handler
|
||||
}
|
||||
}
|
||||
|
||||
public function getEvent($evnUid)
|
||||
public function getEvent($evnUid, $retType = 'array')
|
||||
{
|
||||
if (empty($this->events) || ! array_key_exists($evnUid, $this->activities)) {
|
||||
$event = EventPeer::retrieveByPK($evnUid);
|
||||
|
||||
if (! is_object($event)) {
|
||||
return null;
|
||||
if ($retType != "object" && ! empty($activity)) {
|
||||
$event = $event->toArray();
|
||||
}
|
||||
|
||||
$this->events[$evnUid] = $event;
|
||||
}
|
||||
|
||||
return $this->events[$evnUid];
|
||||
return $event;
|
||||
}
|
||||
|
||||
public function getEvents($start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER)
|
||||
|
||||
@@ -17,6 +17,12 @@ class Logger
|
||||
protected function __construct()
|
||||
{
|
||||
$this->logFile = rtrim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . 'processmaker.log';
|
||||
|
||||
if (! file_exists($this->logFile)) {
|
||||
file_put_contents($this->logFile, "");
|
||||
chmod($this->logFile, 0777);
|
||||
}
|
||||
|
||||
$this->fp = fopen($this->logFile, "a+");
|
||||
}
|
||||
|
||||
@@ -40,8 +46,8 @@ class Logger
|
||||
|
||||
fwrite($this->fp, "- " . date('Y-m-d H:i:s') . " " . $arg . PHP_EOL);
|
||||
}
|
||||
if (count($args) > 1)
|
||||
fwrite($this->fp, PHP_EOL);
|
||||
//if (count($args) > 1)
|
||||
// fwrite($this->fp, PHP_EOL);
|
||||
}
|
||||
|
||||
public static function log()
|
||||
|
||||
@@ -884,6 +884,20 @@ try {
|
||||
$RBAC = &RBAC::getSingleton( PATH_DATA, session_id() );
|
||||
$RBAC->sSystem = 'PROCESSMAKER';
|
||||
|
||||
|
||||
if (\System::isDebugMode()) {
|
||||
$applicationAspectKernel = \Kernel\ApplicationAspectKernel::getInstance();
|
||||
$applicationAspectKernel->init(array(
|
||||
'debug' => true, // Use 'false' for production mode
|
||||
// Cache directory
|
||||
'cacheDir' => sys_get_temp_dir() . DIRECTORY_SEPARATOR, // Adjust this path if needed
|
||||
// Include paths restricts the directories where aspects should be applied, or empty for all source files
|
||||
'includePaths' => array(
|
||||
PATH_HOME . 'engine/src/'
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
// define and send Headers for all pages
|
||||
if (! defined( 'EXECUTE_BY_CRON' )) {
|
||||
header( "Expires: " . gmdate( "D, d M Y H:i:s", mktime( 0, 0, 0, date( 'm' ), date( 'd' ) - 1, date( 'Y' ) ) ) . " GMT" );
|
||||
|
||||
Reference in New Issue
Block a user