Ticket #1085: podpress_url.patch
| File podpress_url.patch, 2.7 KB (added by ntm, 2 years ago) |
|---|
-
podpress_functions.php
82 82 } 83 83 return PODPRESSURL; 84 84 } else { 85 $result = get_settings('siteurl'); 86 if(substr($result, -1, 1) != '/') { 87 $result .= '/'; 88 } 89 return $result.'wp-content/plugins/podpress/'; 85 //~ $result = get_settings('siteurl'); 86 //~ if(substr($result, -1, 1) != '/') { 87 //~ $result .= '/'; 88 //~ } 89 //~ return $result.'wp-content/plugins/podpress/'; 90 return PODPRESS_URL.'/'; 90 91 } 91 92 } 92 93 … … 447 448 448 449 if($options['useSlimPlayer']) { 449 450 echo '<object type="application/x-shockwave-flash" width="150" height="170" '; 450 //echo 'data="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf">'."\n";451 451 echo 'data="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_feed_link('playlist.xspf').'">'."\n"; 452 //echo ' <param name="movie" value="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf" />'."\n";453 452 echo ' <param name="movie" value="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_feed_link('playlist.xspf').'" />'."\n"; 454 453 echo '</object>'."\n"; 455 454 } else { 456 455 echo '<object type="application/x-shockwave-flash" width="150" height="170" '; 457 //echo 'data="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf">'."\n";458 456 echo 'data="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_feed_link('playlist.xspf').'">'."\n"; 459 //echo ' <param name="movie" value="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_settings('siteurl').'/playlist.xspf" />'."\n";460 457 echo ' <param name="movie" value="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_feed_link('playlist.xspf').'" />'."\n"; 461 458 echo '</object>'."\n"; 462 459 } … … 474 471 case 'feed': 475 472 case 'web': 476 473 case 'play': 477 $sqlI = "INSERT INTO ".$wpdb->prefix."podpress_statcounts (postID, media, $method) VALUES ($postID, '$media', 1)"; 478 $sqlU = "UPDATE ".$wpdb->prefix."podpress_statcounts SET $method = $method+1, total = total+1 WHERE postID = '$postID' AND media = '$media'"; 479 $wpdb->hide_errors(); 480 $result = $wpdb->query($sqlI); 481 if(!$result) { 482 $wpdb->query($sqlU); 483 } 484 $wpdb->show_errors(); 474 $sqlIoU = "INSERT INTO ".$wpdb->prefix."podpress_statcounts (postID, media, $method) VALUES ($postID, '$media', 1) ON DUPLICATE KEY UPDATE $method = $method+1, total = total+1"; 475 $result = $wpdb->query($sqlIoU); 485 476 break; 486 477 default: 487 478 return;
