From 029abc9c43d1d396d8cd4301542c89e1023fa553 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 30 Sep 2013 10:03:12 +0200 Subject: [PATCH] mail is already themable via the template, no need to provide additional string in OC_Defaults --- lib/defaults.php | 90 ----------------------------------------- lib/public/defaults.php | 45 --------------------- 2 files changed, 135 deletions(-) diff --git a/lib/defaults.php b/lib/defaults.php index eb531d1e05..4951c6f50a 100644 --- a/lib/defaults.php +++ b/lib/defaults.php @@ -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,

just letting you know that %s shared »%s« with you.'. - '
View it!', array($sender, $itemName, $link)); - - if ($expiration) { - $message .= '

'; - $message .= $this->l->t("The share will expire at %s.", array($expiration)); - } - - $message .= '

'; - $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() . - '
' . - ''.$this->getBaseUrl().''; - - 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(); diff --git a/lib/public/defaults.php b/lib/public/defaults.php index a508c504c9..147f23e341 100644 --- a/lib/public/defaults.php +++ b/lib/public/defaults.php @@ -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