CGI ping fixes. fixes #2197

git-svn-id: http://svn.automattic.com/wordpress/trunk@3491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-01-28 18:41:19 +00:00
parent dd14d47290
commit 5c166af378
2 changed files with 9 additions and 1 deletions

View File

@ -8,5 +8,10 @@
</div>
<?php do_action('admin_footer', ''); ?>
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
<?php if ( (substr(php_sapi_name(), 0, 3) == 'cgi') && spawn_pinger() ) : ?>
<iframe id="pingcheck" src="' . get_settings('siteurl') .'/wp-admin/execute-pings.php?time=' . time() . '" style="border:none;width:1px;height:1px;"></iframe>
<?php endif; ?>
</body>
</html>
</html>

View File

@ -1001,6 +1001,9 @@ function spawn_pinger() {
if ( $wpdb->get_var("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_pingme' OR meta_key = '_encloseme' LIMIT 1") )
$doping = true;
if ( substr(php_sapi_name(), 0, 3) == 'cgi' )
return $doping;
if ( $doping ) {
$ping_url = get_settings('siteurl') .'/wp-admin/execute-pings.php';
$parts = parse_url($ping_url);