summaryrefslogtreecommitdiff
path: root/ext/standard/pageinfo.c
diff options
context:
space:
mode:
authorFrank M. Kromann <fmk@php.net>2001-12-03 05:11:29 +0000
committerFrank M. Kromann <fmk@php.net>2001-12-03 05:11:29 +0000
commitc07cf5c2a5ce32a6f371e1beb914611e85d92cd6 (patch)
treeb60d35998faaf9c3c69d64ed680603a83e6c54f7 /ext/standard/pageinfo.c
parentb4d9b70c6ebad6fd648671b97ea5cb40bfb32665 (diff)
downloadphp-git-c07cf5c2a5ce32a6f371e1beb914611e85d92cd6.tar.gz
Make php_startpage and php_getlastmod available from shared extensions
Diffstat (limited to 'ext/standard/pageinfo.c')
-rw-r--r--ext/standard/pageinfo.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c
index ef99c363d8..6d7ec5ecc5 100644
--- a/ext/standard/pageinfo.c
+++ b/ext/standard/pageinfo.c
@@ -43,7 +43,7 @@
/* {{{ php_statpage
*/
-static void php_statpage(TSRMLS_D)
+PHPAPI void php_statpage(TSRMLS_D)
{
struct stat *pstat;
@@ -137,15 +137,21 @@ PHP_FUNCTION(getmyinode)
}
/* }}} */
+PHPAPI long php_getlastmod(TSRMLS_D)
+{
+ php_statpage(TSRMLS_C);
+ return BG(page_mtime);
+}
+
/* {{{ proto int getlastmod(void)
Get time of last page modification */
PHP_FUNCTION(getlastmod)
{
- php_statpage(TSRMLS_C);
- if (BG(page_mtime) < 0) {
+ long lm = php_getlastmod(TSRMLS_C);
+ if (lm < 0) {
RETURN_FALSE;
} else {
- RETURN_LONG(BG(page_mtime));
+ RETURN_LONG(lm);
}
}
/* }}} */