Skip to content

Commit

Permalink
removed not needed code
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed May 24, 2024
1 parent 644902f commit 9ca5a99
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mmoda.lib.inc
Original file line number Diff line number Diff line change
Expand Up @@ -434,21 +434,16 @@ function mmoda_get_users_with_role($role, $active_user = TRUE)

function mmoda_get_frontend_version()
{
$version = 'test';
// $query = db_select('variable', 'var')
// ->fields('var', array('value'))
// ->condition('var.name', 'mmoda_frontend_version');
$version = '';

$query = db_select('system', 'sys');
$query->addExpression('CONVERT(sys.info USING utf8)', 'info');
$query->condition('sys.name', 'mmoda');
// watchdog('MMODA', 'query to fetch frontend version: ' . $query, WATCHDOG_DEBUG);
$query_result = $query->execute()->fetch();

if (!empty($query_result)) {
$unserialized_info = unserialize($query_result->info);
$version = "{$unserialized_info['version']}";
// watchdog('MMODA', 'result query to fetch frontend, version: ' . $version);
}
else
watchdog('MMODA', 'frontened version not found in the database.');
Expand Down

0 comments on commit 9ca5a99

Please sign in to comment.