1 diff -ur ./mythweb/canned_searches.php /tmp/mythweb/canned_searches.php
2 --- ./mythweb/canned_searches.php 2005-03-01 09:10:23.000000000 +0200
3 +++ /tmp/mythweb/canned_searches.php 2005-10-26 00:17:02.000000000 +0300
5 require_once "includes/init.php";
7 // Load the canned searches
8 - require_once "config/canned_searches.php";
9 + require_once "/etc/mythweb/canned_searches.php";
11 // Load the class for this page
12 require_once theme_dir.'canned_searches.php';
13 diff -ur ./mythweb/includes/init.php /tmp/mythweb/includes/init.php
14 --- ./mythweb/includes/init.php 2005-02-28 00:52:48.000000000 +0200
15 +++ /tmp/mythweb/includes/init.php 2005-10-26 00:11:25.000000000 +0300
17 require_once 'includes/errordisplay.php';
19 // Load the user-defined configuration settings
20 - require_once 'config/conf.php';
21 + require_once '/etc/mythweb/conf.php';
23 // Clean up some variables
24 if (!ereg('/$', $_SERVER['DOCUMENT_ROOT']))
26 define('theme_dir', 'themes/'.Theme.'/');
28 // Load the theme config
29 - require_once 'config/theme_'.Theme.'.php';
30 + require_once '/etc/mythweb/theme_'.Theme.'.php';
32 // Load the overall page theme class
33 require_once theme_dir."theme.php";
35 // Make sure the image cache path exists
37 - foreach (split('/+', image_cache) as $dir) {
38 - $path .= $path ? '/' . $dir : $dir;
39 + foreach (split("/+", image_cache) as $dir) {
40 + $path .= $path ? ('/' . $dir) : ($dir ? $dir : "/$dir");
41 if(!is_dir($path) && !mkdir($path, 0755))
42 trigger_error('Error creating path for '.$path.': Please check permissions.', FATAL);
44 diff -ur ./mythweb/search.php /tmp/mythweb/search.php
45 --- ./mythweb/search.php 2005-03-01 09:10:23.000000000 +0200
46 +++ /tmp/mythweb/search.php 2005-10-26 00:17:12.000000000 +0300
48 if (preg_match('/^\s*canned:\s*(.+)\s*$/', $_SESSION['search']['searchstr'], $search_name)) {
49 $search_name = $search_name[1];
50 // Load the canned searches
51 - require_once 'config/canned_searches.php';
52 + require_once '/etc/mythweb/canned_searches.php';
54 if ($Canned_Searches[$search_name]) {
55 $query = array($Canned_Searches[$search_name]);
56 diff -ur ./mythweb/weather.php /tmp/mythweb/weather.php
57 --- ./mythweb/weather.php 2005-03-09 08:41:54.000000000 +0200
58 +++ /tmp/mythweb/weather.php 2005-10-26 00:17:22.000000000 +0300
62 function getImageAndDescFromId($myid) {
63 - $data = file("config/weathertypes.dat");
64 + $data = file("/etc/mythweb/weathertypes.dat");
65 foreach($data as $line) {
66 list($id, $name, $img) = explode(",", $line);
67 if($id != $myid) continue;
71 function getImageFromName($myname) {
72 - $data = file("config/weathertypes.dat");
73 + $data = file("/etc/mythweb/weathertypes.dat");
74 foreach($data as $line) {
75 list($id, $name, $img) = explode(",", $line);
76 if($name != $myname) continue;