mirror of https://github.com/BOINC/boinc.git
- team import: fix string-escaping bugs
- user web: don't show links to sched logs if they don't exist - user web: add new team types svn path=/trunk/boinc/; revision=14295
This commit is contained in:
parent
da3671f0de
commit
19267f06e1
|
@ -11611,3 +11611,15 @@ David 23 Nov 2007
|
||||||
forum_reply.php
|
forum_reply.php
|
||||||
pm.php
|
pm.php
|
||||||
sample_index.php
|
sample_index.php
|
||||||
|
|
||||||
|
David 23 Nov 2007
|
||||||
|
- team import: fix string-escaping bugs
|
||||||
|
- user web: don't show links to sched logs if they don't exist
|
||||||
|
- user web: add new team types
|
||||||
|
|
||||||
|
html/
|
||||||
|
inc/
|
||||||
|
host.inc
|
||||||
|
team_types.inc
|
||||||
|
ops/
|
||||||
|
team_import.php
|
||||||
|
|
|
@ -18,7 +18,11 @@ function sched_log_name($x) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sched_log_link($x) {
|
function sched_log_link($x) {
|
||||||
|
if (file_exists("../sched_logs")) {
|
||||||
return "<a href=\"../sched_logs/" . sched_log_name($x) . "\">" . time_str($x) . "</a>";
|
return "<a href=\"../sched_logs/" . sched_log_name($x) . "\">" . time_str($x) . "</a>";
|
||||||
|
} else {
|
||||||
|
return time_str($x);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function location_form($host) {
|
function location_form($host) {
|
||||||
|
|
|
@ -8,12 +8,17 @@ $team_types = array(
|
||||||
"Secondary school",
|
"Secondary school",
|
||||||
"Junior college",
|
"Junior college",
|
||||||
"University or department",
|
"University or department",
|
||||||
"Government agency"
|
"Government agency",
|
||||||
|
"Non-profit organization",
|
||||||
|
"National",
|
||||||
|
"Local/regional",
|
||||||
|
"Computer type",
|
||||||
|
"Social/political/religious"
|
||||||
);
|
);
|
||||||
|
|
||||||
function team_type_name($num) {
|
function team_type_name($num) {
|
||||||
global $team_types;
|
global $team_types;
|
||||||
if ($num>0 && $num<8) {
|
if ($num>0 && $num<count($team_types)) {
|
||||||
return $team_types[$num];
|
return $team_types[$num];
|
||||||
}
|
}
|
||||||
return "None";
|
return "None";
|
||||||
|
|
|
@ -106,7 +106,7 @@ function insert_case($t, $user) {
|
||||||
}
|
}
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
echo " making user $t->user_email\n";
|
echo " making user $t->user_email\n";
|
||||||
$user = make_user($t->user_email, $t->user_name, random_string());
|
$user = make_user(mysql_real_escape_string($t->user_email), mysql_real_escape_string($t->user_name), random_string());
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
echo " Can't make user $t->user_email\n";
|
echo " Can't make user $t->user_email\n";
|
||||||
echo mysql_error();
|
echo mysql_error();
|
||||||
|
@ -176,8 +176,8 @@ function handle_team($f) {
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Processing $t->name $t->user_email\n";
|
echo "Processing $t->name $t->user_email\n";
|
||||||
$user = lookup_user_email_addr($t->user_email);
|
$user = lookup_user_email_addr(mysql_real_escape_string($t->user_email));
|
||||||
$team = lookup_team_name($t->name);
|
$team = lookup_team_name(mysql_real_escape_string($t->name));
|
||||||
if ($team) {
|
if ($team) {
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
echo " team exists but user $t->user_email doesn't\n";
|
echo " team exists but user $t->user_email doesn't\n";
|
||||||
|
|
Loading…
Reference in New Issue