Changeset 636700
- Timestamp:
- 12/10/2012 06:58:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
facebook-awd-seo-comments/trunk/inc/classes/class.AWD_facebook_comments_base.php
r633274 r636700 183 183 { 184 184 $this->comments_infos = get_transient($this->AWD_facebook->plugin_option_pref . 'cache_fb_comments_infos_' . $this->wp_post_id); 185 185 186 $this->comments_count = $this->comments_infos['comments_count'] > 0 ? $this->comments_infos['comments_count'] : 0; 187 186 188 $this->comments_id = $this->comments_infos['comments_id'] > 0 ? $this->comments_infos['comments_id'] : 0; 189 187 190 $this->comments_array = get_transient($this->AWD_facebook->plugin_option_pref . 'cache_fb_comments_array' . $this->wp_post_id); 188 $this->comments_array = count($this->comments_array) > 0 ? $this->comments_array : array(); 191 $this->comments_array = count($this->comments_array) > 0 && is_array($this->comments_array) ? $this->comments_array : array(); 192 189 193 $this->comments_status = get_transient($this->AWD_facebook->plugin_option_pref . 'cache_fb_comments_status' . $this->wp_post_id); 190 194 $this->comments_status = $this->comments_status > 0 ? $this->comments_status : 0; … … 203 207 $action = $_REQUEST['action']; 204 208 if ($this->comments_url != '') { 205 if ($this->wp_post_id != '') { 209 if ($this->wp_post_id != '') { 206 210 //know if we want cache comments or not 207 if ($this->AWD_facebook->options['seo_comments']['cache'] != "0" && $action != 'clear_fb_cache') { 211 if ($this->AWD_facebook->options['seo_comments']['cache'] != "0" && $action != 'clear_fb_cache') { 208 212 $this->get_comments_from_cache(); 209 $must_fetch = $this->comments_status != 1 || ($this->comments_count > 0 && count($this->comments_array)) == 0;213 $must_fetch = $this->comments_status != 1 || ($this->comments_count > 0 && count($this->comments_array) == 0); 210 214 if ($must_fetch) { 211 215 $response = $this->get_comments_by_url();
Note: See TracChangeset
for help on using the changeset viewer.