Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2630174
D25525.1732051835.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
12 KB
Referenced Files
None
Subscribers
None
D25525.1732051835.diff
View Options
diff --git a/src/applications/conpherence/controller/ConpherenceRoomPictureController.php b/src/applications/conpherence/controller/ConpherenceRoomPictureController.php
--- a/src/applications/conpherence/controller/ConpherenceRoomPictureController.php
+++ b/src/applications/conpherence/controller/ConpherenceRoomPictureController.php
@@ -24,6 +24,12 @@
$monogram = $conpherence->getMonogram();
$supported_formats = PhabricatorFile::getTransformableImageFormats();
+ if ($supported_formats) {
+ $supported_formats_message = pht('Supported image formats: %s.',
+ implode(', ', $supported_formats));
+ } else {
+ $supported_formats_message = pht('Server supports no image formats.');
+ }
$e_file = true;
$errors = array();
@@ -56,9 +62,7 @@
if (!$errors && !$is_default) {
if (!$file->isTransformableImage()) {
$e_file = pht('Not Supported');
- $errors[] = pht(
- 'This server only supports these image formats: %s.',
- implode(', ', $supported_formats));
+ $errors[] = $supported_formats_message;
} else {
$xform = PhabricatorFileTransform::getTransformByKey(
PhabricatorFileThumbnailTransform::TRANSFORM_PROFILE);
@@ -195,8 +199,7 @@
->setName('picture')
->setLabel(pht('Upload Picture'))
->setError($e_file)
- ->setCaption(
- pht('Supported formats: %s', implode(', ', $supported_formats))))
+ ->setCaption($supported_formats_message))
->appendChild(
id(new AphrontFormSubmitControl())
->addCancelButton('/'.$monogram)
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php b/src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryProfilePictureController.php
@@ -24,6 +24,12 @@
}
$supported_formats = PhabricatorFile::getTransformableImageFormats();
+ if ($supported_formats) {
+ $supported_formats_message = pht('Supported image formats: %s.',
+ implode(', ', $supported_formats));
+ } else {
+ $supported_formats_message = pht('Server supports no image formats.');
+ }
$e_file = true;
$errors = array();
$done_uri = $repository->getURI();
@@ -57,9 +63,7 @@
if (!$errors && !$is_default) {
if (!$file->isTransformableImage()) {
$e_file = pht('Not Supported');
- $errors[] = pht(
- 'This server only supports these image formats: %s.',
- implode(', ', $supported_formats));
+ $errors[] = $supported_formats_message;
} else {
$xform = PhabricatorFileTransform::getTransformByKey(
PhabricatorFileThumbnailTransform::TRANSFORM_PROFILE);
@@ -213,8 +217,7 @@
->setName('picture')
->setLabel(pht('Upload Picture'))
->setError($e_file)
- ->setCaption(
- pht('Supported formats: %s', implode(', ', $supported_formats))))
+ ->setCaption($supported_formats_message))
->appendChild(
id(new AphrontFormSubmitControl())
->addCancelButton($done_uri)
diff --git a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
--- a/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
+++ b/src/applications/people/controller/PhabricatorPeopleProfilePictureController.php
@@ -27,6 +27,12 @@
$done_uri = '/p/'.$name.'/';
$supported_formats = PhabricatorFile::getTransformableImageFormats();
+ if ($supported_formats) {
+ $supported_formats_message = pht('Supported image formats: %s.',
+ implode(', ', $supported_formats));
+ } else {
+ $supported_formats_message = pht('Server supports no image formats.');
+ }
$e_file = true;
$errors = array();
@@ -59,9 +65,7 @@
if (!$errors && !$is_default) {
if (!$file->isTransformableImage()) {
$e_file = pht('Not Supported');
- $errors[] = pht(
- 'This server only supports these image formats: %s.',
- implode(', ', $supported_formats));
+ $errors[] = $supported_formats_message;
} else {
$xform = PhabricatorFileTransform::getTransformByKey(
PhabricatorFileThumbnailTransform::TRANSFORM_PROFILE);
@@ -250,8 +254,7 @@
->setName('picture')
->setLabel(pht('Upload Picture'))
->setError($e_file)
- ->setCaption(
- pht('Supported formats: %s', implode(', ', $supported_formats))))
+ ->setCaption($supported_formats_message))
->appendChild(
id(new AphrontFormSubmitControl())
->addCancelButton($done_uri)
diff --git a/src/applications/phame/controller/blog/PhameBlogHeaderPictureController.php b/src/applications/phame/controller/blog/PhameBlogHeaderPictureController.php
--- a/src/applications/phame/controller/blog/PhameBlogHeaderPictureController.php
+++ b/src/applications/phame/controller/blog/PhameBlogHeaderPictureController.php
@@ -24,6 +24,12 @@
$blog_uri = '/phame/blog/manage/'.$id;
$supported_formats = PhabricatorFile::getTransformableImageFormats();
+ if ($supported_formats) {
+ $supported_formats_message = pht('Supported image formats: %s.',
+ implode(', ', $supported_formats));
+ } else {
+ $supported_formats_message = pht('Server supports no image formats.');
+ }
$e_file = true;
$errors = array();
$delete_header = ($request->getInt('delete') == 1);
@@ -45,9 +51,7 @@
if (!$errors && !$delete_header) {
if (!$file->isTransformableImage()) {
$e_file = pht('Not Supported');
- $errors[] = pht(
- 'This server only supports these image formats: %s.',
- implode(', ', $supported_formats));
+ $errors[] = $supported_formats_message;
}
}
@@ -86,8 +90,7 @@
->setName('header')
->setLabel(pht('Upload Header'))
->setError($e_file)
- ->setCaption(
- pht('Supported formats: %s', implode(', ', $supported_formats))))
+ ->setCaption($supported_formats_message))
->appendChild(
id(new AphrontFormCheckboxControl())
->setName('delete')
diff --git a/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php b/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php
--- a/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php
+++ b/src/applications/phame/controller/blog/PhameBlogProfilePictureController.php
@@ -24,6 +24,12 @@
$blog_uri = '/phame/blog/manage/'.$id;
$supported_formats = PhabricatorFile::getTransformableImageFormats();
+ if ($supported_formats) {
+ $supported_formats_message = pht('Supported image formats: %s.',
+ implode(', ', $supported_formats));
+ } else {
+ $supported_formats_message = pht('Server supports no image formats.');
+ }
$e_file = true;
$errors = array();
@@ -56,9 +62,7 @@
if (!$errors && !$is_default) {
if (!$file->isTransformableImage()) {
$e_file = pht('Not Supported');
- $errors[] = pht(
- 'This server only supports these image formats: %s.',
- implode(', ', $supported_formats));
+ $errors[] = $supported_formats_message;
} else {
$xform = PhabricatorFileTransform::getTransformByKey(
PhabricatorFileThumbnailTransform::TRANSFORM_PROFILE);
@@ -196,8 +200,7 @@
->setName('picture')
->setLabel(pht('Upload Picture'))
->setError($e_file)
- ->setCaption(
- pht('Supported formats: %s', implode(', ', $supported_formats))))
+ ->setCaption($supported_formats_message))
->appendChild(
id(new AphrontFormSubmitControl())
->addCancelButton($blog_uri)
diff --git a/src/applications/phame/controller/post/PhamePostHeaderPictureController.php b/src/applications/phame/controller/post/PhamePostHeaderPictureController.php
--- a/src/applications/phame/controller/post/PhamePostHeaderPictureController.php
+++ b/src/applications/phame/controller/post/PhamePostHeaderPictureController.php
@@ -24,6 +24,12 @@
$post_uri = '/phame/post/view/'.$id;
$supported_formats = PhabricatorFile::getTransformableImageFormats();
+ if ($supported_formats) {
+ $supported_formats_message = pht('Supported image formats: %s.',
+ implode(', ', $supported_formats));
+ } else {
+ $supported_formats_message = pht('Server supports no image formats.');
+ }
$e_file = true;
$errors = array();
$delete_header = ($request->getInt('delete') == 1);
@@ -45,9 +51,7 @@
if (!$errors && !$delete_header) {
if (!$file->isTransformableImage()) {
$e_file = pht('Not Supported');
- $errors[] = pht(
- 'This server only supports these image formats: %s.',
- implode(', ', $supported_formats));
+ $errors[] = $supported_formats_message;
}
}
@@ -86,8 +90,7 @@
->setName('header')
->setLabel(pht('Upload Header'))
->setError($e_file)
- ->setCaption(
- pht('Supported formats: %s', implode(', ', $supported_formats))))
+ ->setCaption($supported_formats_message))
->appendChild(
id(new AphrontFormCheckboxControl())
->setName('delete')
diff --git a/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php b/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php
--- a/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php
+++ b/src/applications/phortune/controller/merchant/PhortuneMerchantPictureController.php
@@ -14,6 +14,12 @@
$uri = $merchant->getDetailsURI();
$supported_formats = PhabricatorFile::getTransformableImageFormats();
+ if ($supported_formats) {
+ $supported_formats_message = pht('Supported image formats: %s.',
+ implode(', ', $supported_formats));
+ } else {
+ $supported_formats_message = pht('Server supports no image formats.');
+ }
$e_file = true;
$errors = array();
@@ -46,9 +52,7 @@
if (!$errors && !$is_default) {
if (!$file->isTransformableImage()) {
$e_file = pht('Not Supported');
- $errors[] = pht(
- 'This server only supports these image formats: %s.',
- implode(', ', $supported_formats));
+ $errors[] = $supported_formats_message;
} else {
$xform = PhabricatorFileTransform::getTransformByKey(
PhabricatorFileThumbnailTransform::TRANSFORM_PROFILE);
@@ -185,8 +189,7 @@
->setName('picture')
->setLabel(pht('Upload Logo'))
->setError($e_file)
- ->setCaption(
- pht('Supported formats: %s', implode(', ', $supported_formats))))
+ ->setCaption($supported_formats_message))
->appendChild(
id(new AphrontFormSubmitControl())
->addCancelButton($uri)
diff --git a/src/applications/project/controller/PhabricatorProjectEditPictureController.php b/src/applications/project/controller/PhabricatorProjectEditPictureController.php
--- a/src/applications/project/controller/PhabricatorProjectEditPictureController.php
+++ b/src/applications/project/controller/PhabricatorProjectEditPictureController.php
@@ -26,6 +26,12 @@
$manage_uri = $this->getApplicationURI('manage/'.$project->getID().'/');
$supported_formats = PhabricatorFile::getTransformableImageFormats();
+ if ($supported_formats) {
+ $supported_formats_message = pht('Supported image formats: %s.',
+ implode(', ', $supported_formats));
+ } else {
+ $supported_formats_message = pht('Server supports no image formats.');
+ }
$e_file = true;
$errors = array();
@@ -58,9 +64,7 @@
if (!$errors && !$is_default) {
if (!$file->isTransformableImage()) {
$e_file = pht('Not Supported');
- $errors[] = pht(
- 'This server only supports these image formats: %s.',
- implode(', ', $supported_formats));
+ $errors[] = $supported_formats_message;
} else {
$xform = PhabricatorFileTransform::getTransformByKey(
PhabricatorFileThumbnailTransform::TRANSFORM_PROFILE);
@@ -257,8 +261,7 @@
->setName('picture')
->setLabel(pht('Upload Picture'))
->setError($e_file)
- ->setCaption(
- pht('Supported formats: %s', implode(', ', $supported_formats))))
+ ->setCaption($supported_formats_message))
->appendChild(
id(new AphrontFormSubmitControl())
->addCancelButton($manage_uri)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 21:30 (22 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
977397
Default Alt Text
D25525.1732051835.diff (12 KB)
Attached To
Mode
D25525: Improve messages when no image formats are supported (due to GD not installed)
Attached
Detach File
Event Timeline
Log In to Comment