Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/public/IServerContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function getUserFolder($userId = null);
*
* @return \OCP\Files\Folder
* @since 6.0.0
* @deprecated since 9.2.0 use IAppData
* @deprecated 9.2.0 use IAppData
*/
public function getAppFolder();

Expand Down
101 changes: 0 additions & 101 deletions lib/public/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,56 +94,6 @@ public static function getChannel() {
return \OC_Util::getChannel();
}

/**
* send an email
* @param string $toaddress
* @param string $toname
* @param string $subject
* @param string $mailtext
* @param string $fromaddress
* @param string $fromname
* @param int $html
* @param string $altbody
* @param string $ccaddress
* @param string $ccname
* @param string $bcc
* @deprecated 8.1.0 Use \OCP\Mail\IMailer instead
* @since 4.0.0
*/
public static function sendMail($toaddress, $toname, $subject, $mailtext, $fromaddress, $fromname,
$html = 0, $altbody = '', $ccaddress = '', $ccname = '', $bcc = '') {
$mailer = \OC::$server->getMailer();
$message = $mailer->createMessage();
$message->setTo([$toaddress => $toname]);
$message->setSubject($subject);
$message->setPlainBody($mailtext);
$message->setFrom([$fromaddress => $fromname]);
if($html === 1) {
$message->setHtmlBody($altbody);
}

if($altbody === '') {
$message->setHtmlBody($mailtext);
$message->setPlainBody('');
} else {
$message->setHtmlBody($mailtext);
$message->setPlainBody($altbody);
}

if(!empty($ccaddress)) {
if(!empty($ccname)) {
$message->setCc([$ccaddress => $ccname]);
} else {
$message->setCc([$ccaddress]);
}
}
if(!empty($bcc)) {
$message->setBcc([$bcc]);
}

$mailer->send($message);
}

/**
* write a message in the log
* @param string $app
Expand Down Expand Up @@ -243,17 +193,6 @@ public static function addHeader($tag, $attributes, $text=null) {
\OC_Util::addHeader($tag, $attributes, $text);
}

/**
* check if some encrypted files are stored
* @return bool
*
* @deprecated 8.1.0 No longer required
* @since 6.0.0
*/
public static function encryptedFiles() {
return false;
}

/**
* Creates an absolute url to the given app and file.
* @param string $app app
Expand Down Expand Up @@ -321,16 +260,6 @@ public static function linkTo( $app, $file, $args = array() ) {
return \OC::$server->getURLGenerator()->linkTo($app, $file, $args);
}

/**
* Returns the server host, even if the website uses one or more reverse proxy
* @return string the server host
* @deprecated 8.1.0 Use \OCP\IRequest::getServerHost
* @since 4.0.0
*/
public static function getServerHost() {
return \OC::$server->getRequest()->getServerHost();
}

/**
* Returns the server host name without an eventual port number
* @return string the server hostname
Expand Down Expand Up @@ -378,36 +307,6 @@ public static function getDefaultEmailAddress($user_part) {
return $user_part.'@localhost.localdomain';
}

/**
* Returns the server protocol. It respects reverse proxy servers and load balancers
* @return string the server protocol
* @deprecated 8.1.0 Use \OCP\IRequest::getServerProtocol
* @since 4.5.0
*/
public static function getServerProtocol() {
return \OC::$server->getRequest()->getServerProtocol();
}

/**
* Returns the request uri, even if the website uses one or more reverse proxies
* @return string the request uri
* @deprecated 8.1.0 Use \OCP\IRequest::getRequestUri
* @since 5.0.0
*/
public static function getRequestUri() {
return \OC::$server->getRequest()->getRequestUri();
}

/**
* Returns the script name, even if the website uses one or more reverse proxies
* @return string the script name
* @deprecated 8.1.0 Use \OCP\IRequest::getScriptName
* @since 5.0.0
*/
public static function getScriptName() {
return \OC::$server->getRequest()->getScriptName();
}

/**
* Creates path to an image
* @param string $app app
Expand Down