Changeset 677798
- Timestamp:
- 03/08/2013 01:04:01 AM (13 years ago)
- Location:
- whisperfollow/trunk
- Files:
-
- 2 edited
-
WhisperFollow.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
whisperfollow/trunk/WhisperFollow.php
r676682 r677798 4 4 Plugin URI: http://www.machinespirit.net/acegiak 5 5 Description: Follow and reblog multiple sites with simplepie RSS 6 Version: 1.2. 36 Version: 1.2.4 7 7 Author: Ashton McAllan 8 8 Author URI: http://www.machinespirit.net/acegiak … … 126 126 127 127 function add_whisper($permalink,$title,$content,$authorname='',$authorurl='',$time=0,$avurl=''){ 128 //whisperfollow_log("adding whisper: ".$permalink.": ".$title); 128 129 global $wpdb; 129 130 if($time < 1){ … … 131 132 } 132 133 $table_name = $wpdb->prefix . "whisperfollow"; 133 if($wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM ".$table_name." WHERE permalink LIKE \"%p\";",$permalink))<1){ 134 if($wpdb->get_var( "SELECT COUNT(*) FROM ".$table_name." WHERE permalink LIKE \"".$permalink."\";")<1){ 135 whisperfollow_log("no duplicate found"); 134 136 $rows_affected = $wpdb->insert( $table_name, 135 137 array( … … 145 147 146 148 if($rows_affected == false){ 149 150 whisperfollow_log("could not insert whisper into database!"); 147 151 die("could not insert whisper into database!"); 148 } 149 whisperfollow_log("added ".$title." from ".$authorurl); 152 }else{ 153 whisperfollow_log("added ".$title." from ".$authorurl); 154 } 155 }else{ 156 whisperfollow_log("duplicate detected"); 150 157 } 151 158 … … 514 521 $hub = rss_hubget($body); 515 522 if(strlen($self) > 0){ 523 whisperfollow_log("PUSH START: ".substr($self,0,50)); 516 524 if(!in_array($self,array_map(create_function('$o', 'return $o->link_rss;'),get_bookmarks( array( 'orderby' => 'name','order'=> 'ASC','category_name' => 'Blogroll'))))){ 517 525 whisperfollow_pubsub_change_subscription("unsubscribe",$self,$hub); … … 605 613 606 614 function whisperfollow_aggregator( $args = array() ) { 607 615 whisperfollow_log("aggregation!"); 608 616 $bookmarks = get_bookmarks( array( 609 617 'orderby' => 'name', … … 623 631 624 632 function whisperfollow_aggregate($feeds,$pushed=false){ 633 //whisperfollow_log("Aggregating feeds:"+count(feeds)); 625 634 if ( !empty( $feeds ) ) { 626 635 … … 637 646 $feed->strip_htmltags(false); 638 647 639 echo "<br/>Feed object:";640 print_r($feed);648 //whisperfollow_log("<br/>Feed object:"); 649 //whisperfollow_log(print_r($feed,true)); 641 650 $items = $feed->get_items(); 642 echo "<br/>items object:"; 643 print_r($items); 651 652 whisperfollow_log(substr(print_r($items,true),0,500)); 653 whisperfollow_log("<br/>items object:"); 644 654 usort($items,'date_sort'); 645 655 foreach ($items as $item){ 646 echo "<br/>got ".$item->get_title()." from ". $item->get_feed()->get_title()."<br/>";656 whisperfollow_log("<br/>got ".$item->get_title()." from ". $item->get_feed()->get_title()."<br/>"); 647 657 add_whisper($item->get_permalink(),$item->get_title(),html_entity_decode ($item->get_description()),$item->get_feed()->get_title(),$item->get_feed()->get_link(),$item->get_date("U")); 648 658 649 659 } 650 } 651 else echo 'No feed defined'; 660 652 661 remove_filter( 'wp_feed_cache_transient_lifetime', 'whisperfollow_feed_time' ); 662 } 663 whisperfollow_log('No feed defined'); 653 664 654 665 } -
whisperfollow/trunk/readme.txt
r676682 r677798 42 42 43 43 == Changelog == 44 45 = 1.2.4 = 46 * Fixed the error preventing whispers to actually be added to the wall created from last bugfix 44 47 45 48 = 1.2.3 =
Note: See TracChangeset
for help on using the changeset viewer.