Changeset 84 for trunk/lib/NodeHeirarchy.inc.php
- Timestamp:
- Apr 8, 2006 3:15:27 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/NodeHeirarchy.inc.php
r83 r84 342 342 * @return string The parents as an array of serialized node identifiers. 343 343 */ 344 function getParents($child_type=null, $child_id=null )344 function getParents($child_type=null, $child_id=null, $type_constraint=null, $order='') 345 345 { 346 346 if (!isset($child_type) || !isset($child_id)) { … … 352 352 return false; 353 353 } 354 } 355 356 $in_clause = ''; 357 if (isset($type_constraint)) { 358 if (!is_array($type_constraint)) { 359 $type_constraint = array($type_constraint); 360 } 361 $in_clause = "AND parent_type IN ('" . join("','", array_map('addslashes', $type_constraint)) . "')"; 354 362 } 355 363 … … 359 367 WHERE child_type = '" . addslashes($child_type) . "' 360 368 AND child_id = '" . addslashes($child_id) . "' 369 $in_clause 370 " . addslashes($order) . " 361 371 "); 362 372
Note: See TracChangeset
for help on using the changeset viewer.