*** empty log message ***

svn path=/trunk/boinc/; revision=3527
This commit is contained in:
David Anderson 2004-06-10 19:43:54 +00:00
parent 2c67f636d2
commit ab6fef1741
9 changed files with 59 additions and 16 deletions

View File

@ -13223,3 +13223,31 @@ Brian 10 June 2004
sched/
main.C
file_upload_handler.C
David 10 June 2004
- Web caching system: use only the filename part of URL
to determine cache file name
(so that files are directly in html/cache).
No "_" if no params.
- web: allow more HTML tags (ul, ol, li)
- web: in seeing if projects is stopped, look for
"stop_sched" and "stop_daemons" rather than "stop_servers"
(forgot to make this change on May 3 2004)
- web: turn off user name search (until we have indices)
- web: change Mac install instructions to match Unix
- setup_project.py: copy html/inc/GioIP.dat also
- start script: remove cached home page when start or stop project.
html/
inc/
cache.inc
sanitize_html.inc
util.inc
user/
account_setup_first_download.php
account_setup_nonfirst_done.php
user_search_action.php
py/Boinc/
setup_project.py
sched/
start

View File

@ -2,10 +2,19 @@
// mechanism for caching commonly-accessed pages
function start_cache($max_age, $unique_parameter_string=""){
$cache_dir="../cache";
function get_path($params) {
$y = pathinfo($_SERVER["PHP_SELF"]);
$z = $y["basename"];
$path = "../cache/".$z;
if ($params) {
$path = $path."_".urlencode($params);
}
return $path;
}
function start_cache($max_age, $params=""){
$path = get_path($params);
$path = $cache_dir.$_SERVER["PHP_SELF"]."_".urlencode($unique_parameter_string);
if (@filemtime($path)<time()-$max_age){
// If cached version is too old (or non-existent)
// generate the page and write to cache
@ -22,10 +31,8 @@ function start_cache($max_age, $unique_parameter_string=""){
// write output buffer both to client and to cache
//
function end_cache($unique_parameter_string=""){
$cache_dir="../cache";
$path = $cache_dir.$_SERVER["PHP_SELF"]."_".urlencode($unique_parameter_string);
function end_cache($params=""){
$path = get_path($params);
$fhandle=fopen($path, "w");
$page=ob_get_contents();
ob_end_flush();

View File

@ -8,6 +8,9 @@ $allowed = array(
'p' => array('align' => 1),
'font' => array('face' => 1),
'br' => array(),
'ul' => array(),
'ol' => array(),
'li' => array(),
'pre' => array(),
'img' => array('src' => 1, 'border' => 1, 'height' => array('maxval' => 450))
);

View File

@ -430,7 +430,9 @@ function format_credit($cobblestones) {
}
function project_is_stopped() {
return file_exists("../../stop_servers");
if (file_exists("../../stop_sched")) return true;
if (file_exists("../../stop_daemons")) return true;
return false;
}
function user_links($user) {

View File

@ -25,8 +25,7 @@ echo "
<li><b>Windows users</b>:
open the downloaded file.
This will install BOINC on your computer.
<li><b>Macintosh OS/X users</b>: BOINC will install itself automatically.
<li><b>Unix and Linux users</b>:
<li><b>Macintosh OS/X, Unix and Linux users</b>:
Use gunzip to uncompress if your browser has not done it for you.
Then chmod +x on the executable and run it.
</ul>

View File

@ -19,11 +19,7 @@ echo "
double-clicking the BOINC system tray icon.
Choose the 'Login to Project' item in the Settings menu.
It will ask you for a project URL and an account ID.
<li><b>Macintosh users:</b>
Open the BOINC application window.
Choose the 'Login to Project' item in the Settings menu.
It will ask you for a project URL and an account ID.
<li><b>Unix and Linux users:</b>
<li><b>Mac, Unix and Linux users:</b>
Quit the BOINC client.
Then run the BOINC client program with the -add_project option.
It will ask you for a project URL and an account ID.

View File

@ -16,7 +16,7 @@ $count = 10;
page_head("Search results");
echo "Name search is disabled"
echo "Name search is disabled";
page_tail();
exit();

View File

@ -264,6 +264,7 @@ def install_boinc_files(dest_dir):
install_glob(srcdir('html/inc/*.inc'), dir('html/inc/'))
install_glob(srcdir('html/inc/*.php'), dir('html/inc/'))
install_glob(srcdir('html/inc/*.dat'), dir('html/inc/'))
install_glob(srcdir('html/ops/*.php'), dir('html/ops/'))
install_glob(srcdir('html/ops/*.inc'), dir('html/ops/'))
install_glob(srcdir('html/user/*.php'), dir('html/user/'))

View File

@ -203,6 +203,11 @@ def safe_unlink(filename):
except OSError, e:
print "Couldn't unlink %s:"%filename,e
def remove_cached_home_page():
path = os.path.join(project_dir, 'html/cache/index.php')
print 'removing '+path
safe_unlink(path)
def redirect(stdout='/dev/null', stderr=None, stdin='/dev/null'):
'''
Redirects stdio. The stdin, stdout, and stderr arguments are file names
@ -469,6 +474,7 @@ def command_enable_start():
run_daemons()
time.sleep(10) # give feeder time to start up and create shmem
remove_stop_sched()
remove_cached_home_page()
def command_cron_start():
if verbose: print "Verbose cron-start: status ==", (run_state.enabled and 'ENABLED' or 'DISABLED')
@ -487,6 +493,7 @@ def command_disable_stop():
run_state.enabled = 0
stop_daemons()
write_stop_sched()
remove_cached_home_page()
def command_status():
if run_state.enabled: