mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Fixing ereg functions with preg in SideReport and Widget
This commit is contained in:
parent
4524d1c594
commit
d914ee0f2c
@ -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\"";
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user