Parent Directory
|
Revision Log
|
Revision Graph
|
Patch
| revision 1.5.2.7 by darthclue, Sun Jan 25 04:06:05 2009 UTC | revision 1.5.2.8 by darthclue, Sun Jun 21 01:54:02 2009 UTC | |
|---|---|---|
| # | Line 1 | Line 1 |
| 1 | <?php | <?php |
| 2 | // $Id: bookmarks.admin.inc,v 1.5.2.4 2009/01/20 15:02:42 darthclue Exp $ | // $Id: bookmarks.admin.inc,v 1.5.2.7 2009/01/25 04:06:05 darthclue Exp $ |
| 3 | ||
| 4 | /** | /** |
| 5 | * @file | * @file |
| # | Line 331 function bookmarks_edit_item(&$form_stat | Line 331 function bookmarks_edit_item(&$form_stat |
| 331 | if ($type == 'addpage') { | if ($type == 'addpage') { |
| 332 | // This is an add this page form, initialize the menu link. | // This is an add this page form, initialize the menu link. |
| 333 | $item = array('link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => $menu['menu_name'], 'weight' => 0, 'link_path' => '', 'options' => array(), 'module' => 'bookmarks', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0, 'newwindow' => 0); | $item = array('link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => $menu['menu_name'], 'weight' => 0, 'link_path' => '', 'options' => array(), 'module' => 'bookmarks', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0, 'newwindow' => 0); |
| 334 | $item['link_path']=drupal_get_normal_path(drupal_get_path_alias(str_replace('bookmarks/item/addpage/', '', $_GET['q']))); | $item['link_path']=base64_decode(drupal_get_normal_path(drupal_get_path_alias(str_replace('bookmarks/item/addpage/', '', $_GET['q'])))); |
| 335 | $menu_item = menu_get_item($item['link_path']); | $menu_item = menu_get_item($item['link_path']); |
| 336 | $item['link_title'] = $menu_item['title']; | $item['link_title'] = $menu_item['title']; |
| 337 | } | } |
| # | Line 726 function _bookmarks_add_preset($item, $p | Line 726 function _bookmarks_add_preset($item, $p |
| 726 | $item = menu_link_load($item['mlid']); | $item = menu_link_load($item['mlid']); |
| 727 | global $user; | global $user; |
| 728 | ||
| 729 | db_query("INSERT INTO {menu_links} (menu_name, plid, link_path, router_path, link_title, options, module, hidden, external, has_children, expanded, weight, depth, customized, p1, p2, p3, p4, p5, p6, p7, p8, p9, updated) SELECT 'bookmarks-%d', %d, link_path, router_path, link_title, options, 'bookmarks', hidden, external, has_children, expanded, 0, %d, customized, %d, %d, %d, %d, %d, %d, %d, %d, %d, updated FROM menu_links WHERE mlid=%d", $user->uid, $plid['p1'], $depth, $plid['p1'], $plid['p2'], $plid['p3'], $plid['p4'], $plid['p5'], $plid['p6'], $plid['p7'], $plid['p8'], $plid['p9'], $item['mlid']); | db_query("INSERT INTO {menu_links} (menu_name, plid, link_path, router_path, link_title, options, module, hidden, external, has_children, expanded, weight, depth, customized, p1, p2, p3, p4, p5, p6, p7, p8, p9, updated) SELECT 'bookmarks-%d', %d, link_path, router_path, link_title, options, 'bookmarks', hidden, external, has_children, expanded, 0, %d, customized, %d, %d, %d, %d, %d, %d, %d, %d, %d, updated FROM {menu_links} WHERE mlid=%d", $user->uid, $plid['p1'], $depth, $plid['p1'], $plid['p2'], $plid['p3'], $plid['p4'], $plid['p5'], $plid['p6'], $plid['p7'], $plid['p8'], $plid['p9'], $item['mlid']); |
| 730 | ||
| 731 | ||
| 732 | //There's got to be a better way to do this. | //There's got to be a better way to do this. |
| # | Line 760 function _bookmarks_add_preset($item, $p | Line 760 function _bookmarks_add_preset($item, $p |
| 760 | if ($item['has_children']) { | if ($item['has_children']) { |
| 761 | $depth++; | $depth++; |
| 762 | ||
| 763 | $result = db_query("SELECT mlid FROM menu_links WHERE plid=%d", $item['mlid']); | $result = db_query("SELECT mlid FROM {menu_links} WHERE plid=%d", $item['mlid']); |
| 764 | while ($mnu = db_fetch_object($result)) { | while ($mnu = db_fetch_object($result)) { |
| 765 | _bookmarks_add_preset(array('mlid' => $mnu->mlid), $plid, $depth); | _bookmarks_add_preset(array('mlid' => $mnu->mlid), $plid, $depth); |
| 766 | } | } |
|
||||||||
| ViewVC Help | |
| Powered by ViewVC 1.1.3 |