3 /*=====================================================================*\
4 || ###################################################################
5 || # ViewSVN [#]version[#]
6 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
8 || # This program is free software; you can redistribute it and/or modify
9 || # it under the terms of the GNU General Public License as published by
10 || # the Free Software Foundation; version [#]gpl[#] of the License.
12 || # This program is distributed in the hope that it will be useful, but
13 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 || # You should have received a copy of the GNU General Public License along
18 || # with this program; if not, write to the Free Software Foundation, Inc.,
19 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
20 || ###################################################################
21 \*=====================================================================*/
23 define('PATH_OVERRIDE', 1);
25 require_once('./global.php');
27 // ###################################################################
29 $tables = $db->query("SHOW TABLES");
30 while ($table = $db->fetch_array($tables))
32 $value = array_values($table);
33 $tablelist[] = $value[0];
36 foreach ($viewsvn->repos
->fetch_list() AS $repos)
38 if (!in_array('c' . ($hash = md5($viewsvn->repos
->fetch_path($repos))) . '_revs', $tablelist))
40 $viewsvn->debug("creating new cacheV: $repos");
42 CREATE TABLE c{$hash
}_revs
44 revision
INT(20) UNSIGNED NOT
NULL DEFAULT 0,
45 author
VARCHAR(255) NOT
NULL DEFAULT '',
46 dateline
VARCHAR(100) NOT
NULL DEFAULT '',
47 files MEDIUMTEXT NOT
NULL DEFAULT '',
48 message MEDIUMTEXT NOT
NULL DEFAULT '',
49 PRIMARY
KEY (revision
)
54 CREATE TABLE c{$hash
}_nodes
56 name
VARCHAR(255) NOT
NULL DEFAULT '',
57 node
VARCHAR(50) NOT
NULL DEFAULT '',
58 revision
INT(20) UNSIGNED NOT
NULL DEFAULT 0,
59 history MEDIUMTEXT NOT
NULL DEFAULT '',
60 properties MEDIUMTEXT NOT
NULL DEFAULT '',
66 $controller = new Controller($repos);
67 $controller->cachev->build(null);
70 /*=====================================================================*\
71 || ###################################################################
74 || ###################################################################
75 \*=====================================================================*/