Skip to content

Commit

Permalink
Remove Message:exists
Browse files Browse the repository at this point in the history
Expensive resulting in many queries

ERM34902
  • Loading branch information
hslater committed Jan 11, 2024
1 parent f0a49f7 commit 128cf7b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions src/Component/SimpleTreeLinkNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,13 @@ public function getSubComponents(): array {
* @return Message
*/
public function getText(): Message {
$msg = Message::newFromKey( $this->options['text'] );
if ( $msg->exists() ) {
return $msg;
}
return new RawMessage( $this->options['text'] );
}

/**
* @return Message
*/
public function getTitle(): Message {
$msg = Message::newFromKey( $this->options['title'] );
if ( $msg->exists() ) {
return $msg;
}
return new RawMessage( $this->options['title'] );
}

Expand Down
4 changes: 0 additions & 4 deletions src/Component/SimpleTreeTextNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ public function getSubComponents(): array {
* @return Message
*/
public function getText(): Message {
$msg = Message::newFromKey( $this->options['text'] );
if ( $msg->exists() ) {
return $msg;
}
return new RawMessage( $this->options['text'] );
}
}

0 comments on commit 128cf7b

Please sign in to comment.