Changeset 1015:10227e338321 for inc
- Timestamp:
- 11/17/12 14:19:52 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.blog.php
r970 r1015 1339 1339 1340 1340 /** 1341 Updates posts category. <var>$new_cat_id</var> can be null. 1342 1343 @param old_cat_id <b>integer</b> Old category ID 1344 @param new_cat_id <b>integer</b> New category ID 1345 */ 1346 public function updPostsCategory($old_cat_id,$new_cat_id) 1347 { 1348 if (!$this->core->auth->check('contentadmin,categories',$this->id)) { 1349 throw new Exception(__('You are not allowed to change entries category')); 1350 } 1351 1352 $old_cat_id = (integer) $old_cat_id; 1353 $new_cat_id = (integer) $new_cat_id; 1354 1355 $cur = $this->con->openCursor($this->prefix.'post'); 1356 1357 $cur->cat_id = ($new_cat_id ? $new_cat_id : null); 1358 $cur->post_upddt = date('Y-m-d H:i:s'); 1359 1360 $cur->update( 1361 'WHERE cat_id = '.$old_cat_id.' '. 1362 "AND blog_id = '".$this->con->escape($this->id)."' " 1363 ); 1364 $this->triggerBlog(); 1365 } 1366 1367 /** 1341 1368 Deletes a post. 1342 1369
Note: See TracChangeset
for help on using the changeset viewer.