Skip to content

Commit

Permalink
Fixed expression style place holder initialization within initial doc…
Browse files Browse the repository at this point in the history
…ument.
  • Loading branch information
Christian Achatz committed Jun 27, 2014
1 parent a0fac38 commit fe83b2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
21 changes: 3 additions & 18 deletions core/pagecontroller/Document.php
Expand Up @@ -118,21 +118,6 @@ class Document extends APFObject {
*/
public static $maxParserLoops = 500;

/**
* @public
*
* Initializes the built-in taglibs, used to create the APF DOM tree.
*
* @author Christian Schäfer
* @version
* Version 0.1, 28.12.2006<br />
* Version 0.2, 03.03.2007 (Removed the "&" in front of "new")<br />
* Version 0.3, 11.02.2012 (Added html:getstring tag as known tag (refactoring!))<br />
*/
public function __construct() {
$this->setObjectId(XmlParser::generateUniqID());
}

/**
* @public
*
Expand Down Expand Up @@ -1294,14 +1279,14 @@ public function onParseTime() {
* Interface definition of the onAfterAppend() method. This function is called after the DOM
* node is appended to the DOM tree. It must be implemented by derived classes.
*
* @public
* @abstract
*
* @author Christian Schäfer
* @version
* Version 0.1, 28.12.2006<br />
* Version 0.2, 27.06.2014 (Added expression tag analysis to "standard" document to allow expression place holders in initial document)<br />
*/
public function onAfterAppend() {
// ID#191: extract "static" expressions (e.g. place holders)
$this->extractExpressionTags();
}

/**
Expand Down
6 changes: 6 additions & 0 deletions core/pagecontroller/Page.php
Expand Up @@ -73,6 +73,7 @@ public function &getRootDocument() {
* Version 0.3, 04.03.2007 (The namespace is taken as a context, if no other was set before)<br />
* Version 0.4, 22.04.2007 (Now the language is applied to the document)<br />
* Version 0.5, 08.03.2009 (Bug-fix: protected variable parentObject might not be used)<br />
* Version 0.6, 27.06.2014 (Bug fix: ensure native environment for Document to allow expression-style place holders)<br />
*/
public function loadDesign($namespace, $design) {

Expand All @@ -92,6 +93,11 @@ public function loadDesign($namespace, $design) {
// load the design
$this->document->loadDesign($namespace, $design);
$this->document->setObjectId(XmlParser::generateUniqID());

// ensure native APF environment
$this->document->onParseTime();
$this->document->onAfterAppend();

}

/**
Expand Down

0 comments on commit fe83b2d

Please sign in to comment.