summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.18/sites/all/modules/seo_checklist/seo_checklist.install
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.18/sites/all/modules/seo_checklist/seo_checklist.install')
-rw-r--r--kolab.org/www/drupal-7.18/sites/all/modules/seo_checklist/seo_checklist.install156
1 files changed, 79 insertions, 77 deletions
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/seo_checklist/seo_checklist.install b/kolab.org/www/drupal-7.18/sites/all/modules/seo_checklist/seo_checklist.install
index 3244159..1e72b45 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/seo_checklist/seo_checklist.install
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/seo_checklist/seo_checklist.install
@@ -33,87 +33,89 @@ function seo_checklist_uninstall() {
*/
function seo_checklist_update_7400() {
// Convert saved progress data.
- $result = db_query('SELECT id, completed, uid FROM {seo_checklist}');
- $old_data = $result->fetchAllAssoc('id');
- $data_mapping = array(
- 'install_page_title' => 1,
- 'enable_clean_urls' => 2,
- 'install_pathauto' => 5,
- 'install_globalredirect' => 6,
- 'get_google_account' => 7,
- 'install_google_analytics' => 9,
- 'create_google_analytics_analytics' => 11,
- 'input_google_analytics_code' => 12,
- 'authenticate_with_google_analytics' => 13,
- 'install_metatags_quick' => 15,
- 'install_scheduler' => 16,
- 'install_htmlpurifier' => 17,
- 'install_search404' => 18,
- 'validate_html' => 19,
- 'check_links' => 20,
- 'install_xmlsitemap' => 21,
- 'authenticate_with_google' => 23,
- 'submit_xml_sitemap_to_google' => 24,
- 'submit_xml_sitemap_to_bing' => 28,
- 'add_to_google_places' => 29,
- 'install_addthis' => 30,
- 'install_service_links' => 31,
- 'install_mollom' => 39,
- 'sign_up_for_mollom_account' => 40,
- 'authenticate_with_bing' => 43,
- 'get_windows_live_id' => 44,
- 'install_htmlpurifier' => 45,
- 'install_site_map' => 46,
- 'install_site_verify' => 47,
- 'install_addtoany' => 49,
- 'add_geo_meta_tags' => 51,
- 'install_admin_menu' => 53,
- 'enable_drupal_caching' => 54,
- 'install_boost' => 55,
- 'install_seo_checker' => 57,
- 'install_fb_social' => 58,
- 'install_follow' => 59,
- 'install_elements' => 60,
- 'install_security_review' => 61,
- 'install_read_more' => 62,
- 'install_ga_tokenizer' => 63,
- 'install_contact_google_analytics' => 64,
- 'install_context_keywords' => 65,
- );
- global $user;
- $new_data = array(
- '#changed' => $time = time(),
- '#changed_by' => $user->uid,
- '#completed_items' => 0,
- );
- $definitions = seo_checklist_checklistapi_checklist_info();
- $groups = $definitions['seo_checklist'];
- foreach (element_children($groups) as $group_key) {
- $group = &$groups[$group_key];
- foreach (element_children($group) as $item_key) {
- if (!empty($data_mapping[$item_key])) {
- $old_item = $old_data[$data_mapping[$item_key]];
- if (!empty($old_item->completed)) {
- $new_data[$item_key] = array(
- '#completed' => $old_item->completed,
- '#uid' => $old_item->uid,
- );
- $new_data['#completed_items']++;
+ if (db_table_exists('seo_checklist')) {
+ $result = db_query('SELECT id, completed, uid FROM {seo_checklist}');
+ $old_data = $result->fetchAllAssoc('id');
+ $data_mapping = array(
+ 'install_page_title' => 1,
+ 'enable_clean_urls' => 2,
+ 'install_pathauto' => 5,
+ 'install_globalredirect' => 6,
+ 'get_google_account' => 7,
+ 'install_google_analytics' => 9,
+ 'create_google_analytics_analytics' => 11,
+ 'input_google_analytics_code' => 12,
+ 'authenticate_with_google_analytics' => 13,
+ 'install_metatags_quick' => 15,
+ 'install_scheduler' => 16,
+ 'install_htmlpurifier' => 17,
+ 'install_search404' => 18,
+ 'validate_html' => 19,
+ 'check_links' => 20,
+ 'install_xmlsitemap' => 21,
+ 'authenticate_with_google' => 23,
+ 'submit_xml_sitemap_to_google' => 24,
+ 'submit_xml_sitemap_to_bing' => 28,
+ 'add_to_google_places' => 29,
+ 'install_addthis' => 30,
+ 'install_service_links' => 31,
+ 'install_mollom' => 39,
+ 'sign_up_for_mollom_account' => 40,
+ 'authenticate_with_bing' => 43,
+ 'get_windows_live_id' => 44,
+ 'install_htmlpurifier' => 45,
+ 'install_site_map' => 46,
+ 'install_site_verify' => 47,
+ 'install_addtoany' => 49,
+ 'add_geo_meta_tags' => 51,
+ 'install_admin_menu' => 53,
+ 'enable_drupal_caching' => 54,
+ 'install_boost' => 55,
+ 'install_seo_checker' => 57,
+ 'install_fb_social' => 58,
+ 'install_follow' => 59,
+ 'install_elements' => 60,
+ 'install_security_review' => 61,
+ 'install_read_more' => 62,
+ 'install_ga_tokenizer' => 63,
+ 'install_contact_google_analytics' => 64,
+ 'install_context_keywords' => 65,
+ );
+ global $user;
+ $new_data = array(
+ '#changed' => $time = time(),
+ '#changed_by' => $user->uid,
+ '#completed_items' => 0,
+ );
+ $definitions = seo_checklist_checklistapi_checklist_info();
+ $groups = $definitions['seo_checklist'];
+ foreach (element_children($groups) as $group_key) {
+ $group = &$groups[$group_key];
+ foreach (element_children($group) as $item_key) {
+ if (!empty($data_mapping[$item_key])) {
+ $old_item = $old_data[$data_mapping[$item_key]];
+ if (!empty($old_item->completed)) {
+ $new_data[$item_key] = array(
+ '#completed' => $old_item->completed,
+ '#uid' => $old_item->uid,
+ );
+ $new_data['#completed_items']++;
+ }
+ }
+ if (!isset($new_data[$item_key])) {
+ $new_data[$item_key] = 0;
}
- }
- if (!isset($new_data[$item_key])) {
- $new_data[$item_key] = 0;
}
}
+ if (variable_get('seo_checklist_link', 0)) {
+ $new_data['link_to_volacci'] = array(
+ '#completed' => $time,
+ '#uid' => $user->uid,
+ );
+ }
+ ksort($new_data);
+ variable_set('checklistapi_checklist_seo_checklist', $new_data);
}
- if (variable_get('seo_checklist_link', 0)) {
- $new_data['link_to_volacci'] = array(
- '#completed' => $time,
- '#uid' => $user->uid,
- );
- }
- ksort($new_data);
- variable_set('checklistapi_checklist_seo_checklist', $new_data);
// Remove old database tables.
foreach (array('seo_group', 'seo_checklist') as $table) {