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 PhrictionDocumentDraftTransaction extends PhrictionDocumentEditTransa..
Decoded Output download
<?php
final class PhrictionDocumentDraftTransaction
extends PhrictionDocumentEditTransaction {
const TRANSACTIONTYPE = 'draft';
public function applyInternalEffects($object, $value) {
parent::applyInternalEffects($object, $value);
$this->getEditor()->setShouldPublishContent($object, false);
}
public function shouldHideForFeed() {
return true;
}
public function validateTransactions($object, array $xactions) {
$errors = array();
// NOTE: We're only validating that you can't edit a document down to
// nothing in a draft transaction. Alone, this doesn't prevent you from
// creating a document with no content. The content transaction has
// validation for that.
if (!$xactions) {
return $errors;
}
$content = $object->getContent()->getContent();
if ($this->isEmptyTextTransaction($content, $xactions)) {
$errors[] = $this->newRequiredError(
pht('Documents must have content.'));
}
return $errors;
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhrictionDocumentDraftTransaction
extends PhrictionDocumentEditTransaction {
const TRANSACTIONTYPE = 'draft';
public function applyInternalEffects($object, $value) {
parent::applyInternalEffects($object, $value);
$this->getEditor()->setShouldPublishContent($object, false);
}
public function shouldHideForFeed() {
return true;
}
public function validateTransactions($object, array $xactions) {
$errors = array();
// NOTE: We're only validating that you can't edit a document down to
// nothing in a draft transaction. Alone, this doesn't prevent you from
// creating a document with no content. The content transaction has
// validation for that.
if (!$xactions) {
return $errors;
}
$content = $object->getContent()->getContent();
if ($this->isEmptyTextTransaction($content, $xactions)) {
$errors[] = $this->newRequiredError(
pht('Documents must have content.'));
}
return $errors;
}
}
Function Calls
None |
Stats
MD5 | 4f1b59ad311fe7b9f78695d35211fd91 |
Eval Count | 0 |
Decode Time | 97 ms |