Changeset 2296
- Timestamp:
- 12/13/10 11:33:52 (18 months ago)
- Location:
- branches/1.5/libs
- Files:
-
- 1 removed
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/libs/Post.php
r2168 r2296 169 169 $h->db->query($h->db->prepare($sql, $date, $last_insert_id)); 170 170 } 171 172 // Add tags to the Tags table: 173 require_once(LIBS . 'Tags.php'); 174 $tags = new TagFunctions(); 175 $tags->addTags($h, $this->id, $this->tags); 176 171 177 172 $h->pluginHook('post_add_post'); 178 173 … … 203 198 $h->post->id = $this->id; // a small hack to get the id for use in plugins. 204 199 205 // Update tags in the Tags table:206 $tags = new TagFunctions();207 $tags->deleteTags($h, $this->id); // delete existing tags208 $tags->addTags($h, $this->id, $this->tags); // insert new or updated tags209 210 200 $h->pluginHook('post_update_post'); 211 201 … … 218 208 * 219 209 * There's a plugin hook in here to delete their parts, e.g. votes, coments, tags, etc. 220 */ 210 */ 221 211 public function deletePost($h) 222 212 { … … 227 217 228 218 $h->post->id = $this->id; // a small hack to get the id for use in plugins. 229 230 // Delete tags from the Tags table:231 require_once(LIBS . 'Tags.php');232 $tags = new TagFunctions();233 $tags->deleteTags($h, $this->id); // delete existing tags234 219 235 220 $h->pluginHook('post_delete_post');