From bd47d001b5482d8f8160a011ac8a0dd76f147e13 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Wed, 9 Aug 2017 22:49:25 +0000 Subject: [PATCH] Remove chatbot example configuration Summary: This is no longer needed after the chatbot was removed in D17756. Test Plan: N/A Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18378 --- resources/chatbot/example_config.json | 24 ------------------- .../files/storage/PhabricatorFile.php | 8 +++++-- 2 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 resources/chatbot/example_config.json diff --git a/resources/chatbot/example_config.json b/resources/chatbot/example_config.json deleted file mode 100644 index 7d150e65ae..0000000000 --- a/resources/chatbot/example_config.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "server" : "irc.freenode.net", - "port" : 6667, - "nick" : "phabot", - "join" : [ - "#phabot-test" - ], - "handlers" : [ - "PhabricatorBotObjectNameHandler", - "PhabricatorBotSymbolHandler", - "PhabricatorBotLogHandler", - "PhabricatorBotFeedNotificationHandler", - "PhabricatorBotWhatsNewHandler", - "PhabricatorBotMacroHandler" - ], - - "conduit.uri" : null, - "conduit.token" : null, - - "macro.size" : 48, - "macro.aspect" : 0.66, - - "notification.channels" : ["#phabot-test"] -} diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php index 19f0bed90a..97c2ef6acc 100644 --- a/src/applications/files/storage/PhabricatorFile.php +++ b/src/applications/files/storage/PhabricatorFile.php @@ -854,7 +854,7 @@ final class PhabricatorFile extends PhabricatorFileDAO return $this->getTransformedURI($transform->getTransformKey()); } - private function getTransformedURI($transform) { + private function getTransformedURI($transform, $cdn) { $parts = array(); $parts[] = 'file'; $parts[] = 'xform'; @@ -871,7 +871,11 @@ final class PhabricatorFile extends PhabricatorFileDAO $path = implode('/', $parts); $path = $path.'/'; - return PhabricatorEnv::getCDNURI($path); + if ($cdn) { + return PhabricatorEnv::getCDNURI($path); + } else { + return PhabricatorEnv::getURI($path); + } } public function isViewableInBrowser() {