Doc System, change hardcoded labels

This commit is contained in:
Julio Cesar Laura
2013-03-14 15:15:04 -04:00
parent 9e0e980a23
commit 64e518fb49
81 changed files with 377 additions and 405 deletions

View File

@@ -944,8 +944,8 @@ function copyMoveAction($type)
$itemField["displayField"] = "FOLDER_NAME";
$itemField["selectOnFocus"] = true;
$itemField["tpl"] = '<tpl for="."><div ext:qtip="{field2}" class="x-combo-list-item">{field2}</div></tpl>';
$itemField["fieldLabel"] = "Destination";
$itemField["emptyText"] = "Select a directory...";
$itemField["fieldLabel"] = G::LoadTranslation('ID_DESTINATION');
$itemField["emptyText"] = G::LoadTranslation('ID_SELECT_DIRECTORY');
$itemField["width"] = 390;
$itemField["allowBlank"]=false;
$copyDialog["items"][]=$itemField;
@@ -1359,11 +1359,11 @@ function uploadExternalDocument()
$response['message']=$err_msg;
$response['success']=false;
} elseif ($emptyInstances==$uploadedInstances) {
$response['error']="You may upload at least one file";
$response['message']="You may upload at least one file";
$response['error']= G::LoadTranslation('ID_UPLOAD_LEAST_FILE');
$response['message']= G::LoadTranslation('ID_UPLOAD_LEAST_FILE');
$response['success']=false;
} else {
$response['error']="Upload complete";
$response['error']= G::LoadTranslation('ID_UPLOAD_COMPLETE');
$response['message']="Upload complete";
$response['success']=true;
}
@@ -1409,7 +1409,7 @@ function newFolder()
$formNewFolder["id"]= "simpleform";
$formNewFolder["labelWidth"]=125;
$formNewFolder["url"]="../appFolder/appFolderAjax.php";
$formNewFolder["dialogtitle"]= "Create New Folder";
$formNewFolder["dialogtitle"]= G::LoadTranslation('ID_CREATE_FOLDER');
$formNewFolder["frame"]= true;
$formNewFolder["items"]= array();

View File

@@ -45,7 +45,7 @@ try {
$dataset->next();
}
$aFields = $RBAC->getAuthSource( $_POST['sUID'] );
$aFields = $RBAC->getAuthSource( $_POST['sUID'] );
//G::LoadThirdParty( 'pear/json', 'class.json' );
//$oJSON = new Services_JSON();
$i = 0;

View File

@@ -96,7 +96,7 @@ try {
$oUser->load( $val['USR_UID'] );
$delegations[$key]['USR_NAME'] = $oUser->getUsrFirstname() . ' ' . $oUser->getUsrLastname();
} else {
$delegations[$key]['USR_NAME'] = 'Unknow user (Sub-Process User)';
$delegations[$key]['USR_NAME'] = G::LoadTranslation('ID_UNKNOW_USER') . G::LoadTranslation('ID_SUBPROCESS_USER');
}
}
$Fields['CANT_DELEGATIONS'] = count( $delegations );

View File

@@ -1,13 +1,13 @@
<?php
if (! isset( $_REQUEST['action'] )) {
$res['success'] = 'failure';
$res['message'] = 'You may request an action';
$res['message'] = G::LoadTranslation( 'ID_REQUEST_ACTION' );
print G::json_encode( $res );
die();
}
if (! function_exists( $_REQUEST['action'] )) {
$res['success'] = 'failure';
$res['message'] = 'The requested action does not exist';
$res['message'] = G::LoadTranslation( 'ID_REQUEST_ACTION_NOT_EXIST' );
print G::json_encode( $res );
die();
}
@@ -127,7 +127,7 @@ function getProcessList ()
$processList = $processListTree;
} else {
$processList['success'] = 'failure';
$processList['message'] = 'User can\'t start process';
$processList['message'] = G::LoadTranslation('ID_USER_PROCESS_NOT_START');
}
print G::json_encode( $processList );
die();

View File

@@ -24,7 +24,7 @@ try {
//getting the ProUid from the file recently downloaded
$oData = $oProcess->getProcessData( $localPath . $newfilename );
if (is_null( $oData )) {
throw new Exception( 'Error' );
throw new Exception( G::LoadTranslation( 'ID_ERROR' ) );
}
$Fields['IMPORT_OPTION'] = 2;
$Fields['PRO_FILENAME'] = $newfilename;

View File

@@ -54,7 +54,7 @@ try {
if (isset( $stdObj->pro_uid ))
$sProUid = $stdObj->pro_uid;
else
throw (new Exception( 'the process uid is not defined!.' ));
throw (new Exception( G::LoadTranslation('ID_PROCESS_UID_NOT_DEFINED') ));
/* Includes */
G::LoadClass( 'processes' );

View File

@@ -275,7 +275,7 @@ if ($action == "uploadFileNewProcessExist") {
//krumo ($oData); die;
$sNewProUid = $oProcess->getUnusedProcessGUID();
$oProcess->setProcessGuid( $oData, $sNewProUid );
$oData->process['PRO_TITLE'] = "Copy of - " . $oData->process['PRO_TITLE'] . ' - ' . date( 'M d, H:i' );
$oData->process['PRO_TITLE'] = G::LoadTranslation('ID_COPY_OF'). ' - ' . $oData->process['PRO_TITLE'] . ' - ' . date( 'M d, H:i' );
$oProcess->renewAll( $oData );
if ($processFileType == "pm") {

View File

@@ -29,7 +29,7 @@ try {
$user = $oTask->assignUsertoTask( $sTASKS );
if ($user == 0) {
throw (new Exception( "The task '" . $TaskFields['TAS_TITLE'] . "' doesn't have users." ));
throw (new Exception( G::LoadTranslation('ID_TASK') . "'" . $TaskFields['TAS_TITLE'] . "'" . G::LoadTranslation('ID_NOT_HAVE_USERS')));
}
if (G::is_https())

View File

@@ -201,7 +201,7 @@ switch ($action) {
}
if (in_array( strtoupper( $data['REP_TAB_NAME'] ), $aReservedWords )) {
throw new Exception( 'Could not create the table with the name "' . $data['REP_TAB_NAME'] . '" because it is a reserved word.' );
throw new Exception( G::LoadTranslation('ID_NOT_CREATE_TABLE') . '"' . $data['REP_TAB_NAME'] . '"' . G::LoadTranslation('ID_RESERVED_WORD') );
}
//create record
$addTabUid = $oAdditionalTables->create( $repTabData );

View File

@@ -60,8 +60,7 @@ function RoleList ($params)
{
$x = ifPermission( $params->sessionId, 'PM_USERS' );
if ($x == 0) {
$result[] = array ('guid' => 24,'name' => 'You do not have privileges'
);
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES'));
return $result;
}
@@ -76,8 +75,7 @@ function GroupList ($params)
{
$x = ifPermission( $params->sessionId, 'PM_USERS' );
if ($x == 0) {
$result[] = array ('guid' => 24,'name' => 'You do not have privileges'
);
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES'));
return $result;
}
@@ -94,7 +92,7 @@ function CaseList ($params)
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
return new wsResponse( 9, 'Session expired' );
return new wsResponse( 9, G::LoadTranslation('ID_SESSION_EXPIRED') );
}
G::LoadClass( 'sessions' );
@@ -113,8 +111,7 @@ function UserList ($params)
{
$x = ifPermission( $params->sessionId, 'PM_USERS' );
if ($x == 0) {
$result[] = array ('guid' => 24,'name' => 'You do not have privileges'
);
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -131,7 +128,7 @@ function SendMessage ($params)
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
G::LoadClass( 'wsBase' );
@@ -161,7 +158,7 @@ function SendVariables ($params)
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
G::LoadClass( 'wsBase' );
@@ -189,7 +186,7 @@ function GetVariables ($params)
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -207,7 +204,7 @@ function DerivateCase ($params)
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -228,7 +225,7 @@ function executeTrigger ($params)
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -248,7 +245,7 @@ function NewCaseImpersonate ($params)
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
G::LoadClass( 'wsBase' );
@@ -272,7 +269,7 @@ function NewCase ($params)
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -333,7 +330,7 @@ function AssignUserToGroup ($params)
$x = ifPermission( $params->sessionId, 'PM_USERS' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
G::LoadClass( 'sessions' );
@@ -341,7 +338,7 @@ function AssignUserToGroup ($params)
$user = $sessions->getSessionUser( $params->sessionId );
if (! is_array( $user )) {
G::LoadClass( 'wsResponse' );
return new wsResponse( 3, 'User not registered in the system' );
return new wsResponse( 3, G::LoadTranslation('ID_USER_NOT_REGISTERED_SYSTEM') );
}
G::LoadClass( 'wsBase' );
@@ -356,7 +353,7 @@ function CreateUser ($params)
$x = ifPermission( $params->sessionId, 'PM_USERS' );
if ($x == 0) {
G::LoadClass( 'wsResponse' );
$result = new wsResponse( 24, "You do not have privileges" );
$result = new wsResponse( 24, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
G::LoadClass( 'wsBase' );
@@ -369,8 +366,7 @@ function TaskList ($params)
{
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
$result[] = array ('guid' => 24,'name' => 'You do not have privileges'
);
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
G::LoadClass( 'wsBase' );
@@ -389,8 +385,7 @@ function TaskCase ($params)
ifSessionExpiredBreakThis( $params->sessionId );
$x = ifPermission( $params->sessionId, 'PM_CASES' );
if ($x == 0) {
$result[] = array ('guid' => 24,'name' => 'You do not have privileges'
);
$result[] = array ('guid' => 24,'name' => G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
G::LoadClass( 'wsBase' );
@@ -418,7 +413,7 @@ function ifSessionExpiredBreakThis ($sessionId)
$session = $oSessions->verifySession( $sessionId );
if ($session == '') {
G::LoadClass( 'wsResponse' );
return new wsResponse( 9, 'Session expired' );
return new wsResponse( 9, G::LoadTranslation('ID_SESSION_EXPIRED') );
}
}

View File

@@ -61,7 +61,7 @@ function ProcessList ($params)
}
if (ifPermission( $params->sessionId, 'PM_FACTORY' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
return array ("processes" => $o
@@ -105,7 +105,7 @@ function RoleList ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
return array ("roles" => $o
@@ -132,7 +132,7 @@ function GroupList ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
return array ("groups" => $o
@@ -159,7 +159,7 @@ function DepartmentList ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
return array ("departments" => $o
@@ -189,7 +189,7 @@ function CaseList ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
$o->status = '';
$o->delIndex = '';
@@ -259,7 +259,7 @@ function UserList ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
return array ("users" => $o
@@ -287,7 +287,7 @@ function triggerList ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
$o->processId = '';
@@ -322,7 +322,7 @@ function outputDocumentList ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->filename = '';
$o->docId = '';
$o->version = '';
@@ -369,7 +369,7 @@ function inputDocumentList ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->filename = '';
$o->docId = '';
$o->version = '';
@@ -410,7 +410,7 @@ function inputDocumentProcessList ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
$o->description = '';
@@ -434,7 +434,7 @@ function removeDocument ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsResponse( 2, "Insufficient privileges to execute this function" );
$result = new wsResponse( 2, G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION') );
return $result;
}
@@ -454,7 +454,7 @@ function SendMessage ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result->getPayloadArray();
}
@@ -474,7 +474,7 @@ function getCaseInfo ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -494,7 +494,7 @@ function SendVariables ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -533,7 +533,7 @@ function GetVariables ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsGetVariableResponse( 2, "You do not have privileges", null );
$result = new wsGetVariableResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES'), null );
return $result;
}
@@ -555,7 +555,7 @@ function GetVariablesNames ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsGetVariableResponse( 2, "You do not have privileges", null );
$result = new wsGetVariableResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES'), null );
return $result;
}
@@ -578,7 +578,7 @@ function DerivateCase ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -605,7 +605,7 @@ function RouteCase ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -631,7 +631,7 @@ function executeTrigger ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -655,7 +655,7 @@ function NewCaseImpersonate ($params)
}
if (ifPermission( $params->sessionId, "PM_CASES" ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -697,7 +697,7 @@ function NewCase ($params)
}
if (ifPermission( $params->sessionId, "PM_CASES" ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -782,7 +782,7 @@ function AssignUserToGroup ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result->getPayloadArray();
}
@@ -811,7 +811,7 @@ function AssignUserToDepartment ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result->getPayloadArray();
}
@@ -822,7 +822,7 @@ function AssignUserToDepartment ($params)
$user = $sessions->getSessionUser( $params->sessionId );
if (! is_array( $user )) {
return new wsResponse( 3, 'User not registered in the system' );
return new wsResponse( 3, G::LoadTranslation('ID_USER_NOT_REGISTERED_SYSTEM') );
}
$ws = new wsBase();
@@ -840,7 +840,7 @@ function CreateUser ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$result = new wsCreateUserResponse( 2, "You do not have privileges" );
$result = new wsCreateUserResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -861,7 +861,7 @@ function updateUser ($params)
}
if (ifPermission( $params->sessionId, "PM_USERS" ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -882,7 +882,7 @@ function informationUser($params)
}
if (ifPermission($params->sessionId, "PM_USERS") == 0) {
$result = new wsResponse(2, "You do not have privileges");
$result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES'));
return $result;
}
@@ -904,7 +904,7 @@ function CreateGroup ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$result = new wsCreateGroupResponse( 2, "You do not have privileges", '' );
$result = new wsCreateGroupResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES'), '' );
return $result;
}
@@ -924,7 +924,7 @@ function CreateDepartment ($params)
}
if (ifPermission( $params->sessionId, 'PM_USERS' ) == 0) {
$result = new wsCreateUserResponse( 2, "You do not have privileges" );
$result = new wsCreateUserResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -948,7 +948,7 @@ function TaskList ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2" . G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
return array ("tasks" => $o
@@ -980,7 +980,7 @@ function TaskCase ($params)
}
if (ifPermission( $params->sessionId, 'PM_CASES' ) == 0) {
$o->guid = "2 Insufficient privileges to execute this function";
$o->guid = "2".G::LoadTranslation('ID_INSUFFICIENT_PRIVILEGES_FUNCTION');
$o->name = '';
return array ("taskCases" => $o
@@ -1062,9 +1062,9 @@ function isValidSession ($sessionId)
$session = $oSessions->verifySession( $sessionId );
if (is_array( $session )) {
return new wsResponse( 0, 'Session active' );
return new wsResponse( 0, G::LoadTranslation('ID_SESSION_ACTIVE') );
} else {
return new wsResponse( 9, 'Session expired' );
return new wsResponse( 9, G::LoadTranslation('ID_SESSION_EXPIRED') );
}
}
@@ -1118,7 +1118,7 @@ function deleteCase ($params)
}
if (ifPermission( $params->sessionId, "PM_CASES" ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -1138,7 +1138,7 @@ function cancelCase ($params)
}
if (ifPermission( $params->sessionId, "PM_CASES" ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -1158,7 +1158,7 @@ function pauseCase ($params)
}
if (ifPermission( $params->sessionId, "PM_CASES" ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -1179,7 +1179,7 @@ function unpauseCase ($params)
}
if (ifPermission( $params->sessionId, "PM_CASES" ) == 0) {
$result = new wsResponse( 2, "You do not have privileges" );
$result = new wsResponse( 2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}
@@ -1199,7 +1199,7 @@ function addCaseNote($params)
}
if (ifPermission($params->sessionId, "PM_CASES") == 0) {
$result = new wsResponse(2, "You do not have privileges");
$result = new wsResponse(2, G::LoadTranslation('ID_NOT_PRIVILEGES') );
return $result;
}

View File

@@ -36,6 +36,7 @@ switch ($request) {
$appCache->setPathToAppCacheFiles( PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP );
$res = $appCache->getMySQLVersion();
//load translations G::LoadTranslation
$result->info[] = array ('name' => G::LoadTranslation ( 'ID_CACHE_BUILDER_MYSQL_VERSION' ) ,'value' => $res
);

View File

@@ -2,14 +2,14 @@
if (! isset( $_REQUEST['action'] )) {
$res['success'] = false;
$res['error'] = $res['message'] = 'You may request an action';
$res['error'] = $res['message'] = G::LoadTranslation('ID_REQUEST_ACTION');
print G::json_encode( $res );
die();
}
if (! function_exists( $_REQUEST['action'] )) {
$res['success'] = false;
$res['error'] = $res['message'] = 'The requested action does not exist';
$res['error'] = $res['message'] = G::LoadTranslation('ID_REQUEST_ACTION_NOT_EXIST');
print G::json_encode( $res );
die();
@@ -18,7 +18,7 @@ $restrictedFunctions = array ('copy_skin_folder','addTarFolder'
);
if (in_array( $_REQUEST['action'], $restrictedFunctions )) {
$res['success'] = false;
$res['error'] = $res['message'] = 'The requested action does not exist *';
$res['error'] = $res['message'] = G::LoadTranslation('ID_REQUEST_ACTION_NOT_EXIST');
print G::json_encode( $res );
die();
}

View File

@@ -53,7 +53,7 @@ $oSystem = new System();
try {
if (! $oSystem->verifyFileForUpgrade()) {
throw (new Exception( "There was an error uploading the file, probably the file size if greater than upload_max_filesize parameter in php.ini, please check this parameter and try again." ));
throw (new Exception( G::LoadTranslation( 'ID_ERROR_UPLOADING_FILENAME')) );
}
$oSystem->cleanupUpgradeDirectory();
$oSystem->getUpgradedFilesList();

View File

@@ -171,7 +171,7 @@ function processSchemaFile ()
$oDataBase = new database( $DB_ADAPTER, $DB_HOST, $DB_USER, $DB_PASS, $DB_NAME );
if (! $oDataBase->isConnected()) {
$oDataBase->logQuery( 'Does not exist an available connection!' );
$oDataBase->logQuery( G::LoadTranslation('ID_DOES_NOT_EXIST_AVAILABLE_CONNECTION') );
return null;
}