- web: remove usage of ereg_replace()

Fixes #787.  From Nicolas Alvarez.

svn path=/trunk/boinc/; revision=19010
This commit is contained in:
David Anderson 2009-09-06 05:33:19 +00:00
parent ed30b45a43
commit c397a9dd9e
3 changed files with 12 additions and 3 deletions

View File

@ -7543,3 +7543,13 @@ David 5 Sept 2009
client/
time_stats.cpp
David 5 Sept 2009
- web: remove usage of ereg_replace()
Fixes #787. From Nicolas Alvarez.
html/
inc/
util.inc
user/
team_edit_form.php

View File

@ -421,8 +421,7 @@ function no_computing() {
// Generates a legal filename from a parameter string.
function get_legal_filename($name) {
$name = ereg_replace(',', '', $name);
return ereg_replace(' ', '_', $name);
return strtr($name, array(','=>'', ' '=>'_'));
}
// Returns a string containing as many words

View File

@ -27,7 +27,7 @@ $team = BoincTeam::lookup_id($teamid);
if (!$team) error_page("no such team");
require_admin($user, $team);
$team_name = ereg_replace("\"", "'", $team->name);
$team_name = strtr($team->name, '"', "'");
page_head("Edit ".$team_name);
team_edit_form($team, "Update team info", "team_edit_action.php");
page_tail();