// Reassign values in form $smarty->assign('ruleID', $rule["ruleID"]); $smarty->assign('ord', $rule["ord"]); $smarty->assign('srch', $rule["srch"]); $smarty->assign('repl', $rule["repl"]); $smarty->assign('type', $rule["type"]); $smarty->assign('casesense', $rule["casesense"]); $smarty->assign('rxmod', $rule["rxmod"]); $smarty->assign('enabled', $rule["enabled"]); $smarty->assign('description', $rule["description"]); // Have smth to show? if ($html != 'y' || $code != 'y') { // Get repository configuration data $rep = $integrator->get_repository($repID); // Check if file given and present at configured location $f = $integrator->get_rep_file($rep, $file); if (substr($rep["path"], 0, 7) != 'http://' && substr($rep["path"], 0, 8) != 'https://' && !file_exists($f)) { $smarty->assign('msg', tra("File not found ") . $f); $smarty->display("error.tpl"); die; } // Get file content to string $data = @file_get_contents($f); if (isset($php_errormsg)) { $data .= "ERROR: " . $php_errormsg; } else { // Should we apply all configured rules or only current one? if ($all == 'y') { $rules = $integrator->list_rules($repID); if (is_array($rules)) { foreach ($rules as $r) {
$smarty->assign('msg', tra("You do not have permission to use this feature")); $smarty->display("error.tpl"); die; } $repID = isset($_REQUEST["repID"]) && strlen($_REQUEST["repID"]) > 0 ? $_REQUEST["repID"] : 0; if (!isset($_REQUEST["repID"]) && $repID <= 0) { $smarty->assign('msg', tra("No repository given")); $smarty->display("error.tpl"); die; } // Create instance of integrator $integrator = new TikiIntegrator($dbTiki); // Get repository configuration data $rep = $integrator->get_repository($repID); // Check if given file present at configured location $file = $integrator->get_rep_file($rep, isset($_REQUEST["file"]) ? $_REQUEST["file"] : ''); if (substr($file, 0, 7) != 'http://' && substr($file, 0, 8) != 'https://' && !file_exists($file)) { if ($tiki_p_admin == 'y') { $smarty->assign('msg', tra("File not found ") . $file); } else { $smarty->assign('msg', tra("File not found ") . $_REQUEST["file"]); } $smarty->display("error.tpl"); die; } // Needs to clear cached version of this file... if (isset($_REQUEST["clear_cache"]) && $rep["cacheable"]) { $integrator->clear_cached_file($repID, isset($_REQUEST["file"]) ? $_REQUEST["file"] : ''); } // $url2cache = $tikilib->httpPrefix() . $_SERVER["SCRIPT_NAME"] . "?repID=" . $repID . (isset($_REQUEST["file"]) ? "&file=" . $_REQUEST["file"] : '');