CVS update: php3/functions

From: Date: Sat, 26 Jun 1999 16:46:33 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-7586@lists.php.net to get a copy of this message
Date: Saturday June 26, 1999 @ 12:46 Author: fmk Update of /repository/php3/functions In directory php:/tmp/cvs-serv22861 Modified Files: pageinfo.c pageinfo.h Log Message: Making php3_lastmod callable from other modules Index: php3/functions/pageinfo.c diff -u php3/functions/pageinfo.c:1.41 php3/functions/pageinfo.c:1.42 --- php3/functions/pageinfo.c:1.41 Wed Jun 16 07:34:22 1999 +++ php3/functions/pageinfo.c Sat Jun 26 12:46:32 1999 @@ -26,7 +26,7 @@ | Authors: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: pageinfo.c,v 1.41 1999/06/16 11:34:22 ssb Exp $ */ +/* $Id: pageinfo.c,v 1.42 1999/06/26 16:46:32 fmk Exp $ */ #ifdef THREAD_SAFE #include "tls.h" #endif @@ -147,13 +147,21 @@ Get time of last page modification */ void php3_getlastmod(INTERNAL_FUNCTION_PARAMETERS) { - TLS_VARS; - - _php3_statpage(); - if (GLOBAL(page_mtime) < 0) { + time_t mtime; + + mtime = _php3_getlastmod(); + if (mtime < 0) { RETURN_FALSE; } else { - RETURN_LONG(GLOBAL(page_mtime)); + RETURN_LONG(mtime); } } /* }}} */ + +PHPAPI time_t _php3_getlastmod(void) +{ + TLS_VARS; + + _php3_statpage(); + return GLOBAL(page_mtime); +} Index: php3/functions/pageinfo.h diff -u php3/functions/pageinfo.h:1.4 php3/functions/pageinfo.h:1.5 --- php3/functions/pageinfo.h:1.4 Sat May 1 01:42:49 1999 +++ php3/functions/pageinfo.h Sat Jun 26 12:46:32 1999 @@ -33,6 +33,7 @@ extern void php3_getmyuid(INTERNAL_FUNCTION_PARAMETERS); extern void php3_getmypid(INTERNAL_FUNCTION_PARAMETERS); extern void php3_getmyinode(INTERNAL_FUNCTION_PARAMETERS); +extern PHPAPI time_t _php3_getlastmod(void); extern void php3_getlastmod(INTERNAL_FUNCTION_PARAMETERS); extern long _php3_getuid(void);

« previous php.dev (#7586) next »