Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Remove initLayout41() and make it work as in 4.1
Browse files Browse the repository at this point in the history
Fixing of issue #17 lead to commit of a code which was no
longer calling initLayout() This is now changed back.

See also: eb6416d
  • Loading branch information
Romans Malinovskis committed Sep 4, 2011
1 parent eb6416d commit 3c146f1
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions lib/ApiWeb.php
@@ -1,14 +1,10 @@
<?php // vim:ts=4:sw=4:et:fdm=marker
/**
ApiWeb extends an api of CommandLine applications with knowlnedge of HTML
templates, understanding of pages and routing.
Learn:
http://agiletoolkit.org/learn/understand/api
http://agiletoolkit.org/learn/template
Reference:
http://agiletoolkit.org/doc/apiweb
* ApiWeb extends an api of CommandLine applications with knowlnedge of HTML
* templates, understanding of pages and routing.
*
* @link http://agiletoolkit.org/learn/understand/api
* @link http://agiletoolkit.org/learn/template
*//*
==ATK4===================================================
This file is part of Agile Toolkit 4
Expand Down Expand Up @@ -183,7 +179,7 @@ function main(){
try{

// Initialize page and all elements from here
$this->initLayout41();
$this->initLayout();
$this->hook('post-init');

$this->hook('pre-exec');
Expand Down Expand Up @@ -293,9 +289,11 @@ function _locatePage($path){
// }}}

// {{{ Layout implementation
function initLayout(){}
private $layout_initialized=false;
/** Implements Layouts. Layout is region in shared template which may be replaced by object */
function initLayout41(){
function initLayout(){
if($this->layout_initialized)throw $this->exception('Please do not call initLayout() directly from init()','Obsolete');
$this->layout_initialized=true;
$this->addLayout('Content');
$this->upgradeChecker();
}
Expand Down

0 comments on commit 3c146f1

Please sign in to comment.