Skip to content

Commit

Permalink
Check if host was split
Browse files Browse the repository at this point in the history
  • Loading branch information
anagh-p committed Mar 30, 2017
1 parent 051d505 commit 9ccd299
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Quintype/Seo/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ protected function getCanonicalUrl(){
protected function getAlternateUrl(){
if(isset($this->config['android-package']) && $this->config['android-package'] !== ''){
$split_host_and_protocol = explode("://", $this->config['sketches-host']);
return $this->config['android-package']. "/" . $split_host_and_protocol[0] . "/" . $split_host_and_protocol[1] . "/" . $this->story['slug'];
if(sizeof($split_host_and_protocol) >= 2){
return $this->config['android-package']. "/" . $split_host_and_protocol[0] . "/" . $split_host_and_protocol[1] . "/" . $this->story['slug'];
}
return $this->config['sketches-host'] . "/". $this->story['slug'];
}
return $this->config['sketches-host'] . "/". $this->story['slug'];
}
Expand Down

0 comments on commit 9ccd299

Please sign in to comment.