mail is already themable via the template, no need to provide additional string in OC_Defaults

This commit is contained in:
Bjoern Schiessle 2013-09-30 10:03:12 +02:00
parent b9a1f63344
commit 029abc9c43
2 changed files with 0 additions and 135 deletions

View file

@ -48,96 +48,6 @@ class OC_Defaults {
return false;
}
/**
* @brief subject for share notification mail
* @param string $user user who shared the item
* @pram string $itemName name of the item
*/
public function getShareNotificationSubject($user, $itemName) {
if ($this->themeExist('getShareNotificationSubject')) {
return $this->theme->getShareNotificationSubject($user, $itemName);
} else {
return $this->l->t("%s shared »%s« with you", array($user, $itemName));
}
}
/**
* @brief mail body for share notification mail (text only)
* @param string $sender owner of the file/folder
* @param string $itemName name of the file/folder
* @param string $link link directly to the file/folder in your ownCloud
* @param string $expiration expiration date
*/
public function getShareNotificationTextHtml($sender, $itemName, $link, $expiration=null) {
if ($this->themeExist('getShareNotificationTextHtml')) {
return $this->theme->getShareNotificationTextHtml($sender, $itemName, $link, $expiration);
} else {
$message = $this->l->t('Hey there,<br><br>just letting you know that %s shared »%s« with you.'.
'<br><a href="%s">View it!</a>', array($sender, $itemName, $link));
if ($expiration) {
$message .= '<br><br>';
$message .= $this->l->t("The share will expire at %s.", array($expiration));
}
$message .= '<br><br>';
$message .= $this->l->t('Cheers!');
return $message;
}
}
/**
* @brief mail body for share notification mail (text only)
* @param string $sender owner of the file/folder
* @param string $itemName name of the file/folder
* @param string $link link directly to the file/folder in your ownCloud
* @param string $expiration expiration date
*/
public function getShareNotificationTextAlt($sender, $itemName, $link, $expiration=null) {
if ($this->themeExist('getShareNotificationTextAlt')) {
return $this->theme->getShareNotificationTextAlt($sender, $itemName, $link, $expiration);
} else {
$message = $this->l->t("Hey there,\n\njust letting you know that %s shared %s with you.\n".
"View it: %s", array($sender, $itemName, $link));
if ($expiration) {
$message .= "\n\n";
$message .= $this->l->t("The share will expire at %s.", array($expiration));
}
$message .= "\n\n";
$message .= $this->l->t('Cheers!');
return $message;
}
}
public function getMailFooterHtml() {
if ($this->themeExist('getMailFooterHtml')) {
return $this->theme->getMailFooterHtml();
} else {
$footer = $this->getName() . ' - ' . $this->getSlogan() .
'<br>' .
'<a href="'. $this->getBaseUrl() .'">'.$this->getBaseUrl().'</a>';
return $footer;
}
}
public function getMailFooterAlt() {
if ($this->themeExist('getMailFooterAlt')) {
return $this->theme->getMailFooterAlt();
} else {
$footer = $this->getName() . ' - ' . $this->getSlogan() .
"\n" . $this->getBaseUrl();
return $footer;
}
}
public function getBaseUrl() {
if ($this->themeExist('getBaseUrl')) {
return $this->theme->getBaseUrl();

View file

@ -34,51 +34,6 @@ class Defaults {
$this->defaults = new \OC_Defaults();
}
/**
* @brief subject for share notification mail
* @param string $user user who shared the item
* @pram string $itemName name of the item
*/
public function getShareNotificationSubject($user, $itemName) {
return $this->defaults->getShareNotificationSubject($user, $itemName);
}
/**
* @brief mail body for share notification mail (text only)
* @param string $sender owner of the file/folder
* @param string $itemName name of the file/folder
* @param string $link link directly to the file/folder in your ownCloud
* @param string $expiration expiration date
*/
public function getShareNotificationTextAlt($sender, $itemName, $link, $expiration=null) {
return $this->defaults->getShareNotificationTextAlt($sender, $itemName, $link, $expiration);
}
/**
* @brief mail body for share notification mail (HTML mail)
* @param string $sender owner of the file/folder
* @param string $itemName name of the file/folder
* @param string $link link directly to the file/folder in your ownCloud
* @param string $expiration expiration date
*/
public function getShareNotificationTextHtml($sender, $itemName, $link, $expiration=null) {
return $this->defaults->getShareNotificationTextHtml($sender, $itemName, $link, $expiration);
}
/**
* @brief return footer for mails (HTML mail)
*/
public function getMailFooterHtml() {
return $this->defaults->getMailFooterHtml();
}
/**
* @brief return footer for mails (text only)
*/
public function getMailFooterAlt() {
return $this->defaults->getMailFooterAlt();
}
/**
* @breif get base URL for the organisation behind your ownCloud instance
* @return string