Page MenuHomePhabricator

D16313.diff
No OneTemporary

D16313.diff

diff --git a/src/applications/phame/editor/PhameBlogEditor.php b/src/applications/phame/editor/PhameBlogEditor.php
--- a/src/applications/phame/editor/PhameBlogEditor.php
+++ b/src/applications/phame/editor/PhameBlogEditor.php
@@ -160,6 +160,33 @@
$error->setIsMissingFieldError(true);
$errors[] = $error;
}
+
+ foreach ($xactions as $xaction) {
+ $new = $xaction->getNewValue();
+ if (phutil_utf8_strlen($new) > 64) {
+ $errors[] = new PhabricatorApplicationTransactionValidationError(
+ $type,
+ pht('Invalid'),
+ pht(
+ 'The selected blog title is too long. The maximum length '.
+ 'of a blog title is 64 characters.'),
+ $xaction);
+ }
+ }
+ break;
+ case PhameBlogTransaction::TYPE_SUBTITLE:
+ foreach ($xactions as $xaction) {
+ $new = $xaction->getNewValue();
+ if (phutil_utf8_strlen($new) > 64) {
+ $errors[] = new PhabricatorApplicationTransactionValidationError(
+ $type,
+ pht('Invalid'),
+ pht(
+ 'The selected blog subtitle is too long. The maximum length '.
+ 'of a blog subtitle is 64 characters.'),
+ $xaction);
+ }
+ }
break;
case PhameBlogTransaction::TYPE_PARENTDOMAIN:
if (!$xactions) {

File Metadata

Mime Type
text/plain
Expires
Mon, Mar 31, 12:24 AM (5 d, 20 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7727696
Default Alt Text
D16313.diff (1 KB)

Event Timeline