? 6-validate.patch ? 6-x-conf-ignore.patch ? 692772-warnings.patch ? 698566-domain-content.patch ? 710712-vbo.patch ? test.patch ? domain_content/contributions-modules-domain-698566.patch Index: API.php =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/domain/API.php,v retrieving revision 1.51 diff -u -p -r1.51 API.php --- API.php 1 Nov 2009 18:20:19 -0000 1.51 +++ API.php 13 Feb 2010 20:44:09 -0000 @@ -319,18 +319,29 @@ function hook_domainform(&$form) { * may have values that vary on each domain. * * @return - * An array of form_id values representing forms that require warnings. + * An associative array where the keys form_id values representing forms + * that require warnings. The value should return a link for where the + * form may be set for the current domain. If no link exists, you should + * pass NULL as the value. + * + * These values are subject to token replacement, using the syntax + * %value, where %NAME may be any element of the $_domain array. * * @ingroup domain_hooks */ function hook_domainwarnings() { // These are the forms for variables set by Domain Conf. - return array( + $forms = array( 'system_admin_theme_settings', 'system_date_time_settings', 'system_site_information_settings', 'system_site_maintenance_settings' ); + $return = array(); + foreach ($forms as $key) { + $return[$key] = 'admin/build/domain/path/%domain_id'; + } + return $return; } /** Index: domain.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain.module,v retrieving revision 1.134.2.6 diff -u -p -r1.134.2.6 domain.module --- domain.module 13 Feb 2010 20:17:26 -0000 1.134.2.6 +++ domain.module 13 Feb 2010 20:44:12 -0000 @@ -2218,17 +2218,39 @@ function domain_batch_validate($values) function domain_warning_check($form_id) { static $_warning; // If $_POST is set, we are submitting the form and should not set a message. - if (!$_POST && empty($_warning)) { + if (empty($_POST) && empty($_warning)) { global $_domain; // Add the list of forms $forms = array(); $forms = module_invoke_all('domainwarnings'); - if ($form_id == 'domain_batch_form' || (arg(2) != 'domain' && in_array($form_id, $forms))) { + // Catch the API change. + foreach ($forms as $key => $value) { + if (is_numeric($key)) { + $forms[$value] = ''; + unset($forms[$key]); + } + } + if ($form_id == 'domain_batch_form' || (arg(2) != 'domain' && in_array($form_id, array_keys($forms)))) { $default = domain_default(); - if ($_domain['domain_id'] != $default['domain_id']) { - $_path = domain_get_uri($default); - drupal_set_message(t('You are viewing #this. This form may need to be entered from !domain', array('#this' => $_domain['subdomain'], '!url' => $_path, '!domain' => $default['subdomain']))); + if ($_domain['domain_id'] == $default['domain_id']) { + return; + } + $link_text = ''; + $link = $forms[$form_id]; + if (!empty($link)) { + $elements = array(); + foreach ($_domain as $key => $value) { + if (!is_array($value)) { + $elements[$key] = $value; + } + } + $replace = explode('|', '%'. implode('|%', array_keys($elements))); + $values = explode('|', implode('|', $elements)); + $link = str_replace($replace, $values, $link); + $link_text = t('You may submit changes to the current domain at %link.', array('!url' => url($link), '%link' => $link)); } + $_path = domain_get_uri($default); + drupal_set_message(t('This form submits changes to your primary domain and may need to be entered from !domain. !link', array('#this' => $_domain['subdomain'], '!url' => $_path, '!domain' => $default['subdomain'], '!link' => $link_text)), 'warning', FALSE); } $_warning = TRUE; } Index: domain_conf/domain_conf.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_conf/domain_conf.module,v retrieving revision 1.53.2.2 diff -u -p -r1.53.2.2 domain_conf.module --- domain_conf/domain_conf.module 13 Feb 2010 16:24:14 -0000 1.53.2.2 +++ domain_conf/domain_conf.module 13 Feb 2010 20:44:13 -0000 @@ -147,7 +147,7 @@ function domain_conf_domainlinks($domain */ function domain_conf_domainwarnings() { // These are the forms for variables set by Domain Conf. - return array( + $forms = array( 'system_admin_theme_settings', 'system_date_time_settings', 'system_performance_settings', @@ -156,6 +156,11 @@ function domain_conf_domainwarnings() { 'locale_languages_overview_form', 'menu_configure', ); + $return = array(); + foreach ($forms as $form) { + $return[$form] = 'admin/build/domain/conf/%domain_id'; + } + return $return; } /** Index: domain_theme/domain_theme.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/domain/domain_theme/Attic/domain_theme.module,v retrieving revision 1.19.2.1 diff -u -p -r1.19.2.1 domain_theme.module --- domain_theme/domain_theme.module 13 Feb 2010 16:24:14 -0000 1.19.2.1 +++ domain_theme/domain_theme.module 13 Feb 2010 20:44:14 -0000 @@ -259,10 +259,15 @@ function domain_theme_batch($values) { * Implement hook_domainwarnings() */ function domain_theme_domainwarnings() { - return array( + $forms = array( 'system_themes_form', 'system_theme_settings', ); + $return = array(); + foreach ($forms as $form) { + $return[$form] = 'admin/build/domain/theme/%domain_id'; + } + return $return; } /**