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 PhabricatorCalendarImportReloadController extends PhabricatorCalendar..
Decoded Output download
<?php
final class PhabricatorCalendarImportReloadController
extends PhabricatorCalendarController {
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$import = id(new PhabricatorCalendarImportQuery())
->setViewer($viewer)
->withIDs(array($request->getURIData('id')))
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->executeOne();
if (!$import) {
return new Aphront404Response();
}
$import_uri = $import->getURI();
if ($request->isFormPost()) {
$xactions = array();
$xactions[] = id(new PhabricatorCalendarImportTransaction())
->setTransactionType(
PhabricatorCalendarImportReloadTransaction::TRANSACTIONTYPE)
->setNewValue(true);
$editor = id(new PhabricatorCalendarImportEditor())
->setActor($viewer)
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true)
->setContentSourceFromRequest($request);
$editor->applyTransactions($import, $xactions);
return id(new AphrontRedirectResponse())->setURI($import_uri);
}
return $this->newDialog()
->setTitle(pht('Reload Events'))
->appendParagraph(
pht(
'Reload this source? Events imported from this source will '.
'be updated.'))
->addCancelButton($import_uri)
->addSubmitButton(pht('Reload Events'));
}
}
?>
Did this file decode correctly?
Original Code
<?php
final class PhabricatorCalendarImportReloadController
extends PhabricatorCalendarController {
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$import = id(new PhabricatorCalendarImportQuery())
->setViewer($viewer)
->withIDs(array($request->getURIData('id')))
->requireCapabilities(
array(
PhabricatorPolicyCapability::CAN_VIEW,
PhabricatorPolicyCapability::CAN_EDIT,
))
->executeOne();
if (!$import) {
return new Aphront404Response();
}
$import_uri = $import->getURI();
if ($request->isFormPost()) {
$xactions = array();
$xactions[] = id(new PhabricatorCalendarImportTransaction())
->setTransactionType(
PhabricatorCalendarImportReloadTransaction::TRANSACTIONTYPE)
->setNewValue(true);
$editor = id(new PhabricatorCalendarImportEditor())
->setActor($viewer)
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true)
->setContentSourceFromRequest($request);
$editor->applyTransactions($import, $xactions);
return id(new AphrontRedirectResponse())->setURI($import_uri);
}
return $this->newDialog()
->setTitle(pht('Reload Events'))
->appendParagraph(
pht(
'Reload this source? Events imported from this source will '.
'be updated.'))
->addCancelButton($import_uri)
->addSubmitButton(pht('Reload Events'));
}
}
Function Calls
None |
Stats
MD5 | 4d371a9f05544495ef845e2c1194e123 |
Eval Count | 0 |
Decode Time | 82 ms |