Opened 11 years ago

Closed 11 years ago

#1177 closed enhancement (no action needed)

Is there a way to get Xinha version to other apps/scripts?

Reported by: guest Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: normal Keywords:


This is just a suggestion for a feature I realized I was missing.

To make it easy to build scripts that could create config-files etc, It seems to me a necceccity to be able to know what version of Xinha it will interact with, especially since there is Safari support coming, and I think it's very user friendly to start Xinha if the user can use it without errors.

I've been looking, but I haven't found a simple way for me to get the Xinha version number into a (in my case) php-script.

If ther is a way, it would be nice to know, and if there isn't maybe just a file named version.txt with the current version/build/whatever in a clear syntax

Change History (1)

comment:1 Changed 11 years ago by ray

  • Milestone 0.96 deleted
  • Resolution set to no action needed
  • Status changed from new to closed

In Javascript there is the Xinha.version object that has some information about this including the revision number in Xinha.version.Revision. This is the most reliable, as it is updated automatically by Subversion. From PHP you can get it like this

        $x = file_get_contents('XinhaCore.js');
        preg_match('/\$LastChangedRevision: (\d+) \$/', $x, $m);
        $xinha_revision = $m[1];

Note: See TracTickets for help on using tickets.