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 MetaMTAMailReceivedGarbageCollector extends PhabricatorGarbageCollect..

Decoded Output download

<?php

final class MetaMTAMailReceivedGarbageCollector
  extends PhabricatorGarbageCollector {

  const COLLECTORCONST = 'metamta.received';

  public function getCollectorName() {
    return pht('Mail (Received)');
  }

  public function getDefaultRetentionPolicy() {
    return phutil_units('90 days in seconds');
  }

  protected function collectGarbage() {
    $table = new PhabricatorMetaMTAReceivedMail();
    $conn_w = $table->establishConnection('w');

    queryfx(
      $conn_w,
      'DELETE FROM %T WHERE dateCreated < %d LIMIT 100',
      $table->getTableName(),
      $this->getGarbageEpoch());

    return ($conn_w->getAffectedRows() == 100);
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class MetaMTAMailReceivedGarbageCollector
  extends PhabricatorGarbageCollector {

  const COLLECTORCONST = 'metamta.received';

  public function getCollectorName() {
    return pht('Mail (Received)');
  }

  public function getDefaultRetentionPolicy() {
    return phutil_units('90 days in seconds');
  }

  protected function collectGarbage() {
    $table = new PhabricatorMetaMTAReceivedMail();
    $conn_w = $table->establishConnection('w');

    queryfx(
      $conn_w,
      'DELETE FROM %T WHERE dateCreated < %d LIMIT 100',
      $table->getTableName(),
      $this->getGarbageEpoch());

    return ($conn_w->getAffectedRows() == 100);
  }

}

Function Calls

None

Variables

None

Stats

MD5 df7632e906b1f61a669d80f685b423af
Eval Count 0
Decode Time 125 ms