New feature: shortcuts to a search result. The feature is not automatically available with upgrade of custom versions -requires a ShortcutContainerMenuNode.

SVN:trunk[2431]
This commit is contained in:
Romain Quetiez
2012-11-16 11:21:00 +00:00
parent 8f398bd130
commit 7792b54d26
14 changed files with 677 additions and 27 deletions

View File

@@ -819,5 +819,27 @@ class utils
$sUrl = self::GetAbsoluteUrlAppRoot().'env-'.self::GetCurrentEnvironment().'/';
return $sUrl;
}
/**
* Returns a name unique amongst the given list
* @param string $sProposed The default value
* @param array $aExisting An array of existing values (strings)
*/
static public function MakeUniqueName($sProposed, $aExisting)
{
if (in_array($sProposed, $aExisting))
{
$i = 1;
while (in_array($sProposed.$i, $aExisting) && ($i < 50))
{
$i++;
}
return $sProposed.$i;
}
else
{
return $sProposed;
}
}
}
?>