|
|
|
@ -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(); |
|
|
|
|