support < 0.21 syntax highlighting
This commit is contained in:
parent
106141efa4
commit
ec8851e46c
|
@ -588,9 +588,17 @@ class zerobin
|
||||||
|
|
||||||
// set formatter for for the view.
|
// set formatter for for the view.
|
||||||
if (!property_exists($paste->meta, 'formatter'))
|
if (!property_exists($paste->meta, 'formatter'))
|
||||||
|
{
|
||||||
|
// support < 0.21 syntax highlighting
|
||||||
|
if (property_exists($paste->meta, 'syntaxcoloring') && $paste->meta->syntaxcoloring === true)
|
||||||
|
{
|
||||||
|
$paste->meta->formatter = 'syntaxhighlighting';
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
$paste->meta->formatter = $this->_getMainConfig('defaultformatter', 'syntaxhighlighting');
|
$paste->meta->formatter = $this->_getMainConfig('defaultformatter', 'syntaxhighlighting');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->_data = json_encode($messages);
|
$this->_data = json_encode($messages);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue