another fix

master
vbracco 2008-11-01 13:23:58 +00:00
parent 6236f57500
commit 7f28472b77
1 changed files with 11 additions and 9 deletions

View File

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