domain_check_primary($msg = 'default')Check to see if a redirect to the primary domain is needed.
If TRUE, issue a redirect and print a message.
$msg The message to print. Optional. If passed, this string must be translated and safe.
./domain.module, line 996
<?php
function domain_check_primary($msg = 'default') {
global $_domain;
$default = domain_default();
if ($_domain['domain_id'] != $default['domain_id']) {
if ($msg == 'default') {
drupal_set_message(t('You have been redirected: This page must be accessed from the primary domain.'));
}
else if (!empty($msg)) {
drupal_set_message($msg);
}
domain_goto($default);
}
}
?>