| 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 |
| 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 |
|
|
| 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 |
|
|