mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Merge branch '1.6' into 1
This commit is contained in:
commit
776e6bd9d9
22
.travis.yml
22
.travis.yml
@ -4,34 +4,40 @@ sudo: false
|
||||
|
||||
language: php
|
||||
|
||||
dist: precise
|
||||
|
||||
php:
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
|
||||
env:
|
||||
- DB=MYSQL CORE_RELEASE=3.2
|
||||
- DB=MYSQL CORE_RELEASE=3.6
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.6
|
||||
env: DB=MYSQL CORE_RELEASE=3
|
||||
env: DB=MYSQL CORE_RELEASE=3.5
|
||||
- php: 5.6
|
||||
env: DB=MYSQL CORE_RELEASE=3.1
|
||||
- php: 5.6
|
||||
env: DB=PGSQL CORE_RELEASE=3.2
|
||||
env: DB=PGSQL CORE_RELEASE=3.6
|
||||
- php: 7.2
|
||||
env: CORE_RELEASE=3
|
||||
- php: nightly
|
||||
env: CORE_RELEASE=3
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
- php: 7.2
|
||||
env: CORE_RELEASE=3
|
||||
- php: nightly
|
||||
env: CORE_RELEASE=3
|
||||
|
||||
before_script:
|
||||
- composer self-update || true
|
||||
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
|
||||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
|
||||
- cd ~/builds/ss
|
||||
- composer install
|
||||
- composer require wilr/silverstripe-googlesitemaps
|
||||
|
||||
script:
|
||||
- vendor/bin/phpunit googlesitemaps/tests
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Google Sitemaps Module
|
||||
|
||||
[![Build Status](https://secure.travis-ci.org/wilr/silverstripe-googlesitemaps.png?branch=master)](http://travis-ci.org/wilr/silverstripe-googlesitemaps)
|
||||
[![Build Status](https://secure.travis-ci.org/wilr/silverstripe-googlesitemaps.png?branch=1)](http://travis-ci.org/wilr/silverstripe-googlesitemaps)
|
||||
|
||||
## Maintainer Contact
|
||||
|
||||
|
@ -18,6 +18,15 @@ class GoogleSitemapExtension extends DataExtension
|
||||
|
||||
if ($this->owner->hasMethod('AbsoluteLink')) {
|
||||
$hostHttp = parse_url(Director::protocolAndHost(), PHP_URL_HOST);
|
||||
|
||||
// Subsite support
|
||||
if (class_exists('Subsite')) {
|
||||
// Subsite will have a different domain from Director::protocolAndHost
|
||||
if ($subsite = Subsite::currentSubsite()) {
|
||||
$hostHttp = parse_url(Director::protocol() . $subsite->getPrimaryDomain(), PHP_URL_HOST);
|
||||
}
|
||||
}
|
||||
|
||||
$objHttp = parse_url($this->owner->AbsoluteLink(), PHP_URL_HOST);
|
||||
|
||||
if ($objHttp != $hostHttp) {
|
||||
|
Loading…
Reference in New Issue
Block a user