[SCM] BOINC packaging branch, SZTAKI, updated. debian/6.10.17+dfsg-3-291-g2ca3019

Steffen Moeller moeller at debian.org
Sun Jun 12 20:01:13 UTC 2011


The following commit has been merged in the SZTAKI branch:
commit 55484a395a9098cb2859c324c7894631f71b0c28
Author: Steffen Moeller <moeller at debian.org>
Date:   Sun Jun 12 21:49:24 2011 +0200

    Clarified html_path throughout html file tree

diff --git a/debian/patches/series b/debian/patches/series
index faf6a60..9eb95b1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ csh2tcsh.patch
 file_upload_handler_permission.patch
 upstream_sztaki_usingTempfileInUpdateVersions.patch
 upstream_sztaki_reduce_accessibility_of_php_inc_file.patch
+upstream_sztaki_html_path.patch
diff --git a/debian/patches/upstream_sztaki_html_path.patch b/debian/patches/upstream_sztaki_html_path.patch
new file mode 100644
index 0000000..457fc5f
--- /dev/null
+++ b/debian/patches/upstream_sztaki_html_path.patch
@@ -0,0 +1,1264 @@
+Index: boinc/html/inc/bolt_snap.inc
+===================================================================
+--- boinc.orig/html/inc/bolt_snap.inc	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/inc/bolt_snap.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -40,9 +40,9 @@
+ 
+ 
+ function compare_snapshot_filename($course_id, $select_name, $xset_name) {
+-    @mkdir("../bolt_snap");
++    @mkdir(html_path("bolt_snap"));
+     $x = urlencode($course_id."_".$select_name."_".$xset_name);
+-    return "../bolt_snap/compare_snapshot_$x";
++    return html_path("bolt_snap/compare_snapshot_$x");
+ }
+ 
+ function write_compare_snapshot($course_id, $select_name, $xset_name, $dur) {
+@@ -124,7 +124,7 @@
+ 
+ 
+ function map_snapshot_filename($course_id) {
+-    return "../bolt_snap/map_snapshot_".$course_id;
++    return html_path("bolt_snap/map_snapshot_".$course_id);
+ }
+ 
+ function write_map_snapshot($course_id, $dur) {
+Index: boinc/html/inc/cache.inc
+===================================================================
+--- boinc.orig/html/inc/cache.inc	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/inc/cache.inc	2011-06-12 21:35:37.000000000 +0200
+@@ -16,7 +16,8 @@
+ // You should have received a copy of the GNU Lesser General Public License
+ // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+ 
+-require_once("../project/cache_parameters.inc");
++require_once("../inc/util.inc");
++require_once(html_path("project/cache_parameters.inc"));
+ 
+ // If we can't see request headers, don't do caching
+ //
+@@ -29,20 +30,20 @@
+ 
+ function make_cache_dirs() {
+     if (!@filemtime("../cache")) {
+-        mkdir("../cache", 0770);
+-        chmod("../cache", 0770);
++        mkdir(html_path("cache"), 0770);
++        chmod(html_path("cache"), 0770);
+     }
+     for ($i=0;$i<256;$i++) {
+         $j=sprintf("%02x",$i);
+-        if (!@filemtime("../cache/$j")) {
+-            mkdir("../cache/$j", 0770);
+-            chmod("../cache/$j", 0770);
++        if (!@filemtime(html_path("cache/$j"))) {
++            mkdir(html_path("cache/$j"), 0770);
++            chmod(html_path("cache/$j"), 0770);
+         } 
+     }
+ }
+ 
+ function get_path($params, $phpfile=null) {
+-    if (!@filemtime("../cache/00")) make_cache_dirs();
++    if (!@filemtime(html_path("cache/00"))) make_cache_dirs();
+     if ($phpfile) {
+         $z = $phpfile;
+     } else {
+@@ -52,7 +53,7 @@
+ 
+     // add a layer of subdirectories for reducing file lookup time
+     $sz = substr(md5($z."_".urlencode($params)),1,2);
+-    $path = "../cache/".$sz."/".$z;
++    $path = html_path("cache".$sz."/".$z);
+     if ($params) {
+         $path = $path."_".urlencode($params);
+     }
+@@ -110,10 +111,10 @@
+     if (!(rand() % CACHE_SIZE_CHECK_FREQ)) {
+         set_time_limit(0);  // this may take a while
+         $max_age = 86400;
+-        while ((disk_free_space("../cache") < MIN_FREE_SPACE) ||
+-            (disk_usage("../cache") > MAX_CACHE_USAGE)
++        while ((disk_free_space(html_path("cache")) < MIN_FREE_SPACE) ||
++            (disk_usage(html_path("cache")) > MAX_CACHE_USAGE)
+         ) {
+-            clean_cache($max_age, "../cache");
++            clean_cache($max_age, html_path("cache"));
+             $max_age/=2;
+         }
+     }
+Index: boinc/html/inc/db.inc
+===================================================================
+--- boinc.orig/html/inc/db.inc	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/inc/db.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -40,6 +40,7 @@
+     if (!$link) {
+         return 1;
+     }
++    mysql_set_charset('utf8', $link);
+     $db_name = parse_config($config, "<db_name>");
+     if (!mysql_select_db($db_name, $link)) {
+         echo "selecting $db_name\n";
+Index: boinc/html/inc/db_conn.inc
+===================================================================
+--- boinc.orig/html/inc/db_conn.inc	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/inc/db_conn.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -32,6 +32,7 @@
+         if (!$this->db_conn) {
+             return false;
+         }
++        mysql_set_charset('utf8', $this->db_conn);
+         $this->db_name = $name;
+         return true;
+     }
+Index: boinc/html/inc/email.inc
+===================================================================
+--- boinc.orig/html/inc/email.inc	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/inc/email.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -20,7 +20,7 @@
+ // Don't put specific message text here.
+ 
+ require_once("../inc/util.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ $config = get_config();
+ $master_url = parse_config($config, "<master_url>");
+Index: boinc/html/inc/forum_email.inc
+===================================================================
+--- boinc.orig/html/inc/forum_email.inc	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/inc/forum_email.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -18,7 +18,7 @@
+ 
+ require_once("../inc/util.inc");
+ require_once("../inc/email.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ define('MASTER_URL', $master_url);
+ 
+Index: boinc/html/inc/notify.inc
+===================================================================
+--- boinc.orig/html/inc/notify.inc	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/inc/notify.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -16,7 +16,8 @@
+ // You should have received a copy of the GNU Lesser General Public License
+ // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+ 
+-require_once("../project/project.inc");
++require_once("../inc/util.inc");
++require_once(html_path("project/project.inc"));
+ 
+ function notify_rss_auth($user) {
+     return md5($user->authenticator.$user->passwd_hash."notify_rss");
+Index: boinc/html/inc/translation.inc
+===================================================================
+--- boinc.orig/html/inc/translation.inc	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/inc/translation.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -16,7 +16,9 @@
+ // You should have received a copy of the GNU Lesser General Public License
+ // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+ 
+-$lang_language_dir = "../languages/";
++require_once '../inc/util_basic.inc';
++
++$lang_language_dir = html_path("languages/");
+ $lang_translations_dir = "translations/";
+ $lang_prj_translations_dir = "project_specific_translations/";
+ $lang_compiled_dir = "compiled/";
+Index: boinc/html/inc/user.inc
+===================================================================
+--- boinc.orig/html/inc/user.inc	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/inc/user.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -325,8 +325,8 @@
+         }
+     }
+     if ($user->donated == 1) { 
+-        if (file_exists("../project/donations.inc")) {
+-            require_once("../project/donations.inc");
++        if (file_exists(html_path("project/donations.inc"))) {
++            require_once(html_path("project/donations.inc"));
+             $x .= DONATION_LINK;
+             row2(tra("Donor"), $x);
+         }
+Index: boinc/html/inc/util.inc
+===================================================================
+--- boinc.orig/html/inc/util.inc	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/inc/util.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -17,7 +17,7 @@
+ // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ require_once("../inc/util_basic.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ require_once("../inc/countries.inc");
+ require_once("../inc/db.inc");
+ require_once("../inc/boinc_db.inc");
+@@ -443,7 +443,7 @@
+     }
+     $x .= " <a href=\"".URL_BASE."show_user.php?userid=".$user->id."\">".$user->name."</a>";
+     if ($user->donated == 1) { 
+-        require_once("../project/donations.inc");
++        require_once(html_path("project/donations.inc"));
+         $x .= DONATION_LINK;
+     }
+     $x .= "</td></tr></table>\n";
+@@ -462,7 +462,7 @@
+     }
+     $x .= " <a href=\"".URL_BASE."show_user.php?userid=".$user->id."\">".$user->name."</a>";
+     if ($user->donated == 1) { 
+-        require_once("../project/donations.inc");
++        require_once(html_path("project/donations.inc"));
+         $x .= DONATION_LINK;
+     }
+     if (function_exists("project_user_links")){
+Index: boinc/html/inc/util_basic.inc
+===================================================================
+--- boinc.orig/html/inc/util_basic.inc	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/inc/util_basic.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -19,12 +19,36 @@
+ // minimal set of util functions;
+ // doesn't pull in translation.inc etc.
+ 
++$g_project_path = null;
++function project_path($file) {
++    global $g_project_path;
++
++    if ($g_project_path)
++	return $g_project_path . "/" . $file;
++    if (function_exists('apache_getenv') && apache_getenv("BOINC_PROJECT_DIR"))
++	$g_project_path = apache_getenv("BOINC_PROJECT_DIR");
++    else if (isset($_ENV["BOINC_PROJECT_DIR"]))
++	$g_project_path = $_ENV["BOINC_PROJECT_DIR"];
++    else if (file_exists("config.xml"))
++	$g_project_path = ".";
++    else if (file_exists("../config.xml"))
++	$g_project_path = "..";
++    else
++	$g_project_path = "../..";
++
++    return $g_project_path . "/" . $file;
++}
++
++function html_path($file) {
++    return project_path("html/" . $file);
++}
++
+ function web_stopped() {
+-    return file_exists("../../stop_web");
++    return file_exists(project_path("stop_web"));
+ }
+ 
+ function sched_stopped() {
+-    return file_exists("../../stop_sched");
++    return file_exists(project_path("stop_sched"));
+ }
+ 
+ function show_page($x, $y) {
+@@ -64,7 +88,7 @@
+ function get_config() {
+     global $g_config;
+     if ($g_config == null) {
+-       $g_config = file_get_contents("../../config.xml");
++       $g_config = file_get_contents(project_path("config.xml"));
+     }
+     return $g_config;
+ }
+@@ -115,7 +139,7 @@
+     return false;
+ }
+ 
+-// look for a particular element in the ../../config.xml file
++// look for a particular element in the config.xml file
+ //
+ function parse_config($config, $tag) {
+     $element = parse_element($config, $tag);
+Index: boinc/html/inc/util_ops.inc
+===================================================================
+--- boinc.orig/html/inc/util_ops.inc	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/inc/util_ops.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -18,7 +18,7 @@
+ 
+ require_once("../inc/db_ops.inc");
+ require_once("../inc/util.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ // TODO: get rid of the following.  use style sheets
+ define("TD", "<td bgcolor=\"#708090\">");
+Index: boinc/html/ops/bossa_example4_make_jobs.php
+===================================================================
+--- boinc.orig/html/ops/bossa_example4_make_jobs.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/bossa_example4_make_jobs.php	2011-06-12 21:28:58.000000000 +0200
+@@ -41,7 +41,7 @@
+         exit("bossa_create_batch() failed\n");
+     }
+ 
+-    $d = opendir("../user/$dir");
++    $d = opendir(html_path("user/$dir"));
+     while ($file = readdir($d)) {
+         if (!strstr($file, ".png") && !strstr($file, ".jpg")) continue;
+         make_job("$dir/$file", $batchid, $appid);
+@@ -60,8 +60,8 @@
+ 
+ if (!$dir) usage();
+ 
+-if (!is_dir("../user/$dir")) {
+-    exit("../user/$dir is not a directory\n");
++if (!is_dir(html_path("user/$dir"))) {
++    exit(html_path("user/$dir") . " is not a directory\n");
+ }
+ 
+ $appid = bossa_app_lookup("bossa_example4");
+Index: boinc/html/ops/bossa_example_make_files.php
+===================================================================
+--- boinc.orig/html/ops/bossa_example_make_files.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/bossa_example_make_files.php	2011-06-12 21:28:58.000000000 +0200
+@@ -94,7 +94,7 @@
+ 
+ if (!$nfiles || !$dir) usage();
+ 
+-$dir = "../user/$dir";
++$dir = html_path("user/$dir");
+ if (!is_dir($dir)) {
+     exit("$dir is not a directory\n");
+ }
+Index: boinc/html/ops/bossa_example_make_jobs.php
+===================================================================
+--- boinc.orig/html/ops/bossa_example_make_jobs.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/bossa_example_make_jobs.php	2011-06-12 21:28:58.000000000 +0200
+@@ -34,7 +34,7 @@
+     // if it's a calibration job, get the answer and store in job record
+     //
+     if ($calibration) {
+-        $path2 = str_replace(".png", ".ans", "../user/$path");
++        $path2 = str_replace(".png", ".ans", html_path("user/$path"));
+         $info->answer = unserialize(file_get_contents($path2));
+     }
+ 
+@@ -50,7 +50,7 @@
+         exit("bossa_create_batch() failed\n");
+     }
+ 
+-    $d = opendir("../user/$dir");
++    $d = opendir(html_path("user/$dir"));
+     while ($file = readdir($d)) {
+         if (!strstr($file, ".png")) continue;
+         make_job("$dir/$file", $batchid, $appid, $calibration);
+@@ -76,8 +76,8 @@
+     exit("Application '$app_name' not found\n");
+ }
+ 
+-if (!is_dir("../user/$dir")) {
+-    exit("../user/$dir is not a directory\n");
++if (!is_dir(html_path("user/$dir"))) {
++    exit(html_path("user/$dir") . " is not a directory\n");
+ }
+ 
+ make_jobs($dir, $appid, $calibration);
+Index: boinc/html/ops/clean_cache.php
+===================================================================
+--- boinc.orig/html/ops/clean_cache.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/clean_cache.php	2011-06-12 21:28:58.000000000 +0200
+@@ -26,13 +26,13 @@
+ function cache_check_diskspace2(){
+    $too_old = 86400;
+    while (1) {
+-       $f = disk_free_space("../cache");
+-       $u = disk_usage("../cache");
++       $f = disk_free_space(html_path("cache"));
++       $u = disk_usage(html_path("cache"));
+        echo "free: $f used: $u\n";
+        if ($f > MIN_FREE_SPACE && $u < MAX_CACHE_USAGE) {
+            break;
+        }
+-       clean_cache($too_old, "../cache");
++       clean_cache($too_old, html_path("cache"));
+        $too_old/=2;
+    }
+ }
+Index: boinc/html/ops/eah_server_status.php
+===================================================================
+--- boinc.orig/html/ops/eah_server_status.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/eah_server_status.php	2011-06-12 21:28:58.000000000 +0200
+@@ -19,7 +19,7 @@
+ require_once("../inc/cache.inc");
+ require_once("../inc/util_ops.inc");
+ require_once("../inc/db.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ ################################################
+ # local functions
+@@ -47,7 +47,7 @@
+ }
+ 
+ function daemon_status($host, $pidname) {
+-    $path = "../../pid_$host/$pidname.pid";
++    $path = project_path("/pid_$host/$pidname.pid");
+     $running = false;
+     if (is_file($path)) {
+         $pid = file_get_contents($path);
+@@ -120,8 +120,7 @@
+ 
+ 
+ 
+-$web_running = !file_exists("../../stop_web");
+-show_status("einstein", "Web server", $web_running);
++show_status("einstein", "Web server", !web_stopped());
+ 
+ 
+ 
+@@ -130,8 +129,7 @@
+ show_daemon_status("einstein", "Pulsar work generator (LLO)", "make_pulsar_WU_daemon_l");
+ show_daemon_status("einstein", "BOINC database feeder", "feeder");
+ show_daemon_status("einstein", "BOINC transitioner", "transitioner");
+-$sched_running = !file_exists("../../stop_sched");
+-show_status("einstein", "BOINC scheduler", $sched_running);
++show_status("einstein", "BOINC scheduler", !sched_stopped());
+ show_daemon_status("einstein", "Einstein validator", "einstein_validator"); 
+ show_daemon_status("einstein", "Einstein assimilator", "einstein_assimilator");
+ show_daemon_status("einstein", "BOINC file deleter", "file_deleter");
+@@ -297,16 +295,6 @@
+ 
+ // Display cgi-bin restriction status
+ 
+-if (  file_exists("../../cgi-bin/.htaccess") ) {
+-    echo "<P><font color=RED>
+-        <b>The ".PROJECT." scheduler is currently restricted 
+-	  to uwm.edu and a few other domains.
+-
+-	</b></font><P>
+-     ";
+-} 
+-
+-
+ echo "</TD></TR>
+ 	</TABLE>
+     ";  
+Index: boinc/html/ops/manage_app_versions.php
+===================================================================
+--- boinc.orig/html/ops/manage_app_versions.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/manage_app_versions.php	2011-06-12 21:28:58.000000000 +0200
+@@ -117,7 +117,7 @@
+         }
+     }
+     mysql_free_result($result);
+-    touch("../../reread_db");
++    touch(project_path("reread_db"));
+ }
+ 
+ 
+Index: boinc/html/ops/manage_user.php
+===================================================================
+--- boinc.orig/html/ops/manage_user.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/manage_user.php	2011-06-12 21:28:58.000000000 +0200
+@@ -33,7 +33,7 @@
+ require_once("../inc/forum.inc");
+ require_once("../inc/util_ops.inc");
+ require_once("../inc/profile.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ db_init();
+ 
+Index: boinc/html/ops/notify.php
+===================================================================
+--- boinc.orig/html/ops/notify.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/notify.php	2011-06-12 21:42:24.000000000 +0200
+@@ -30,7 +30,7 @@
+ $cli_only = true;
+ require_once("../inc/boinc_db.inc");
+ require_once("../inc/util_ops.inc");
+-require_once("../project/project.inc");
++require_once(html_path("../project/project.inc"));
+ 
+ // delete notifications older than 90 days
+ //
+@@ -63,6 +63,8 @@
+     $query = "select notify.* from DBNAME.notify, DBNAME.forum_preferences where forum_preferences.pm_notification=2 and notify.userid = forum_preferences.userid and notify.create_time > $t";
+ 
+     $notifies = BoincNotify::enum_general($query);
++    if (!isset($notifies))
++        return;
+     $userid = 0;
+     $message = "";
+     $i = 1;
+Index: boinc/html/ops/profile_screen_form.php
+===================================================================
+--- boinc.orig/html/ops/profile_screen_form.php	2011-06-12 21:28:29.000000000 +0200
++++ boinc/html/ops/profile_screen_form.php	2011-06-12 21:28:58.000000000 +0200
+@@ -20,7 +20,7 @@
+ require_once("../inc/text_transform.inc");
+ require_once("../inc/profile.inc");
+ require_once("../inc/util_ops.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ db_init();
+ 
+Index: boinc/html/ops/repair_profile_pictures.php
+===================================================================
+--- boinc.orig/html/ops/repair_profile_pictures.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/repair_profile_pictures.php	2011-06-12 21:28:58.000000000 +0200
+@@ -29,8 +29,8 @@
+ 
+ foreach ($profiles as $p) {
+     $id = $p->userid;
+-    $path = "../user_profile/images/$id.jpg";
+-    $smpath = "../user_profile/images/".$id."_sm.jpg";
++    $path = html_path("user_profile/images/$id.jpg");
++    $smpath = html_path("user_profile/images/".$id."_sm.jpg");
+     $has_pic = file_exists($path);
+     $has_pic_sm = file_exists($smpath);
+     if ($p->has_picture) {
+Index: boinc/html/ops/show_log.php
+===================================================================
+--- boinc.orig/html/ops/show_log.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/show_log.php	2011-06-12 21:28:58.000000000 +0200
+@@ -58,13 +58,13 @@
+ echo 'Hint: Example greps: "RESULT#106876", "26fe99aa_25636_00119.wu_1", "WU#8152", "too many errors", "2003-07-17", "CRITICAL" <br>';
+ 
+ if (strlen($f)) {
+-	$f = "../log*/". $f;
++	$f = project_path("log*/". $f);
+ } else {
+-    $f = "../log*/*.log";
++    $f = project_path("log*/*.log");
+ }
+ 
+ if ($s) {
+-    passthru("cd $log_dir && ../bin/grep_logs -html -l $l '$s' $f 2>&1");
++    passthru("cd $log_dir && " . project_path("bin/grep_logs") . " -html -l $l '$s' $f 2>&1");
+ }
+ 
+ admin_page_tail();
+Index: boinc/html/ops/team_import.php
+===================================================================
+--- boinc.orig/html/ops/team_import.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/team_import.php	2011-06-12 21:28:58.000000000 +0200
+@@ -25,7 +25,7 @@
+ require_once("../inc/user.inc");
+ require_once("../inc/team.inc");
+ require_once("../inc/email.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ if (defined('INVITE_CODES')) {
+     echo "Account creation is protected by invitation codes, so not importing teams";
+Index: boinc/html/ops/update_profile_pages.php
+===================================================================
+--- boinc.orig/html/ops/update_profile_pages.php	2011-06-12 21:28:30.000000000 +0200
++++ /dev/null	1970-01-01 00:00:00.000000000 +0000
+@@ -1,410 +0,0 @@
+-#!/usr/bin/env php
+-<?php
+-// This file is part of BOINC.
+-// http://boinc.berkeley.edu
+-// Copyright (C) 2008 University of California
+-//
+-// BOINC is free software; you can redistribute it and/or modify it
+-// under the terms of the GNU Lesser General Public License
+-// as published by the Free Software Foundation,
+-// either version 3 of the License, or (at your option) any later version.
+-//
+-// BOINC is distributed in the hope that it will be useful,
+-// but WITHOUT ANY WARRANTY; without even the implied warranty of
+-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+-// See the GNU Lesser General Public License for more details.
+-//
+-// You should have received a copy of the GNU Lesser General Public License
+-// along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+-
+-$cli_only = true;
+-require_once("../inc/util_ops.inc");
+-require_once("../inc/uotd.inc");
+-require_once("../inc/db.inc");
+-require_once("../inc/profile.inc");
+-
+-// this causes "cannot modify header" errors
+-//echo date(DATE_RFC822), ": Starting\n";
+-
+-set_time_limit(0);
+-ini_set("memory_limit", "1024M");
+-
+-db_init();
+-
+-// TODO: convert to new DB interface
+-
+-$alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9');
+-
+-
+-// Builds a summary table of user profiles.
+-//
+-//   $members is an array of userIDs;
+-//   $offset indicates which entry to begin the table with
+-//   $numToDisplay indicates how many profiles to display in this table
+-//   $cols indicates how many profile summaries should be written per row
+-//   $descriptor is an optional file descriptor to write the table to.
+-
+-function show_user_table($members, $offset, $numToDisplay, $cols) {
+-    echo "<table class=bordered border=1 cellpadding=5>\n";
+-
+-    $rows = ceil($numToDisplay / $cols);
+-    $count = $offset;
+-    $numMembers = count($members);
+-
+-    for ($row = 0; $row < $rows; $row++) {
+-        if ($count >= $numMembers) {
+-            break;
+-        }
+-
+-        echo "<tr>\n";
+-
+-        for ($col = 0; $col < $cols; $col++) {
+-            if ($count < $numMembers) {
+-                $profile = get_profile($members[$count]);
+-                if (!$profile) {
+-                    $numMembers--;
+-                    continue;
+-                }
+-
+-                echo "<td class=bordered width=7% height=64><center>";
+-
+-                $show_picture = $profile->has_picture;
+-                if (profile_screening() && $profile->verification != 1) {
+-                    $show_picture = false;
+-                }
+-                if ($show_picture) {
+-                    echo "<a href=\"".URL_BASE."view_profile.php?userid={$members[$count]}\"><img src=\"".URL_BASE.IMAGE_URL."{$members[$count]}_sm.jpg\"></a>";
+-                } else {
+-                    echo " ";
+-                }
+-
+-                echo "</center></td><td class=bordered width=33% height=64>\n", get_profile_summary($profile), "</td>";
+-                $count++;
+-            } else {
+-                echo "<td width=7% height=64></td><td width=33% height=64></td>";
+-            }
+-        }
+-        echo "</tr>\n";
+-    }
+-    echo "</table>\n";
+-
+-}
+-
+-// Generates a standard set of links between associated multi-page documents.
+-//  All linked files must be of the form "$filename_<page number>.html".
+-
+-function write_page_links($filename, $currPageNum, $numPages) {
+-    echo "<p>Page $currPageNum of $numPages</p>";
+-
+-    $nextPageNum = $currPageNum + 1;
+-    $prevPageNum = $currPageNum - 1;
+-
+-    // Make the 'previous' and 'next' page links as appropriate.
+-    if ($currPageNum > 1) {
+-        echo "<a href={$filename}_{$prevPageNum}.html>Previous page</a>";
+-
+-        if ($currPageNum != $numPages) {
+-            echo " | ";
+-        }
+-    }
+-    if ($currPageNum != $numPages) {
+-        echo "<a href={$filename}_{$nextPageNum}.html>Next page</a>";
+-    }
+-
+-    echo "<p>Jump to Page:\n";
+-
+-    // Make the individual page links (or a bold non-link for the current page).
+-    //
+-    for ($i = 1; $i <= $numPages; $i++) {
+-        if ($i != $currPageNum) {
+-            echo "<a href={$filename}_{$i}.html>$i</a>\n";
+-        } else {
+-            echo "<b>$i</b>\n";
+-        }
+-    }
+-
+-}
+-
+-// Generates the html files which comprise the photo gallery.
+-//   $room: which gallery to generate (user, computer).
+-//   $width: the width of the table of images.
+-//   $height: the height of the table of images.
+-//
+-function build_picture_pages($width, $height) {
+-
+-    // TODO: Add support for a computer image gallery.
+-
+-    // TODO: Standardize "Last modified" string to a function call (util.inc).
+-
+-    if (profile_screening()) {
+-        $query = "SELECT userid FROM profile WHERE has_picture = 1 AND verification=1 order by userid";
+-    } else {
+-        $query = "SELECT userid FROM profile WHERE has_picture = 1 order by userid";
+-    }
+-    $result = mysql_query($query);
+-    $numIds = mysql_num_rows($result);
+-
+-    //echo "Result has $numIds rows.<br>";
+-
+-    // Build an array of IDs of all users with pictures in their profiles.
+-    while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+-        $userIds[] = $row[0];
+-    }
+-
+-    mysql_free_result($result);
+-
+-// don't randomize; makes things hard for people who sift profiles
+-//
+-//    if (count($userIds) > 0) {
+-//        // Randomize the ordering of users.
+-//        shuffle($userIds);
+-//    }
+-
+-    $numPages = ceil(count($userIds)/($width * $height));
+-
+-    // Make sure that a page is generated even when no profiles with pictures
+-    // exist in order to avoid 404 errors from the profile_menu page.
+-
+-    if ($numPages == 0) {
+-        $numPages = 1;
+-    }
+-
+-    //echo "Generating $numPages pages.<br>";
+-
+-    $count = 0;
+-
+-    for ($page = 1; $page <= $numPages; $page++) {
+-        $filename = PROFILE_PATH . "user_gallery_" . $page . ".html";
+-        open_output_buffer();
+-
+-        page_head("Profile gallery: page $page of $numPages", null, null, "../");
+-
+-        echo "Last updated ", pretty_time_str(time()),
+-            "\n<p>Browse the user profiles by picture.
+-            Only user profiles with pictures are listed here.";
+-
+-
+-        echo "<table class=bordered border=1 cellpadding=5>\n";
+-
+-        for ($row = 0; $row < $height; $row++) {
+-            echo "<tr>";
+-            for ($col = 0; $col < $width; $col++) {
+-	            if ($count < $numIds) {
+-                    echo "<td class=\"bordered\" align=\"center\">
+-                        <a href=\"".URL_BASE."view_profile.php?userid=".$userIds[$count]."\"><img src=\"".URL_BASE.IMAGE_URL.$userIds[$count]."_sm.jpg\"></a>
+-                    </td>";
+-                    $count++;
+-                }
+-            }
+-            echo "</tr>\n";
+-            if ($count == $numIds) {
+-                break;
+-            }
+-        }
+-
+-        echo "</table>\n";
+-
+-        // Previous and Next links
+-
+-        write_page_links("user_gallery", $page, $numPages);
+-
+-        page_tail(false, "../");
+-
+-        close_output_buffer($filename);
+-    }
+-
+-    //echo "<br><br><a href=\""  .PROFILE_PATH . "user_gallery_1.html\">Go to the first generated page.</a>";
+-}
+-
+-// Creates pages grouping user profiles by country.  Filenames are of the
+-// format "profile_country_<country name>_<page number>.html"
+-// Also creates a summary page listing all countries which have profiled
+-// members, the number of such members, and links to the created pages for
+-// each country.
+-
+-function build_country_pages() {
+-    $query = "select userid from profile";
+-    $result = mysql_query($query);
+-    $numIds = 0;
+-
+-    // Build a multi-dimensional array of countries,
+-    // each element of which contains an array
+-    // of the userids who belong to those countries.
+-    // Format: array[country][index] = userid.
+-
+-    while ($profile = mysql_fetch_object($result)) {
+-        $user = lookup_user_id($profile->userid);
+-        if (!$user) continue;
+-        if ($user->country) {
+-            $countryMembers[$user->country][] = $user->id;
+-            $numIds++;
+-        } else {
+-            $countryMembers['Other'][] = $user->id;
+-        }
+-    }
+-
+-    mysql_free_result($result);
+-
+-    //echo "$numIds users have profiles AND non-null country entries.<br>";
+-
+-    $countries = array_keys($countryMembers);
+-    sort($countries);
+-
+-    // Build the pages.
+-    // TODO: Define a constant for the desired number of rows per page.
+-
+-    foreach ($countries as $country) {
+-        $baseFileName =  "profile_country_" . get_legal_filename($country);
+-        $filePath = PROFILE_PATH;
+-        build_profile_pages(
+-            $countryMembers[$country],
+-            "User Profiles from $country", $country, 5, 2,
+-            $filePath, $baseFileName, "../html/"
+-        );
+-    }
+-
+-    // Build the summary page linking to the individual country pages.
+-
+-    build_country_summary_page($countryMembers);
+-
+-    //echo "<br><a href=\"" . PROFILE_PATH . "profile_country.html\">View Summary Page</a>";
+-    //echo "<br><br>Done";
+-
+-}
+-
+-// Creates pages grouping users by the first letter of their names.
+-
+-function build_alpha_pages() {
+-    global $alphabet;
+-
+-    $query = "select userid from profile";
+-    $result = mysql_query($query);
+-    $numIds = 0;
+-
+-    while ($profile = mysql_fetch_object($result)) {
+-        $user = lookup_user_id($profile->userid);
+-        if (!$user) continue;
+-        if ($user->name) {
+-            $name = ltrim($user->name);
+-            $members[strtoupper($name[0])][] = $user->id;
+-            $numIds++;
+-        }
+-    }
+-
+-    mysql_free_result($result);
+-
+-    //echo "$numIds users have profiles AND non-null country entries.<br>";
+-
+-    $letters = array_keys($members);
+-
+-    foreach ($letters as $letter) {
+-        // NOTE: Array indexing is case sensitive.
+-        $filePath = PROFILE_PATH;
+-        if (in_array($letter, $alphabet)) {
+-            build_profile_pages(
+-                $members[$letter],
+-                "User Profiles - Names beginning with $letter",
+-                "Names beginning with $letter", 5, 2, $filePath,
+-                "profile_$letter"
+-            );
+-        } else {
+-            build_profile_pages(
+-                $members[$letter],
+-                "User Profiles - Names beginning with other characters",
+-                "Names beginning with other characters", 5, 2, $filePath,
+-                "profile_other"
+-            );
+-        }
+-        $letters_used[$letter] = 1;
+-    }
+-
+-    build_alpha_summary_page($letters_used);
+-}
+-
+-// A generalized function to produce some number of pages summarizing a
+-// set of user profiles.
+-
+-function build_profile_pages($members, $pageHead, $pageTitle, $rowsPerPage, $colsPerPage, $filePath, $baseFileName) {
+-    $numMembers = count($members);
+-    $numPerPage = $rowsPerPage * $colsPerPage;
+-    $numPages = ceil(count($members) / $numPerPage);
+-
+-    $count = 0;
+-
+-    for ($page = 1; $page <= $numPages; $page++) {
+-
+-        $filename = $filePath . $baseFileName . "_" . $page . ".html";
+-        open_output_buffer();
+-
+-        $head = $pageHead . ": Page $page of $numPages";
+-        page_head($pageTitle, null, null, "../");
+-
+-        echo "Last updated ", pretty_time_str(time()), "<p>\n";
+-
+-        $offset = (($page-1) * $rowsPerPage * $colsPerPage);
+-
+-        show_user_table($members, $offset, $numPerPage, $colsPerPage);
+-
+-        write_page_links($baseFileName, $page, $numPages);
+-
+-        page_tail(false, "../");
+-
+-        close_output_buffer($filename);
+-    }
+-
+-}
+-
+-function build_country_summary_page($countryMembers) {
+-    $countries = array_keys($countryMembers);
+-
+-    $filename = PROFILE_PATH . "profile_country.html";
+-    open_output_buffer();
+-
+-    page_head("User Profiles by Country", null, null, "../");
+-    echo "Last updated " . pretty_time_str(time()) . "<p>";
+-
+-    echo "<table border=0>\n";
+-    echo "<tr><td><b>Country</b></td><td align=\"center\"><b>Profiles</b></td></tr>\n";
+-
+-    foreach ($countries as $country) {
+-        $numMembers = count($countryMembers[$country]);
+-        $name = get_legal_filename($country);
+-
+-        echo "<tr>\n<td><a href=\"profile_country_",
+-            "{$name}_1.html\">$country</a></td><td align=\"center\">$numMembers</td></td>\n";
+-    }
+-
+-    echo "</table>";
+-    page_tail(false, "../");
+-
+-    close_output_buffer($filename);
+-}
+-
+-function build_alpha_summary_page($characters_used) {
+-    global $alphabet;
+-
+-    $filename = PROFILE_PATH."profile_alpha.html";
+-    open_output_buffer();
+-
+-    foreach ($alphabet as $character) {
+-        if (isset($characters_used[$character])) {
+-            echo "<a href=\"".URL_BASE.PROFILE_URL."profile_{$character}_1.html\">$character</a> ";
+-            unset($characters_used[$character]);
+-        } else {
+-            echo "$character ";
+-        }
+-    }
+-
+-    // Link to the 'Other' page if necessary.
+-    if (!empty($characters_used)) {
+-        echo "<a href=\"".URL_BASE.PROFILE_URL."profile_other_1.html\">Other</a> ";
+-    }
+-    close_output_buffer($filename);
+-}
+-
+-build_country_pages();
+-build_alpha_pages();
+-build_picture_pages(GALLERY_WIDTH, GALLERY_HEIGHT);
+-
+-echo date(DATE_RFC822), ": Finished\n";
+-?>
+Index: boinc/html/ops/upgrade_db.php
+===================================================================
+--- boinc.orig/html/ops/upgrade_db.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/upgrade_db.php	2011-06-12 21:28:58.000000000 +0200
+@@ -25,9 +25,11 @@
+ 
+ echo "Checking for DB updates...\n";
+ 
++require_once("../inc/util.inc");
++
+ $db_revision = 0;
+-if (file_exists("../../db_revision")) {
+-    $db_revision = (int) file_get_contents("../../db_revision");
++if (file_exists(project_path("db_revision"))) {
++    $db_revision = (int) file_get_contents(project_path("db_revision"));
+ }
+ require_once("db_update.php");
+ 
+@@ -62,7 +64,7 @@
+     list($rev, $func) = $update;
+     echo "performing update $func\n";
+     call_user_func($func);
+-    file_put_contents("../../db_revision", $rev);
++    file_put_contents(project_path("db_revision"), $rev);
+ }
+ echo "All done.\n";
+ 
+Index: boinc/html/project.sample/project.inc
+===================================================================
+--- boinc.orig/html/project.sample/project.inc	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/project.sample/project.inc	2011-06-12 21:28:58.000000000 +0200
+@@ -9,11 +9,11 @@
+ require_once("../inc/util.inc");
+ 
+ $master_url = parse_config(get_config(), "<master_url>");
+-define("PROJECT", "REPLACE WITH PROJECT NAME");
++define("PROJECT", "%(long_name)s");
+ define("URL_BASE", $master_url);
+-define("IMAGE_PATH", "../user_profile/images/");
++define("IMAGE_PATH", html_path("user_profile/images/"));
+ define("IMAGE_URL", "user_profile/images/");
+-define("PROFILE_PATH", "../user_profile/");
++define("PROFILE_PATH", html_path("user_profile/"));
+ define("PROFILE_URL", "user_profile/");
+ define("LANGUAGE_FILE", "languages.txt");
+ define("STYLESHEET", "white.css");
+Index: boinc/html/user/ffmail_action.php
+===================================================================
+--- boinc.orig/html/user/ffmail_action.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/ffmail_action.php	2011-06-12 21:28:58.000000000 +0200
+@@ -16,8 +16,8 @@
+ // You should have received a copy of the GNU Lesser General Public License
+ // along with BOINC.  If not, see <http://www.gnu.org/licenses/>.
+ 
+-require_once("../project/project.inc");
+ require_once("../inc/email.inc");
++require_once(html_path("project/project.inc"));
+ 
+ function replace($toname, $comment, $fromname, $template) {
+     $pat = array(
+@@ -33,9 +33,9 @@
+     return preg_replace($pat, $rep, $template);
+ }
+ 
+-$html = file_get_contents('../ops/ffmail/html');
+-$text = file_get_contents('../ops/ffmail/text');
+-$subject = file_get_contents('../ops/ffmail/subject');
++$html = file_get_contents(html_path('ops/ffmail/html'));
++$text = file_get_contents(html_path('ops/ffmail/text'));
++$subject = file_get_contents(html_path('ops/ffmail/subject'));
+ 
+ $preview = get_str('preview', true);
+ $uname = get_str('uname');
+Index: boinc/html/user/ffmail_form.php
+===================================================================
+--- boinc.orig/html/user/ffmail_form.php	2011-06-12 21:28:32.000000000 +0200
++++ boinc/html/user/ffmail_form.php	2011-06-12 21:29:21.000000000 +0200
+@@ -21,7 +21,7 @@
+ db_init();
+ $user = get_logged_in_user();
+ 
+-if (!@file_get_contents('../ops/ffmail/subject')) {
++if (!@file_get_contents(html_path('ops/ffmail/subject'))) {
+     error_page(
+         'This project hasn\'t created an email message -
+         please notify its administrators'
+Index: boinc/html/user/get_project_config.php
+===================================================================
+--- boinc.orig/html/user/get_project_config.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/get_project_config.php	2011-06-12 21:28:58.000000000 +0200
+@@ -26,7 +26,7 @@
+ // and update it every hour if possible.
+ //
+ function show_platforms() {
+-    $path = "../cache/platform_list.xml";
++    $path = html_path("cache/platform_list.xml");
+     $mtime = @filemtime($path);
+     if ($mtime && (time() - $mtime) < 3600) {
+         @readfile($path);
+@@ -71,11 +71,6 @@
+     <master_url>$master_url</master_url>
+ ";
+ 
+-$local_revision = trim(file_get_contents("../../local.revision"));
+-if ($local_revision) {
+-    echo "<local_revision>$local_revision</local_revision>\n";
+-}
+-
+ if (web_stopped()) {
+     echo "
+         <error_num>-183</error_num>
+@@ -105,7 +100,7 @@
+ 
+ show_platforms();
+ 
+-$tou_file = "../../terms_of_use.txt";
++$tou_file = project_path("terms_of_use.txt");
+ if (file_exists($tou_file)) {
+     $terms_of_use = trim(file_get_contents($tou_file));
+     if ($terms_of_use) {
+Index: boinc/html/user/mail_passwd.php
+===================================================================
+--- boinc.orig/html/user/mail_passwd.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/mail_passwd.php	2011-06-12 21:28:58.000000000 +0200
+@@ -19,7 +19,7 @@
+ require_once("../inc/boinc_db.inc");
+ require_once("../inc/util.inc");
+ require_once("../inc/email.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ function email_sent_message($email_addr) {
+     if (defined('EMAIL_FROM')) {
+Index: boinc/html/user/moderation.php
+===================================================================
+--- boinc.orig/html/user/moderation.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/moderation.php	2011-06-12 21:28:58.000000000 +0200
+@@ -20,7 +20,7 @@
+ 
+ require_once("../inc/util.inc");
+ require_once("../inc/forum.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ page_head("Moderation");
+ echo "
+Index: boinc/html/user/moderator_instructions.php
+===================================================================
+--- boinc.orig/html/user/moderator_instructions.php	2011-06-12 21:28:32.000000000 +0200
++++ boinc/html/user/moderator_instructions.php	2011-06-12 21:29:28.000000000 +0200
+@@ -20,7 +20,7 @@
+ 
+ require_once("../inc/util.inc");
+ require_once("../inc/forum.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ page_head("Moderator instructions");
+ echo "
+Index: boinc/html/user/notify_rss.php
+===================================================================
+--- boinc.orig/html/user/notify_rss.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/notify_rss.php	2011-06-12 21:28:58.000000000 +0200
+@@ -23,7 +23,7 @@
+ require_once("../inc/pm.inc");
+ require_once("../inc/friend.inc");
+ require_once("../inc/notify.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ $userid = get_int('userid');
+ $auth = get_str('auth');
+Index: boinc/html/user/sample_index.php
+===================================================================
+--- boinc.orig/html/user/sample_index.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/sample_index.php	2011-06-12 21:45:55.000000000 +0200
+@@ -24,7 +24,7 @@
+ require_once("../inc/sanitize_html.inc");
+ require_once("../inc/translation.inc");
+ require_once("../inc/text_transform.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ function show_nav() {
+     $config = get_config();
+@@ -98,7 +98,7 @@
+     <link rel=\"stylesheet\" type=\"text/css\" href=\"".STYLESHEET."\">
+     <link rel=\"alternate\" type=\"application/rss+xml\" title=\"".$rssname."\" href=\"".$rsslink."\">
+ ";
+-include 'schedulers.txt';
++include html_path('project/schedulers.txt');
+ echo "
+     </head><body>
+     <span class=page_title>".PROJECT."</span>
+Index: boinc/html/user/sample_moderation.php
+===================================================================
+--- boinc.orig/html/user/sample_moderation.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/sample_moderation.php	2011-06-12 21:28:58.000000000 +0200
+@@ -19,7 +19,7 @@
+ 
+ 
+ require_once("../inc/util.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ page_head("Moderation");
+ echo "
+Index: boinc/html/user/sample_moderator_instructions.php
+===================================================================
+--- boinc.orig/html/user/sample_moderator_instructions.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/sample_moderator_instructions.php	2011-06-12 21:28:58.000000000 +0200
+@@ -19,7 +19,7 @@
+ 
+ 
+ require_once("../inc/util.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ page_head("Moderator instructions");
+ echo "
+Index: boinc/html/user/show_coproc.php
+===================================================================
+--- boinc.orig/html/user/show_coproc.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/show_coproc.php	2011-06-12 21:28:58.000000000 +0200
+@@ -92,7 +92,7 @@
+     exit;
+ }
+ 
+-$fname = "../ops/".filename($mode);
++$fname = html_path("ops/".filename($mode));
+ $data = file_get_contents($fname);
+ $array = unserialize($data);
+ 
+Index: boinc/html/user/show_user.php
+===================================================================
+--- boinc.orig/html/user/show_user.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/show_user.php	2011-06-12 21:28:58.000000000 +0200
+@@ -31,7 +31,7 @@
+ require_once("../inc/boinc_db.inc");
+ require_once("../inc/user.inc");
+ require_once("../inc/forum.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ $auth = get_str("auth", true);
+ if (!$auth) {
+Index: boinc/html/user/uotd_gadget.php
+===================================================================
+--- boinc.orig/html/user/uotd_gadget.php	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/user/uotd_gadget.php	2011-06-12 21:28:58.000000000 +0200
+@@ -19,7 +19,7 @@
+ 
+ 
+ require_once("../inc/xml.inc");
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ 
+ xml_header();
+ 
+Index: boinc/html/inc/prefs.inc
+===================================================================
+--- boinc.orig/html/inc/prefs.inc	2011-06-12 21:28:31.000000000 +0200
++++ boinc/html/inc/prefs.inc	2011-06-12 21:45:00.000000000 +0200
+@@ -64,7 +64,7 @@
+ ini_set('display_startup_errors', true);
+ 
+ include_once("../inc/prefs_util.inc");
+-include_once("../project/project_specific_prefs.inc");
++include_once(html_path("project/project_specific_prefs.inc"));
+ 
+ $app_types = get_app_types();
+ 
+Index: boinc/html/ops/mass_email_script.php
+===================================================================
+--- boinc.orig/html/ops/mass_email_script.php	2011-06-12 21:28:30.000000000 +0200
++++ boinc/html/ops/mass_email_script.php	2011-06-12 21:41:49.000000000 +0200
+@@ -39,10 +39,10 @@
+ // see http://boinc.berkeley.edu/mass_email.php for info
+ 
+ $cli_only = true;
+-require_once('../project/project.inc');
+ require_once('../inc/email.inc');
+ require_once('../inc/db.inc');
+ require_once('../inc/util_ops.inc');
++require_once(html_path('project/project.inc'));
+ 
+ db_init();
+ set_time_limit(0);
+Index: boinc/html/user/forum_rss.php
+===================================================================
+--- boinc.orig/html/user/forum_rss.php	2011-06-12 21:28:32.000000000 +0200
++++ boinc/html/user/forum_rss.php	2011-06-12 21:39:27.000000000 +0200
+@@ -27,7 +27,7 @@
+ //      If true, truncate posts to 256 chars and show BBcode
+ //      else show whole post and convert to HTML
+ 
+-require_once("../project/project.inc");
++require_once(html_path("project/project.inc"));
+ require_once("../inc/boinc_db.inc");
+ require_once("../inc/forum_rss.inc");
+ 

-- 
BOINC packaging



More information about the pkg-boinc-commits mailing list