Apply Nicco's style footer to HTML mail.

Add 2 news functions to indicate to build URL with full path

git-svn-id: http://piwigo.org/svn/trunk@1676 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2006-12-19 22:05:01 +00:00
commit a7ce261531
4 changed files with 82 additions and 24 deletions

View file

@ -396,4 +396,61 @@ function make_section_in_url($params)
return $section_string;
}
/**
* Indicate to build url with full path
*
* @param null
* @return null
*/
function set_make_full_url()
{
global $page;
if (!isset($page['save_root_path']))
{
if (isset($page['root_path']))
{
$page['save_root_path']['path'] = $page['root_path'];
}
$page['save_root_path']['count'] = 1;
$page['root_path'] = 'http://'.$_SERVER['HTTP_HOST'].cookie_path();
}
else
{
$page['save_root_path']['count'] += 1;
}
}
/**
* Restore old parameter to build url with full path
*
* @param null
* @return null
*/
function unset_make_full_url()
{
global $page;
if (isset($page['save_root_path']))
{
if ($page['save_root_path']['count'] == 1)
{
if (isset($page['save_root_path']['path']))
{
$page['root_path'] = $page['save_root_path']['path'];
}
else
{
unset($page['root_path']);
}
unset($page['save_root_path']);
}
else
{
$page['save_root_path']['count'] -= 1;
}
}
}
?>