From 6967127b27f56b6c12d6df6c48e0800cb3c4156f Mon Sep 17 00:00:00 2001 From: carl <> Date: Mon, 13 Oct 2008 13:59:17 +0000 Subject: #913 - PRADO Copyright notice in HTML source --- framework/PradoBase.php | 9 +++++++-- framework/Web/UI/WebControls/THead.php | 21 +++++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) (limited to 'framework') diff --git a/framework/PradoBase.php b/framework/PradoBase.php index e6a77136..ead66e1b 100644 --- a/framework/PradoBase.php +++ b/framework/PradoBase.php @@ -7,7 +7,7 @@ * * @author Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System @@ -114,6 +114,11 @@ class PradoBase $url='http://www.pradosoft.com/images/'.$logoName.'.gif'; return 'Powered by PRADO'; } + + public static function metaGenerator() + { + return 'PRADO - http://www.pradosoft.com/'; + } /** * PHP error handler. @@ -611,4 +616,4 @@ PradoBase::using('System.TComponent'); PradoBase::using('System.Exceptions.TException'); PradoBase::using('System.Util.TLogger'); -?> +?> diff --git a/framework/Web/UI/WebControls/THead.php b/framework/Web/UI/WebControls/THead.php index 1b51f8ae..62ee46d3 100644 --- a/framework/Web/UI/WebControls/THead.php +++ b/framework/Web/UI/WebControls/THead.php @@ -4,7 +4,7 @@ * * @author Marcus Nyeholt and Qiang Xue * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2008 PradoSoft + * @copyright Copyright © 2005-2008 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ * @package System.Web.UI @@ -29,6 +29,13 @@ * * * + * + * A MetaTag for "generator" is added by default if you haven't specified your own generator meta tag. You can override + * the property by adding the following code to your template: + * + * + * + * * * Note, {@link TPage} has a property {@link TPage::getHead Head} that refers to * the THead control currently on the page. A page can have at most once THead @@ -155,14 +162,24 @@ class THead extends TControl if(($icon=$this->getShortcutIcon())!=='') $writer->write('\n"); + $generatorAdded = false; if(($metaTags=$this->getMetaTags())!==null) { foreach($metaTags as $metaTag) { + if(strtolower($metaTag->getName()) == 'generator') + $generatorAdded = true; $metaTag->render($writer); $writer->writeLine(); } } + if(!$generatorAdded) + { + $metaTag = new TMetaTag(); + $metaTag->setName('generator'); + $metaTag->setContent(Prado::metaGenerator()); + $metaTag->render($writer); + } $cs=$page->getClientScript(); $cs->renderStyleSheetFiles($writer); $cs->renderStyleSheets($writer); @@ -374,4 +391,4 @@ class TMetaTagCollection extends TList } } -?> +?> -- cgit v1.2.3