Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F803942
D34.id142.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Feb 26, 9:01 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 9:01 AM (4 h, 54 m)
Engine
blob
Format
Raw Data
Handle
576662
Attached To
D34: INP-1398 - Add support for "result_to_var" parameter in "m_RenderElement" tag
D34.id142.diff
View Options
Index: branches/5.2.x/core/kernel/nparser/ntags.php
===================================================================
--- branches/5.2.x/core/kernel/nparser/ntags.php
+++ branches/5.2.x/core/kernel/nparser/ntags.php
@@ -309,7 +309,16 @@
$this->AppendCode($o, $this->Parser->BreakCache('', $pointer.'b') . " ?".">\n", false);
// $this->AppendCode($o, "if (!\$_parser->CacheStartOrContinue(\$_parser->CachableElements['".$tag['NP']['name']."'], '{$pointer}')) {".' ?'.'>', false);
*/
- $this->AppendCode($o, "echo (\$_parser->ParseBlock($to_pass));");
+ $code = array("echo (\$_parser->ParseBlock($to_pass));");
+
+ if ( array_key_exists('result_to_var', $tag['NP']) && $tag['NP']['result_to_var'] ) {
+ $param_name = $tag['NP']['result_to_var'];
+ $code[] = "\$params['{$param_name}'] = \$_parser->GetParam('{$param_name}');";
+ $code[] = "\${$param_name} = \$params['{$param_name}'];";
+ }
+
+ $this->AppendCode($o, $code);
+
return $o;
}
$this->Single = false;
@@ -711,4 +720,4 @@
return $o;
}
-}
\ No newline at end of file
+}
Event Timeline
Log In to Comment