Some issues fixed

master
vbracco 2008-11-01 13:22:40 +00:00
parent 3c108ae57e
commit 6236f57500
1 changed files with 11 additions and 6 deletions

View File

@ -18,12 +18,17 @@ class kodrs extends plugins {
function source_code_beautifier() {
global $rows;
$text = $rows[0]['Body'];
foreach($rows as $key=>$post){
// Si no es tipo 'post' entonces no tiene 'Body' :)
if($post["postType"]=="post"){
$text = $rows[$key]['Body'];
$result = preg_replace_callback("/<code\s+.*lang\s*=\"(.*)\">(.*)<\/code>/siU",
array('kodrs', 'replace_with_geshi'),
$text);
$rows[0]['Body'] = $result;
$text
);
$rows[$key]['Body'] = $result;
}
}
}
static function replace_with_geshi($matches) {