Skip to content

Commit

Permalink
Avoid use global variable when getting latest admin news #2796
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Feb 13, 2019
1 parent 1f4c0cd commit 6be9f6e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main/inc/ajax/admin.ajax.php
Expand Up @@ -246,8 +246,6 @@ function check_system_version()
*/
function getLatestNews()
{
global $language_interface;

$url = 'https://version.chamilo.org/news/latest.php';

$client = new Client();
Expand All @@ -256,7 +254,7 @@ function getLatestNews()
$url,
[
'query' => [
'language' => $language_interface,
'language' => api_get_interface_language(),
],
]
);
Expand Down

1 comment on commit 6be9f6e

@jmontoyaa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.