mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 05:22:35 +09:00
rollback r11168, r11171. issue 2159.
git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11188 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
de9492a1c0
commit
e03e365ff0
4 changed files with 16 additions and 108 deletions
|
|
@ -225,21 +225,9 @@ class TemplateHandler {
|
|||
**/
|
||||
function _compileFormAuthGeneration($matches)
|
||||
{
|
||||
// form ruleset attribute move to hidden tag
|
||||
if($matches[1])
|
||||
{
|
||||
// form id attribute move to hidden tag
|
||||
preg_match('/id="([^"]*?)"/is', $matches[1], $m);
|
||||
if(!$m[1])
|
||||
{
|
||||
$mt = microtime();
|
||||
$rand = mt_rand();
|
||||
$m[1] = md5($mt . $rand);
|
||||
$matches[1] = substr($matches[1], 0, 5) . ' id="' . $m[1] . '" ' . substr($matches[1], 5);
|
||||
}
|
||||
$matches[2] = '<input type="hidden" name="xe_form_id" value="' . $m[1] . '" />' . $matches[2];
|
||||
$formId = $m[1];
|
||||
|
||||
// form ruleset attribute move to hidden tag
|
||||
preg_match('/ruleset="([^"]*?)"/is', $matches[1], $m);
|
||||
if($m[0])
|
||||
{
|
||||
|
|
@ -270,10 +258,6 @@ class TemplateHandler {
|
|||
}
|
||||
}
|
||||
|
||||
// generate array key index
|
||||
$this->arrayKeyIndex = array();
|
||||
$matches[2] = preg_replace_callback('/(<(?:input|select|textarea)[^>]* name=")([^"]+)\[\](")/is', array($this, '_generateArrayKey'), $matches[2]);
|
||||
|
||||
// if not exists default hidden tag, generate hidden tag
|
||||
preg_match_all('/<input[^>]* name="(act|mid|vid)"/is', $matches[2], $m2);
|
||||
$checkVar = array('act', 'mid', 'vid');
|
||||
|
|
@ -303,19 +287,6 @@ class TemplateHandler {
|
|||
return implode($matches);
|
||||
}
|
||||
|
||||
function _generateArrayKey($matches)
|
||||
{
|
||||
if(!$this->arrayKeyIndex[$matches[2]])
|
||||
{
|
||||
$this->arrayKeyIndex[$matches[2]] = 0;
|
||||
}
|
||||
|
||||
$matches[2] = $matches[2] . '[' . $this->arrayKeyIndex[$matches[2]]++ . ']';
|
||||
|
||||
$matches[0] = '';
|
||||
return implode($matches);
|
||||
}
|
||||
|
||||
/**
|
||||
* fetch using ob_* function
|
||||
* @param string $buff if buff is not null, eval it instead of including compiled template file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue