From 91f054d52440e7f51ec1cb10ec5c5de44e7a3650 Mon Sep 17 00:00:00 2001
From: Brett Bieber <brett.bieber@gmail.com>
Date: Thu, 15 Apr 2010 14:20:49 +0000
Subject: [PATCH] Path fixes.

---
 config.sample.php       | 8 ++++++++
 www/index.php           | 5 +----
 www/linkedcse/index.php | 3 +--
 3 files changed, 10 insertions(+), 6 deletions(-)
 create mode 100644 config.sample.php

diff --git a/config.sample.php b/config.sample.php
new file mode 100644
index 0000000..0e760dc
--- /dev/null
+++ b/config.sample.php
@@ -0,0 +1,8 @@
+<?php
+
+ini_set('display_errors',true);
+error_reporting(E_ALL);
+
+set_include_path(dirname(__FILE__).'/src:'.dirname(__FILE__).'/lib/php:'.get_include_path());
+
+require_once 'UNL/Autoload.php';
\ No newline at end of file
diff --git a/www/index.php b/www/index.php
index 66c3a36..0cea7d8 100644
--- a/www/index.php
+++ b/www/index.php
@@ -1,8 +1,6 @@
 <?php
 
-ini_set('display_errors',true);
-error_reporting(E_ALL);
-require_once 'UNL/Autoload.php';
+require_once dirname(__FILE__).'/../config.sample.php';
 
 UNL_Templates::$options['version'] = 3;
 
@@ -15,7 +13,6 @@ $page->head .= '
 <link rel="stylesheet" type="text/css" href="searchCSS.css" />
 ';
 $page->addScript('searchFunc.js');
-$options = array('allowed_schemes' => array('http','https'));
 
 if (isset($_GET['u'])
     && preg_match('/^https?/', $_GET['u'])
diff --git a/www/linkedcse/index.php b/www/linkedcse/index.php
index 6d20e18..9645cfb 100644
--- a/www/linkedcse/index.php
+++ b/www/linkedcse/index.php
@@ -4,8 +4,7 @@ if (!isset($_GET['u'])) {
     exit();
 }
 
-chdir(dirname(dirname(__FILE__)));
-require_once 'UNL/Autoload.php';
+require_once dirname(__FILE__).'/../../config.sample.php';
 
 header('Content-type:application/xml');
 echo UNL_Search_CSEGenerator::generateCSE($_GET['u']);
-- 
GitLab