[geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.130,1.131
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Thu Sep 2 14:38:43 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html/admin
In directory www:/tmp/cvs-serv21594
Modified Files:
story.php
Log Message:
Fixed a typo and update the article_images table when a story ID changes ...
Index: story.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/admin/story.php,v
retrieving revision 1.130
retrieving revision 1.131
diff -C2 -d -r1.130 -r1.131
*** story.php 29 Aug 2004 18:52:16 -0000 1.130
--- story.php 2 Sep 2004 18:38:40 -0000 1.131
***************
*** 894,898 ****
$A['perm_anon']);
} else {
! if (!empty ($old_sid) && ($sid != old_sid)) {
$delete_old_story = true;
}
--- 894,898 ----
$A['perm_anon']);
} else {
! if (!empty ($old_sid) && ($sid != $old_sid)) {
$delete_old_story = true;
}
***************
*** 1023,1027 ****
}
}
! $upload->setAllowedMimeTypes(array('image/gif'=>'.gif','image/jpeg'=>'.jpg,.jpeg','image/pjpeg'=>'.jpg,.jpeg','image/x-png'=>'.png','image/png'=>'.png'));
if (!$upload->setPath($_CONF['path_images'] . 'articles')) {
$display = COM_siteHeader ('menu');
--- 1023,1033 ----
}
}
! $upload->setAllowedMimeTypes (array (
! 'image/gif' => '.gif',
! 'image/jpeg' => '.jpg,.jpeg',
! 'image/pjpeg' => '.jpg,.jpeg',
! 'image/x-png' => '.png',
! 'image/png' => '.png'
! ));
if (!$upload->setPath($_CONF['path_images'] . 'articles')) {
$display = COM_siteHeader ('menu');
***************
*** 1078,1081 ****
--- 1084,1091 ----
if ($_CONF['maximagesperarticle'] > 0) {
+ if ($delete_old_story) {
+ // story id has changed - update article_images table first
+ DB_query ("UPDATE {$_TABLES['article_images']} SET ai_sid = '{$sid}' WHERE ai_sid = '{$old_sid}'");
+ }
list($errors, $introtext, $bodytext) = insert_images($sid, $introtext, $bodytext);
if (count($errors) > 0) {
More information about the geeklog-cvs
mailing list