mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 11:30:55 +01:00
86a00ee4ab
Summary: Ref T10747. This barely works, but can technically import some event data. Test Plan: Used import flow to import a ".ics" document. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10747 Differential Revision: https://secure.phabricator.com/D16699
28 lines
628 B
PHP
28 lines
628 B
PHP
<?php
|
|
|
|
final class PhabricatorCalendarImportDisableTransaction
|
|
extends PhabricatorCalendarImportTransactionType {
|
|
|
|
const TRANSACTIONTYPE = 'calendar.import.disable';
|
|
|
|
public function generateOldValue($object) {
|
|
return (int)$object->getIsDisabled();
|
|
}
|
|
|
|
public function applyInternalEffects($object, $value) {
|
|
$object->setIsDisabled((int)$value);
|
|
}
|
|
|
|
public function getTitle() {
|
|
if ($this->getNewValue()) {
|
|
return pht(
|
|
'%s disabled this import.',
|
|
$this->renderAuthor());
|
|
} else {
|
|
return pht(
|
|
'%s enabled this import.',
|
|
$this->renderAuthor());
|
|
}
|
|
}
|
|
|
|
}
|