Skip to content

Commit b74d6f1

Browse files
committed
use reset()
1 parent a6b43c1 commit b74d6f1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

renderer/book.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,23 @@ class renderer_plugin_odt_book extends renderer_plugin_odt_page {
1818
/** @var string document title*/
1919
protected $title = '';
2020

21+
/**
22+
* clean out any per-use values
23+
*
24+
* This is called before each use of the renderer object and should normally be used to
25+
* completely reset the state of the renderer to be reused for a new document.
26+
* For ODT book it resets only some properties.
27+
*/
28+
public function reset() {
29+
$this->doc = '';
30+
}
2131
/**
2232
* Initialize the document
2333
*/
2434
public function document_start() {
2535
// number of wiki pages included in ODT file
2636
$this->wikipages_count ++;
2737

28-
$this->doc = ''; //FIXME move to reset()??
2938

3039
if($this->isBookStart()) {
3140
parent::document_start();

0 commit comments

Comments
 (0)