Skip to content

Commit

Permalink
Import $app_list_strings and $app_strings as global variables on …
Browse files Browse the repository at this point in the history
…SugarCRM load
  • Loading branch information
Rémi Sauvat committed Apr 6, 2017
1 parent 792c598 commit caba231
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.2.5
----
* Import `$app_list_strings` and `$app_strings` as global variables on SugarCRM load.

1.2.4
-----
* Fix call to Activity class when it doesn't exists on older SugarCRM version.
Expand Down
8 changes: 8 additions & 0 deletions src/EntryPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@ private function loadSugarEntryPoint()
// 2. Get the "autoloader"
require_once('include/entryPoint.php');

// Set language globally
if (empty($current_language)) {
$current_language = $sugar_config['default_language'];
}

$app_list_strings = return_app_list_strings_language($current_language);
$app_strings = return_application_language($current_language);

// Set all variables as Global to be able to access $sugar_config for example
// Even the GLOBALS one ! Because I save it locally and it could disappear later
$this->defineVariablesAsGlobal(
Expand Down

0 comments on commit caba231

Please sign in to comment.