Commit b7c1aab8 authored by zaufi's avatar zaufi

Add cache expiration timeout

parent 4ddb2b68
......@@ -3921,6 +3921,7 @@ CREATE TABLE tiki_integrator_reps (
css_file varchar(255) NOT NULL default '',
visibility char(1) NOT NULL default 'y',
cacheable char(1) NOT NULL default 'y',
expiration int(11) NOT NULL default '0',
description text NOT NULL,
PRIMARY KEY (repID)
) TYPE=MyISAM;
......@@ -3928,7 +3929,7 @@ CREATE TABLE tiki_integrator_reps (
#
# Dumping data for table 'tiki_integrator_reps'
#
INSERT INTO tiki_integrator_reps VALUES (1,'Doxygened (1.3.4) Documentation','','index.html','doxygen.css','n','y','Use this repository as rule source for all your repositories based on doxygened docs. To setup yours just add new repository and copy rules from this repository :)');
INSERT INTO tiki_integrator_reps VALUES ('1','Doxygened (1.3.4) Documentation','','index.html','doxygen.css','n','y','0','Use this repository as rule source for all your repositories based on doxygened docs. To setup yours just add new repository and copy rules from this repository :)');
#
# Table structure for table 'tiki_integrator_rules'
......@@ -3952,9 +3953,9 @@ CREATE TABLE tiki_integrator_rules (
#
# Dumping data for table 'tiki_integrator_rules'
#
INSERT INTO tiki_integrator_rules VALUES (1,1,1,'.*<body[^>]*?>(.*?)</body.*','\1','y','n','i','y','Extract code between <BODY> tags');
INSERT INTO tiki_integrator_rules VALUES (2,1,2,'img src=(\"|\')(?!http://)','img src=\1{path}/','y','n','i','y','Fix images path');
INSERT INTO tiki_integrator_rules VALUES (3,1,3,'href=(\"|\')(?!(#|(http|ftp)://))','href=\1tiki-integrator.php?repID={repID}&file=','y','n','i','y','Relace internal links to integrator. Dont touch an external links.');
INSERT INTO tiki_integrator_rules VALUES ('1','1','1','.*<body[^>]*?>(.*?)</body.*','\1','y','n','i','y','Extract code between <BODY> tags');
INSERT INTO tiki_integrator_rules VALUES ('2','1','2','img src=(\"|\')(?!http://)','img src=\1{path}/','y','n','i','y','Fix images path');
INSERT INTO tiki_integrator_rules VALUES ('3','1','3','href=(\"|\')(?!(#|(http|ftp)://))','href=\1tiki-integrator.php?repID={repID}&file=','y','n','i','y','Relace internal links to integrator. Dont touch an external links.');
#
# Integrator permissions
......
# $Id: tiki_1.7to1.8.sql,v 1.64 2003-11-11 18:47:16 dheltzel Exp $
# $Id: tiki_1.7to1.8.sql,v 1.65 2003-11-12 00:32:25 zaufi Exp $
# The following script will update a tiki database from verion 1.7 to 1.8
#
......@@ -515,6 +515,7 @@ CREATE TABLE tiki_integrator_reps (
css_file varchar(255) NOT NULL default '',
visibility char(1) NOT NULL default 'y',
cacheable char(1) NOT NULL default 'y',
expiration int(11) NOT NULL default '0',
description text NOT NULL,
PRIMARY KEY (repID)
) TYPE=MyISAM;
......@@ -522,7 +523,7 @@ CREATE TABLE tiki_integrator_reps (
#
# Dumping data for table 'tiki_integrator_reps'
#
INSERT INTO tiki_integrator_reps VALUES (1,'Doxygened (1.3.4) Documentation','','index.html','doxygen.css','n','y','Use this repository as rule source for all your repositories based on doxygened docs. To setup yours just add new repository and copy rules from this repository :)');
INSERT INTO tiki_integrator_reps VALUES ('1','Doxygened (1.3.4) Documentation','','index.html','doxygen.css','n','y','0','Use this repository as rule source for all your repositories based on doxygened docs. To setup yours just add new repository and copy rules from this repository :)');
#
# Table structure for table 'tiki_integrator_rules'
......@@ -546,9 +547,9 @@ CREATE TABLE tiki_integrator_rules (
#
# Dumping data for table 'tiki_integrator_rules'
#
INSERT INTO tiki_integrator_rules VALUES (1,1,1,'.*<body[^>]*?>(.*?)</body.*','\1','y','n','i','y','Extract code between <BODY> tags');
INSERT INTO tiki_integrator_rules VALUES (2,1,2,'img src=(\"|\')(?!http://)','img src=\1{path}/','y','n','i','y','Fix images path');
INSERT INTO tiki_integrator_rules VALUES (3,1,3,'href=(\"|\')(?!(#|(http|ftp)://|mailto:))','href=\1tiki-integrator.php?repID={repID}&file=','y','n','i','y','Relace internal (local) links to integrator. Dont touch an external links.');
INSERT INTO tiki_integrator_rules VALUES ('1','1','1','.*<body[^>]*?>(.*?)</body.*','\1','y','n','i','y','Extract code between <BODY> tags');
INSERT INTO tiki_integrator_rules VALUES ('2','1','2','img src=(\"|\')(?!http://)','img src=\1{path}/','y','n','i','y','Fix images path');
INSERT INTO tiki_integrator_rules VALUES ('3','1','3','href=(\"|\')(?!(#|(http|ftp)://|mailto:))','href=\1tiki-integrator.php?repID={repID}&file=','y','n','i','y','Relace internal (local) links to integrator. Dont touch an external links.');
#
# Integrator permissions
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/modules/mod-application_menu.tpl,v 1.72 2003-11-08 19:50:33 zaufi Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/modules/mod-application_menu.tpl,v 1.73 2003-11-12 00:32:26 zaufi Exp $ *}
<div class="box">
<div class="box-title">
......@@ -528,7 +528,7 @@
{if $tiki_p_edit_languages eq 'y' && $lang_use_db eq 'y'}
&nbsp;<a href="tiki-edit_languages.php" class="linkmenu">{tr}Edit languages{/tr}</a><br />
{/if}
{if $tiki_p_admin_integrator eq 'y'}
{if $tiki_p_admin_integrator eq 'y' && $feature_integrator eq 'y'}
&nbsp;<a href="tiki-admin_integrator.php" class="linkmenu">{tr}Integrator{/tr}</a><br />
{/if}
{if $tiki_p_admin eq 'y'}
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_integrator.tpl,v 1.14 2003-11-10 14:50:31 sylvieg Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_integrator.tpl,v 1.15 2003-11-12 00:32:25 zaufi Exp $ *}
{if $repID > 0}
<h2>{tr}Edit Repository:{/tr} {$name}</h2>
......@@ -51,6 +51,9 @@
</a>
{/if}
</td>
</tr><tr>
<td class="formcolor"><span title="{tr}Seconds count 'till cached page will be expired{/tr}">{tr}Cache expiraion{/tr}</td>
<td class="formcolor"><input type="text" maxlength="14" size="14" name="expiration" value="{$expiration|escape}" title="{tr}Seconds count 'till cached page will be expired{/tr}" /></td>
</tr><tr>
<td class="formcolor"><span title="{tr}Human readable text description of repository{/tr}">{tr}Description{/tr}</td>
<td class="formcolor"><textarea name="description" rows="4" title="{tr}Human readable text description of repository{/tr}">{$description|escape}</textarea></td>
......
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_integrator_rules.tpl,v 1.12 2003-11-10 05:00:42 zaufi Exp $ *}
{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-admin_integrator_rules.tpl,v 1.13 2003-11-12 00:32:25 zaufi Exp $ *}
<h2>{tr}Edit Rules for Repository:{/tr} {$name}</h2>
<div id="page-bar">
......@@ -60,7 +60,7 @@
<table class="normal">
<tr>
<td class="formcolor"><span title="{tr}According this order rules will be applied ('0' or empty = auto){/tr}">{tr}Rule order{/tr}</span></td>
<td class="formcolor"><input type="text" size="2" name="ord" value="{$ord|escape}" title="{tr}According this order rules will be applied ('0' or empty = auto){/tr}" />
<td class="formcolor"><input type="text" maxlength="2" size="2" name="ord" value="{$ord|escape}" title="{tr}According this order rules will be applied ('0' or empty = auto){/tr}" />
</td>
</tr><tr>
<td class="formcolor"><span title="{tr}Text to search for{/tr}">{tr}Search{/tr}</span></td>
......@@ -81,7 +81,7 @@
</tr><tr>
<td class="formcolor">{tr}<span title="{tr}subset of chars: imsxeADSXUu, which is regex modifiers{/tr}">Regex modifiers{/tr}</span></td>
<td class="formcolor">
<input type="text" name="rxmod" value="{$rxmod|escape}" title="{tr}subset of chars: imsxeADSXUu, which is regex modifiers{/tr}" />
<input type="text" maxlength="20" size="20" name="rxmod" value="{$rxmod|escape}" title="{tr}subset of chars: imsxeADSXUu, which is regex modifiers{/tr}" />
</td>
</tr><tr>
<td class="formcolor"><span title="{tr}Human readable text description of rule{/tr}">{tr}Description{/tr}</td>
......
<?php
/**
* $Header: /cvsroot/tikiwiki/tiki/tiki-admin_integrator.php,v 1.11 2003-11-11 12:05:27 sylvieg Exp $
* $Header: /cvsroot/tikiwiki/tiki/tiki-admin_integrator.php,v 1.12 2003-11-12 00:32:25 zaufi Exp $
*
* Admin interface for repositories management
*
......@@ -8,12 +8,14 @@
require_once('tiki-setup.php');
require_once('lib/integrator/integrator.php');
if ($feature_integrator != 'y') {
// If Integrator is ON, check permissions...
if ($feature_integrator != 'y')
{
$smarty->assign('msg', tra("This feature is disabled").": feature_integrator");
$smarty->display("styles/$style_base/error.tpl");
die;
}
// Check permissions
if (($tiki_p_admin_integrator != 'y') && ($tiki_p_admin != 'y'))
{
$smarty->assign('msg',tra("You dont have permission to use this feature"));
......@@ -27,6 +29,7 @@ $name = isset($_REQUEST["name"]) ? $_REQUEST["name"] : '';
$path = isset($_REQUEST["path"]) ? $_REQUEST["path"] : '';
$start = isset($_REQUEST["start"]) ? $_REQUEST["start"] : '';
$cssfile = isset($_REQUEST["cssfile"]) ? $_REQUEST["cssfile"] : '';
$expiration = isset($_REQUEST["expiration"]) ? $_REQUEST["expiration"] : 0;
$description = isset($_REQUEST["description"]) ? $_REQUEST["description"] : '';
$vis = isset($_REQUEST["vis"]) ? ($_REQUEST["vis"] == 'on' ? 'y' : 'n') : 'n';
$cacheable = isset($_REQUEST["cacheable"]) ? ($_REQUEST["cacheable"] == 'on' ? 'y' : 'n') : 'n';
......@@ -37,7 +40,8 @@ if (isset($_REQUEST["save"]))
{
// ... and all mandatory paramaters r OK
if (strlen($name) > 0)
$integrator->add_replace_repository($repID, $name, $path, $start, $cssfile, $vis, $cacheable, $description);
$integrator->add_replace_repository($repID, $name, $path, $start, $cssfile,
$vis, $cacheable, $expiration, $description);
else
{
$smarty->assign('msg',tra("Repository name can't be an empty"));
......@@ -59,6 +63,7 @@ if (isset($_REQUEST["action"]))
$smarty->assign('path', $rep["path"]);
$smarty->assign('start', $rep["start_page"]);
$smarty->assign('cssfile', $rep["css_file"]);
$smarty->assign('expiration', $rep["expiration"]);
$smarty->assign('vis', $rep["visibility"]);
$smarty->assign('cacheable', $rep["cacheable"]);
$smarty->assign('description', $rep["description"]);
......
<?php
/**
* $Header: /cvsroot/tikiwiki/tiki/tiki-admin_integrator_rules.php,v 1.17 2003-11-11 21:53:09 sylvieg Exp $
* $Header: /cvsroot/tikiwiki/tiki/tiki-admin_integrator_rules.php,v 1.18 2003-11-12 00:32:25 zaufi Exp $
*
* Admin interface for rules management
*
......@@ -8,12 +8,14 @@
require_once('tiki-setup.php');
require_once('lib/integrator/integrator.php');
if ($feature_integrator != 'y') {
// If Integrator is ON, check permissions...
if ($feature_integrator != 'y')
{
$smarty->assign('msg', tra("This feature is disabled").": feature_integrator");
$smarty->display("styles/$style_base/error.tpl");
die;
}
// Check permissions
if (($tiki_p_admin_integrator != 'y') && ($tiki_p_admin != 'y'))
{
$smarty->assign('msg', tra("You dont have permission to use this feature"));
......
<?php
/**
* $Header: /cvsroot/tikiwiki/tiki/tiki-integrator.php,v 1.12 2003-11-09 05:22:53 zaufi Exp $
* $Header: /cvsroot/tikiwiki/tiki/tiki-integrator.php,v 1.13 2003-11-12 00:32:25 zaufi Exp $
*
* Integrated files viewer (wrapper)
*
......@@ -9,7 +9,13 @@
require_once('tiki-setup.php');
require_once('lib/integrator/integrator.php');
// Check permissions
// If Integrator is ON, check permissions...
if ($feature_integrator != 'y')
{
$smarty->assign('msg', tra("This feature is disabled").": feature_integrator");
$smarty->display("styles/$style_base/error.tpl");
die;
}
if (($tiki_p_view_integrator != 'y') && ($tiki_p_admin_integrator != 'y') && ($tiki_p_admin != 'y'))
{
$smarty->assign('msg',tra("You dont have permission to use this feature"));
......
<?php
/**
* $Header: /cvsroot/tikiwiki/tiki/tiki-list_integrator_repositories.php,v 1.8 2003-11-11 21:15:10 sylvieg Exp $
* $Header: /cvsroot/tikiwiki/tiki/tiki-list_integrator_repositories.php,v 1.9 2003-11-12 00:32:25 zaufi Exp $
*
* Admin interface for repositories management
*
......@@ -9,12 +9,13 @@
require_once('tiki-setup.php');
require_once('lib/integrator/integrator.php');
f ($feature_integrator != 'y') {
// If Integrator is ON, check permissions...
if ($feature_integrator != 'y')
{
$smarty->assign('msg', tra("This feature is disabled").": feature_integrator");
$smarty->display("styles/$style_base/error.tpl");
die;
}
// Check permissions
if (($tiki_p_view_integrator != 'y') && ($tiki_p_admin_integrator != 'y') && ($tiki_p_admin != 'y'))
{
$smarty->assign('msg',tra("You dont have permission to use this feature"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment