projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PlFlagset and PlDBTableEntry are exportable.
[platal.git]
/
classes
/
plpage.php
diff --git
a/classes/plpage.php
b/classes/plpage.php
index
258a8c3
..
c13410e
100644
(file)
--- a/
classes/plpage.php
+++ b/
classes/plpage.php
@@
-164,6
+164,7
@@
abstract class PlPage extends Smarty
if (!$globals->debug) {
error_reporting(0);
$this->display($skin);
if (!$globals->debug) {
error_reporting(0);
$this->display($skin);
+ pl_print_errors(true);
exit;
}
exit;
}
@@
-370,11
+371,10
@@
abstract class PlPage extends Smarty
protected function jsonDisplay()
{
pl_content_headers("text/javascript");
protected function jsonDisplay()
{
pl_content_headers("text/javascript");
- if (!empty($GLOBALS['pl_errors'])) {
- $this->jsonAssign('pl_errors', join("\n", $GLOBALS['pl_errors']));
- $GLOBALS['pl_errors'] = array();
+ if (!empty(PlBacktrace::$bt)) {
+ $this->jsonAssign('pl_backtraces', PlBacktrace::$bt);
}
}
- array_walk_recursive($this->_jsonVars, "escape_
xorg
DB");
+ array_walk_recursive($this->_jsonVars, "escape_
X
DB");
$jsonbegin = Env::v('jsonBegin');
$jsonend = Env::v('jsonEnd');
if (Env::has('jsonVar')) {
$jsonbegin = Env::v('jsonBegin');
$jsonend = Env::v('jsonEnd');
if (Env::has('jsonVar')) {
@@
-388,6
+388,17
@@
abstract class PlPage extends Smarty
exit;
}
// }}}
exit;
}
// }}}
+
+ public function runJSon()
+ {
+ pl_content_headers("text/javascript");
+ if (!empty(PlBacktrace::$bt)) {
+ $this->jsonAssign('pl_backtraces', PlBacktrace::$bt);
+ }
+ echo json_encode($this->_jsonVars);
+ exit;
+ }
+
// {{{ function jsonAssign
public function jsonAssign($var, $value)
{
// {{{ function jsonAssign
public function jsonAssign($var, $value)
{
@@
-397,9
+408,9
@@
abstract class PlPage extends Smarty
// }}}
}
// }}}
}
-function escape_
xorg
DB(&$item, $key)
+function escape_
X
DB(&$item, $key)
{
{
- if ($item instanceof X
Org
DBIterator) {
+ if ($item instanceof XDBIterator) {
$expanded = array();
while ($a = $item->next()) {
$expanded[] = $a;
$expanded = array();
while ($a = $item->next()) {
$expanded[] = $a;