domain_content_view($domain_id = NULL, $all_affiliates = FALSE)
domain_content/domain_content.module, line 143
Content administration for a specific domain. This callback puts the user on the current domain and then fetches the appropirate content for batch editing.
$domain_id The unique identifier for the currently active domain.
$all_affiliates A boolean flag that indicates whether to grant the domain_site node access realm for this content view.
A link group for each domain the user can access.
function domain_content_view($domain_id = NULL, $all_affiliates = FALSE) {
global $_domain;
// For users with limited privileges, we have to be on the same server
// as the content we are looking up. Will return -1 if it fails.
$domain = domain_lookup($domain_id);
domain_goto($domain);
// Override the $_domain global so we can see the appropriate content
if (!is_null($domain_id)) {
$_domain['site_grant'] = FALSE;
drupal_set_title(t('Content for !domain', array('!domain' => $_domain['sitename'])));
}
else if ($all_affiliates) {
$_domain['site_grant'] = TRUE;
drupal_set_title(t('Content for all affiliate sites'));
}
// KILLSWITCH CASE: returns an error
else {
drupal_set_message(t('Invalid request'), 'error');
$output = t('<p>The specified domain does not exist.</p>');
return $output;
}
$output .= domain_content_admin();
return $output;
}