diff --git a/webcomponents.install b/webcomponents.install index d4cdb68880be835bfa275971a39b80cf8ba529a1..fff5958d89cfd7a86fdf5a77406e5944f8d0ed29 100755 --- a/webcomponents.install +++ b/webcomponents.install @@ -148,4 +148,13 @@ function webcomponents_update_7000(&$sandbox) { */ function webcomponents_install() { _webcomponents_rebuild(TRUE); +} + +/** + * PSU CDN moved so if old valid move to the new one + */ +function webcomponents_update_7001(&$sandbox) { + if (variable_get('webcomponents_project_location', 'https://cdn.webcomponents.psu.edu/cdn/') == 'https://webcomponents.psu.edu/cdn/') { + variable_set('webcomponents_project_location', 'https://cdn.webcomponents.psu.edu/cdn/'); + } } \ No newline at end of file diff --git a/webcomponents.module b/webcomponents.module index e9d3e5e5a7a917e6c1c5c2a24b8d52287bd61e69..0ce9d29dd7e628dee0b1c33011fdb53c9eab9fbe 100755 --- a/webcomponents.module +++ b/webcomponents.module @@ -29,9 +29,9 @@ function webcomponents_admin_settings($form, &$form_state) { $form['webcomponents_project_location'] = [ '#type' => 'select', '#title' => t('Webcomponents Location'), - '#default_value' => variable_get('webcomponents_project_location', 'https://webcomponents.psu.edu/cdn/'), + '#default_value' => variable_get('webcomponents_project_location', 'https://cdn.webcomponents.psu.edu/cdn/'), '#options' => array( - 'https://webcomponents.psu.edu/cdn/' => 'Penn State CDN', + 'https://cdn.webcomponents.psu.edu/cdn/' => 'Penn State CDN', 'https://cdn.waxam.io/' => 'Waxam CDN', 'sites/all/libraries/webcomponents/' => 'Local libraries folder (sites/all/libraries/webcomponents/)', 'other' => t('Other'), @@ -52,7 +52,7 @@ function webcomponents_admin_settings($form, &$form_state) { * Implements hook_process_html(). */ function webcomponents_process_html(&$variables) { - $location = variable_get('webcomponents_project_location', 'https://webcomponents.psu.edu/cdn/'); + $location = variable_get('webcomponents_project_location', 'https://cdn.webcomponents.psu.edu/cdn/'); if ($location == 'other') { $location = variable_get('webcomponents_project_location_other', ''); }