summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-15 17:52:38 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-09-15 17:52:38 +0800
commite27049043bf545aabdc4fbab115712e3ce2a929d (patch)
tree424c47a5d8c4fa62669e74768b1461cf9fc31762 /mbbsd/bbs.c
parentb7fd178763c0c7519c3eb7bd281cd6113fd812bf (diff)
downloadpttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar
pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.gz
pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.bz2
pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.lz
pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.xz
pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.tar.zst
pttbbs-e27049043bf545aabdc4fbab115712e3ce2a929d.zip
fix again: touch file record.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3175 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index b7aaa703..dcf094e2 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1133,7 +1133,7 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
fileheader_t postfile;
boardheader_t *bp = getbcache(currbid);
struct stat oldstat, newstat;
- int isSysop = 0;
+ int isSysop = 0, recordTouched = 0;
if (strcmp(bp->brdname, "Security") == 0)
return DONOTHING;
@@ -1198,7 +1198,7 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
fhdr->textlen = newstat.st_size;
else
fhdr->textlen = 0;
-
+ recordTouched = 1;
}
} else /* old flavor, no textlen info */
if (oldstat.st_mtime != newstat.st_mtime)
@@ -1252,8 +1252,12 @@ edit_post(int ent, fileheader_t * fhdr, const char *direct)
// Ptt: here is the black hole problem
// (try getindex)
strcpy(fhdr->title, save_title);
- substitute_ref_record(direct, fhdr, ent);
+ recordTouched = 1;
}
+
+ if(recordTouched)
+ substitute_ref_record(direct, fhdr, ent);
+
break;
} while (1);