Changeset 479 for trunk/lib/Hierarchy.inc.php
- Timestamp:
- May 3, 2014 11:09:03 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Hierarchy.inc.php
r468 r479 115 115 public function toStringID($child_type=null, $child_id=null) 116 116 { 117 117 $app =& App::getInstance(); 118 118 119 119 if (!isset($child_type) || !isset($child_id)) { … … 149 149 public function toArrayID(&$node) 150 150 { 151 151 $app =& App::getInstance(); 152 152 153 153 if (preg_match('/^([[:alnum:]]+)__-?([[:digit:]]+)$/', $node, $node_parts)) { … … 169 169 public function insertNode($parents, $child_type=null, $child_id=null, $relationship_type=null, $title='') 170 170 { 171 172 171 $app =& App::getInstance(); 172 $db =& DB::getInstance(); 173 173 174 174 if (!isset($child_type) || !isset($child_id)) { … … 248 248 public function deleteNode($child_type=null, $child_id=null) 249 249 { 250 251 250 $app =& App::getInstance(); 251 $db =& DB::getInstance(); 252 252 253 253 if (!isset($child_type) || !isset($child_id)) { … … 298 298 public function moveNode($new_parents=null, $child_type=null, $child_id=null, $relationship_type=null, $title='') 299 299 { 300 301 302 303 300 $app =& App::getInstance(); 301 $db =& DB::getInstance(); 302 303 if (!isset($child_type) || !isset($child_id)) { 304 304 if ($this->node_init) { 305 305 $child_type =& $this->child_type; … … 375 375 public function getParents($child_type=null, $child_id=null, $type_constraint=null, $order='') 376 376 { 377 378 377 $app =& App::getInstance(); 378 $db =& DB::getInstance(); 379 379 380 380 if (!isset($child_type) || !isset($child_id)) { … … 426 426 public function getNode($child_type=null, $child_id=null) 427 427 { 428 429 428 $app =& App::getInstance(); 429 $db =& DB::getInstance(); 430 430 431 431 if (!isset($child_type) || !isset($child_id)) { … … 470 470 public function getChildren($child_type=null, $child_id=null, $type_constraint=null, $order='') 471 471 { 472 473 472 $app =& App::getInstance(); 473 $db =& DB::getInstance(); 474 474 475 475 if (!isset($child_type) || !isset($child_id)) { … … 522 522 public function getNumberChildren($child_type=null, $child_id=null, $type_constraint=null) 523 523 { 524 525 524 $app =& App::getInstance(); 525 $db =& DB::getInstance(); 526 526 527 527 if (!isset($child_type) || !isset($child_id)) { … … 563 563 public function isLeaf($child_type=null, $child_id=null) 564 564 { 565 565 $app =& App::getInstance(); 566 566 567 567 if (!isset($child_type) || !isset($child_id)) { … … 624 624 public function getAllAncestors($child_type, $child_id, $go_linear=false, $_return_flag=true) 625 625 { 626 626 $db =& DB::getInstance(); 627 627 628 628 static $output = array(); … … 678 678 public function nodeExists($child_type=null, $child_id=null, $parent_type=null, $parent_id=null, $relationship_type=null) 679 679 { 680 681 680 $app =& App::getInstance(); 681 $db =& DB::getInstance(); 682 682 683 683 if (!isset($child_type) || !isset($child_id)) { … … 730 730 public function &getNodeList($preselected=null, $child_type=null, $child_id=null, $type_constraint=null, $include_curr=false, $order='', $_indent=0, $_return_flag=true) 731 731 { 732 732 $app =& App::getInstance(); 733 733 734 734 static $output = array(); … … 803 803 public function rebuildSubnodeQty($type_constraint=null) 804 804 { 805 805 $db =& DB::getInstance(); 806 806 807 807 // Reset all the category counters to zero. … … 827 827 public function setSubnodeQtyToParents($child_type, $child_id, $num_children) 828 828 { 829 829 $db =& DB::getInstance(); 830 830 831 831 $db->query("
Note: See TracChangeset
for help on using the changeset viewer.