Skip to content

Commit

Permalink
suppress 'Post Review to Slack' option if Slack is not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMan committed Jan 15, 2024
1 parent 8e5cfbb commit 2d99633
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ui/Reviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zookeeper Online
*
* @author Jim Mason <[email protected]>
* @copyright Copyright (C) 1997-2023 Jim Mason <[email protected]>
* @copyright Copyright (C) 1997-2024 Jim Mason <[email protected]>
* @link https://zookeeper.ibinx.com/
* @license GPL-3.0
*
Expand Down Expand Up @@ -443,6 +443,9 @@ public function editReview() {
$airnames[] = $row['airname'];
$airnames[] = $self;

$slack = Engine::param('slack');
$export = $slack && $slack['token'] && $slack['review_channel'];

$this->template = "review.edit.html";
$this->addVar("id", $id ?? 0);
$this->addVar("album", $albums[0]);
Expand All @@ -452,7 +455,7 @@ public function editReview() {
$this->addVar("self", $self);
$this->addVar("review", $review);
$this->addVar("private", $_REQUEST["private"] ?? 0);
$this->addVar("exported", isset($exportid));
$this->addVar("exported", !$export || isset($exportid));
$this->addVar("MAX_AIRNAME_LENGTH", IDJ::MAX_AIRNAME_LENGTH);
$this->addVar("MAX_REVIEW_LENGTH", IReview::MAX_REVIEW_LENGTH);
}
Expand Down

0 comments on commit 2d99633

Please sign in to comment.