|
From: <al...@us...> - 2008-01-15 14:51:55
|
Revision: 592
http://sciret.svn.sourceforge.net/sciret/?rev=592&view=rev
Author: alpeb
Date: 2008-01-15 06:51:50 -0800 (Tue, 15 Jan 2008)
Log Message:
-----------
added preDispatch() method for Views, to allow doing things before the headers are sent
Modified Paths:
--------------
branches/release-candidates/sciret-1.2/classes/Controller.php
branches/release-candidates/sciret-1.2/views/View.php
Modified: branches/release-candidates/sciret-1.2/classes/Controller.php
===================================================================
--- branches/release-candidates/sciret-1.2/classes/Controller.php 2008-01-11 13:58:15 UTC (rev 591)
+++ branches/release-candidates/sciret-1.2/classes/Controller.php 2008-01-15 14:51:50 UTC (rev 592)
@@ -67,6 +67,7 @@
require "views/$view.php";
$obj = new $view($this->user, $this->configuration);
$obj->setTemplate(new KB_Template('templates', $this->user));
+ $obj->preDispatch();
$obj->setHTMLHeader($this->views[$view][SHOW_HEADER]);
$obj->dispatch();
if ($this->views[$view][SHOW_HEADER]) {
Modified: branches/release-candidates/sciret-1.2/views/View.php
===================================================================
--- branches/release-candidates/sciret-1.2/views/View.php 2008-01-11 13:58:15 UTC (rev 591)
+++ branches/release-candidates/sciret-1.2/views/View.php 2008-01-15 14:51:50 UTC (rev 592)
@@ -24,6 +24,18 @@
$this->configuration =& $configuration;
}
+ /**
+ * @abstract
+ */
+ function preDispatch() {
+ }
+
+ /**
+ * @abstract
+ */
+ function dispatch() {
+ }
+
function setTemplate(&$tpl) {
$this->tpl =& $tpl;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|