[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] cvs: phd(PHD_ENTERPRISE) / config.php render.php /formats bigxhtml.php php.php xhtml.php
From: "Rudy Nappée" <loudi () php ! net>
Date: 2008-07-30 12:17:22
Message-ID: cvsloudi1217420242 () cvsserver
[Download RAW message or body]
loudi Wed Jul 30 12:17:22 2008 UTC
Modified files: (Branch: PHD_ENTERPRISE)
/phd config.php render.php
/phd/formats xhtml.php bigxhtml.php php.php
/phd/include PhDIndex.class.php PhDFormat.class.php
PhDReader.class.php PhDBuildOptions.class.php
PhDRender.class.php
Log:
* migrating from sqlite_ functions to SQLite3 OO methods (needs pecl sqlite3 extension)
["loudi-20080730121722.txt" (text/plain)]
http://cvs.php.net/viewvc.cgi/phd/config.php?r1=1.53.2.1&r2=1.53.2.2&diff_format=u
Index: phd/config.php
diff -u phd/config.php:1.53.2.1 phd/config.php:1.53.2.2
--- phd/config.php:1.53.2.1 Tue Jul 29 19:56:48 2008
+++ phd/config.php Wed Jul 30 12:17:20 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: config.php,v 1.53.2.1 2008/07/29 19:56:48 loudi Exp $ */
+/* $Id: config.php,v 1.53.2.2 2008/07/30 12:17:20 loudi Exp $ */
require $ROOT . "/include/PhDErrors.php";
@@ -42,16 +42,6 @@
self::$optionArray = array_merge(self::$optionArray, (array)$a);
}
- /*public static function get($opt) {
- if (!is_string($opt)) {
- throw new UnexpectedValueException("Excpecting a string");
- }
- if (!isset(self::$optionArray[$opt])) {
- throw new UnexpectedValueException("Unknown option: $opt");
- }
- return self::$optionArray[$opt];
- }*/
-
public static function __callStatic($name, $params) {
$name = strtolower($name); // FC if this becomes case-sensitive
if (strncmp($name, 'set', 3) === 0) {
http://cvs.php.net/viewvc.cgi/phd/render.php?r1=1.3.2.3&r2=1.3.2.4&diff_format=u
Index: phd/render.php
diff -u phd/render.php:1.3.2.3 phd/render.php:1.3.2.4
--- phd/render.php:1.3.2.3 Tue Jul 29 19:56:49 2008
+++ phd/render.php Wed Jul 30 12:17:20 2008
@@ -39,7 +39,7 @@
// Create indexer
$format = new PhDIndex();
$render->attach($format);
-
+var_dump(PhDConfig::xml_file());
$reader->open(PhDConfig::xml_file());
$render->render($reader);
http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.68.2.2&r2=1.68.2.3&diff_format=u
Index: phd/formats/xhtml.php
diff -u phd/formats/xhtml.php:1.68.2.2 phd/formats/xhtml.php:1.68.2.3
--- phd/formats/xhtml.php:1.68.2.2 Tue Jul 29 19:56:48 2008
+++ phd/formats/xhtml.php Wed Jul 30 12:17:21 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: xhtml.php,v 1.68.2.2 2008/07/29 19:56:48 loudi Exp $ */
+/* $Id: xhtml.php,v 1.68.2.3 2008/07/30 12:17:21 loudi Exp $ */
class PhDXHTMLFormat extends PhDFormat {
private $myelementmap = array( /* {{{ */
'abstract' => 'div', /* Docbook-xsl prints "abstract"... */
@@ -504,7 +504,7 @@
return NO_SQLITE;
if ($desc === null) {
- $rsl = sqlite_array_query($this->sqlite, "SELECT docbook_id, filename \
FROM ids WHERE docbook_id='$for'", SQLITE_ASSOC); + $rsl = \
$this->sqlite->query("SELECT docbook_id, filename FROM ids WHERE \
docbook_id='$for'")->fetchArray(SQLITE3_ASSOC);
if (!isset($rsl[0])) {
return false;
@@ -512,7 +512,7 @@
$retval = $rsl[0]["filename"] . '.' . $this->ext . '#' . \
$rsl[0]["docbook_id"]; } else {
- $rsl = sqlite_array_query($this->sqlite, $q = "SELECT docbook_id, \
filename, sdesc, ldesc FROM ids WHERE docbook_id='$for'", SQLITE_ASSOC); + \
$rsl = $this->sqlite->query($q = "SELECT docbook_id, filename, sdesc, ldesc FROM ids \
WHERE docbook_id='$for'")->fetchArray(SQLITE3_ASSOC);
if (!isset($rsl[0])) {
var_dump($q);
@@ -532,7 +532,7 @@
}
public function getLongDescription($for) {
return NO_SQLITE;
- $rsl = sqlite_array_query($this->sqlite, $q = "SELECT sdesc, ldesc FROM ids \
WHERE docbook_id='$for'", SQLITE_ASSOC); + $rsl = $this->sqlite->query($q = \
"SELECT sdesc, ldesc FROM ids WHERE docbook_id='$for'")->fetchArray(SQLITE3_ASSOC); \
if (!isset($rsl[0])) { var_dump($q);
return false;
@@ -541,13 +541,13 @@
}
public function getShortDescription($for) {
return NO_SQLITE;
- $rsl = sqlite_array_query($this->sqlite, "SELECT sdesc, ldesc FROM ids WHERE \
docbook_id='$for'", SQLITE_ASSOC); + $rsl = $this->sqlite->query("SELECT \
sdesc, ldesc FROM ids WHERE docbook_id='$for'")->fetchArray(SQLITE3_ASSOC); return \
$rsl[0]["sdesc"] ?: $rsl[0]["ldesc"]; }
public function getParentInfo($for) {
return NO_SQLITE;
- $rsl = sqlite_array_query($this->sqlite, "SELECT parent_id FROM ids WHERE \
docbook_id='$for'", SQLITE_ASSOC);
- return sqlite_array_query($this->sqlite, "SELECT filename, sdesc, ldesc FROM \
ids WHERE docbook_id='{$rsl[0]["parent_id"]}'", SQLITE_ASSOC); + $rsl = \
$this->sqlite->query("SELECT parent_id FROM ids WHERE docbook_id='$for'"); + \
return $this->sqlite->query("SELECT filename, sdesc, ldesc FROM ids WHERE \
docbook_id='{$rsl[0]["parent_id"]}'")->fetchArray(SQLITE3_ASSOC); }
protected function createTOC($rsl) {
$toc = '<ol>';
@@ -556,7 +556,7 @@
$link = $this->createLink($row["docbook_id"], $desc);
$list = "";
if ($this->cchunk["name"] === "book" || $this->cchunk["name"] === "set") \
{
- $childrens = sqlite_array_query($this->sqlite, "SELECT docbook_id, \
filename, sdesc, ldesc FROM ids WHERE parent_id='{$row["docbook_id"]}' AND \
filename=docbook_id", SQLITE_ASSOC); + $childrens = \
$this->sqlite->query("SELECT docbook_id, filename, sdesc, ldesc FROM ids WHERE \
parent_id='{$row["docbook_id"]}' AND \
filename=docbook_id")->fetchArray(SQLITE3_ASSOC); if (NO_SQLITE && $childrens) {
$list = "<ol>";
foreach($childrens as $child) {
@@ -758,7 +758,7 @@
$toc = "";
if (NO_SQLITE && !in_array($id, $this->TOC_WRITTEN)) {
- $rsl = sqlite_array_query($this->sqlite, "SELECT docbook_id, filename, \
sdesc, ldesc FROM ids WHERE parent_id='$id' AND filename=docbook_id", SQLITE_ASSOC); \
+ $rsl = $this->sqlite->query("SELECT docbook_id, filename, sdesc, ldesc \
FROM ids WHERE parent_id='$id' AND filename=docbook_id")->fetchArray(SQLITE3_ASSOC); \
$toc = $this->createTOC($rsl); }
return $toc."</div>";
@@ -770,7 +770,7 @@
$id = $this->CURRENT_CHUNK;
if (NO_SQLITE) {
- $this->CHILDRENS = $rsl = sqlite_array_query($this->sqlite, "SELECT \
docbook_id, filename, sdesc, ldesc FROM ids WHERE parent_id='$id' AND \
filename=docbook_id", SQLITE_ASSOC); + $this->CHILDRENS = $rsl = \
$this->sqlite->query("SELECT docbook_id, filename, sdesc, ldesc FROM ids WHERE \
parent_id='$id' AND filename=docbook_id")->fetchArray(SQLITE3_ASSOC); $toc = \
$this->createToc($rsl); } else {
$this->CHILDRENS = array();
@@ -790,7 +790,7 @@
if ($open) {
if (NO_SQLITE) {
- $this->CHILDRENS = sqlite_array_query($this->sqlite, "SELECT \
docbook_id, filename, sdesc, ldesc FROM ids WHERE parent_id='$id' AND \
filename=docbook_id", SQLITE_ASSOC); + $this->CHILDRENS = \
$this->sqlite->query("SELECT docbook_id, filename, sdesc, ldesc FROM ids WHERE \
parent_id='$id' AND filename=docbook_id")->fetchArray(SQLITE3_ASSOC); }
$this->CURRENT_CHUNK = $id;
$this->notify(PhDRender::CHUNK, PhDRender::OPEN);
http://cvs.php.net/viewvc.cgi/phd/formats/bigxhtml.php?r1=1.2.2.3&r2=1.2.2.4&diff_format=u
Index: phd/formats/bigxhtml.php
diff -u phd/formats/bigxhtml.php:1.2.2.3 phd/formats/bigxhtml.php:1.2.2.4
--- phd/formats/bigxhtml.php:1.2.2.3 Tue Jul 29 19:56:48 2008
+++ phd/formats/bigxhtml.php Wed Jul 30 12:17:21 2008
@@ -118,7 +118,7 @@
public function createLink($for, &$desc = null, $type = self::SDESC) {
$retval = '#' . $for;
if ($desc !== null) {
- $rsl = sqlite_array_query($this->sqlite, "SELECT sdesc, ldesc FROM ids \
WHERE docbook_id='$for'", SQLITE_ASSOC); + $rsl = \
$this->sqlite($this->sqlite, "SELECT sdesc, ldesc FROM ids WHERE \
docbook_id='$for'")->fetchArray(SQLITE3_ASSOC); $retval = '#' . $for;
if ($type === self::SDESC) {
http://cvs.php.net/viewvc.cgi/phd/formats/php.php?r1=1.4.2.3&r2=1.4.2.4&diff_format=u
Index: phd/formats/php.php
diff -u phd/formats/php.php:1.4.2.3 phd/formats/php.php:1.4.2.4
--- phd/formats/php.php:1.4.2.3 Tue Jul 29 19:56:48 2008
+++ phd/formats/php.php Wed Jul 30 12:17:21 2008
@@ -141,7 +141,7 @@
protected function lookupRefname($for) {
return $this->refs[$for];
return NO_SQLITE;
- $rsl = sqlite_array_query($this->sqlite, "SELECT filename, ldesc, sdesc FROM \
ids WHERE sdesc='$for' AND element='refentry'", SQLITE_ASSOC); + $rsl = \
$this->sqlite->query("SELECT filename, ldesc, sdesc FROM ids WHERE sdesc='$for' AND \
element='refentry'")->fetchArray(SQLITE3_ASSOC); if (isset($rsl[0])) {
return $rsl[0]["filename"];
}
http://cvs.php.net/viewvc.cgi/phd/include/PhDIndex.class.php?r1=1.2.2.3&r2=1.2.2.4&diff_format=u
Index: phd/include/PhDIndex.class.php
diff -u phd/include/PhDIndex.class.php:1.2.2.3 phd/include/PhDIndex.class.php:1.2.2.4
--- phd/include/PhDIndex.class.php:1.2.2.3 Tue Jul 29 19:56:49 2008
+++ phd/include/PhDIndex.class.php Wed Jul 30 12:17:21 2008
@@ -91,11 +91,11 @@
if (file_exists("index.sqlite")) {
unlink("index.sqlite");
}
- $db = sqlite_open("index.sqlite");
+ $db = new SQLite3('index.sqlite');
- sqlite_exec($db, 'PRAGMA default_synchronous=OFF');
- sqlite_exec($db, 'PRAGMA count_changes=OFF');
- sqlite_exec($db, 'PRAGMA cache_size=100000');
+ $db->exec('PRAGMA default_synchronous=OFF');
+ $db->exec('PRAGMA count_changes=OFF');
+ $db->exec('PRAGMA cache_size=100000');
$create = <<<SQL
CREATE TABLE ids (
@@ -107,16 +107,16 @@
element TEXT
);
SQL;
- sqlite_exec($db, 'PRAGMA default_synchronous=OFF');
- sqlite_exec($db, 'PRAGMA count_changes=OFF');
- sqlite_exec($db, 'PRAGMA cache_size=100000');
- sqlite_exec($db, $create);
+ $db->exec('PRAGMA default_synchronous=OFF');
+ $db->exec('PRAGMA count_changes=OFF');
+ $db->exec('PRAGMA cache_size=100000');
+ $db->exec($create);
$this->db = $db;
$this->chunks = array();
} else {
- //print_r($this->chunks);
+ print_r($this->chunks);
}
}
}
@@ -173,12 +173,12 @@
}
$this->commit .= sprintf(
"INSERT INTO ids (docbook_id, filename, parent_id, sdesc, ldesc, \
element) VALUES('%s', '%s', '%s', '%s', '%s', '%s');\n",
- sqlite_escape_string($lastchunkid),
- sqlite_escape_string($a["filename"]),
- sqlite_escape_string($this->currentchunk),
- sqlite_escape_string($sdesc),
- sqlite_escape_string($a["ldesc"]),
- sqlite_escape_string($a["element"])
+ $this->db->escapeString($lastchunkid),
+ $this->db->escapeString($a["filename"]),
+ $this->db->escapeString($this->currentchunk),
+ $this->db->escapeString($sdesc),
+ $this->db->escapeString($a["ldesc"]),
+ $this->db->escapeString($a["element"])
);
if ($array === true && !empty($a["sdesc"])) {
foreach($a["sdesc"] as $sdesc) {
@@ -186,14 +186,19 @@
$this->commit .= sprintf(
"INSERT INTO ids (docbook_id, filename, \
parent_id, sdesc, ldesc, element) VALUES('%s', '%s', '', '%s', '%s', '%s');\n", \
"phdgen-" . $rand,
- sqlite_escape_string($a["filename"]),
- sqlite_escape_string($sdesc),
- sqlite_escape_string($a["ldesc"]),
- sqlite_escape_string($a["element"])
+ $this->db->escapeString($a["filename"]),
+ $this->db->escapeString($sdesc),
+ $this->db->escapeString($a["ldesc"]),
+ $this->db->escapeString($a["element"])
);
}
}
}
+
+ // Don't sort IDs in indexer
+ //public function sortIDs() {
+ //}
+
public function format_section_chunk($open, $name, $attrs, $props) {
static $a = array();
if ($open) {
@@ -234,7 +239,6 @@
$this->notify(PhDRender::CHUNK, PhDRender::CLOSE);
$this->appendID();
-
return false;
}
public function format_legalnotice_chunk($open, $name, $attrs, $props) {
@@ -267,8 +271,10 @@
}
}
public function commit() {
- var_dump(sqlite_exec($this->db, 'BEGIN TRANSACTION; '.$this->commit.' \
COMMIT'));
- $this->commit = null;
+ if (isset($this->commit) && $this->commit) {
+ var_dump($this->db->exec('BEGIN TRANSACTION; '.$this->commit.' \
COMMIT')); + $this->commit = null;
+ }
}
}
http://cvs.php.net/viewvc.cgi/phd/include/PhDFormat.class.php?r1=1.10.6.2&r2=1.10.6.3&diff_format=u
Index: phd/include/PhDFormat.class.php
diff -u phd/include/PhDFormat.class.php:1.10.6.2 \
phd/include/PhDFormat.class.php:1.10.6.3
--- phd/include/PhDFormat.class.php:1.10.6.2 Tue Jul 29 19:56:49 2008
+++ phd/include/PhDFormat.class.php Wed Jul 30 12:17:21 2008
@@ -11,7 +11,7 @@
private static $autogen = array();
public function __construct() {
- $this->sqlite = sqlite_open("index.sqlite");
+ $this->sqlite = new SQLite3('index.sqlite');
$this->sortIDs();
}
@@ -24,18 +24,19 @@
abstract public function update($event, $value = null);
public function sortIDs() {
- sqlite_create_aggregate($this->sqlite, "idx", array($this, "SQLiteIndex"), \
array($this, "SQLiteFinal"), 6);
- sqlite_unbuffered_query($this->sqlite, "SELECT idx(docbook_id, filename, \
parent_id, sdesc, ldesc, element) FROM ids", SQLITE_ASSOC); + \
$this->sqlite->createAggregate("idx", array($this, "SQLiteIndex"), array($this, \
"SQLiteFinal"), 6); + $this->sqlite->querySingle('SELECT idx(docbook_id, \
filename, parent_id, sdesc, ldesc, element) FROM ids'); + \
//$this->sqlite_unbuffered_query($this->sqlite, "SELECT idx(docbook_id, filename, \
parent_id, sdesc, ldesc, element) FROM ids", SQLITE_ASSOC); //print_r($this->idx);
}
public function SQLiteIndex(&$context, $id, $filename, $parent, $sdesc, $ldesc, \
$element) { $this->idx[$id] = array(
-"docbook_id" => $id,
-"filename" => $filename,
-"parent_id" => $parent,
-"sdesc" => $sdesc,
-"ldesc" => $ldesc,
-"element" => $element
+ "docbook_id" => $id,
+ "filename" => $filename,
+ "parent_id" => $parent,
+ "sdesc" => $sdesc,
+ "ldesc" => $ldesc,
+ "element" => $element
);
if ($element == "refentry") {
$this->refs[$sdesc] = $id;
http://cvs.php.net/viewvc.cgi/phd/include/PhDReader.class.php?r1=1.17.4.1&r2=1.17.4.2&diff_format=u
Index: phd/include/PhDReader.class.php
diff -u phd/include/PhDReader.class.php:1.17.4.1 \
phd/include/PhDReader.class.php:1.17.4.2
--- phd/include/PhDReader.class.php:1.17.4.1 Mon Jul 28 22:40:57 2008
+++ phd/include/PhDReader.class.php Wed Jul 30 12:17:21 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: PhDReader.class.php,v 1.17.4.1 2008/07/28 22:40:57 bjori Exp $ */
+/* $Id: PhDReader.class.php,v 1.17.4.2 2008/07/30 12:17:21 loudi Exp $ */
//6271
class PhDReader extends XMLReader {
@@ -7,109 +7,109 @@
const XMLNS_XLINK = "http://www.w3.org/1999/xlink";
const XMLNS_PHD = "http://www.php.net/ns/phd";
const XMLNS_DOCBOOK = "http://docbook.org/ns/docbook";
-
- public function __construct() {
- }
-
- public function close() {
- return XMLReader::close();
- }
-
- public function getAttribute($name) {
- return XMLReader::getAttribute($name);
- }
-
- public function getAttributeNo($index) {
- return XMLReader::getAttributeNo($index);
- }
-
- public function getAttributeNs($name, $namespaceURI) {
- return XMLReader::getAttributeNs($name, $namespaceURI);
- }
-
- public function getParserProperty($property) {
- return XMLReader::getParserProperty($property);
- }
-
- public function isValid() {
- return XMLReader::isValid();
- }
-
- public function lookupNamespace($prefix) {
- return XMLReader::lookupNamespace($prefix);
- }
-
- public function moveToAttributeNo($index) {
- return XMLReader::moveToAttributeNo($index);
- }
-
- public function moveToAttribute($name) {
- return XMLReader::moveToAttribute($name);
- }
-
- public function moveToAttributeNs($name, $namespaceURI) {
- return XMLReader::moveToAttributeNs($name, $namespaceURI);
- }
-
- public function moveToElement() {
- return XMLReader::moveToElement();
- }
-
- public function moveToFirstAttribute() {
- return XMLReader::moveToFirstAttribute();
- }
-
- public function moveToNextAttribute() {
- return XMLReader::moveToNextAttribute();
- }
-
- public function open($URI, $encoding = null, $options = null) {
- return XMLReader::open($URI, $encoding, $options);
- }
-
- public function read() {
- return XMLReader::read();
- }
-
- public function next($localname = null) {
- return XMLReader::next($localname);
- }
-
- public function readInnerXml() {
- return XMLReader::readInnerXml();
- }
-
- public function readOuterXml() {
- return XMLReader::readOuterXml();
- }
-
- public function readString() {
- return XMLReader::readString();
- }
-
- public function setSchema($filename) {
- return XMLReader::setSchema($filename);
- }
-
- public function setParserProperty($property, $value) {
- return XMLReader::setParserProperty($property, $value);
- }
-
- public function setRelaxNGSchema($filename) {
- return XMLReader::setRelaxNGSchema($filename);
- }
-
- public function setRelaxNGSchemaSource($source) {
- return XMLReader::setRelaxNGSchemaSource($source);
- }
-
- public function XML($source, $encoding = null, $options = null) {
- return XMLReader::XML($source, $encoding, $options);
- }
-
- public function expand() {
- return XMLReader::expand();
- }
+
+ public function __construct() {
+ }
+
+ public function close() {
+ return XMLReader::close();
+ }
+
+ public function getAttribute($name) {
+ return XMLReader::getAttribute($name);
+ }
+
+ public function getAttributeNo($index) {
+ return XMLReader::getAttributeNo($index);
+ }
+
+ public function getAttributeNs($name, $namespaceURI) {
+ return XMLReader::getAttributeNs($name, $namespaceURI);
+ }
+
+ public function getParserProperty($property) {
+ return XMLReader::getParserProperty($property);
+ }
+
+ public function isValid() {
+ return XMLReader::isValid();
+ }
+
+ public function lookupNamespace($prefix) {
+ return XMLReader::lookupNamespace($prefix);
+ }
+
+ public function moveToAttributeNo($index) {
+ return XMLReader::moveToAttributeNo($index);
+ }
+
+ public function moveToAttribute($name) {
+ return XMLReader::moveToAttribute($name);
+ }
+
+ public function moveToAttributeNs($name, $namespaceURI) {
+ return XMLReader::moveToAttributeNs($name, $namespaceURI);
+ }
+
+ public function moveToElement() {
+ return XMLReader::moveToElement();
+ }
+
+ public function moveToFirstAttribute() {
+ return XMLReader::moveToFirstAttribute();
+ }
+
+ public function moveToNextAttribute() {
+ return XMLReader::moveToNextAttribute();
+ }
+
+ public function open($URI, $encoding = null, $options = null) {
+ return XMLReader::open($URI, $encoding, $options);
+ }
+
+ public function read() {
+ return XMLReader::read();
+ }
+
+ public function next($localname = null) {
+ return XMLReader::next($localname);
+ }
+
+ public function readInnerXml() {
+ return XMLReader::readInnerXml();
+ }
+
+ public function readOuterXml() {
+ return XMLReader::readOuterXml();
+ }
+
+ public function readString() {
+ return XMLReader::readString();
+ }
+
+ public function setSchema($filename) {
+ return XMLReader::setSchema($filename);
+ }
+
+ public function setParserProperty($property, $value) {
+ return XMLReader::setParserProperty($property, $value);
+ }
+
+ public function setRelaxNGSchema($filename) {
+ return XMLReader::setRelaxNGSchema($filename);
+ }
+
+ public function setRelaxNGSchemaSource($source) {
+ return XMLReader::setRelaxNGSchemaSource($source);
+ }
+
+ public function XML($source, $encoding = null, $options = null) {
+ return XMLReader::XML($source, $encoding, $options);
+ }
+
+ public function expand() {
+ return XMLReader::expand();
+ }
}
http://cvs.php.net/viewvc.cgi/phd/include/PhDBuildOptions.class.php?r1=1.6.2.1&r2=1.6.2.2&diff_format=u
Index: phd/include/PhDBuildOptions.class.php
diff -u phd/include/PhDBuildOptions.class.php:1.6.2.1 \
phd/include/PhDBuildOptions.class.php:1.6.2.2
--- phd/include/PhDBuildOptions.class.php:1.6.2.1 Tue Jul 29 19:56:49 2008
+++ phd/include/PhDBuildOptions.class.php Wed Jul 30 12:17:21 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: PhDBuildOptions.class.php,v 1.6.2.1 2008/07/29 19:56:49 loudi Exp $ */
+/* $Id: PhDBuildOptions.class.php,v 1.6.2.2 2008/07/30 12:17:21 loudi Exp $ */
class PhDBuildOptionsParser extends PhDOptionParser
{
@@ -271,4 +271,15 @@
$optParser = new PhDBuildOptionsParser;
$optParser->getopt();
+if (!$optParser->docbook && $argc > 1) {
+ $arg = $argv[$argc-1];
+ if (is_dir($arg)) {
+ PhDConfig::set_xml_root($arg);
+ PhDConfig::set_xml_file($arg . DIRECTORY_SEPARATOR . ".manual.xml");
+ } elseif (is_file($arg)) {
+ PhDConfig::set_xml_root(dirname($arg));
+ PhDConfig::set_xml_file($arg);
+ }
+}
+
?>
http://cvs.php.net/viewvc.cgi/phd/include/PhDRender.class.php?r1=1.2.2.3&r2=1.2.2.4&diff_format=u
Index: phd/include/PhDRender.class.php
diff -u phd/include/PhDRender.class.php:1.2.2.3 \
phd/include/PhDRender.class.php:1.2.2.4
--- phd/include/PhDRender.class.php:1.2.2.3 Tue Jul 29 19:56:49 2008
+++ phd/include/PhDRender.class.php Wed Jul 30 12:17:21 2008
@@ -46,7 +46,7 @@
switch($type) {
case XMLReader::ELEMENT: /* {{{ */
$open = true;
- /* break intentionally omitted */
+ /* break intentionally omitted */
case XMLReader::END_ELEMENT:
$name = $r->name;
$depth = $r->depth;
@@ -65,12 +65,12 @@
}
$props = array(
- "empty" => $r->isEmptyElement,
- "isChunk" => false,
- "lang" => $r->xmlLang,
- "ns" => $r->namespaceURI,
- "sibling" => $lastdepth >= $depth ? \
$this->STACK[$depth] : "",
- "depth" => $depth,
+ "empty" => $r->isEmptyElement,
+ "isChunk" => false,
+ "lang" => $r->xmlLang,
+ "ns" => $r->namespaceURI,
+ "sibling" => $lastdepth >= $depth ? $this->STACK[$depth] : "",
+ "depth" => $depth,
);
$this->STACK[$depth] = $name;
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic