Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/extensions/Newsletter/includes/Notifications/BaseNewsletterPresentationModel.php
Ðазад
<?php namespace MediaWiki\Extension\Newsletter\Notifications; use MediaWiki\Extension\Newsletter\Newsletter; use MediaWiki\Extension\Notifications\Formatters\EchoEventPresentationModel; use MediaWiki\SpecialPage\SpecialPage; use MediaWiki\Title\Title; use RuntimeException; abstract class BaseNewsletterPresentationModel extends EchoEventPresentationModel { private const NEWSLETTER_UNSUBSCRIBE = 'unsubscribe'; public function canRender() { $nl = Newsletter::newFromID( $this->getNewsletterId() ); return (bool)$nl; } /** * @return int */ protected function getNewsletterId() { return (int)$this->event->getExtraParam( 'newsletter-id' ); } /** * @return string */ protected function getNewsletterName() { return $this->event->getExtraParam( 'newsletter-name' ); } /** * @return string */ protected function getNewsletterUrl() { $result = Title::makeTitleSafe( NS_NEWSLETTER, $this->getNewsletterName() )->getFullURL(); if ( !$result ) { throw new RuntimeException( 'Cannot find newsletter with name \"' . $this->getNewsletterName() . '\"' ); } return $result; } /** * @return string */ protected function getNewsletterUnsubscribeUrl() { return SpecialPage::getTitleFor( 'Newsletter', $this->getNewsletterId() . '/' . self::NEWSLETTER_UNSUBSCRIBE )->getFullURL(); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка