Commit 1e721090 authored by Dave Reid's avatar Dave Reid

Issue #1435264 by mgriego, gordon, Carsten Müller, rooby | FanisTsiros:...

Issue #1435264 by mgriego, gordon, Carsten Müller, rooby | FanisTsiros: Removed the XMLSitemapWriter::flush method which causes unnecessary XMLSitemapGenerationException exceptions
parent 72b729b8
......@@ -13,7 +13,6 @@ class XMLSitemapGenerationException extends XMLSitemapException {}
* Extended class for writing XML sitemap files.
*/
class XMLSitemapWriter extends XMLWriter {
protected $status = TRUE;
protected $uri = NULL;
protected $sitemapElementCount = 0;
protected $linkCountFlush = 500;
......@@ -129,19 +128,6 @@ class XMLSitemapWriter extends XMLWriter {
}
}
/**
* Override of XMLWriter::flush() to track file writing status.
*/
public function flush($empty = TRUE) {
$return = parent::flush($empty);
$this->status &= (bool) $return;
return $return;
}
public function getStatus() {
return $this->status;
}
public function getURI() {
return $this->uri;
}
......@@ -153,7 +139,7 @@ class XMLSitemapWriter extends XMLWriter {
public function endDocument() {
$return = parent::endDocument();
if (!$this->getStatus()) {
if (!$return) {
throw new XMLSitemapGenerationException(t('Unknown error occurred while writing to file @file.', array('@file' => $this->uri)));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment