The pulldown list of parents shown in node edit page should use db_rewrite_sql in the selection of possible parent nodes, so other modules may filter the results.
For instance, the i18n module could filter out parents from other languages, so in the list only nodes in the same language would be shown.

This happens in the function _nodehierarchy_get_parent_pulldown_items

function _nodehierarchy_get_parent_pulldown_items( $parent_id, $types, $child_node = null, $depth = 0 ) {
  $out = array();
  //Note the order of the tables. Switched "{node} n" to the last place so the rewrite would work ok.
  $query = "SELECT * FROM {nodehierarchy} h, {node} n WHERE h.nid = n.nid AND h.parent = %d AND n.type IN (". implode( ",", $types ) .") ORDER BY n.title ASC";

  // Added db_rewrite_sql so other modules may filter the query further 
  $result = db_query(db_rewrite_sql($query),$parent_id);

  // ... rest of the function ...

Comments

ronan’s picture

Thanks for the heads-up, I'll get that taken care of as soon as I can

Ronan

ronan’s picture

Status: Active » Fixed

I've made that change in 5.x dev, thanks again

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.