From: gggeek Date: Sat, 21 Feb 2015 18:58:18 +0000 (+0000) Subject: Reformat source code: doc X-Git-Tag: 4.0.0-alpha^2~188 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=05ba4479e2f74f0a51797ca268b1b8751f544614;p=plcapi.git Reformat source code: doc --- diff --git a/doc/convert.php b/doc/convert.php index 4de3b444..a811c4ed 100644 --- a/doc/convert.php +++ b/doc/convert.php @@ -1,57 +1,56 @@ load($doc); -$xsl = new DOMDocument; +$xsl = new DOMDocument(); $xsl->load($xss); // Configure the transformer -$proc = new XSLTProcessor; -if (version_compare(PHP_VERSION,'5.4',"<")) -{ - if(defined('XSL_SECPREF_WRITE_FILE')) +$proc = new XSLTProcessor(); +if (version_compare(PHP_VERSION, '5.4', "<")) { + if (defined('XSL_SECPREF_WRITE_FILE')) { ini_set("xsl.security_prefs", XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE); -} -else -{ + } +} else { $proc->setSecurityPreferences(XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE); } $proc->importStyleSheet($xsl); // attach the xsl rules //if ($_SERVER['argc'] >= 4) //{ - if (is_dir($_SERVER['argv'][3])) - { - if (!$proc->setParameter('', 'base.dir', realpath($_SERVER['argv'][3]))) - echo "setting param base.dir KO\n"; - } - else - { - //echo "{$_SERVER['argv'][3]} is not a dir\n"; +if (is_dir($_SERVER['argv'][3])) { + if (!$proc->setParameter('', 'base.dir', realpath($_SERVER['argv'][3]))) { + echo "setting param base.dir KO\n"; } +} else { + //echo "{$_SERVER['argv'][3]} is not a dir\n"; +} //} $out = $proc->transformToXML($xml); -if (!is_dir($_SERVER['argv'][3])) +if (!is_dir($_SERVER['argv'][3])) { file_put_contents($_SERVER['argv'][3], $out); +} echo "OK\n"; diff --git a/doc/custom.fo.xsl b/doc/custom.fo.xsl index f87d9747..54598264 100644 --- a/doc/custom.fo.xsl +++ b/doc/custom.fo.xsl @@ -1,7 +1,7 @@ + xmlns:fo="http://www.w3.org/1999/XSL/Format">