checkGitRevision();
if (! $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT')) {
$response = Response::getInstance();
$response->setRequestStatus(false);
return;
}
// if using a remote commit fast-forwarded, link to GitHub
$commit_hash = substr(
$GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITHASH'),
0,
7
);
$commit_hash = '' . htmlspecialchars($commit_hash) . '';
if ($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_ISREMOTECOMMIT')) {
$commit_hash = '' . $commit_hash . '';
}
$branch = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_BRANCH');
$isRemoteBranch = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_ISREMOTEBRANCH');
if ($isRemoteBranch) {
$branch = '' . htmlspecialchars($branch) . '';
}
if ($branch !== false) {
$branch = sprintf(
__('%1$s from %2$s branch'),
$commit_hash,
$isRemoteBranch ? $branch : htmlspecialchars($branch)
);
} else {
$branch = $commit_hash . ' (' . __('no branch') . ')';
}
$committer = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITTER');
$author = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_AUTHOR');
Core::printListItem(
__('Git revision:') . ' '
. $branch . ',
'
. sprintf(
__('committed on %1$s by %2$s'),
Util::localisedDate(strtotime($committer['date'])),
''
. htmlspecialchars($committer['name']) . ''
)
. ($author != $committer
? ',
'
. sprintf(
__('authored on %1$s by %2$s'),
Util::localisedDate(strtotime($author['date'])),
''
. htmlspecialchars($author['name']) . ''
)
: ''),
'li_pma_version_git', null, null, null
);
}
}