Version 4.7.23

This commit is contained in:
Neo committed 2025-12-19 16:21:27 -08:00
1 parent 7124a02564
commit 25ddeb65d6
1791 files changed
+76990 -44452

No files matched your search

-32
View File
@@ -122,9 +122,6 @@ class _Sitemap
}
}
/* And ping search engines */
$this->pingSearchEngines();
return TRUE;
}
else
@@ -256,33 +253,4 @@ class _Sitemap
'last_id' => $lastId
) );
}
/**
* Ping search engines to notify of updates
*
* @return void
* @note Yahoo! search is being replaced by Bing and ask.com/moreover.com no longer accept sitemap submissions
*/
public function pingSearchEngines()
{
/* Search engines don't want to receive more than one ping in a 24 hour period */
if( \IPS\Settings::i()->sitemap_last_ping > time() - 86400 )
{
return;
}
/* Update last ping time before the requests are made so if they time out, it won't attempt to try again for 24 hrs */
\IPS\Settings::i()->changeValues( array( 'sitemap_last_ping' => time() ) );
/* Ping Google */
$response = \IPS\Http\Url::external( "http://www.google.com/webmasters/tools/ping?sitemap=" . urlencode( $this->sitemapUrl ) )->request()->get();
if( $response->httpResponseCode != 200 )
{
$this->log[] = 'sitemap_ping_google_fail';
}
else
{
$this->log[] = 'sitemap_ping_google_success';
}
}
}