include/MVC/SugarApplication.php
\SugarApplication
SugarCRM application
- Api
Properties
array
$globalModifyActions= 'array(
'massupdate', 'configuredashlet', 'import', 'importvcardsave', 'inlinefieldsave',
'wlsave', 'quicksave'
)'
Actions that always modify data and thus require referrers save* and delete* hardcoded as modified
array(
'massupdate', 'configuredashlet', 'import', 'importvcardsave', 'inlinefieldsave',
'wlsave', 'quicksave'
)
Details- Type
- array
array
$modifyActions= 'array()'
Actions that modify data in this controller's instance and thus require referrers
array()
Details- Type
- array
$modifyModules= 'array(
'Administration' => true,
'UpgradeWizard' => true,
'Configurator' => true,
'Studio' => true,
'ModuleBuilder' => true,
'Emails' => true,
'DCETemplates' => true,
'DCEInstances' => true,
'DCEActions' => true,
'Trackers' => array('trackersettings'),
'SugarFavorites' => array('tag'),
'Import' => array('last', 'undo'),
'Users' => array('changepassword', "generatepassword"),
)'
Modules that modify data and thus require referrers for all actions
array(
'Administration' => true,
'UpgradeWizard' => true,
'Configurator' => true,
'Studio' => true,
'ModuleBuilder' => true,
'Emails' => true,
'DCETemplates' => true,
'DCEInstances' => true,
'DCEActions' => true,
'Trackers' => array('trackersettings'),
'SugarFavorites' => array('tag'),
'Import' => array('last', 'undo'),
'Users' => array('changepassword', "generatepassword"),
)
Details- Type
- n/a
$redirectVars= 'array('module', 'action', 'record', 'token', 'oauth_token', 'mobile')'
array('module', 'action', 'record', 'token', 'oauth_token', 'mobile')
Details- Type
- n/a
array
$whiteListActions= 'array('index', 'ListView', 'DetailView', 'EditView', 'oauth', 'authorize', 'Authenticate', 'Login', 'SupportPortal')'
The list of the actions excepted from referer checks by default
array('index', 'ListView', 'DetailView', 'EditView', 'oauth', 'authorize', 'Authenticate', 'Login', 'SupportPortal')
Details- Type
- array
Methods
appendErrorMessage(
$error_message
)
:
void
Redirect to another URL
Name | Type | Description |
---|---|---|
$error_message |
- Access
- public
checkDatabaseVersion(
$dieOnFailure
=
true
)
:
void
checkDatabaseVersion Check the db version sugar_version.php and compare to what the version is stored in the config table.
Ensure that both are the same.
Name | Type | Description |
---|---|---|
$dieOnFailure |
checkHTTPReferer(
$dieIfInvalid
=
true
)
:
void
Checks a request to ensure the request is coming from a valid source or it is for one of the white listed actions
Name | Type | Description |
---|---|---|
$dieIfInvalid |
createLoginVars(
)
:
string
Create string to attach to login URL with vars to preserve post-login
Type | Description |
---|---|
string | URL part with login vars |
getLoginRedirect(
)
:
string
Get URL to redirect after the login
Type | Description |
---|---|
string | the URL to redirect to |
getLoginVars(
bool $add_empty
=
true
)
:
array
Get the list of vars passed with login form
Name | Type | Description |
---|---|---|
$add_empty | bool | Add empty vars to the result? |
Type | Description |
---|---|
array | List of vars passed with login |
loadLanguages(
)
:
void
Load application wide languages as well as module based languages so they are accessible from the module.
loadUser(
)
:
void
Load the authenticated user. If there is not an authenticated user then redirect to login screen.
preLoadLanguages(
)
:
void
Load only bare minimum of language that can be done before user init and MVC stuff
redirect(
string $url
)
:
void
Redirect to another URL
Name | Type | Description |
---|---|---|
$url | string | The URL to redirect to |
- Access
- public
setCookie(
$name, $value, $expire
=
0, $path
=
'/', $domain
=
null, $secure
=
false, $httponly
=
false
)
:
void
Wrapper for the PHP setcookie() function, to handle cases where headers have already been sent
Name | Type | Description |
---|---|---|
$name | ||
$value | ||
$expire | ||
$path | ||
$domain | ||
$secure | ||
$httponly |
setupResourceManagement(
$module
)
:
void
setupResourceManagement This function initialize the ResourceManager and calls the setup method on the ResourceManager instance.
Name | Type | Description |
---|---|---|
$module |