Trying to fix the problem where if the cache is built up, then until you refresh...
authorRobert Sesek <rsesek@bluestatic.org>
Sat, 28 Jan 2006 20:55:23 +0000 (20:55 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sat, 28 Jan 2006 20:55:23 +0000 (20:55 +0000)
global.php
includes/cachev.php

index 4d101b58e8e86e141d50f8776849345cded1f76a..8d2faacc30839d2c7eedacb1cd65b54144a6f3f1 100644 (file)
@@ -26,7 +26,6 @@ $dochooser = ((defined('PATH_OVERRIDE') AND PATH_OVERRIDE == 1) ? false : true);
 if ($dochooser)
 {
        $controller = new Controller(Paths::init());
-       $viewsvn->maincontrol =& $controller;
        
        if (isset($viewsvn->in['rebuild']) AND $viewsvn->in['rebuild'] == 1 AND $viewsvn->get('debug') == true)
        {
@@ -34,8 +33,14 @@ if ($dochooser)
        }
        else
        {
-               $controller->cachev->exec_build();
+               if ($controller->cachev->exec_build())
+               {
+                       unset($controller);
+                       $controller = new Controller(Paths::init());
+               }
        }
+       
+       $viewsvn->maincontrol =& $controller;
 }
 
 $fetchtemplates[] = 'header';
index 195132ba68ca64d9d414686ac0b8360befb42d30..dbde2d7d29769a549ba3c7f00f0b33f334ada499 100644 (file)
@@ -290,6 +290,8 @@ class cacheV
        * to make sure that it's up-to-date against the root repository.
        *
        * @access       public
+       *
+       * @return       bool    Whether or not any part of the cache was (re-)built
        */
        function exec_build()
        {
@@ -312,8 +314,11 @@ class cacheV
                        if ($tree['info']['entry']['revision'] != $this->count)
                        {
                                $this->build($this->count);
+                               return true;
                        }
                }
+               
+               return false;
        }
        
        // ###################################################################