Commit 0c330b03 authored by Mike Hibler's avatar Mike Hibler

Replace deprecated ereg_replace with str_replace.

str_replace is sufficient since we were always replacing fixed strings
(i.e., not REs).
parent 35f19bcd
......@@ -245,7 +245,7 @@ echo "<tr>
<td align=center class=left>
<textarea name=message rows=15 cols=70>";
if (isset($message)) {
echo ereg_replace("\r", "", CleanString($message));
echo str_replace("\r", "", CleanString($message));
}
echo "</textarea>
</td>
......
......@@ -126,7 +126,7 @@ function SPITFORM($formfields, $errors)
<td align=center class=left>
<textarea name=\"formfields[message]\"
rows=10 cols=70>" .
ereg_replace("\r", "", $formfields["message"]) .
str_replace("\r", "", $formfields["message"]) .
"</textarea>
</td>
</tr>\n";
......
<?php
#
# Copyright (c) 2006, 2007 University of Utah and the Flux Group.
# Copyright (c) 2006-2012 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -517,8 +517,8 @@ function FormRenderElements($fields, $submitted)
function FormRenderMouseOver($string)
{
$string = ereg_replace("\n", "<br>", $string);
$string = ereg_replace("\r", "", $string);
$string = str_replace("\n", "<br>", $string);
$string = str_replace("\r", "", $string);
$string = htmlentities($string);
$string = preg_replace("/\'/", "\&\#039;", $string);
......
......@@ -352,7 +352,7 @@ function SPITFORM($formfields, $errors)
<td class=left>
<textarea name=\"formfields[notes]\"
rows=2 cols=40>" .
ereg_replace("\r", "",
str_replace("\r", "",
$formfields["notes"]) .
"</textarea>
</td>
......
......@@ -597,7 +597,7 @@ function SPITFORM($formfields, $returning, $errors)
<td colspan=3 align=center class=left>
<textarea name=\"formfields[proj_why]\"
rows=10 cols=60>" .
ereg_replace("\r", "", $formfields["proj_why"]) .
str_replace("\r", "", $formfields["proj_why"]) .
"</textarea>
</td>
</tr>\n";
......
......@@ -121,7 +121,7 @@ function SPITFORM($formfields, $errors)
<td align=center class=left>
<textarea name=\"formfields[message]\"
rows=10 cols=70>" .
ereg_replace("\r", "", $formfields["message"]) .
str_replace("\r", "", $formfields["message"]) .
"</textarea>
</td>
</tr>\n";
......
......@@ -233,7 +233,7 @@ function SPITFORM($formfields, $errors)
<td colspan=2 align=center class=left>
<textarea name=\"formfields[description]\"
rows=10 cols=80>" .
ereg_replace("\r", "", $formfields["description"]) .
str_replace("\r", "", $formfields["description"]) .
"</textarea>
</td>
</tr>\n";
......
......@@ -2472,7 +2472,7 @@ class TemplateMetadata
<td colspan=2 align=center class=left>
<textarea readonly
rows=10 cols=80>" .
ereg_replace("\r", "", $metadata_value) .
str_replace("\r", "", $metadata_value) .
"</textarea>
</td>
</tr>\n";
......@@ -2670,8 +2670,8 @@ function TBvalid_experiment_run_description($token) {
function MakeMouseOver($string)
{
$string = ereg_replace("\n", "<br>", $string);
$string = ereg_replace("\r", "", $string);
$string = str_replace("\n", "<br>", $string);
$string = str_replace("\r", "", $string);
$string = htmlentities($string);
$string = preg_replace("/\'/", "\&\#039;", $string);
......
<?php
#
# Copyright (c) 2006-2011 University of Utah and the Flux Group.
# Copyright (c) 2006-2012 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -360,7 +360,7 @@ function SPITFORM($action, $instance, $formfields, $parameters, $errors)
<td colspan=2 align=center class=left>
<textarea name=\"formfields[description]\"
rows=4 cols=80>" .
ereg_replace("\r", "", $formfields["description"]) .
str_replace("\r", "", $formfields["description"]) .
"</textarea>
</td>
</tr>\n";
......
<?php
#
# Copyright (c) 2006-2011 University of Utah and the Flux Group.
# Copyright (c) 2006-2012 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -164,7 +164,7 @@ function SPITFORM($action, $formfields, $errors)
<td colspan=2 align=center class=left>
<textarea $readonly_value name=\"formfields[value]\"
rows=10 cols=80>" .
ereg_replace("\r", "", $formfields["value"]) .
str_replace("\r", "", $formfields["value"]) .
"</textarea>
</td>
</tr>\n";
......
<?php
#
# Copyright (c) 2006-2011 University of Utah and the Flux Group.
# Copyright (c) 2006-2012 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -121,7 +121,7 @@ function SPITFORM($template, $formfields, $errors)
<td colspan=2 align=center class=left>
<textarea name=\"formfields[description]\"
rows=4 cols=100>" .
ereg_replace("\r", "", $formfields["description"]) .
str_replace("\r", "", $formfields["description"]) .
"</textarea>
</td>
</tr>\n";
......
<?php
#
# Copyright (c) 2006-2011 University of Utah and the Flux Group.
# Copyright (c) 2006-2012 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -290,7 +290,7 @@ function SPITFORM($template, $formfields, $parameters, $errors)
<td colspan=2 align=center class=left>
<textarea name=\"formfields[description]\"
rows=5 cols=80>" .
ereg_replace("\r", "", $formfields["description"]) .
str_replace("\r", "", $formfields["description"]) .
"</textarea>
</td>
</tr>\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment