[geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.143,1.144
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Fri Dec 31 05:22:48 EST 2004
Update of /var/cvs/geeklog-1.3/public_html/admin
In directory www:/tmp/cvs-serv21624/public_html/admin
Modified Files:
story.php
Log Message:
Fixed problems in the story editor when editing plain-text posts with uploaded images (bug #356)
Index: story.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/story.php,v
retrieving revision 1.143
retrieving revision 1.144
diff -C2 -d -r1.143 -r1.144
*** story.php 29 Dec 2004 15:06:25 -0000 1.143
--- story.php 31 Dec 2004 10:22:45 -0000 1.144
***************
*** 268,275 ****
--- 268,291 ----
$A['hits'] = 0;
}
+
if ($A['postmode'] == 'plaintext') {
$B = $A;
+
+ // if the plain-text story has images embedded, we'll have to do
+ // some awkward back-and-forth conversion ...
+ $has_images = false;
+ $tmpsid = addslashes ($A['sid']);
+ if (DB_count ($_TABLES['article_images'], 'ai_sid', $tmpsid) > 0) {
+ $has_images = true;
+ list ($B['introtext'], $B['bodytext']) = replace_images ($A['sid'], $B['introtext'], $B['bodytext']);
+ }
+
$B['introtext'] = COM_makeClickableLinks ($B['introtext']);
$B['bodytext'] = COM_makeClickableLinks ($B['bodytext']);
+
+ if ($has_images) {
+ list ($errors, $B['introtext'], $B['bodytext']) = insert_images ($A['sid'], $B['introtext'], $B['bodytext']);
+ }
+
$display .= STORY_renderArticle ($B, 'n');
} else {
More information about the geeklog-cvs
mailing list