[Nextcms-commits] CVS: nextcms class.Cache.php,1.3,1.4 class.Mapper.php,1.1,1.2 class.Site.php,1.5,1
Status: Alpha
Brought to you by:
andrejb
|
From: Andrej B. <an...@us...> - 2002-05-14 16:16:04
|
Update of /cvsroot/nextcms/nextcms
In directory usw-pr-cvs1:/tmp/cvs-serv1052
Modified Files:
class.Cache.php class.Mapper.php class.Site.php
Log Message:
* fixed minor cache bug
* fixed mapper bug (some pages couldn't be accessed)
Index: class.Cache.php
===================================================================
RCS file: /cvsroot/nextcms/nextcms/class.Cache.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** class.Cache.php 30 Apr 2002 23:58:18 -0000 1.3
--- class.Cache.php 14 May 2002 16:16:00 -0000 1.4
***************
*** 30,34 ****
foreach ($check_file as $filename) {
if (file_exists($docroot . $filename)) {
! if (filemtime($docroot . $filename) > $this->filemtime) {
fclose($cache_file); return;
}
--- 30,34 ----
foreach ($check_file as $filename) {
if (file_exists($docroot . $filename)) {
! if (fileatime($docroot . $filename) > $this->filemtime) {
fclose($cache_file); return;
}
Index: class.Mapper.php
===================================================================
RCS file: /cvsroot/nextcms/nextcms/class.Mapper.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** class.Mapper.php 30 Apr 2002 23:58:18 -0000 1.1
--- class.Mapper.php 14 May 2002 16:16:00 -0000 1.2
***************
*** 12,16 ****
function Mapper($disable_cache = false) {
disableLoadedFiles();
-
$site_file = $GLOBALS['SITE_FILES'];
--- 12,15 ----
***************
*** 40,44 ****
foreach ($site_file as $key => $file) {
if (isset($this->site[$key]))
! if (!(filemtime($GLOBALS['document_root'] . '/' . $this->site[$key]['file']) > $this->site[$key]['modtime']))
continue;
else
--- 39,43 ----
foreach ($site_file as $key => $file) {
if (isset($this->site[$key]))
! if (!(fileatime($GLOBALS['document_root'] . '/' . $this->site[$key]['file']) > $this->site[$key]['modtime']))
continue;
else
***************
*** 56,60 ****
$csite['root'] = $site->root;
$csite['file'] = $file;
! $csite['modtime'] = filemtime($GLOBALS['document_root'] . '/' . $file);
$csite['pageid'] = array();
--- 55,59 ----
$csite['root'] = $site->root;
$csite['file'] = $file;
! $csite['modtime'] = fileatime($GLOBALS['document_root'] . '/' . $file);
$csite['pageid'] = array();
Index: class.Site.php
===================================================================
RCS file: /cvsroot/nextcms/nextcms/class.Site.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** class.Site.php 30 Apr 2002 23:58:18 -0000 1.5
--- class.Site.php 14 May 2002 16:16:00 -0000 1.6
***************
*** 58,61 ****
--- 58,62 ----
*/
+ /*
function getPageNode($file) {
$dirname = dirname($this->filename);
***************
*** 77,80 ****
--- 78,82 ----
}
}
+ */
function getPageLastNext($file) {
***************
*** 198,202 ****
$url = $this->xmltree->getAttribute($this->id[$id], 'url');
if (!isset($url)) $url = $this->xmltree->getAttribute($this->id[$id], 'file');
! if (!isset($url)) return;
if (!strstr($url, ':'))
$url = relToAbs($url, dirname($this->filename));
--- 200,204 ----
$url = $this->xmltree->getAttribute($this->id[$id], 'url');
if (!isset($url)) $url = $this->xmltree->getAttribute($this->id[$id], 'file');
! if (!isset($url)) continue;
if (!strstr($url, ':'))
$url = relToAbs($url, dirname($this->filename));
|