Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class ConpherenceThreadDatasource extends PhabricatorTypeaheadDatasource { ..

Decoded Output download

<?php

final class ConpherenceThreadDatasource
  extends PhabricatorTypeaheadDatasource {

  public function getBrowseTitle() {
    return pht('Browse Room');
  }

  public function getPlaceholderText() {
    return pht('Type a room title...');
  }

  public function getDatasourceApplicationClass() {
    return 'PhabricatorConpherenceApplication';
  }

  public function loadResults() {
    $viewer = $this->getViewer();
    $raw_query = $this->getRawQuery();

    $rooms = id(new ConpherenceThreadQuery())
      ->setViewer($viewer)
      ->withTitleNgrams($raw_query)
      ->needParticipants(true)
      ->execute();

    $results = array();
    foreach ($rooms as $room) {
      if (strlen($room->getTopic())) {
        $topic = $room->getTopic();
      } else {
        $topic = phutil_tag('em', array(), pht('No topic set'));
      }

      $token = id(new PhabricatorTypeaheadResult())
        ->setName($room->getTitle())
        ->setPHID($room->getPHID())
        ->addAttribute($topic);

      $results[] = $token;
    }

    return $results;
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class ConpherenceThreadDatasource
  extends PhabricatorTypeaheadDatasource {

  public function getBrowseTitle() {
    return pht('Browse Room');
  }

  public function getPlaceholderText() {
    return pht('Type a room title...');
  }

  public function getDatasourceApplicationClass() {
    return 'PhabricatorConpherenceApplication';
  }

  public function loadResults() {
    $viewer = $this->getViewer();
    $raw_query = $this->getRawQuery();

    $rooms = id(new ConpherenceThreadQuery())
      ->setViewer($viewer)
      ->withTitleNgrams($raw_query)
      ->needParticipants(true)
      ->execute();

    $results = array();
    foreach ($rooms as $room) {
      if (strlen($room->getTopic())) {
        $topic = $room->getTopic();
      } else {
        $topic = phutil_tag('em', array(), pht('No topic set'));
      }

      $token = id(new PhabricatorTypeaheadResult())
        ->setName($room->getTitle())
        ->setPHID($room->getPHID())
        ->addAttribute($topic);

      $results[] = $token;
    }

    return $results;
  }

}

Function Calls

None

Variables

None

Stats

MD5 35952a90fe5559fc1a450d4878f53a9a
Eval Count 0
Decode Time 91 ms