mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 11:04:02 +02:00
Fix plugin AdminerPrettyJsonColumn
This commit is contained in:
@@ -3,13 +3,6 @@
|
|||||||
/** Pretty print JSON values in edit
|
/** Pretty print JSON values in edit
|
||||||
*/
|
*/
|
||||||
class AdminerPrettyJsonColumn {
|
class AdminerPrettyJsonColumn {
|
||||||
/** @var AdminerPlugin */
|
|
||||||
protected $adminer;
|
|
||||||
|
|
||||||
public function __construct($adminer) {
|
|
||||||
$this->adminer = $adminer;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function testJson($value) {
|
private function testJson($value) {
|
||||||
if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
|
if ((substr($value, 0, 1) == '{' || substr($value, 0, 1) == '[') && ($json = json_decode($value, true))) {
|
||||||
return $json;
|
return $json;
|
||||||
@@ -33,6 +26,5 @@ class AdminerPrettyJsonColumn {
|
|||||||
$value = json_encode($json);
|
$value = json_encode($json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->adminer->_callParent('processInput', array($field, $value, $function));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user