Permalink
Browse files

MINOR Fixing ereg functions with preg in SideReport and Widget

  • Loading branch information...
1 parent 4524d1c commit d914ee0f2cbf12c1f2f5c3af85f2a7f3d9112a66 @halkyon halkyon committed Apr 10, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 code/reports/SideReport.php
  2. +2 −2 code/widgets/Widget.php
@@ -86,7 +86,7 @@ protected function formatValue($record, $source, $info) {
$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
@@ -94,8 +94,8 @@ function CMSEditor() {
$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;

0 comments on commit d914ee0

Please sign in to comment.