[Formsess-devel] patch for object oriented code based on current trunk
Status: Beta
Brought to you by:
mrkatana
|
From: <M...@rm...> - 2005-04-22 08:51:56
|
Hi guys,
Here is a patch to be able to use object oriented calls in formsess
code.
Index: FormsessFilter.class.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- FormsessFilter.class.php (revision 547)
+++ FormsessFilter.class.php (working copy)
@@ -81,13 +81,13 @@
//replace known two part tags (except of select) by one part tags
//with the value stored in the ouput attribute
$this->_source =3D preg_replace('%<fs:(' . implode('|',
- $this->_known_two_part_tags) . ')(\s.*?)?>(.*?)</fs:\1>%xsmi',
- '<fs:$1$2 tagcontent=3D"$3" />', $this->_source
+ $this->_known_two_part_tags) . ')((\s+\w+=3D"[^"]*")*)?>(.*?)</fs:=
\1>%xsmi',
+ '<fs:$1$3 tagcontent=3D"$4" />', $this->_source
);
// first, look for all <fs:(*)> tags
// @todo add a condition to check if we don't at the same time get a=
closing and inline closing tag
- if (!preg_match_all('!<(/?)fs:([\w]+)(.*?)?(/?)>!xsmi', $this->_sour=
ce, $fs_tags, PREG_SET_ORDER)) {
+ if (!preg_match_all('!<(/?)fs:(\w+)((\s+\w+=3D"[^"]*")*)(\s*/)?>!xsm=
i', $this->_source, $fs_tags, PREG_SET_ORDER)) {
$this->_smartyCommentsRestore();
return;
}
Best regards,
S=E9bastien Hordeaux
|