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 --- buildscripts/PhpDocumentor/new_phpdoc.php | 2 +- buildscripts/PhpDocumentor/phpDocumentor/InlineTags.inc | 6 +++--- buildscripts/PhpDocumentor/phpDocumentor/Io.inc | 5 +++-- buildscripts/PhpDocumentor/phpDocumentor/Setup.inc.php | 2 +- buildscripts/PhpDocumentor/phpDocumentor/common.inc.php | 6 ++++-- buildscripts/PhpDocumentor/phpDocumentor/phpDocumentorTParser.inc | 4 ++-- buildscripts/texbuilder/Page2Tex.php | 5 ++++- 7 files changed, 18 insertions(+), 12 deletions(-) (limited to 'buildscripts') 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); -- cgit v1.2.3