Improvement fullName and labels - Audilog Kpi
This commit is contained in:
@@ -77,7 +77,7 @@ class Dashboard extends BaseDashboard
|
||||
}
|
||||
}
|
||||
|
||||
public function remove($dasUid)
|
||||
public function remove($dasUid, $userLogged = '')
|
||||
{
|
||||
$connection = Propel::getConnection(DashboardPeer::DATABASE_NAME);
|
||||
try {
|
||||
@@ -92,8 +92,8 @@ class Dashboard extends BaseDashboard
|
||||
$criteria->add(DashboardIndicatorPeer::DAS_UID, $dasUid);
|
||||
DashboardIndicatorPeer::doDelete($criteria);
|
||||
|
||||
if ((!isset($_SESSION['USER_LOGGED']) || $_SESSION['USER_LOGGED'] == '') && isset($data['USR_UID']) && $data['USR_UID'] != '') {
|
||||
$this->setUser($data['USR_UID']);
|
||||
if ((!isset($_SESSION['USER_LOGGED']) || $_SESSION['USER_LOGGED'] == '') && $userLogged != '') {
|
||||
$this->setUser($userLogged);
|
||||
}
|
||||
|
||||
$dashboard = DashboardPeer::retrieveByPK($dasUid);
|
||||
|
||||
@@ -294,15 +294,16 @@ class Dashboard {
|
||||
* Delete Dashboard
|
||||
*
|
||||
* @param string $das_uid Unique id
|
||||
* @param string $usr_uid
|
||||
*
|
||||
* return void
|
||||
*
|
||||
* @author Marco Antonio Nina <marco.antonio.nina@colosa.com>
|
||||
*/
|
||||
public function deletedashboard($das_uid)
|
||||
public function deletedashboard($das_uid, $usr_uid)
|
||||
{
|
||||
$dashboard = new \Dashboard();
|
||||
$response = $dashboard->remove($das_uid);
|
||||
$response = $dashboard->remove($das_uid, $usr_uid);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ class Dashboard extends Api
|
||||
try {
|
||||
$dashboard = new \ProcessMaker\BusinessModel\Dashboard();
|
||||
$request_data['USR_UID'] = $this->getUserId();
|
||||
$response = $dashboard->deletedashboard($das_uid);
|
||||
$response = $dashboard->deletedashboard($das_uid, $this->getUserId());
|
||||
return $response;
|
||||
} catch (\Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
|
||||
Reference in New Issue
Block a user