Ticket #1085: podpress_url.patch

File podpress_url.patch, 2.7 KB (added by ntm, 2 years ago)
  • podpress_functions.php

     
    8282                        } 
    8383                        return PODPRESSURL; 
    8484                } 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.'/'; 
    9091                } 
    9192        } 
    9293 
     
    447448 
    448449                if($options['useSlimPlayer']) { 
    449450                        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"; 
    451451                        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"; 
    453452                        echo '  <param name="movie" value="'.podPress_url().'players/xspf_player_slim.swf?playlist_url='.get_feed_link('playlist.xspf').'" />'."\n"; 
    454453                        echo '</object>'."\n"; 
    455454                } else { 
    456455                        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"; 
    458456                        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"; 
    460457                        echo '  <param name="movie" value="'.podPress_url().'players/xspf_player.swf?playlist_url='.get_feed_link('playlist.xspf').'" />'."\n"; 
    461458                        echo '</object>'."\n"; 
    462459                } 
     
    474471                        case 'feed': 
    475472                        case 'web': 
    476473                        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); 
    485476                                break; 
    486477                        default: 
    487478                                return;