2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays form for password change
8 use PMA\libraries\Response
;
11 * Prints details about the current Git commit revision
15 function PMA_printGitRevision()
17 if (! $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT')) {
18 $response = Response
::getInstance();
19 $response->setRequestStatus(false);
23 // load revision data from repo
24 $GLOBALS['PMA_Config']->checkGitRevision();
26 // if using a remote commit fast-forwarded, link to GitHub
27 $commit_hash = substr(
28 $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITHASH'),
32 $commit_hash = '<strong title="'
33 . htmlspecialchars($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_MESSAGE'))
34 . '">' . $commit_hash . '</strong>';
35 if ($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_ISREMOTECOMMIT')) {
36 $commit_hash = '<a href="'
38 'https://github.com/phpmyadmin/phpmyadmin/commit/'
39 . $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITHASH')
41 . '" rel="noopener noreferrer" target="_blank">' . $commit_hash . '</a>';
44 $branch = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_BRANCH');
45 if ($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_ISREMOTEBRANCH')) {
48 'https://github.com/phpmyadmin/phpmyadmin/tree/'
49 . $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_BRANCH')
51 . '" rel="noopener noreferrer" target="_blank">' . $branch . '</a>';
53 if ($branch !== false) {
54 $branch = sprintf(__('%1$s from %2$s branch'), $commit_hash, $branch);
56 $branch = $commit_hash . ' (' . __('no branch') . ')';
59 $committer = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITTER');
60 $author = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_AUTHOR');
62 __('Git revision:') . ' '
63 . $branch . ',<br /> '
65 __('committed on %1$s by %2$s'),
66 PMA\libraries\Util
::localisedDate(strtotime($committer['date'])),
67 '<a href="' . PMA_linkURL(
68 'mailto:' . htmlspecialchars($committer['email'])
70 . htmlspecialchars($committer['name']) . '</a>'
72 . ($author != $committer
75 __('authored on %1$s by %2$s'),
76 PMA\libraries\Util
::localisedDate(strtotime($author['date'])),
77 '<a href="' . PMA_linkURL(
78 'mailto:' . htmlspecialchars($author['email'])
80 . htmlspecialchars($author['name']) . '</a>'
83 'li_pma_version_git', null, null, null