]> git.joonet.de Git - adminer.git/commitdiff
Show version in comment (thanks to David Grudl)
authorJakub Vrana <jakub@vrana.cz>
Thu, 12 May 2011 14:21:40 +0000 (16:21 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 12 May 2011 14:21:40 +0000 (16:21 +0200)
compile.php

index a8b0384b7e2734fbdc16977b82ef29b666e5bf38..17a2e9b64179c8e43e9ab0ea383bff2f97829d21 100644 (file)
@@ -101,6 +101,7 @@ function short_identifier($number, $chars) {
 
 // based on http://latrine.dgx.cz/jak-zredukovat-php-skripty
 function php_shrink($input) {
+       global $VERSION;
        $special_variables = array_flip(array('$this', '$GLOBALS', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_SERVER'));
        $short_variables = array();
        $shortening = true;
@@ -138,6 +139,7 @@ function php_shrink($input) {
                } else {
                        if ($token[0] == T_DOC_COMMENT) {
                                $doc_comment = true;
+                               $token[1] = substr_replace($token[1], "* @version $VERSION\n", -2, 0);
                        }
                        if ($token[0] == T_VAR) {
                                $shortening = false;