shunt shields (almost) to the top

This commit is contained in:
mappu 2015-11-07 18:22:10 +13:00
parent ad76f6fb7a
commit 1194223ddd

View File

@ -208,14 +208,18 @@ class CProject {
$this->shortdesc[0] = strtolower($this->shortdesc[0]); // cosmetic lowercase $this->shortdesc[0] = strtolower($this->shortdesc[0]); // cosmetic lowercase
// Filter longdesc // Filter longdesc
$this->longdesc = preg_replace_callback('~Written in ([^\\r\\n]+)~', function($matches) { $prefix_html = '';
return ( $this->longdesc = preg_replace_callback('~Written in ([^\\r\\n]+)~', function($matches) use (&$prefix_html) {
$prefix_html .= (
'<html>'. '<html>'.
(SHIELDS_PREFIX ? mkshield('build', 'success', 'brightgreen').'&nbsp;' : ''). (SHIELDS_PREFIX ? mkshield('build', 'success', 'brightgreen').'&nbsp;' : '').
mkshield('written in', $matches[1], 'blue'). mkshield('written in', $matches[1], 'blue').
'<br/>'.
'</html>' '</html>'
); );
return '';
}, $this->longdesc); }, $this->longdesc);
$this->longdesc = $prefix_html.$this->longdesc;
continue; continue;
} }