Файл: concrete5.7.5.6/concrete/controllers/dialog/page/delete_alias.php
Строк: 34
<?php
namespace ConcreteControllerDialogPage;
use ConcreteControllerBackendUserInterfacePage as BackendInterfacePageController;
use ConcreteCorePageEditResponse;
class DeleteAlias extends BackendInterfacePageController {
protected $viewPath = '/dialogs/page/delete_alias';
protected function canAccess() {
return $this->permissions->canDeletePage() && $this->page->isAlias();
}
public function view()
{
}
public function submit() {
if ($this->validateAction()) {
$c = $this->page;
$pr = new EditResponse();
if ($c->isExternalLink()) {
$pr->setMessage(t('External Link deleted.'));
} else {
$pr->setMessage(t("Alias deleted."));
}
$c->removeThisAlias();
$pr->setPage($c);
$pr->outputJSON();
}
}
}