]> andersk Git - sql-web.git/commitdiff
git-svn-id: svn://presbrey.mit.edu/sql/mitsql@73 a142d4bd-2cfb-0310-9673-cb33a7e74f58
authorJoe Presbrey <presbrey@mit.edu>
Tue, 11 Oct 2005 09:47:01 +0000 (09:47 +0000)
committerJoe Presbrey <presbrey@mit.edu>
Tue, 11 Oct 2005 09:47:01 +0000 (09:47 +0000)
cron/checkProcesses.php
lib/mitsql.lib.php
lib/security.lib.php

index b0ce0516536eda06a1f5c97938bdebe4e4d2de34..e5c134ec951efceecd12525e43d06aea3f5ade3a 100755 (executable)
@@ -1,12 +1,10 @@
 <?php
 
-chdir('../');
+@chdir(dirname(__FILE__).'/../');
 require_once('mitsql.cfg.php');
 require_once('mitsql.lib.php');
 define('MAX_PROC_TIME', 10);
 
-echo '<pre>';
-
 $baddbs = $badusers = $bad = array();
 $result = mysql_query('SHOW FULL PROCESSLIST');
 while ($row = mysql_fetch_assoc($result)){
index db3790df2fd57df3e2ef4533e7939b118ffb4f35..c59a4347e776573ff2d6e91dc6c19cc7badb9c69 100755 (executable)
@@ -13,7 +13,11 @@ require_once('security.lib.php');
 
 require_once('display.lib.php');
 
-$BASE_URL = 'http'.(isSSL()?'s':'').'://'.$_SERVER['SERVER_NAME'].BASE_URL;
+if (isset($_SERVER['SERVER_NAME'])) {
+       $BASE_URL = 'http'.(isSSL()?'s':'').'://'.$_SERVER['SERVER_NAME'].BASE_URL;
+} else {
+       $BASE_URL = 'http://sql.mit.edu/';
+}
 
 if (isset($_SERVER['REQUEST_URI'])) {
     //$thisPath=pathinfo($_SERVER['REQUEST_URI']);
index 77baf2005ceed3f8fe3293ee1b93aa20f644da42..2f7211330936a2390d8e902bc908047e39f7c842 100644 (file)
@@ -258,7 +258,7 @@ function impersonate($userId=null) {
 }
 
 function isSSL() {
-       return $_SERVER['SERVER_PORT'] == 443;
+       return isset($_SERVER['SERVER_PORT'])?($_SERVER['SERVER_PORT'] == 443):false;
 }
 
 function getSSLCert() {
This page took 0.073286 seconds and 5 git commands to generate.