projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f0fafb
)
Inserted a pl_error field in the json responses
author
Riton
<henri.jouhaud@polytechnique.org>
Sat, 4 Sep 2010 14:54:49 +0000
(16:54 +0200)
committer
Florent Bruneau
<florent.bruneau@polytechnique.org>
Sat, 4 Sep 2010 16:14:15 +0000
(18:14 +0200)
Signed-off-by: Riton <henri.jouhaud@polytechnique.org>
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/plpage.php
patch
|
blob
|
blame
|
history
diff --git
a/classes/plpage.php
b/classes/plpage.php
index
a38a076
..
63ece95
100644
(file)
--- a/
classes/plpage.php
+++ b/
classes/plpage.php
@@
-370,6
+370,10
@@
abstract class PlPage extends Smarty
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();
+ }
array_walk_recursive($this->_jsonVars, "escape_xorgDB");
$jsonbegin = Env::v('jsonBegin');
$jsonend = Env::v('jsonEnd');