diff --git a/class2.php b/class2.php index 70c6f4a12..a9b59ca9c 100644 --- a/class2.php +++ b/class2.php @@ -631,6 +631,22 @@ define('SITEDISCLAIMER', $tp->toHTML($pref['sitedisclaimer'], '', 'emotes_off,de define('SITECONTACTINFO', $tp->toHTML($pref['sitecontactinfo'], true, 'emotes_off,defs')); define('SITEEMAIL', vartrue($pref['replyto_email'],$pref['siteadminemail'])); +if(is_array($pref['xurl'])) +{ + define('XURL_FACEBOOK', vartrue($pref['xurl']['facebook'], false)); + define('XURL_TWITTER', vartrue($pref['xurl']['twitter'], false)); + define('XURL_YOUTUBE', vartrue($pref['xurl']['youtube'], false)); + define('XURL_GOOGLE', vartrue($pref['xurl']['google'], false)); + define('XURL_LINKEDIN', vartrue($pref['xurl']['linkedin'], false)); +} +else +{ + define('XURL_FACEBOOK',false); + define('XURL_TWITTER', false); + define('XURL_YOUTUBE', false); + define('XURL_GOOGLE', false); + define('XURL_LINKEDIN', false); +} /* Withdrawn 0.8 // legacy module.php file loading. diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index 8c9d813dc..00354db61 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -2984,25 +2984,6 @@ class e107 define('e_LOGIN', SITEURL.(file_exists(e_BASE.'customlogin.php') ? 'customlogin.php' : 'login.php')); } - $p = e107::getPref(); - - if(varset($p['xurl']) && is_array($p['xurl'])) // avoid fatal errors if pref missing. - { - $pref = $p['xurl']; - define('XURL_FACEBOOK', vartrue($pref['facebook'],false)); - define('XURL_TWITTER', vartrue($pref['twitter'],false)); - define('XURL_YOUTUBE', vartrue($pref['youtube'],false)); - define('XURL_GOOGLE', vartrue($pref['google'],false)); - define('XURL_LINKEDIN', vartrue($pref['linkedin'],false)); - } - else - { - define('XURL_FACEBOOK',false); - define('XURL_TWITTER', false); - define('XURL_YOUTUBE', false); - define('XURL_GOOGLE', false); - define('XURL_LINKEDIN', false); - } return $this; }