From 15be96d7736550fbf097bb4dd3d4c971ef1f5cc1 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Wed, 25 May 2011 09:34:54 +0000 Subject: backported build script fixes to branch/3.1 --- build.xml | 1044 ++++++++++---------- buildscripts/PhpDocumentor/new_phpdoc.php | 2 +- .../PhpDocumentor/phpDocumentor/InlineTags.inc | 6 +- buildscripts/PhpDocumentor/phpDocumentor/Io.inc | 5 +- .../PhpDocumentor/phpDocumentor/Setup.inc.php | 2 +- .../PhpDocumentor/phpDocumentor/common.inc.php | 6 +- .../phpDocumentor/phpDocumentorTParser.inc | 4 +- buildscripts/texbuilder/Page2Tex.php | 5 +- .../protected/pages/Controls/TabPanel.page | 2 +- .../Data/SqlMap/Configuration/TResultProperty.php | 2 +- .../UI/ActiveControls/TValueTriggeredCallback.php | 4 +- framework/Web/UI/WebControls/TTextHighlighter.php | 142 +-- 12 files changed, 619 insertions(+), 605 deletions(-) diff --git a/build.xml b/build.xml index e159f68b..7f412865 100644 --- a/build.xml +++ b/build.xml @@ -1,110 +1,110 @@ - - - - - - - - + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - Welcome to use PRADO build script! - ---------------------------------- - You may use the following command format to build a target: - - phing <target name> - - where <target name> can be one of the following: - - For all PRADO developers: - - test : run unit tests (results are under /build/test-reports); - - For PRADO release manager: - - dist : create release files; - - build : prepare a directory for distribution; - - clean : clean up the build directory; - - rebuild : clean first and then build; - - docs : generate documentation; - - pear : generate PEAR packages; - - snapshot: generate nightly snapshot; - + + + + + + + + + + + + Welcome to use PRADO build script! + ---------------------------------- + You may use the following command format to build a target: + + phing <target name> + + where <target name> can be one of the following: + + For all PRADO developers: + - test : run unit tests (results are under /build/test-reports); + + For PRADO release manager: + - dist : create release files; + - build : prepare a directory for distribution; + - clean : clean up the build directory; + - rebuild : clean first and then build; + - docs : generate documentation; + - pear : generate PEAR packages; + - snapshot: generate nightly snapshot; + - - + + @@ -163,9 +163,9 @@ PRADO Framework for PHP 5, version ${prado.version}. See docs/ directory for documentation. - - + + @@ -175,7 +175,7 @@ - + @@ -225,8 +225,8 @@ - - + + @@ -240,388 +240,388 @@ - + - - - - - - - - - - setDbConnection($conn); - -//start playing - -foreach(Employee::finder()->findAll() as $employee) - var_dump($employee->LastName); - -//fetch all regions and its territories. -foreach(Region::finder()->withTerritories()->findAll() as $region) -{ - var_dump($region->RegionDescription); - foreach($region->Territories as $territory) - var_dump($territory->TerritoryDescription); -} - -//sqlmap example -$manager = new TSqlMapManager($conn); -$manager->configureXml('./database/sqlmap.xml'); -$sqlmap = $manager->getSqlMapGateway(); - -var_dump($sqlmap->queryForList('products-with-price', 50)); - -//similar query, but not identical -//Product::finder()->withCategory()->findAll('UnitPrice < ?', 50) - -?>]]> + + + + + + + + + + setDbConnection($conn); + +//start playing + +foreach(Employee::finder()->findAll() as $employee) + var_dump($employee->LastName); + +//fetch all regions and its territories. +foreach(Region::finder()->withTerritories()->findAll() as $region) +{ + var_dump($region->RegionDescription); + foreach($region->Territories as $territory) + var_dump($territory->TerritoryDescription); +} + +//sqlmap example +$manager = new TSqlMapManager($conn); +$manager->configureXml('./database/sqlmap.xml'); +$sqlmap = $manager->getSqlMapGateway(); + +var_dump($sqlmap->queryForList('products-with-price', 50)); + +//similar query, but not identical +//Product::finder()->withCategory()->findAll('UnitPrice < ?', 50) + +?>]]> - - - Building pradolite.php... - - - - Copying files to build directory... - - - - + + + Building pradolite.php... + + + + Copying files to build directory... + + + + - - - - - - - - Changing file permissions... - - - - - Building quickstart demo search indices... - - - - - Cleaning up the mess - - - - - - - Build PDF + CHM + HTML Docs, it may take about 30 mins - - Building quickstart.pdf... - - - - - - - - - - - - Building API manuals... - - - - - Indexing API manuals... - - - - - - - Generating CHM Content (Quickstart + ClassDocs) - - - - - - - - - - - - Moving doc files to build... - - - - - - - - - - - - - - - Generating compressed distribution files... - - - - - - - - - - - Generating files for pradosoft.com... - Compiling class docs... - - - - Moving HTML docs to Web folder... - - - - - - - - - - - Distribution Not Completed Yet!!! - -The following steps need to be manually performed in order to complete -the PRADO distribution: - -1. Package DreamWeaver extension by running DW extension manager with - buildscripts/classtree/PRADO.mxi and saving the generated file as - "${build.src.dir}/editors/Dreamweaver/PRADO.mxp" - -2. Use winzip (on Windows) and gzip (on Linux) to generate the compressed - release files of the direcotry - "${build.src.dir}". - - - - - - - - - - - - - - - - - - - - Generating compressed distribution files... - - - - - - - - - - - - - - + + + + + + + + Changing file permissions... + + + + + Building quickstart demo search indices... + + + + + Cleaning up the mess + + + + + + + Build PDF + CHM + HTML Docs, it may take about 30 mins + + Building quickstart.pdf... + + + + + + + + + + + + Building API manuals... + + + + + Indexing API manuals... + + + + + + + Generating CHM Content (Quickstart + ClassDocs) + + + + + + + + + + + + Moving doc files to build... + + + + + + + + + + + + + + + Generating compressed distribution files... + + + + + + + + + + + Generating files for pradosoft.com... + Compiling class docs... + + + + Moving HTML docs to Web folder... + + + + + + + + + + + Distribution Not Completed Yet!!! + +The following steps need to be manually performed in order to complete +the PRADO distribution: + +1. Package DreamWeaver extension by running DW extension manager with + buildscripts/classtree/PRADO.mxi and saving the generated file as + "${build.src.dir}/editors/Dreamweaver/PRADO.mxp" + +2. Use winzip (on Windows) and gzip (on Linux) to generate the compressed + release files of the direcotry + "${build.src.dir}". + + + + + + + + + + + + + + + + + + + + Generating compressed distribution files... + + + + + + + + + + + + + + diff --git a/buildscripts/PhpDocumentor/new_phpdoc.php b/buildscripts/PhpDocumentor/new_phpdoc.php index e4adea90..bac5e514 100644 --- a/buildscripts/PhpDocumentor/new_phpdoc.php +++ b/buildscripts/PhpDocumentor/new_phpdoc.php @@ -75,7 +75,7 @@ if (!empty($_REQUEST['altuserdir'])) $configdir = $_REQUEST['altuserdir']; value),' ')) { - $v = split(' ',trim($this->value)); + $v = explode(' ', trim($this->value)); $value = $c->getTutorialLink($v[0]); array_shift($v); $descrip = join($v,' '); } else $value = $c->getTutorialLink($this->value); } else { - $vals = split(',',$this->value); + $vals = explode(',',$this->value); $descrip = array(); foreach($vals as $val) { $val = trim($val); if (strpos($val,' ')) { - $v = split(' ',$val); + $v = explode(' ',$val); $value[] = $c->getTutorialLink($v[0]); array_shift($v); $descrip[] = join($v,' '); diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Io.inc b/buildscripts/PhpDocumentor/phpDocumentor/Io.inc index 0425096d..dac36bec 100644 --- a/buildscripts/PhpDocumentor/phpDocumentor/Io.inc +++ b/buildscripts/PhpDocumentor/phpDocumentor/Io.inc @@ -361,8 +361,9 @@ class Io { if (dirname($path) != $masterPath) { - $mp = split(PATH_DELIMITER,$masterPath); - $np = split(PATH_DELIMITER,str_replace('\\','/',dirname($path))); + $mp = explode(PATH_DELIMITER, $masterPath); + $np = explode(PATH_DELIMITER, str_replace('\\', '/', dirname($path))); + if (count($np) < count($mp)) { $masterPath = join($np, PATH_DELIMITER); diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Setup.inc.php b/buildscripts/PhpDocumentor/phpDocumentor/Setup.inc.php index c1e7095f..b53634de 100644 --- a/buildscripts/PhpDocumentor/phpDocumentor/Setup.inc.php +++ b/buildscripts/PhpDocumentor/phpDocumentor/Setup.inc.php @@ -157,7 +157,7 @@ class phpDocumentor_setup { phpDocumentor_out("time_limit cannot be set since your in safe_mode, please edit time_limit in your php.ini to allow enough time for phpDocumentor to run"); } - ini_set("memory_limit","256M"); + ini_set("memory_limit","1024M"); $phpver = phpversion(); $phpdocver = PHPDOCUMENTOR_VER; diff --git a/buildscripts/PhpDocumentor/phpDocumentor/common.inc.php b/buildscripts/PhpDocumentor/phpDocumentor/common.inc.php index 787afd67..f86ed5da 100644 --- a/buildscripts/PhpDocumentor/phpDocumentor/common.inc.php +++ b/buildscripts/PhpDocumentor/phpDocumentor/common.inc.php @@ -238,7 +238,9 @@ function fancy_debug($s,$v) */ function phpDocumentor_get_class($object) { - return strtolower(get_class($object)); + if(is_object($object)) + return strtolower(get_class($object)); + return false; } -?> \ No newline at end of file +?> diff --git a/buildscripts/PhpDocumentor/phpDocumentor/phpDocumentorTParser.inc b/buildscripts/PhpDocumentor/phpDocumentor/phpDocumentorTParser.inc index b5c5c733..24a816e9 100644 --- a/buildscripts/PhpDocumentor/phpDocumentor/phpDocumentorTParser.inc +++ b/buildscripts/PhpDocumentor/phpDocumentor/phpDocumentorTParser.inc @@ -1660,7 +1660,7 @@ class phpDocumentorTParser extends Parser } else { $save = $value[$i]; - $value[$i] = split("[\t ]",str_replace("\t",' ',$value[$i])); + $value[$i] = preg_split("/[\t ]/", str_replace("\t", ' ', $value[$i])); $word = trim(array_shift($value[$i])); $val = join(' ',$value[$i]); if (trim($word) == 'internal') @@ -2612,4 +2612,4 @@ class phpDocumentorTParser extends Parser $this->_wp->setWhitespace(false); } } -?> \ No newline at end of file +?> diff --git a/buildscripts/texbuilder/Page2Tex.php b/buildscripts/texbuilder/Page2Tex.php index 04a60f93..008b30fa 100644 --- a/buildscripts/texbuilder/Page2Tex.php +++ b/buildscripts/texbuilder/Page2Tex.php @@ -210,9 +210,12 @@ class Page2Tex $html = preg_replace_callback('/\s*]*>((.|\n)*?)<\/table>/', array($this, 'tabular'), $html); - $html = preg_replace('//', '', $html); + $html = preg_replace('//', '', $html); $html = preg_replace('/
((.|\n)*?)<\/div>/', '', $html); + //useless divs + $html = preg_replace('/
]*">((.|\n)*?)<\/div>/', '$1', $html); + //since $html = preg_replace('/]+>/', '', $html); diff --git a/demos/quickstart/protected/pages/Controls/TabPanel.page b/demos/quickstart/protected/pages/Controls/TabPanel.page index 69309931..f4c9962d 100644 --- a/demos/quickstart/protected/pages/Controls/TabPanel.page +++ b/demos/quickstart/protected/pages/Controls/TabPanel.page @@ -36,7 +36,7 @@ If both ActiveViewIndex and ActiveViewID are set, the latter t To use TTabPanel, write a template like following:

- + <com:TTabPanel> <com:TTabView Caption="View 1"> content for view 1 diff --git a/framework/Data/SqlMap/Configuration/TResultProperty.php b/framework/Data/SqlMap/Configuration/TResultProperty.php index abeeceb9..b327e0bd 100644 --- a/framework/Data/SqlMap/Configuration/TResultProperty.php +++ b/framework/Data/SqlMap/Configuration/TResultProperty.php @@ -138,7 +138,7 @@ class TResultProperty extends TComponent } /** - * @parma string ID of another used to fill the property. + * @param string ID of another used to fill the property. */ public function setResultMapping($value) { diff --git a/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php b/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php index 305afd70..4f7c8332 100644 --- a/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php +++ b/framework/Web/UI/ActiveControls/TValueTriggeredCallback.php @@ -4,12 +4,14 @@ * * @author Wei Zhuo * @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.ActiveControls */ +Prado::using('System.Web.UI.ActiveControls.TTriggeredCallback'); + /** * TValueTriggeredCallback Class * diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php index 890deb05..8218587c 100644 --- a/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/framework/Web/UI/WebControls/TTextHighlighter.php @@ -4,16 +4,16 @@ * * @author Wei Zhuo * @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.WebControls */ Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter',false); -Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter.Renderer.Html',false); -Prado::using('System.Web.UI.WebControls.TTextProcessor'); - +Prado::using('System.3rdParty.TextHighlighter.Text.Highlighter.Renderer.Html',false); +Prado::using('System.Web.UI.WebControls.TTextProcessor'); + /** * TTextHighlighter class. @@ -37,8 +37,8 @@ Prado::using('System.Web.UI.WebControls.TTextProcessor'); */ class TTextHighlighter extends TTextProcessor { - private static $_lineNumberStyle=array(TTextHighlighterLineNumberStyle::Li => HL_NUMBERS_LI, TTextHighlighterLineNumberStyle::Table => HL_NUMBERS_TABLE); - + private static $_lineNumberStyle=array(TTextHighlighterLineNumberStyle::Li => HL_NUMBERS_LI, TTextHighlighterLineNumberStyle::Table => HL_NUMBERS_TABLE); + /** * @return string tag name of the panel */ @@ -99,39 +99,39 @@ class TTextHighlighter extends TTextProcessor { $this->setViewState('CopyCode', TPropertyValue::ensureBoolean($value), false); } - - /** - * @return TTextHighlighterLineNumberStyle style of row number, Table by default - */ - public function getLineNumberStyle() - { - return $this->getViewState('LineNumberStyle', TTextHighlighterLineNumberStyle::Table); + + /** + * @return TTextHighlighterLineNumberStyle style of row number, Table by default + */ + public function getLineNumberStyle() + { + return $this->getViewState('LineNumberStyle', TTextHighlighterLineNumberStyle::Table); + } + + /** + * @param TTextHighlighterLineNumberStyle style of row number + */ + public function setLineNumberStyle($value) + { + $this->setViewState('LineNumberStyle', TPropertyValue::ensureEnum($value,'TTextHighlighterLineNumberStyle')); + } + + /** + * @return integer tab size. Defaults to 4. + */ + public function getTabSize() + { + return $this->getViewState('TabSize', 4); + } + + /** + * @param integer tab size + */ + public function setTabSize($value) + { + $this->setViewState('TabSize', TPropertyValue::ensureInteger($value)); } - - /** - * @param TTextHighlighterLineNumberStyle style of row number - */ - public function setLineNumberStyle($value) - { - $this->setViewState('LineNumberStyle', TPropertyValue::ensureEnum($value,'TTextHighlighterLineNumberStyle')); - } - - /** - * @return integer tab size. Defaults to 4. - */ - public function getTabSize() - { - return $this->getViewState('TabSize', 4); - } - - /** - * @param integer tab size - */ - public function setTabSize($value) - { - $this->setViewState('TabSize', TPropertyValue::ensureInteger($value)); - } - + /** * Registers css style for the highlighted result. * This method overrides parent implementation. @@ -143,18 +143,18 @@ class TTextHighlighter extends TTextProcessor $this->registerStyleSheet(); $this->getPage()->getClientScript()->registerPradoScript('prado'); } - - /** - * Registers the stylesheet for presentation. - */ - protected function registerStyleSheet() - { - $cs=$this->getPage()->getClientScript(); - $cssFile=Prado::getPathOfNamespace('System.3rdParty.TextHighlighter.highlight','.css'); - $cssKey='prado:TTextHighlighter:'.$cssFile; - if(!$cs->isStyleSheetFileRegistered($cssKey)) - $cs->registerStyleSheetFile($cssKey, $this->publishFilePath($cssFile)); - } + + /** + * Registers the stylesheet for presentation. + */ + protected function registerStyleSheet() + { + $cs=$this->getPage()->getClientScript(); + $cssFile=Prado::getPathOfNamespace('System.3rdParty.TextHighlighter.highlight','.css'); + $cssKey='prado:TTextHighlighter:'.$cssFile; + if(!$cs->isStyleSheetFileRegistered($cssKey)) + $cs->registerStyleSheetFile($cssKey, $this->publishFilePath($cssFile)); + } /** * Processes a text string. @@ -163,18 +163,18 @@ class TTextHighlighter extends TTextProcessor * @return string the processed text result */ public function processText($text) - { - try - { - $highlighter=Text_Highlighter::factory($this->getLanguage()); - } - catch(Exception $e) - { - $highlighter=false; - } - if($highlighter===false) - return ('
'.htmlentities(trim($text)).'
'); - + { + try + { + $highlighter=Text_Highlighter::factory($this->getLanguage()); + } + catch(Exception $e) + { + $highlighter=false; + } + if($highlighter===false) + return ('
'.htmlentities(trim($text)).'
'); + $options["use_language"]=true; $options["tabsize"] = $this->getTabSize(); if ($this->getShowLineNumbers()) @@ -191,10 +191,16 @@ class TTextHighlighter extends TTextProcessor $id = $this->getClientID(); return TJavaScript::renderScriptBlock("new Prado.WebUI.TTextHighlighter('{$id}');"); } -} - -class TTextHighlighterLineNumberStyle extends TEnumerable -{ - const Li='Li'; - const Table='Table'; +} + +/** + * @author Wei Zhuo + * @version $Id$ + * @package System.Web.UI.WebControls + * @since 3.0 + */ +class TTextHighlighterLineNumberStyle extends TEnumerable +{ + const Li='Li'; + const Table='Table'; } -- cgit v1.2.3