Changeset 1532:f6c9584b4677 for inc/core
- Timestamp:
- 08/23/13 13:16:14 (12 years ago)
- Branch:
- default
- Location:
- inc/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.blog.php
r1468 r1532 555 555 $this->triggerBlog(); 556 556 } 557 558 /** 559 Set category position 560 561 @param id <b>integer</b> Category ID 562 @param left <b>integer</b> Category ID before 563 @param right <b>integer</b> Category ID after 564 */ 565 public function updCategoryPosition($id,$left,$right) 566 { 567 $this->categories()->updatePosition($id,$left,$right); 568 $this->triggerBlog(); 569 } 557 570 558 571 /** -
inc/core/class.dc.categories.php
r1179 r1532 188 188 } 189 189 190 public function updatePosition($id,$left,$right) 191 { 192 $sql = 'UPDATE '.$this->table.' SET ' 193 .$this->f_left.' = '.$left.', ' 194 .$this->f_right.' = '.$right 195 .' WHERE '.$this->f_id .' = '.(integer) $id 196 .$this->getCondition(); 197 198 $this->con->begin(); 199 try { 200 $this->con->execute($sql); 201 $this->con->commit(); 202 } catch (Exception $e) { 203 $this->con->rollback(); 204 throw $e; 205 } 206 } 207 190 208 public function deleteNode($node,$keep_children=true) 191 209 {
Note: See TracChangeset
for help on using the changeset viewer.