2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Displays form for password change
8 if (! defined('PHPMYADMIN')) {
13 * Prints details about the current Git commit revision
17 function PMA_printGitRevision()
19 if (! $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT')) {
20 $response = PMA_Response
::getInstance();
21 $response->isSuccess(false);
25 // load revision data from repo
26 $GLOBALS['PMA_Config']->checkGitRevision();
28 // if using a remote commit fast-forwarded, link to GitHub
29 $commit_hash = substr(
30 $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITHASH'),
34 $commit_hash = '<strong title="'
35 . htmlspecialchars($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_MESSAGE'))
36 . '">' . $commit_hash . '</strong>';
37 if ($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_ISREMOTECOMMIT')) {
38 $commit_hash = '<a href="'
40 'https://github.com/phpmyadmin/phpmyadmin/commit/'
41 . $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITHASH')
43 . '" target="_blank">' . $commit_hash . '</a>';
46 $branch = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_BRANCH');
47 if ($GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_ISREMOTEBRANCH')) {
50 'https://github.com/phpmyadmin/phpmyadmin/tree/'
51 . $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_BRANCH')
53 . '" target="_blank">' . $branch . '</a>';
55 if ($branch !== false) {
56 $branch = sprintf(__('%1$s from %2$s branch'), $commit_hash, $branch);
58 $branch = $commit_hash . ' (' . __('no branch') . ')';
61 $committer = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_COMMITTER');
62 $author = $GLOBALS['PMA_Config']->get('PMA_VERSION_GIT_AUTHOR');
64 __('Git revision:') . ' '
65 . $branch . ',<br /> '
67 __('committed on %1$s by %2$s'),
68 PMA_Util
::localisedDate(strtotime($committer['date'])),
69 '<a href="' . PMA_linkURL('mailto:' . $committer['email']) . '">'
70 . htmlspecialchars($committer['name']) . '</a>'
72 . ($author != $committer
75 __('authored on %1$s by %2$s'),
76 PMA_Util
::localisedDate(strtotime($author['date'])),
77 '<a href="' . PMA_linkURL('mailto:' . $author['email']) . '">'
78 . htmlspecialchars($author['name']) . '</a>'
81 'li_pma_version_git', null, null, null