Page MenuHomePhabricator

D19786.diff
No OneTemporary

D19786.diff

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

Mime Type
text/plain
Expires
Thu, May 16, 3:24 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6288280
Default Alt Text
D19786.diff (1 KB)

Event Timeline