12.10.2016 1.0.1 fix reading sitemap url with user/pass

fix checking sitemap object
Dieser Commit ist enthalten in:
Tobias Merkl 2016-10-12 14:40:41 +02:00
Ursprung 7acb57980d
Commit 5d8ba32d82
5 geänderte Dateien mit 14 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -20,7 +20,10 @@ Installation
Changelog Changelog
25.08.2016 1.0.0 module release 12.10.2016 1.0.1 fix reading sitemap url with user/pass
fix checking sitemap object
25.08.2016 1.0.0 module release for oxid 4.7, 4.8, 4.9, 4.10
License License

Datei anzeigen

@ -8,7 +8,7 @@
* @copyright (c) Proud Sourcing GmbH | 2016 * @copyright (c) Proud Sourcing GmbH | 2016
* @link www.proudcommerce.com * @link www.proudcommerce.com
* @package psCacheWarmer * @package psCacheWarmer
* @version 1.0.0 * @version 1.0.1
**/ **/
class psCacheWarmer extends oxUBase class psCacheWarmer extends oxUBase
{ {
@ -63,8 +63,12 @@ class psCacheWarmer extends oxUBase
$sSitemapUrl = $this->_getSitemapUrl(); $sSitemapUrl = $this->_getSitemapUrl();
} }
$sUsername = oxRegistry::getConfig()->getShopConfVar('psCacheWarmerUser');
$sPassword = oxRegistry::getConfig()->getShopConfVar('psCacheWarmerPass');
$sSitemapUrl = str_replace("://", "://".$sUsername.":".$sPassword."@", $sSitemapUrl);
$sSitemapXmlData = @file_get_contents($sSitemapUrl); $sSitemapXmlData = @file_get_contents($sSitemapUrl);
if(($oSitemap = @simplexml_load_string($sSitemapXmlData)) != false) { if($oSitemap = @simplexml_load_string($sSitemapXmlData)) {
if (count($oSitemap->sitemap) > 0) { if (count($oSitemap->sitemap) > 0) {
foreach ($oSitemap->sitemap as $oSubSitemap) { foreach ($oSitemap->sitemap as $oSubSitemap) {
$sNextSitemapUrl = (string)$oSubSitemap->loc; $sNextSitemapUrl = (string)$oSubSitemap->loc;

Datei anzeigen

@ -8,7 +8,7 @@
* @copyright (c) Proud Sourcing GmbH | 2016 * @copyright (c) Proud Sourcing GmbH | 2016
* @link www.proudcommerce.com * @link www.proudcommerce.com
* @package psCacheWarmer * @package psCacheWarmer
* @version 1.0.0 * @version 1.0.1
**/ **/
$sLangName = "Deutsch"; $sLangName = "Deutsch";
// ------------------------------- // -------------------------------

Datei anzeigen

@ -8,7 +8,7 @@
* @copyright (c) Proud Sourcing GmbH | 2016 * @copyright (c) Proud Sourcing GmbH | 2016
* @link www.proudcommerce.com * @link www.proudcommerce.com
* @package psCacheWarmer * @package psCacheWarmer
* @version 1.0.0 * @version 1.0.1
**/ **/
/** /**
@ -29,7 +29,7 @@ $aModule = array(
<b>URL:</b> <a href="'.oxRegistry::getConfig()->getConfigParam('sShopURL').'?cl=psCacheWarmer&key='.oxRegistry::getConfig()->getShopConfVar('psCacheWarmerKey', oxRegistry::getConfig()->getShopId()).'" target="_blank">'.oxRegistry::getConfig()->getConfigParam('sShopURL').'?cl=psCacheWarmer&key='.oxRegistry::getConfig()->getShopConfVar('psCacheWarmerKey', oxRegistry::getConfig()->getShopId()).'</a>', <b>URL:</b> <a href="'.oxRegistry::getConfig()->getConfigParam('sShopURL').'?cl=psCacheWarmer&key='.oxRegistry::getConfig()->getShopConfVar('psCacheWarmerKey', oxRegistry::getConfig()->getShopId()).'" target="_blank">'.oxRegistry::getConfig()->getConfigParam('sShopURL').'?cl=psCacheWarmer&key='.oxRegistry::getConfig()->getShopConfVar('psCacheWarmerKey', oxRegistry::getConfig()->getShopId()).'</a>',
), ),
'thumbnail' => 'logo.jpg', 'thumbnail' => 'logo.jpg',
'version' => '1.0.0', 'version' => '1.0.1',
'author' => 'Proud Sourcing GmbH', 'author' => 'Proud Sourcing GmbH',
'url' => 'http://www.proudcommerce.com/', 'url' => 'http://www.proudcommerce.com/',
'email' => 'support@proudcommerce.com', 'email' => 'support@proudcommerce.com',

Datei anzeigen

@ -8,7 +8,7 @@
* @copyright (c) Proud Sourcing GmbH | 2016 * @copyright (c) Proud Sourcing GmbH | 2016
* @link www.proudcommerce.com * @link www.proudcommerce.com
* @package psCacheWarmer * @package psCacheWarmer
* @version 1.0.0 * @version 1.0.1
**/ **/
$sLangName = "Deutsch"; $sLangName = "Deutsch";
// ------------------------------- // -------------------------------