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 PhabricatorCalendarEventAllDayTransaction extends PhabricatorCalendar..
Decoded Output download
<?php
final class PhabricatorCalendarEventAllDayTransaction
extends PhabricatorCalendarEventTransactionType {
const TRANSACTIONTYPE = 'calendar.allday';
public function generateOldValue($object) {
return (int)$object->getIsAllDay();
}
public function generateNewValue($object, $value) {
return (int)$value;
}
public function applyInternalEffects($object, $value) {
$object->setIsAllDay($value);
// Adjust the flags on any other dates the event has.
$keys = array(
'startDateTime',
'endDateTime',
'untilDateTime',
);
foreach ($keys as $key) {
$dict = $object->getParameter($key);
if (!$dict) {
continue;
}
$datetime = PhutilCalendarAbsoluteDateTime::newFromDictionary($dict);
$datetime->setIsAllDay($value);
$object->setParameter($key, $datetime->toDictionary());
}
}
public function getTitle() {
if ($this->getNewValue()) {
return pht(
'%s changed this to an all day event.',
$this->renderAuthor());
} else {
return pht(
'%s converted this from an all day event.',
$this->renderAuthor());
}
}
public function getTitleForFeed() {
if ($this->getNewValue()) {
return pht(
'%s changed %s to an all day event.',
$this->renderAuthor(),
$this->renderObject());
} else {
return pht(
'%s converted %s from an all day event.',
$this->renderAuthor(),
$this->renderObject());
}
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorCalendarEventAllDayTransaction
extends PhabricatorCalendarEventTransactionType {
const TRANSACTIONTYPE = 'calendar.allday';
public function generateOldValue($object) {
return (int)$object->getIsAllDay();
}
public function generateNewValue($object, $value) {
return (int)$value;
}
public function applyInternalEffects($object, $value) {
$object->setIsAllDay($value);
// Adjust the flags on any other dates the event has.
$keys = array(
'startDateTime',
'endDateTime',
'untilDateTime',
);
foreach ($keys as $key) {
$dict = $object->getParameter($key);
if (!$dict) {
continue;
}
$datetime = PhutilCalendarAbsoluteDateTime::newFromDictionary($dict);
$datetime->setIsAllDay($value);
$object->setParameter($key, $datetime->toDictionary());
}
}
public function getTitle() {
if ($this->getNewValue()) {
return pht(
'%s changed this to an all day event.',
$this->renderAuthor());
} else {
return pht(
'%s converted this from an all day event.',
$this->renderAuthor());
}
}
public function getTitleForFeed() {
if ($this->getNewValue()) {
return pht(
'%s changed %s to an all day event.',
$this->renderAuthor(),
$this->renderObject());
} else {
return pht(
'%s converted %s from an all day event.',
$this->renderAuthor(),
$this->renderObject());
}
}
}
Function Calls
None |
Stats
MD5 | e313411bf8ce6de9dda3fd84f0a2070a |
Eval Count | 0 |
Decode Time | 101 ms |