|
From: <nma...@us...> - 2006-03-23 09:06:14
|
Revision: 36 Author: nmarkgraf Date: 2006-03-23 01:06:06 -0800 (Thu, 23 Mar 2006) ViewCVS: http://svn.sourceforge.net/opendocumentphp/?rev=36&view=rev Log Message: ----------- Fix should fix some errors with the "ini_set" statement in unix or windows environment. Modified Paths: -------------- poc/src/samples/TestInput.php poc/src/samples/TestOutput.php Modified: poc/src/samples/TestInput.php =================================================================== --- poc/src/samples/TestInput.php 2006-03-20 22:14:51 UTC (rev 35) +++ poc/src/samples/TestInput.php 2006-03-23 09:06:06 UTC (rev 36) @@ -42,6 +42,13 @@ * @subpackage samples * @since 0.4.2 */ + +// Very dirty hack ... +$dsep = DIRECTORY_SEPARATOR; +$IP = dirname( realpath( dirname( dirname ( __FILE__) . "$dsep..$dsep") ) ); +$sep = (DIRECTORY_SEPARATOR == "\\") ? ";" : ":"; +ini_set( "include_path", ini_get( "include_path" ). "$sep$IP" ); + ?> <html> <head> Modified: poc/src/samples/TestOutput.php =================================================================== --- poc/src/samples/TestOutput.php 2006-03-20 22:14:51 UTC (rev 35) +++ poc/src/samples/TestOutput.php 2006-03-23 09:06:06 UTC (rev 36) @@ -14,7 +14,12 @@ * @since 0.4.2 */ -ini_set( "include_path", ini_get( "include_path" ). ";..\\;.\\styles\\;..\\styles\\;.\\content\\;..\\content\\" ); +// Very dirty hack ... +$dsep = DIRECTORY_SEPARATOR; +$IP = dirname( realpath( dirname( dirname ( __FILE__) . "$dsep..$dsep") ) ) . $dsep; +$sep = (DIRECTORY_SEPARATOR == "\\") ? ";" : ":"; +ini_set( "include_path", ini_get( "include_path" ). "$sep$IP" ); + include_once( "AllInclude.inc" ); require_once( "OpenDocumentFactory.php" ); @@ -30,7 +35,7 @@ function __construct() { $conf = array( "mode" => 0600 ); - $this->logger = &Log::factory( "file", "D:/PHP/OpenDocument.log", "OpenDocument", $conf ); +// $this->logger = &Log::factory( "file", "D:/PHP/OpenDocument.log", "OpenDocument", $conf ); $this->logger = &Log::factory( "console", "", "OpenDocument" ); } @@ -48,8 +53,6 @@ $text = $content->getText(); - $text->addNoForms(); - $text->addToText( $text->getTextHeading( "Heading", 1, "The first step" ) ); $text->addToText( $text->getTextParagraph( "Paragraph", "This is a little test!" ) ); } @@ -61,11 +64,11 @@ } function makeAutomaticStyles( $automaticStyles ) { - return $automaticStyles; + // return $automaticStyles; } function makeScripts( $scripts ) { - return $scripts; + // return $scripts; } function makeStyle( $style ) { @@ -168,8 +171,8 @@ */ $this->makeMeta( $TestDoc->getMeta(), $creator, $title, "en-EN" ); - $this->makeAutomaticStyles( $TestDoc->getAutomaticStyles() ); - $this->makeScripts( $TestDoc->getScripts() ); +// $this->makeAutomaticStyles( $TestDoc->getAutomaticStyles() ); +// $this->makeScripts( $TestDoc->getScripts() ); $this->makeFontFaceDecl( $TestDoc->getFontFaceDeclaration() ); $this->makeStyle( $TestDoc->getStyle() ); $this->makeContent( $TestDoc->getBody() ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |