A method for knowing the current website?

Hi all,
Is there a method to get back the name of the current website?
Thanks

What do you mean exactly?

Are you tracking multiple sites with one Piwik-installation? In this case you can see the current site in the upper right corner of your dashboard:[attachment=117:piwik.gif]

I’m developing a plugin and i would like to display the name of the current website inside.

JavaScript

    siteName = piwik.siteName;

PHP

    $idSite = Piwik_Common::getRequestVar('idSite');
    $site = new Piwik_Site($idSite);
    $siteName = $site->getName();