From 6236f57500fd4357a5ac8983032f732e1f67abb2 Mon Sep 17 00:00:00 2001 From: vbracco Date: Sat, 1 Nov 2008 13:22:40 +0000 Subject: [PATCH] Some issues fixed --- plugins/kodrs.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/plugins/kodrs.php b/plugins/kodrs.php index 6d3a115..385e606 100644 --- a/plugins/kodrs.php +++ b/plugins/kodrs.php @@ -18,12 +18,17 @@ class kodrs extends plugins { function source_code_beautifier() { global $rows; - - $text = $rows[0]['Body']; - $result = preg_replace_callback("/(.*)<\/code>/siU", - array('kodrs', 'replace_with_geshi'), - $text); - $rows[0]['Body'] = $result; + 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>/siU", + array('kodrs', 'replace_with_geshi'), + $text + ); + $rows[$key]['Body'] = $result; + } + } } static function replace_with_geshi($matches) {