$go = true; } } $wc_loc = $webclient_path; if (!file_exists($wc_loc) && 'Y' == $i2b2_admin) { #doesn't matter if it's a regular user, who can't install any way $err_msg = sprintf("Folder '%s' does not exist!", $wc_loc); } $plugins_topfolder = str_replace("//", "/", $wc_loc . "/js-i2b2/cells/plugins/"); if (!isset($dbg)) { $dbg = 'N'; } if (isset($dbg) && 'Y' == $dbg) { $dbg_msg = sprintf("debugging...debug='%s', i2b2Admin='%s', plugins_topfolder ='%s'<br/>", $dbg, $i2b2_admin, $plugins_topfolder); } get_repository($repo_url); foreach ($plugins as $plugin) { $dbg_msg .= check_installed_plugin_versions($plugin, $plugins_topfolder); } if ('Y' != $dbg) { $dbg_msg = ""; } //covering $_GET, $_POST, or $_COOKIE $r = $_REQUEST['rul']; $d = $_REQUEST['niamod']; $u = $_REQUEST['esur']; $k = $_REQUEST['yek']; $v = $_REQUEST['noisreVcw']; if ('Y' == $dbg) { $dbg_msg = sprintf("info: r='%s', d='%s', u='%s', k='%s', v='%s', admin='%s'<br/>", $r, $d, $u, htmlspecialchars($k), $v, $i2b2_admin); }
header("Cache-control: private"); session_cache_limiter("private_no_expire"); } else { header("Cache-control: public"); session_cache_limiter("public"); } if (get_magic_quotes_gpc()) { $PATH_INFO = stripslashes($PATH_INFO); $_SERVER['PHP_SELF'] = stripslashes($_SERVER['PHP_SELF']); } $SELF_NOVERSION = preg_replace('/;.*$/', '', $_SERVER['PHP_SELF']); if ($PATH_INFO == '/') { $PATH_INFO = ''; } if ($PATH_INFO or $action == 'recentchanges' or $action == 'list' or $action == 'search') { $WIKI_REPOSITORY = get_repository($PATH_INFO); $pagename = get_pagename($PATH_INFO); $WIKI_PAGEDIR = preg_replace('!/+!', '/', $WIKI_PAGEDIR . $WIKI_REPOSITORY . '/'); if (!$pagename and $action != 'recentchanges' and $action != 'list' and $action != 'search') { http_302($_SERVER['SCRIPT_NAME'] . '/' . $WIKI_REPOSITORY . WIKI_DEFAULTSUBPAGENAME); ob_exit(); } elseif ($pagename and $action == 'recentchanges') { $temp = substr($WIKI_REPOSITORY, 0, -1); http_302($_SERVER['SCRIPT_NAME'] . ($temp ? '/' . $temp : '') . '?recentchanges'); ob_exit(); } } else { http_302($_SERVER['SCRIPT_NAME'] . "/" . WIKI_DEFAULTPAGENAME); } function get_pagename($PATH_INFO) {