The Mage::getVersion()
method is defined here
#File: app/Mage.php
public static function getVersion()
{
$i = self::getVersionInfo();
return trim("{$i['major']}.{$i['minor']}.{$i['revision']}" . ($i['patch'] != '' ? ".{$i['patch']}" : "")
. "-{$i['stability']}{$i['number']}", '.-');
}
Jumping to the getVersionInfo
referenced above, we find the following
#File: app/Mage.php
public static function getVersionInfo()
{
return array(
'major' => '1',
'minor' => '7',
'revision' => '0',
'patch' => '2',
'stability' => '',
'number' => '',
);
}
So, Magento uses the array returned by the getVersionInfo
method to come up with a version number. We can do so manually (with our minds), and come up with the version 1.7.0.2 for the method listed above. If we found
public static function getVersionInfo()
{
return array(
'major' => '1',
'minor' => '5',
'revision' => '0',
'patch' => '0',
'stability' => 'beta',
'number' => '1',
);
}
We'd know the version was the 1st beta of 1.5.0.0.
That said, if the site's been hacked, all bets are off — as hackers have likely modified multiple class files and create a version of Magento that doesn't exist.