Index: cdn.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cdn/cdn.admin.inc,v
retrieving revision 1.14
diff -u -F '^f' -r1.14 cdn.admin.inc
--- cdn.admin.inc	23 Aug 2010 10:11:07 -0000	1.14
+++ cdn.admin.inc	23 Aug 2010 12:24:14 -0000
@@ -88,6 +88,8 @@ function cdn_admin_general_settings_form
     '#dependency'    => array('radio:' . CDN_STATUS_VARIABLE => array(CDN_TESTING, CDN_ENABLED)),
   );
 
+  $form['#submit'] = array('cdn_admin_settings_submit_show_cache_warning');
+
   return system_settings_form($form);
 }
 
@@ -273,6 +275,26 @@ function cdn_admin_advanced_settings_for
   }
 }
 
+/**
+ * Submit callback for all settings forms, that shows a warning whenever
+ * settings have been changed: the caches might need to be cleared.
+ */
+function cdn_admin_settings_submit_show_cache_warning($form, &$form_state) {
+  drupal_set_message(t('You have just changed some settings. This might affect
+                        the file URLs that have been cached in nodes, views,
+                        or elsewhere.<br />
+                        You now may want to clear the cached data, to ensure
+                        the new CDN file URLs are used immediately. This can
+                        be done in the <a href="!link">"Clear cached data"
+                        field set</a> in the "Performance" settings form.',
+                        array(
+                          '!link' => url('admin/settings/performance', array('fragment' => 'clear-cache'))
+                        )
+                      ),
+                      'info'
+  );
+}
+
 
 //----------------------------------------------------------------------------
 // Private functions.
Index: cdn.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cdn/cdn.module,v
retrieving revision 1.47
diff -u -F '^f' -r1.47 cdn.module
--- cdn.module	23 Aug 2010 12:05:10 -0000	1.47
+++ cdn.module	23 Aug 2010 12:24:15 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: cdn.module,v 1.47 2010/08/23 12:05:10 wimleers Exp $
+// $Id: cdn.module,v 1.46 2010/08/23 10:23:44 wimleers Exp $
 
 /**
  * @file
@@ -168,6 +168,15 @@ function cdn_perm() {
 }
 
 /**
+ * Implementation of hook_form_alter().
+ */
+function cdn_form_system_performance_settings_alter(&$form, &$form_state) {
+  // Add an id to the "Clear cached data" fieldset in the
+  // "system_performance_settings" form, so we can link to it directly.
+  $form['clear_cache']['#attributes']['id'] = 'clear-cache';
+}
+
+/**
  * Implementation of hook_theme().
  */
 function cdn_theme() {
