/[drupal]/contributions/modules/bookmarks/bookmarks.install
ViewVC logotype

Diff of /contributions/modules/bookmarks/bookmarks.install

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

revision 1.3.2.2 by darthclue, Wed Dec 24 20:14:59 2008 UTC revision 1.3.2.3 by darthclue, Fri Jan 23 16:14:35 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: bookmarks.install,v 1.3.2.1 2008/12/17 17:40:38 darthclue Exp $  // $Id: bookmarks.install,v 1.3.2.2 2008/12/24 20:14:59 darthclue Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 13  function bookmarks_install() { Line 13  function bookmarks_install() {
13    // Create tables.    // Create tables.
14    drupal_install_schema('bookmarks');    drupal_install_schema('bookmarks');
15    $ret = array();    $ret = array();
16    $ret[] = update_sql("INSERT INTO {menu_bookmarks} VALUES ('defaults','Defaults','The default bookmarks for all users.  This list will be used to pre-populate bookmarks for new users.')");    $ret[] = update_sql("INSERT INTO {menu_bookmarks} VALUES ('bookmarks-defaults','Defaults','The default bookmarks for all users.  This list will be used to pre-populate bookmarks for new users.')");
17      $ret[] = update_sql("INSERT INTO {menu_bookmarks} VALUES ('bookmarks-presets','Presets','The preset bookmarks for all users.  This list will be used to provide a list or presets for all users.')");
18    return $ret;    return $ret;
19  }  }
20    
# Line 33  function bookmarks_uninstall() { Line 34  function bookmarks_uninstall() {
34   */   */
35  function bookmarks_update_6100() {  function bookmarks_update_6100() {
36    $ret = array();    $ret = array();
37    $ret[] = update_sql("INSERT INTO {menu_bookmarks} VALUES ('defaults','Defaults','The default bookmarks for all users.  This list will be used to pre-populate bookmarks for new users.')");    $ret[] = update_sql("INSERT INTO {menu_bookmarks} VALUES ('bookmarks-defaults','Defaults','The default bookmarks for all users.  This list will be used to pre-populate bookmarks for new users.')");
38      return $ret;
39    }
40    
41    /**
42     * Implementation of hook_Update_N().
43     */
44    function bookmarks_update_6200() {
45      $ret = array();
46      if (db_result(db_query("SELECT count(1) as Cnt FROM {menu_bookmarks} WHERE menu_name='defaults'"))>0) {
47        $ret[] = update_sql("UPDATE {menu_bookmarks} SET menu_name='bookmarks-defaults' WHERE menu_name='defaults'");
48        $ret[] = update_sql("UPDATE {menu_links} SET menu_name='bookmarks-defaults' WHERE menu_name='defaults'");
49      }
50      else {
51        $ret[] = update_sql("INSERT INTO {menu_bookmarks} VALUES ('bookmarks-defaults','Defaults','The default bookmarks for all users.  This list will be used to pre-populate bookmarks for new users.')");
52      }
53      $ret[] = update_sql("INSERT INTO {menu_bookmarks} VALUES ('bookmarks-presets','Presets','The preset bookmarks for all users.  This list will be used to provide a list of presets for all users.')");
54    return $ret;    return $ret;
55  }  }
56    

Legend:
Removed from v.1.3.2.2  
changed lines
  Added in v.1.3.2.3

  ViewVC Help
Powered by ViewVC 1.1.3