Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14076488
D19786.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19786.diff
View Options
diff --git a/src/xsprintf/qsprintf.php b/src/xsprintf/qsprintf.php
--- a/src/xsprintf/qsprintf.php
+++ b/src/xsprintf/qsprintf.php
@@ -32,9 +32,9 @@
* %K ("Comment")
* Escapes a comment.
*
- * %Q, %LA, %LO, %LQ ("Query Fragment")
+ * %Q, %LA, %LO, %LQ, %LJ ("Query Fragment")
* Injects a query fragment from a prior call to qsprintf(). The list
- * variants join a list of query fragments with AND, OR, or comma.
+ * variants join a list of query fragments with AND, OR, comma, or space.
*
* %R ("Database and Table Reference")
* Behaves like "%T.%T" and prints a full reference to a table including
@@ -196,6 +196,12 @@
}
$value = '(('.implode(') AND (', $value).'))';
break;
+ case 'J':
+ foreach ($value as $k => $v) {
+ $value[$k] = $v->getUnmaskedString();
+ }
+ $value = implode(' ', $value);
+ break;
default:
throw new XsprintfUnknownConversionException("%L{$next}");
}
@@ -314,6 +320,7 @@
case 'LQ':
case 'LA':
case 'LO':
+ case 'LJ':
if (!is_array($value)) {
throw new AphrontParameterQueryException(
$query,
@@ -340,6 +347,7 @@
case 'LQ':
case 'LA':
case 'LO':
+ case 'LJ':
if (!($value instanceof PhutilQueryString)) {
throw new AphrontParameterQueryException(
$query,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 5:37 PM (18 h, 21 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6775485
Default Alt Text
D19786.diff (1 KB)
Attached To
Mode
D19786: Add %LJ (joined with spaces) to qsprintf() for merging JOIN clauses
Attached
Detach File
Event Timeline
Log In to Comment