summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY3
-rw-r--r--framework/Web/Services/TPageService.php2
-rw-r--r--framework/Web/UI/TTemplateManager.php2
-rw-r--r--framework/Web/UI/WebControls/TDataGridColumn.php5
-rw-r--r--framework/Web/UI/WebControls/TTableCell.php6
-rw-r--r--framework/prado.php15
6 files changed, 17 insertions, 16 deletions
diff --git a/HISTORY b/HISTORY
index 71a086af..6d7ccff3 100644
--- a/HISTORY
+++ b/HISTORY
@@ -15,6 +15,9 @@ CHG: All validators ClientSide.OnError becomes ClientSide.OnValidationError, and
Version 3.0.6 December 4, 2006
==============================
+BUG: Ticket#442 - TPageService getBasePath in namespace form (Qiang)
+BUG: TTableCell should render   only when Text is not set and there's no child (Qiang)
+CHG: Ticket#437 - __autoload is replaced by spl_autoload_register (Qiang)
CHG: constructUrl() now encodes & into & by default (Qiang)
CHG: TRepeater does not render <span> anymore for empty item template (Qiang)
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 3e33fbb4..5d9e74fb 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -375,7 +375,7 @@ class TPageService extends TService
}
/**
- * @return string root directory (in namespace form) storing pages. Defaults to 'pages' directory under application base path.
+ * @return string the root directory for storing pages. Defaults to the 'pages' directory under the application base path.
*/
public function getBasePath()
{
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index 8c4983bf..950f2c70 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -746,7 +746,7 @@ class TTemplate extends TApplicationComponent implements ITemplate
}
catch(Exception $e)
{
- if($e->getErrorCode()==='template_format_invalid' || $e->getErrorCode()==='template_format_invalid2')
+ if(($e instanceof TException) && ($e->getErrorCode()==='template_format_invalid' || $e->getErrorCode()==='template_format_invalid2'))
throw $e;
if($matchEnd===0)
$line=$this->_startingLine+1;
diff --git a/framework/Web/UI/WebControls/TDataGridColumn.php b/framework/Web/UI/WebControls/TDataGridColumn.php
index 30349244..f0d088d2 100644
--- a/framework/Web/UI/WebControls/TDataGridColumn.php
+++ b/framework/Web/UI/WebControls/TDataGridColumn.php
@@ -346,9 +346,8 @@ abstract class TDataGridColumn extends TApplicationComponent
}
break;
case TDataGrid::IT_FOOTER:
- if(($text=$this->getFooterText())==='')
- $text='&nbsp;';
- $cell->setText($text);
+ if(($text=$this->getFooterText())!=='')
+ $cell->setText($text);
break;
}
}
diff --git a/framework/Web/UI/WebControls/TTableCell.php b/framework/Web/UI/WebControls/TTableCell.php
index 8b80e1f2..dad2e69b 100644
--- a/framework/Web/UI/WebControls/TTableCell.php
+++ b/framework/Web/UI/WebControls/TTableCell.php
@@ -185,10 +185,12 @@ class TTableCell extends TWebControl
*/
public function renderContents($writer)
{
- if(($text=$this->getText())==='')
+ if(($text=$this->getText())!=='')
+ $writer->write($text);
+ else if($this->getHasControls())
parent::renderContents($writer);
else
- $writer->write($text);
+ $writer->write('&nbsp;');
}
}
diff --git a/framework/prado.php b/framework/prado.php
index 2eeda291..4cf3ab3e 100644
--- a/framework/prado.php
+++ b/framework/prado.php
@@ -7,7 +7,7 @@
* available functionalities that enable PRADO component model and error handling mechanism.
*
* By including this file, the PHP error and exception handlers are set as
- * PRADO handlers, and an __autoload function is provided that automatiically
+ * PRADO handlers, and an __autoload function is provided that automatically
* loads a class file if the class is not defined.
*
* @author Qiang Xue <qiang.xue@gmail.com>
@@ -34,15 +34,12 @@ if(!class_exists('Prado',false))
}
/**
- * Defines __autoload function if not defined.
+ * Registers the autoload function.
+ * Since Prado::autoload will report a fatal error if the class file
+ * cannot be found, if you have multiple autoloaders, Prado::autoload
+ * should be registered in the last.
*/
-if(!function_exists('__autoload'))
-{
- function __autoload($className)
- {
- Prado::autoload($className);
- }
-}
+spl_autoload_register(array('Prado','autoload'));
/**
* Initializes error and exception handlers