[geeklog-cvs] geeklog: Fixed images not being displayed in story previews (bug...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Aug 28 11:08:53 EDT 2011


changeset 8362:abdc906961f4
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/abdc906961f4
user: Dirk Haun <dirk at haun-online.de>
date: Sun Jun 19 11:22:10 2011 +0200
description:
Fixed images not being displayed in story previews (bug #0001367)

diffstat:

 public_html/admin/story.php |  20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 378bdebe026f -r abdc906961f4 public_html/admin/story.php
--- a/public_html/admin/story.php	Sun Jun 19 10:00:50 2011 +0200
+++ b/public_html/admin/story.php	Sun Jun 19 11:22:10 2011 +0200
@@ -2,13 +2,13 @@
 
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Geeklog 1.6                                                               |
+// | Geeklog 1.8                                                               |
 // +---------------------------------------------------------------------------+
 // | story.php                                                                 |
 // |                                                                           |
 // | Geeklog story administration page.                                        |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2000-2010 by the following authors:                         |
+// | Copyright (C) 2000-2011 by the following authors:                         |
 // |                                                                           |
 // | Authors: Tony Bibbs        - tony AT tonybibbs DOT com                    |
 // |          Mark Limburg      - mlimburg AT users DOT sourceforge DOT net    |
@@ -283,6 +283,22 @@
             }
         }
         $result = $story->loadFromArgsArray($_POST);
+
+        // in preview mode, we now need to re-insert the images
+        if ($_CONF['maximagesperarticle'] > 0) {
+            $errors = $story->insertImages();
+            if (count($errors) > 0) {
+                $display .= COM_startBlock($LANG24[54], '',
+                                COM_getBlockTemplate('_msg_block', 'header'));
+                $display .= $LANG24[55] . LB . '<ul>' . LB;
+                foreach ($errors as $err) {
+                    $display .= '<li>' . $err . '</li>' . LB;
+                }
+                $display .= '</ul>' . LB;
+                $display .= COM_endBlock(COM_getBlockTemplate('_msg_block',
+                                                              'footer'));
+            }
+        }
     } else {
         $result = $story->loadFromDatabase($sid, $mode);
     }



More information about the geeklog-cvs mailing list