/[drupal]/contributions/modules/seo_checklist/seochecklist.install
ViewVC logotype

Diff of /contributions/modules/seo_checklist/seochecklist.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.7, Thu Oct 22 23:58:31 2009 UTC revision 1.1.2.8, Wed Oct 28 16:06:55 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: seochecklist.install,v 1.1.2.6 2009/10/22 23:23:34 davereid Exp $  // $Id: seochecklist.install,v 1.1.2.7 2009/10/22 23:58:31 davereid Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 141  function seochecklist_uninstall() { Line 141  function seochecklist_uninstall() {
141    variable_del('seo_checklist_link');    variable_del('seo_checklist_link');
142    variable_del('seo_checklist_thanks');    variable_del('seo_checklist_thanks');
143    variable_del('seo_checklist_podcast');    variable_del('seo_checklist_podcast');
144    }
145    
146    /**
147     * Update from 5.x-1.x to 5.x-2.x.
148     */
149    function seochecklist_update_5001() {
150      $ret = array();
151    
152      $query = db_query("SELECT linked_seo FROM {seo_checklist} ORDER BY id DESC LIMIT 1");
153      $result = db_fetch_object($query);
154      variable_set('seo_checklist_link', intval($result->linked_seo));
155    
156      $query = db_query("SELECT extra2, extra3 FROM {seo_checklist} WHERE id = 1");
157      $result = db_fetch_object($query);
158      variable_set('seo_checklist_thanks', intval($result->extra2));
159      variable_set('seo_checklist_podcast', intval($result->extra3));
160    
161      switch ($GLOBALS['db_type']) {
162        case 'mysql':
163        case 'mysqli':
164          $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP extra2");
165          $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP extra3");
166          $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP linked_seo");
167          $ret[] = update_sql("ALTER TABLE {seo_group} DROP subgroup");
168          break;
169        case 'pgsql':
170          $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN extra2");
171          $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN extra3");
172          $ret[] = update_sql("ALTER TABLE {seo_checklist} DROP COLUMN linked_seo");
173          $ret[] = update_sql("ALTER TABLE {seo_group} DROP COLUMN subgroup");
174          break;
175      }
176    
177      $ret[] = update_sql("DROP TABLE {seo_subgroup}");
178    
179      return $ret;
180  }  }
181    
182  /**  /**

Legend:
Removed from v.1.1.2.7  
changed lines
  Added in v.1.1.2.8

  ViewVC Help
Powered by ViewVC 1.1.2