@@ -94,56 +94,6 @@ public static function getChannel() {
9494 return \OC_Util::getChannel ();
9595 }
9696
97- /**
98- * send an email
99- * @param string $toaddress
100- * @param string $toname
101- * @param string $subject
102- * @param string $mailtext
103- * @param string $fromaddress
104- * @param string $fromname
105- * @param int $html
106- * @param string $altbody
107- * @param string $ccaddress
108- * @param string $ccname
109- * @param string $bcc
110- * @deprecated 8.1.0 Use \OCP\Mail\IMailer instead
111- * @since 4.0.0
112- */
113- public static function sendMail ($ toaddress , $ toname , $ subject , $ mailtext , $ fromaddress , $ fromname ,
114- $ html = 0 , $ altbody = '' , $ ccaddress = '' , $ ccname = '' , $ bcc = '' ) {
115- $ mailer = \OC ::$ server ->getMailer ();
116- $ message = $ mailer ->createMessage ();
117- $ message ->setTo ([$ toaddress => $ toname ]);
118- $ message ->setSubject ($ subject );
119- $ message ->setPlainBody ($ mailtext );
120- $ message ->setFrom ([$ fromaddress => $ fromname ]);
121- if ($ html === 1 ) {
122- $ message ->setHtmlBody ($ altbody );
123- }
124-
125- if ($ altbody === '' ) {
126- $ message ->setHtmlBody ($ mailtext );
127- $ message ->setPlainBody ('' );
128- } else {
129- $ message ->setHtmlBody ($ mailtext );
130- $ message ->setPlainBody ($ altbody );
131- }
132-
133- if (!empty ($ ccaddress )) {
134- if (!empty ($ ccname )) {
135- $ message ->setCc ([$ ccaddress => $ ccname ]);
136- } else {
137- $ message ->setCc ([$ ccaddress ]);
138- }
139- }
140- if (!empty ($ bcc )) {
141- $ message ->setBcc ([$ bcc ]);
142- }
143-
144- $ mailer ->send ($ message );
145- }
146-
14797 /**
14898 * write a message in the log
14999 * @param string $app
@@ -243,17 +193,6 @@ public static function addHeader($tag, $attributes, $text=null) {
243193 \OC_Util::addHeader ($ tag , $ attributes , $ text );
244194 }
245195
246- /**
247- * check if some encrypted files are stored
248- * @return bool
249- *
250- * @deprecated 8.1.0 No longer required
251- * @since 6.0.0
252- */
253- public static function encryptedFiles () {
254- return false ;
255- }
256-
257196 /**
258197 * Creates an absolute url to the given app and file.
259198 * @param string $app app
@@ -321,16 +260,6 @@ public static function linkTo( $app, $file, $args = array() ) {
321260 return \OC ::$ server ->getURLGenerator ()->linkTo ($ app , $ file , $ args );
322261 }
323262
324- /**
325- * Returns the server host, even if the website uses one or more reverse proxy
326- * @return string the server host
327- * @deprecated 8.1.0 Use \OCP\IRequest::getServerHost
328- * @since 4.0.0
329- */
330- public static function getServerHost () {
331- return \OC ::$ server ->getRequest ()->getServerHost ();
332- }
333-
334263 /**
335264 * Returns the server host name without an eventual port number
336265 * @return string the server hostname
@@ -378,36 +307,6 @@ public static function getDefaultEmailAddress($user_part) {
378307 return $ user_part .'@localhost.localdomain ' ;
379308 }
380309
381- /**
382- * Returns the server protocol. It respects reverse proxy servers and load balancers
383- * @return string the server protocol
384- * @deprecated 8.1.0 Use \OCP\IRequest::getServerProtocol
385- * @since 4.5.0
386- */
387- public static function getServerProtocol () {
388- return \OC ::$ server ->getRequest ()->getServerProtocol ();
389- }
390-
391- /**
392- * Returns the request uri, even if the website uses one or more reverse proxies
393- * @return string the request uri
394- * @deprecated 8.1.0 Use \OCP\IRequest::getRequestUri
395- * @since 5.0.0
396- */
397- public static function getRequestUri () {
398- return \OC ::$ server ->getRequest ()->getRequestUri ();
399- }
400-
401- /**
402- * Returns the script name, even if the website uses one or more reverse proxies
403- * @return string the script name
404- * @deprecated 8.1.0 Use \OCP\IRequest::getScriptName
405- * @since 5.0.0
406- */
407- public static function getScriptName () {
408- return \OC ::$ server ->getRequest ()->getScriptName ();
409- }
410-
411310 /**
412311 * Creates path to an image
413312 * @param string $app app
0 commit comments