mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 23:27:17 +02:00
Show version in comment (thanks to David Grudl)
This commit is contained in:
@@ -101,6 +101,7 @@ function short_identifier($number, $chars) {
|
|||||||
|
|
||||||
// based on http://latrine.dgx.cz/jak-zredukovat-php-skripty
|
// based on http://latrine.dgx.cz/jak-zredukovat-php-skripty
|
||||||
function php_shrink($input) {
|
function php_shrink($input) {
|
||||||
|
global $VERSION;
|
||||||
$special_variables = array_flip(array('$this', '$GLOBALS', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_SERVER'));
|
$special_variables = array_flip(array('$this', '$GLOBALS', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_SERVER'));
|
||||||
$short_variables = array();
|
$short_variables = array();
|
||||||
$shortening = true;
|
$shortening = true;
|
||||||
@@ -138,6 +139,7 @@ function php_shrink($input) {
|
|||||||
} else {
|
} else {
|
||||||
if ($token[0] == T_DOC_COMMENT) {
|
if ($token[0] == T_DOC_COMMENT) {
|
||||||
$doc_comment = true;
|
$doc_comment = true;
|
||||||
|
$token[1] = substr_replace($token[1], "* @version $VERSION\n", -2, 0);
|
||||||
}
|
}
|
||||||
if ($token[0] == T_VAR) {
|
if ($token[0] == T_VAR) {
|
||||||
$shortening = false;
|
$shortening = false;
|
||||||
|
Reference in New Issue
Block a user