[geeklog-cvs] geeklog: Retrieving a staticpage content via plugin_getiteminfo_...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun May 15 14:34:21 EDT 2011


changeset 8280:9deac0913781
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/9deac0913781
user: Tom <websitemaster at cogeco.net>
date: Sun May 15 14:33:26 2011 -0400
description:
Retrieving a staticpage content via plugin_getiteminfo_staticpages did not work for pages that use templates. Bug #1342

diffstat:

 plugins/staticpages/functions.inc |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (25 lines):

diff -r 0a214ae901f8 -r 9deac0913781 plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc	Sun May 15 09:57:07 2011 +0200
+++ b/plugins/staticpages/functions.inc	Sun May 15 14:33:26 2011 -0400
@@ -1765,9 +1765,18 @@
                 break;
             case 'description':
             case 'excerpt':
-                $props[$p] = SP_render_content(stripslashes($A['sp_content']),
-                                                            $A['sp_php']);
-                break;
+                $retval = '';
+                $mode = '';
+                $args = array(
+                            'sp_id' => $sp_id,
+                            'mode'  => $mode
+                             );
+                $svc_msg = array();
+            
+                if (PLG_invokeService('staticpages', 'get', $args, $retval, $svc_msg) == PLG_RET_OK) {     
+                    $props[$p] = SP_render_content(stripslashes($retval['sp_content']), $retval['sp_php']);
+                }
+                break;                
             case 'id':
                 $props['id'] = $A['sp_id'];
                 break;



More information about the geeklog-cvs mailing list