Merge remote-tracking branch 'upstream/master'
Conflicts: workflow/engine/classes/class.processMap.php workflow/engine/classes/model/AdditionalTables.php
This commit is contained in:
@@ -135,6 +135,7 @@ class adminProxy extends HttpProxyController
|
||||
$list = $data;
|
||||
}
|
||||
|
||||
$oRoles = new Roles();
|
||||
$rows = array();
|
||||
|
||||
foreach ($list as $value) {
|
||||
@@ -144,6 +145,13 @@ class adminProxy extends HttpProxyController
|
||||
$user->save();
|
||||
|
||||
$row = $user->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
try {
|
||||
$uRole = $oRoles->loadByCode($row['USR_ROLE']);
|
||||
} catch (exception $oError) {
|
||||
$uRole['ROL_NAME'] = G::loadTranslation( 'ID_DELETED' );
|
||||
}
|
||||
$row['USR_ROLE_ID'] = $row['USR_ROLE'];
|
||||
$row['USR_ROLE'] = isset($uRole['ROL_NAME']) ? ($uRole['ROL_NAME'] != '' ? $uRole['ROL_NAME'] : $uRole['USR_ROLE']) : $uRole['USR_ROLE'];
|
||||
|
||||
$uxList = self::getUxTypesList();
|
||||
$row['USR_UX'] = $uxList[$user->getUsrUx()];
|
||||
|
||||
@@ -332,7 +332,9 @@ class Dashboard extends Controller
|
||||
$users[] = array ('OWNER_UID' => $user['USR_UID'],'OWNER_NAME' => $user['USR_FIRSTNAME'] . ' ' . $user['USR_LASTNAME']
|
||||
);
|
||||
}
|
||||
|
||||
usort($users, function($str1, $str2) {
|
||||
return strcmp(strtolower($str1["OWNER_NAME"]), strtolower($str2["OWNER_NAME"]));
|
||||
});
|
||||
$result->total = $allUsers->totalCount;
|
||||
$result->owners = $users;
|
||||
break;
|
||||
|
||||
@@ -43,13 +43,13 @@ class Home extends Controller
|
||||
}
|
||||
|
||||
public function login ($httpData)
|
||||
{
|
||||
{
|
||||
//start new session
|
||||
@session_destroy();
|
||||
session_start();
|
||||
session_regenerate_id();
|
||||
|
||||
$data = isset( $httpData->d ) ? unserialize( base64_decode( $httpData->d ) ) : '';
|
||||
$data = isset( $httpData->d ) ? unserialize( base64_decode( $httpData->d ) ) : '';
|
||||
$template = $this->clientBrowser['name'] == 'msie' ? 'login_ie' : 'login_standard';
|
||||
$skin = $this->clientBrowser['name'] == 'msie' ? $this->lastSkin : 'simplified';
|
||||
|
||||
@@ -94,8 +94,20 @@ class Home extends Controller
|
||||
$start = 0;
|
||||
$limit = '';
|
||||
|
||||
$proData = $process->getAllProcesses( $start, $limit );
|
||||
$processList = $case->getStartCasesPerType( $_SESSION['USER_LOGGED'], 'category' );
|
||||
$proData = $process->getAllProcesses( $start, $limit, null, null, false, true );
|
||||
$processList = $case->getStartCasesPerType( $_SESSION['USER_LOGGED'], 'category' );
|
||||
|
||||
unset( $processList[0] );
|
||||
$processesList = array ();
|
||||
|
||||
foreach ($processList as $key => $valueProcess) {
|
||||
foreach ($proData as $keyPro => $valuePro) {
|
||||
if ($valueProcess['pro_uid'] == $valuePro['PRO_UID']) {
|
||||
$processesList[] = $valueProcess;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$switchLink = $userProperty->getUserLocation( $_SESSION['USER_LOGGED'] );
|
||||
|
||||
if (!isset($_COOKIE['workspaceSkin'])) {
|
||||
@@ -105,7 +117,13 @@ class Home extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
unset( $processList[0] );
|
||||
$oServerConf = & serverConf::getSingleton();
|
||||
|
||||
if ($oServerConf->isRtl( SYS_LANG )) {
|
||||
$swRtl = 1;
|
||||
} else {
|
||||
$swRtl = 0;
|
||||
}
|
||||
|
||||
//Get simplified options
|
||||
global $G_TMP_MENU;
|
||||
@@ -132,13 +150,14 @@ class Home extends Controller
|
||||
|
||||
$this->setVar( 'usrUid', $this->userID );
|
||||
$this->setVar( 'userName', $this->userName );
|
||||
$this->setVar( 'processList', $processList );
|
||||
$this->setVar( 'processList', $processesList );
|
||||
$this->setVar( 'canStartCase', $case->canStartCase( $_SESSION['USER_LOGGED'] ) );
|
||||
$this->setVar( 'userUxType', $this->userUxType );
|
||||
$this->setVar( 'clientBrowser', $this->clientBrowser['name'] );
|
||||
$this->setVar( 'switchLink', $switchLink );
|
||||
$this->setVar( 'arrayMnuOption', $arrayMnuOption );
|
||||
$this->setVar( 'mnuNewCase', $mnuNewCase );
|
||||
$this->setVar( 'rtl', $swRtl );
|
||||
|
||||
$this->render();
|
||||
}
|
||||
@@ -183,7 +202,7 @@ class Home extends Controller
|
||||
}
|
||||
|
||||
public function appList ($httpData)
|
||||
{
|
||||
{
|
||||
// setting default list applications types [default: todo]
|
||||
$httpData->t = isset( $httpData->t ) ? $httpData->t : 'todo';
|
||||
|
||||
@@ -270,7 +289,7 @@ class Home extends Controller
|
||||
}
|
||||
|
||||
public function getApps ($httpData)
|
||||
{
|
||||
{
|
||||
$cases = $this->getAppsData( $httpData->t, $httpData->start, $httpData->limit );
|
||||
|
||||
$this->setView( $this->userUxBaseTemplate . PATH_SEP . 'applications' );
|
||||
@@ -293,7 +312,7 @@ class Home extends Controller
|
||||
$dir = null,
|
||||
$sort = "APP_CACHE_VIEW.APP_NUMBER",
|
||||
$category = null)
|
||||
{
|
||||
{
|
||||
require_once ("classes/model/AppNotes.php");
|
||||
G::LoadClass( 'applications' );
|
||||
|
||||
@@ -545,7 +564,7 @@ class Home extends Controller
|
||||
return $status;
|
||||
}
|
||||
function getProcessArray($action, $userUid)
|
||||
{
|
||||
{
|
||||
global $oAppCache;
|
||||
|
||||
$processes = array();
|
||||
@@ -576,6 +595,7 @@ class Home extends Controller
|
||||
$cProcess->addJoinMC($conds, Criteria::LEFT_JOIN);
|
||||
$cProcess->add(ProcessPeer::PRO_STATUS, "ACTIVE");
|
||||
$oDataset = ProcessPeer::doSelectRS($cProcess);
|
||||
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$oDataset->next();
|
||||
|
||||
@@ -199,6 +199,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
$result = new StdClass();
|
||||
|
||||
try {
|
||||
$result = new stdClass();
|
||||
ob_start();
|
||||
$data = (array) $httpData;
|
||||
$data['PRO_UID'] = trim( $data['PRO_UID'] );
|
||||
@@ -327,6 +328,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
$result->success = true;
|
||||
$result->message = $result->msg = $buildResult;
|
||||
} catch (Exception $e) {
|
||||
$result = new stdClass();
|
||||
$buildResult = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$result->success = false;
|
||||
@@ -353,6 +355,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
*/
|
||||
public function delete ($httpData)
|
||||
{
|
||||
$result = new stdClass();
|
||||
$rows = G::json_decode( stripslashes( $httpData->rows ) );
|
||||
$errors = '';
|
||||
$count = 0;
|
||||
@@ -737,6 +740,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
{
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
try {
|
||||
$result = new stdClass();
|
||||
$errors = '';
|
||||
|
||||
$overWrite = isset( $_POST['form']['OVERWRITE'] ) ? true : false;
|
||||
@@ -964,6 +968,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
|
||||
$result->message = $msg;
|
||||
} catch (Exception $e) {
|
||||
$result = new stdClass();
|
||||
$result->errorType = 'error';
|
||||
$result->buildResult = ob_get_contents();
|
||||
ob_end_clean();
|
||||
@@ -995,6 +1000,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
$tablesToExport = G::json_decode( stripslashes( $httpData->rows ) );
|
||||
|
||||
try {
|
||||
$result = new stdClass();
|
||||
G::LoadCLass( 'net' );
|
||||
$net = new NET( G::getIpAddress() );
|
||||
|
||||
@@ -1095,6 +1101,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
$result->link = $link;
|
||||
$result->message = "Generated file: $filenameOnly, size: $size";
|
||||
} catch (Exception $e) {
|
||||
$result = new stdClass();
|
||||
$result->success = false;
|
||||
$result->message = $e->getMessage();
|
||||
}
|
||||
@@ -1227,6 +1234,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
|
||||
public function genDataReport ($httpData)
|
||||
{
|
||||
$result = new stdClass();
|
||||
G::loadClass( 'pmTable' );
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
$result->message = '';
|
||||
|
||||
Reference in New Issue
Block a user