projects
/
fusionforge
/
fusionforge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
project home
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
11b3e7d
)
put a few commonly used strings into their own variables
author
Thorsten Glaser
<mirabilos@evolvis.org>
Fri, 16 Jul 2010 16:25:33 +0000
(16:25 +0000)
committer
Thorsten Glaser
<mirabilos@evolvis.org>
Fri, 16 Jul 2010 16:25:33 +0000
(16:25 +0000)
e.g. for easier moves
src/common/include/extras-debug.php
patch
|
blob
|
history
diff --git
a/src/common/include/extras-debug.php
b/src/common/include/extras-debug.php
index ec3c15281aa1e93145e2473de1c36cdd8b984643..7fd7e6b1226c3c6501bb79dff4f450ba631e52d9 100644
(file)
--- a/
src/common/include/extras-debug.php
+++ b/
src/common/include/extras-debug.php
@@
-61,6
+61,10
@@
function ffOutputHandler($buffer) {
/* stop calling ffErrorHandler */
restore_error_handler();
/* stop calling ffErrorHandler */
restore_error_handler();
+ $dtdpath = $gfcommon . 'include/';
+ // this is, sadly, necessary (especially in ff-plugin-mediawiki)
+ $pre_tag = "<pre style=\"margin:0; padding:0; border:0;\">";
+
if (!isset($ffErrors))
$ffErrors = array();
if (!isset($ffErrors))
$ffErrors = array();
@@
-106,7
+110,7
@@
function ffOutputHandler($buffer) {
/* generate buffer for checking */
$cbuf = str_ireplace('http://www.w3.org/TR/xhtml1/DTD/',
/* generate buffer for checking */
$cbuf = str_ireplace('http://www.w3.org/TR/xhtml1/DTD/',
- 'file://' . $
gfcommon . 'include/'
, $buffer);
+ 'file://' . $
dtdpath
, $buffer);
if ($has_div)
$cbuf .= "\n</div></div>";
$cbuf .= "\n</body></html>\n";
if ($has_div)
$cbuf .= "\n</div></div>";
$cbuf .= "\n</body></html>\n";
@@
-123,7
+127,7
@@
function ffOutputHandler($buffer) {
2 => array("pipe", "w"),
);
$xmlstarlet = proc_open("xmlstarlet val -d " .
2 => array("pipe", "w"),
);
$xmlstarlet = proc_open("xmlstarlet val -d " .
- escapeshellarg($
gfcommon . 'include/
xhtml1-transitional.dtd') .
+ escapeshellarg($
dtdpath . '
xhtml1-transitional.dtd') .
" -", $dspec, $pipes);
$rv = 0;
if (is_resource($xmlstarlet)) {
" -", $dspec, $pipes);
$rv = 0;
if (is_resource($xmlstarlet)) {
@@
-141,7
+145,7
@@
function ffOutputHandler($buffer) {
if ($rv) {
$valck[] = array(
'msg' => "xmlstarlet found that this document is not valid (errorlevel $rv)!",
if ($rv) {
$valck[] = array(
'msg' => "xmlstarlet found that this document is not valid (errorlevel $rv)!",
- 'extra' =>
"<pre style=\"margin:0; padding:0; border:0;\">"
. htmlspecialchars(trim($serr .
+ 'extra' =>
$pre_tag
. htmlspecialchars(trim($serr .
"\n\n" . $sout)) . "</pre>",
'type' => "error"
);
"\n\n" . $sout)) . "</pre>",
'type' => "error"
);
@@
-173,9
+177,9
@@
function ffOutputHandler($buffer) {
/* append XHTML source code, if validation failed */
if ($appsrc) {
if (!$sysdebug_akelos || $vbuf == $sbuf[1])
/* append XHTML source code, if validation failed */
if ($appsrc) {
if (!$sysdebug_akelos || $vbuf == $sbuf[1])
- $vbuf = "<ol><li>
<pre style=\"margin:0; padding:0; border:0;\">" . join("</pre></li>\n<li><pre style=\"margin:0; padding:0; border:0;\">"
, explode("\n", htmlentities(rtrim($cbuf)))) . "</pre></li></ol>";
+ $vbuf = "<ol><li>
" . $pre_tag . join("</pre></li>\n<li>" . $pre_tag
, explode("\n", htmlentities(rtrim($cbuf)))) . "</pre></li></ol>";
else
else
- $vbuf =
"<pre style=\"margin:0; padding:0; border:0;\">"
. htmlentities(rtrim($sbuf[0])) . "</pre>" . $vbuf;
+ $vbuf =
$pre_tag
. htmlentities(rtrim($sbuf[0])) . "</pre>" . $vbuf;
$valck[] = array(
'msg' => "Since XHTML validation failed, here’s the checked document for you to look at:",
'extra' => $vbuf,
$valck[] = array(
'msg' => "Since XHTML validation failed, here’s the checked document for you to look at:",
'extra' => $vbuf,