1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 13:22:42 +01:00

Conpherence - fix fatal if you don't have conpherences

Summary: Fixes T7721. Looks like this got renamed at some point but skipped. Also, change the true / false idx look ups to correct integers here since there's a warning in the error logs in this case without it.

Test Plan: made  new user. loaded up conpherence and it worked. tried all the links too for good measure and they worked

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7717, T7721

Differential Revision: https://secure.phabricator.com/D12243
This commit is contained in:
Bob Trahan 2015-04-01 07:59:55 -07:00
parent 77b23035c3
commit 6f028e16e8

View file

@ -22,7 +22,7 @@ final class ConpherenceThreadListView extends AphrontView {
require_celerity_resource('conpherence-menu-css'); require_celerity_resource('conpherence-menu-css');
$grouped = mgroup($this->threads, 'getIsRoom'); $grouped = mgroup($this->threads, 'getIsRoom');
$rooms = idx($grouped, true, array()); $rooms = idx($grouped, 1, array());
$policies = array(); $policies = array();
foreach ($rooms as $room) { foreach ($rooms as $room) {
@ -41,7 +41,7 @@ final class ConpherenceThreadListView extends AphrontView {
->setID('conpherence-menu'); ->setID('conpherence-menu');
$this->addRoomsToMenu($menu, $rooms, $policy_objects); $this->addRoomsToMenu($menu, $rooms, $policy_objects);
$messages = idx($grouped, false, array()); $messages = idx($grouped, 0, array());
$this->addMessagesToMenu($menu, $messages); $this->addMessagesToMenu($menu, $messages);
return $menu; return $menu;
@ -164,7 +164,7 @@ final class ConpherenceThreadListView extends AphrontView {
$menu->addMenuItem($header); $menu->addMenuItem($header);
if (empty($conpherences)) { if (empty($conpherences)) {
$menu->addMenuItem($this->getNoConpherencesMenuItem()); $menu->addMenuItem($this->getNoMessagesMenuItem());
return $menu; return $menu;
} }