projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6409c4b
)
* wiki still needs some tuning
author
Art Cancro
<ajc@citadel.org>
Fri, 16 Oct 2009 03:52:08 +0000
(
03:52
+0000)
committer
Art Cancro
<ajc@citadel.org>
Fri, 16 Oct 2009 03:52:08 +0000
(
03:52
+0000)
citadel/modules/wiki/serv_wiki.c
patch
|
blob
|
history
diff --git
a/citadel/modules/wiki/serv_wiki.c
b/citadel/modules/wiki/serv_wiki.c
index d9db654efbb890b1de7f66299872d9e46e186da5..397b4095c8734b5042e264b03a85f30014f7f8e0 100644
(file)
--- a/
citadel/modules/wiki/serv_wiki.c
+++ b/
citadel/modules/wiki/serv_wiki.c
@@
-117,18
+117,15
@@
int wiki_upload_beforesave(struct CtdlMessage *msg) {
old_msg = CtdlFetchMessage(old_msgnum, 1);
old_msg = CtdlFetchMessage(old_msgnum, 1);
- if (old_msg != NULL) {
-
- if (old_msg->cm_fields['M'] == NULL) { /* old version is corrupt? */
- CtdlFreeMessage(old_msg);
- return(0);
- }
+ if ((old_msg != NULL) && (old_msg->cm_fields['M'] == NULL)) { /* old version is corrupt? */
+ CtdlFreeMessage(old_msg);
+ old_msg = NULL;
+ }
- /* If no changes were made, don't bother saving it again */
- if (!strcmp(msg->cm_fields['M'], old_msg->cm_fields['M'])) {
- CtdlFreeMessage(old_msg);
- return(1);
- }
+ /* If no changes were made, don't bother saving it again */
+ if ((old_msg != NULL) && (!strcmp(msg->cm_fields['M'], old_msg->cm_fields['M']))) {
+ CtdlFreeMessage(old_msg);
+ return(1);
}
/*
}
/*