| 1 |
<?php |
<?php |
| 2 |
// $Id: core.inc,v 1.1.2.10 2009/05/09 12:45:16 dman Exp $ |
// $Id: core.inc,v 1.1.2.11 2009/05/09 14:16:30 dman Exp $ |
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 5 |
* Basic per-module functionality used by import_html. |
* Basic per-module functionality used by import_html. |
| 260 |
$p_path = dirname($path); // parent path |
$p_path = dirname($path); // parent path |
| 261 |
|
|
| 262 |
if ($p_path == dirname($p_path)) { |
if ($p_path == dirname($p_path)) { |
| 263 |
debug(" |
import_html_debug(" |
| 264 |
Looping menu path, this is either a recursion error (illegal paths), |
Hit topmost menu path '$p_path', this is either caused by creating a new menu tree |
| 265 |
or caused by creating a new menu tree from the bottom up and we just |
from the bottom up and we just reached the top, |
| 266 |
reached the top. |
or a recursion error (illegal paths). |
| 267 |
Although a menu structure for this page is now built, it may be hard |
", array(), WATCHDOG_INFO); |
|
to navigate to child pages if the parent doesn't exist. |
|
|
This can be fixed by importing the parents first or creating section header content. |
|
|
", 2); |
|
| 268 |
|
|
| 269 |
$parent = $root_parent; |
$parent = $root_parent; |
| 270 |
} |
} |
| 285 |
return FALSE; |
return FALSE; |
| 286 |
} |
} |
| 287 |
|
|
| 288 |
|
if ($path == '.') { |
| 289 |
|
return $root_parent; |
| 290 |
|
} |
| 291 |
|
|
| 292 |
import_html_debug("Creating a placeholder menu item for $path. Parent was found to be item {$parent['mlid']}", array(), WATCHDOG_INFO); |
import_html_debug("Creating a placeholder menu item for $path. Parent was found to be item {$parent['mlid']}", array(), WATCHDOG_INFO); |
| 293 |
$menu_link_item = import_html_create_placeholder_menu_item($path, $profile, $parent); |
$menu_link_item = import_html_create_placeholder_menu_item($path, $profile, $parent); |
| 294 |
|
|
| 295 |
if (empty($menu_link_item)) { |
if (empty($menu_link_item)) { |
| 296 |
trigger_error("Failed to create placeholder menu item ($path, $title, $parent) ", E_USER_ERROR); |
trigger_error("Failed to create placeholder menu item ($path, $parent) ", E_USER_ERROR); |
| 297 |
return NULL; |
return NULL; |
| 298 |
} |
} |
| 299 |
|
|