Skip to content

Commit

Permalink
bug 2554 php warning PHPWG_URL is not defined in page_tail.inc.php
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@12875 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Jan 11, 2012
1 parent 511cbb1 commit b1ebb7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
32 changes: 7 additions & 25 deletions admin/include/functions.php
Expand Up @@ -1564,12 +1564,12 @@ function associate_categories_to_categories($sources, $destinations)
function pwg_URL()
{
$urls = array(
'HOME' => 'http://'.PHPWG_DOMAIN,
'WIKI' => 'http://'.PHPWG_DOMAIN.'/doc',
'DEMO' => 'http://'.PHPWG_DOMAIN.'/demo',
'FORUM' => 'http://'.PHPWG_DOMAIN.'/forum',
'BUGS' => 'http://'.PHPWG_DOMAIN.'/bugs',
'EXTENSIONS' => 'http://'.PHPWG_DOMAIN.'/ext',
'HOME' => PHPWG_URL,
'WIKI' => PHPWG_URL.'/doc',
'DEMO' => PHPWG_URL.'/demo',
'FORUM' => PHPWG_URL.'/forum',
'BUGS' => PHPWG_URL.'/bugs',
'EXTENSIONS' => PHPWG_URL.'/ext',
);
return $urls;
}
Expand Down Expand Up @@ -1969,25 +1969,7 @@ function get_username($user_id)
}

function get_newsletter_subscribe_base_url($language) {
$subscribe_domain = 'piwigo.org';

$domain_of = array(
'fr_FR' => 'fr.piwigo.org',
'it_IT' => 'it.piwigo.org',
'de_DE' => 'de.piwigo.org',
'es_ES' => 'es.piwigo.org',
'zh_CN' => 'cn.piwigo.org',
'pl_PL' => 'pl.piwigo.org',
'hu_HU' => 'hu.piwigo.org',
'ru_RU' => 'ru.piwigo.org',
'nl_NL' => 'nl.piwigo.org',
);

if (isset($domain_of[$language])) {
$subscribe_domain = $domain_of[$language];
}

return 'http://'.$subscribe_domain.'/announcement/subscribe/';
return PHPWG_URL.'/announcement/subscribe/';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion include/page_tail.php
Expand Up @@ -27,7 +27,7 @@
$template->assign(
array(
'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
'PHPWG_URL' => PHPWG_URL,
'PHPWG_URL' => defined('PHPWG_URL') ? PHPWG_URL : '',
));

//--------------------------------------------------------------------- contact
Expand Down

0 comments on commit b1ebb7c

Please sign in to comment.