Ticket #787: ereg_replace_remove.diff

File ereg_replace_remove.diff, 989 bytes (added by Nicolas, 16 years ago)
  • html/user/team_edit_form.php

     
    2727if (!$team) error_page("no such team");
    2828require_admin($user, $team);
    2929
    30 $team_name = ereg_replace("\"", "'", $team->name);
     30$team_name = strtr($team->name, '"', "'");
    3131page_head("Edit ".$team_name);
    3232team_edit_form($team, "Update team info", "team_edit_action.php");
    3333page_tail();
  • html/inc/util.inc

     
    418418// Generates a legal filename from a parameter string.
    419419
    420420function get_legal_filename($name) {
    421     $name = ereg_replace(',', '', $name);
    422     return ereg_replace(' ', '_', $name);
     421    return strtr($name, array(','=>'', ' '=>'_'));
    423422}
    424423
    425424// Returns a string containing as many words