Merge pull request #86 from halkyon/deprecated_fixes

MINOR Fixing deprecated ereg functions with preg in SideReport and Widget
This commit is contained in:
Ingo Schommer 2012-04-10 03:38:38 -07:00
commit 44f2b88bd4
2 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ class SideReportView extends ViewableData {
$classClause = "";
if(isset($info['title'])) {
$cssClass = ereg_replace('[^A-Za-z0-9]+','',$info['title']);
$cssClass = preg_replace('/[^A-Za-z0-9]+/', '', $info['title']);
$classClause = "class=\"$cssClass\"";
}

View File

@ -94,8 +94,8 @@ class Widget extends DataObject {
$name = $field->Name();
$field->setValue($this->getField($name));
$renderedField = $field->FieldHolder();
$renderedField = ereg_replace("name=\"([A-Za-z0-9\-_]+)\"", "name=\"Widget[" . $this->ID . "][\\1]\"", $renderedField);
$renderedField = ereg_replace("id=\"([A-Za-z0-9\-_]+)\"", "id=\"Widget[" . $this->ID . "][\\1]\"", $renderedField);
$renderedField = preg_replace("/name=\"([A-Za-z0-9\-_]+)\"/", "name=\"Widget[" . $this->ID . "][\\1]\"", $renderedField);
$renderedField = preg_replace("/id=\"([A-Za-z0-9\-_]+)\"/", "id=\"Widget[" . $this->ID . "][\\1]\"", $renderedField);
$output .= $renderedField;
}
return $output;