From bb6de89905f0bf2bbd520adf6f35e478d6918fdc Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Wed, 13 Oct 2010 22:05:54 +0000
Subject: [PATCH] Minor fix to last commit

git-svn-id: file:///tmp/wdn_thm_drupal/trunk@241 20a16fea-79d4-4915-8869-1ea9d5ebf173
---
 includes/unl_bootstrap.inc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/includes/unl_bootstrap.inc b/includes/unl_bootstrap.inc
index 2899e268..3caa2fc9 100644
--- a/includes/unl_bootstrap.inc
+++ b/includes/unl_bootstrap.inc
@@ -13,8 +13,13 @@ function unl_bootstrap() {
   
   $previous_conf_path = '';
   $previous_script_name = '';
-  for ($i = count($path_parts); $i > 0; $i--) {
-    $_SERVER['SCRIPT_NAME'] = '/' . implode('/', array_slice($path_parts, 0, $i)) . '/index.php';
+  for ($i = count($path_parts); $i >= 0; $i--) {
+    if ($i == 0) {
+      $_SERVER['SCRIPT_NAME'] = '/index.php';
+    }
+    else {
+      $_SERVER['SCRIPT_NAME'] = '/' . implode('/', array_slice($path_parts, 0, $i)) . '/index.php';
+    }
     $conf_path = conf_path(TRUE, TRUE);
     
     if ($previous_conf_path && ($conf_path != $previous_conf_path)) {
-- 
GitLab