Changeset 25259
- Timestamp:
- 11/25/2007 08:39:15 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
subscribe-to-comments/trunk/subscribe-to-comments.php
r14273 r25259 334 334 335 335 function subscriptions_from_post($postid) { 336 if ( is_array($this->post_subscriptions) ) 337 return $this->post_subscriptions; 336 $postid = (int) $postid; 337 if ( is_array($this->post_subscriptions[ $postid ]) ) 338 return $this->post_subscriptions[ $postid ]; 338 339 global $wpdb; 339 $postid = (int) $postid;340 340 $this->post_subscriptions = $wpdb->get_results("SELECT comment_author_email FROM $wpdb->comments WHERE comment_post_ID = '$postid' AND comment_subscribe='Y' AND comment_author_email != '' AND comment_approved = '1' GROUP BY LCASE(comment_author_email)"); 341 341 $subscribed_without_comment = get_post_meta($postid, '_sg_subscribe-to-comments'); 342 342 foreach ( (array) $subscribed_without_comment as $email ) 343 $this->post_subscriptions[ ]->comment_author_email = $email;344 return $this->post_subscriptions ;343 $this->post_subscriptions[ $postid ][]->comment_author_email = $email; 344 return $this->post_subscriptions[ $postid ]; 345 345 } 346 346
Note:
See TracChangeset
for help on using the changeset viewer.