summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/common.php9
-rw-r--r--inc/html.php2
-rw-r--r--inc/lang/el/lang.php25
-rw-r--r--inc/lang/el/mailwrap.html13
-rw-r--r--inc/lang/el/resetpwd.txt3
-rw-r--r--inc/lang/gl/lang.php12
-rw-r--r--inc/lang/gl/mailwrap.html2
-rw-r--r--inc/lang/gl/resetpwd.txt4
-rw-r--r--inc/media.php23
-rw-r--r--inc/plugin.php2
-rw-r--r--inc/search.php19
-rw-r--r--inc/subscription.php74
-rw-r--r--inc/template.php3
13 files changed, 142 insertions, 49 deletions
diff --git a/inc/common.php b/inc/common.php
index bc49e76b2..db39affc6 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -311,7 +311,11 @@ function breadcrumbs() {
*
* This is run on a ID before it is outputted somewhere
* currently used to replace the colon with something else
- * on Windows systems and to have proper URL encoding
+ * on Windows (non-IIS) systems and to have proper URL encoding
+ *
+ * See discussions at https://github.com/splitbrain/dokuwiki/pull/84 and
+ * https://github.com/splitbrain/dokuwiki/pull/173 why we use a whitelist of
+ * unaffected servers instead of blacklisting affected servers here.
*
* Urlencoding is ommitted when the second parameter is false
*
@@ -322,7 +326,8 @@ function idfilter($id, $ue = true) {
if($conf['useslash'] && $conf['userewrite']) {
$id = strtr($id, ':', '/');
} elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' &&
- $conf['userewrite']
+ $conf['userewrite'] &&
+ strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') === false
) {
$id = strtr($id, ':', ';');
}
diff --git a/inc/html.php b/inc/html.php
index f72316a5e..c8b96cbc0 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -859,7 +859,7 @@ function html_list_index($item){
$base = ':'.$item['id'];
$base = substr($base,strrpos($base,':')+1);
if($item['type']=='d'){
- $ret .= '<a href="'.wl($ID,'idx='.rawurlencode($item['id'])).'" class="idx_dir"><strong>';
+ $ret .= '<a href="'.wl($ID,'idx='.rawurlencode($item['id'])).'" title="' . $item['id'] . '" class="idx_dir"><strong>';
$ret .= $base;
$ret .= '</strong></a>';
}else{
diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php
index b6cdc38c1..55b70074f 100644
--- a/inc/lang/el/lang.php
+++ b/inc/lang/el/lang.php
@@ -8,6 +8,7 @@
* @author Konstantinos Koryllos <koryllos@gmail.com>
* @author George Petsagourakis <petsagouris@gmail.com>
* @author Petros Vidalis <pvidalis@gmail.com>
+ * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -43,6 +44,7 @@ $lang['btn_backtomedia'] = 'Επιστροφή στην επιλογή α
$lang['btn_subscribe'] = 'Εγγραφή σε λήψη ενημερώσεων σελίδας';
$lang['btn_profile'] = 'Επεξεργασία προφίλ';
$lang['btn_reset'] = 'Ακύρωση';
+$lang['btn_resendpwd'] = 'Εισαγωγή νέου κωδικού';
$lang['btn_draft'] = 'Επεξεργασία αυτόματα αποθηκευμένης σελίδας';
$lang['btn_recover'] = 'Επαναφορά αυτόματα αποθηκευμένης σελίδας';
$lang['btn_draftdel'] = 'Διαγραφή αυτόματα αποθηκευμένης σελίδας';
@@ -79,6 +81,7 @@ $lang['profnoempty'] = 'Δεν επιτρέπεται κενό όνο
$lang['profchanged'] = 'Το προφίλ χρήστη τροποποιήθηκε επιτυχώς.';
$lang['pwdforget'] = 'Ξεχάσατε το κωδικό σας; Αποκτήστε νέο.';
$lang['resendna'] = 'Αυτό το wiki δεν υποστηρίζει την εκ\' νέου αποστολή κωδικών.';
+$lang['resendpwd'] = 'Εισαγωγή νέου ωδικού για';
$lang['resendpwdmissing'] = 'Πρέπει να συμπληρώσετε όλα τα πεδία.';
$lang['resendpwdnouser'] = 'Αυτός ο χρήστης δεν υπάρχει στα αρχεία μας.';
$lang['resendpwdbadauth'] = 'Αυτός ο κωδικός ενεργοποίησης δεν είναι έγκυρος.';
@@ -91,6 +94,7 @@ $lang['searchmedia_in'] = 'Αναζήτηση σε %s';
$lang['txt_upload'] = 'Επιλέξτε αρχείο για φόρτωση';
$lang['txt_filename'] = 'Επιλέξτε νέο όνομα αρχείου (προαιρετικό)';
$lang['txt_overwrt'] = 'Αντικατάσταση υπάρχοντος αρχείου';
+$lang['maxuploadsize'] = 'Μέγιστο μέγεθος αρχείου: %s.';
$lang['lockedby'] = 'Προσωρινά κλειδωμένο από';
$lang['lockexpire'] = 'Το κλείδωμα λήγει στις';
$lang['js']['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την Προεπισκόπηση.';
@@ -185,6 +189,12 @@ $lang['external_edit'] = 'εξωτερική τροποποίηση';
$lang['summary'] = 'Επεξεργασία σύνοψης';
$lang['noflash'] = 'Το <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> απαιτείται για την προβολή αυτού του στοιχείου.';
$lang['download'] = 'Λήψη Κώδικα';
+$lang['tools'] = 'Εργαλεία';
+$lang['user_tools'] = 'Εργαλεία Χρήστη';
+$lang['site_tools'] = 'Εργαλεία ιστότοπου';
+$lang['page_tools'] = 'Εργαλεία ιστοσελίδας';
+$lang['skip_to_content'] = 'παράληψη περιεχομένων';
+$lang['sidebar'] = 'Sidebar';
$lang['mail_newpage'] = 'σελίδα προστέθηκε:';
$lang['mail_changed'] = 'σελίδα τροποποιήθηκε:';
$lang['mail_subscribe_list'] = 'σελίδες που άλλαξαν στον φάκελο:';
@@ -255,6 +265,7 @@ $lang['subscr_style_digest'] = 'συνοπτικό email αλλαγών της
$lang['subscr_style_list'] = 'λίστα σελίδων με αλλαγές μετά από το τελευταίο email (κάθε %.2f μέρες)';
$lang['authmodfailed'] = 'Κακή ρύθμιση λίστας χρηστών. Παρακαλούμε ενημερώστε τον διαχειριστή του wiki.';
$lang['authtempfail'] = 'Η συνδεση χρηστών είναι απενεργοποιημένη αυτή την στιγμή. Αν αυτό διαρκέσει για πολύ, παρακαλούμε ενημερώστε τον διαχειριστή του wiki.';
+$lang['authpwdexpire'] = 'Ο κωδικός πρόσβασης θα λήξει σε %s ημέρες. Προτείνουμε να τον αλλάξετε σύντομα.';
$lang['i_chooselang'] = 'Επιλογή γλώσσας';
$lang['i_installer'] = 'Οδηγός εγκατάστασης DokuWiki';
$lang['i_wikiname'] = 'Ονομασία wiki';
@@ -270,8 +281,8 @@ $lang['i_confexists'] = '<code>%s</code> υπάρχει ήδη';
$lang['i_writeerr'] = 'Δεν είναι δυνατή η δημιουργία του <code>%s</code>. Πρέπει να διορθώσετε τα δικαιώματα πρόσβασης αυτού του φακέλου/αρχείου και να δημιουργήσετε το αρχείο χειροκίνητα!';
$lang['i_badhash'] = 'Μη αναγνωρίσιμο ή τροποποιημένο αρχείο dokuwiki.php (hash=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> - λάθος ή ανύπαρκτη τιμή';
-$lang['i_success'] = 'Η εγκατάσταση ολοκληρώθηκε επιτυχώς. Μπορείτε πλέον να διαγράψετε το αρχείο install.php. Συνεχίστε στο <a href="doku.php?id=wiki:welcome">νέο σας DokuWiki</a>.';
-$lang['i_failure'] = 'Εμφανίστηκαν κάποια προβλήματα στη διαδικασία ανανέωσης των αρχείων ρυθμίσεων. Πιθανόν να χρειάζεται να τα τροποποιήσετε χειροκίνητα ώστε να μπορείτε να χρησιμοποιήσετε το <a href="doku.php?id=wiki:welcome">νέο σας DokuWiki</a>.';
+$lang['i_success'] = 'Η εγκατάσταση ολοκληρώθηκε επιτυχώς. Μπορείτε πλέον να διαγράψετε το αρχείο install.php. Συνεχίστε στο <a href="doku.php">νέο σας DokuWiki</a>.';
+$lang['i_failure'] = 'Εμφανίστηκαν κάποια προβλήματα στη διαδικασία ανανέωσης των αρχείων ρυθμίσεων. Πιθανόν να χρειάζεται να τα τροποποιήσετε χειροκίνητα ώστε να μπορείτε να χρησιμοποιήσετε το <a href="doku.php">νέο σας DokuWiki</a>.';
$lang['i_policy'] = 'Αρχική πολιτική Λίστας Δικαιωμάτων Πρόσβασης - ACL';
$lang['i_pol0'] = 'Ανοιχτό Wiki (όλοι μπορούν να διαβάσουν ή να δημιουργήσουν/τροποποιήσουν σελίδες και να μεταφορτώσουν αρχεία)';
$lang['i_pol1'] = 'Δημόσιο Wiki (όλοι μπορούν να διαβάσουν σελίδες αλλά μόνο οι εγγεγραμμένοι χρήστες μπορούν να δημιουργήσουν/τροποποιήσουν σελίδες και να μεταφορτώσουν αρχεία)';
@@ -289,16 +300,20 @@ $lang['seconds'] = 'πριν %d δευτερόλεπτα';
$lang['wordblock'] = 'Η αλλαγή σας δεν αποθηκεύτηκε γιατί περιείχε spam.';
$lang['media_uploadtab'] = 'Φόρτωση';
$lang['media_searchtab'] = 'Αναζήτηση';
+$lang['media_file'] = 'Αρχείο';
$lang['media_viewtab'] = 'Εμφάνιση';
$lang['media_edittab'] = 'Επεξεργασία';
$lang['media_historytab'] = 'Ιστορικό';
-$lang['media_thumbsview'] = 'Προεπισκόπιση';
-$lang['media_listview'] = 'Λίστα';
-$lang['media_sort'] = 'Ταξινόμιση';
+$lang['media_list_thumbs'] = 'Μικρογραφίες';
+$lang['media_list_rows'] = 'Γραμμές';
$lang['media_sort_name'] = 'ανά όνομα';
$lang['media_sort_date'] = 'ανά ημερομηνία';
+$lang['media_namespaces'] = 'Επιλογή namespace';
+$lang['media_files'] = 'Αρχεία στο %s φάκελο';
$lang['media_upload'] = 'Φόρτωση στο <strong>%s</strong> φάκελο.';
$lang['media_search'] = 'Αναζήτηση στο <strong>%s</strong> φάκελο.';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s στα %s';
$lang['media_edit'] = 'Επεξεργασία';
$lang['media_history'] = 'Αυτές είναι οι παλαιότερες αναθεωρήσεις του αρχείου.';
$lang['media_meta_edited'] = 'τα μεταδεδομένα επεξεργάστηκαν';
diff --git a/inc/lang/el/mailwrap.html b/inc/lang/el/mailwrap.html
new file mode 100644
index 000000000..b2e655789
--- /dev/null
+++ b/inc/lang/el/mailwrap.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<title>@TITLE@</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
+
+@HTMLBODY@
+
+<br /><hr />
+<small>Το email έχει δημιουργηθεί από το DokuWiki στις @DOKUWIKIURL@.</small>
+</body>
+</html> \ No newline at end of file
diff --git a/inc/lang/el/resetpwd.txt b/inc/lang/el/resetpwd.txt
new file mode 100644
index 000000000..0d26d05fa
--- /dev/null
+++ b/inc/lang/el/resetpwd.txt
@@ -0,0 +1,3 @@
+====== Εισάγετε νέο κωδικό πρόσβασης ======
+
+Παρακαλούμε, εισάγετε έναν νέο κωδικό πρόσβασης για τον λογαριασμό σας. \ No newline at end of file
diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php
index a33aba72e..7cc06a833 100644
--- a/inc/lang/gl/lang.php
+++ b/inc/lang/gl/lang.php
@@ -5,7 +5,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Medúlio <medulio@ciberirmandade.org>
* @author Oscar M. Lage <r0sk10@gmail.com>
- * @author Leandro Regueiro <leandro.regueiro@gmail.com>
+ * @author Rodrigo Rega <rodrigorega@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -41,7 +41,7 @@ $lang['btn_backtomedia'] = 'Volver á Selección de Arquivos-Media';
$lang['btn_subscribe'] = 'Avísame dos trocos na páxina';
$lang['btn_profile'] = 'Actualizar Perfil';
$lang['btn_reset'] = 'Reiniciar';
-$lang['btn_resendpwd'] = 'Definir novo contrasinal';
+$lang['btn_resendpwd'] = 'Establecer novo contrasinal';
$lang['btn_draft'] = 'Editar borrador';
$lang['btn_recover'] = 'Recuperar borrador';
$lang['btn_draftdel'] = 'Eliminar borrador';
@@ -78,7 +78,7 @@ $lang['profnoempty'] = 'Non se permite un nome ou un enderezo de corre
$lang['profchanged'] = 'Perfil de usuario actualizado correctamente.';
$lang['pwdforget'] = 'Esqueceches o teu contrasinal? Consegue un novo';
$lang['resendna'] = 'Este wiki non permite o reenvío de contrasinais.';
-$lang['resendpwd'] = 'Definir novo contrasinal para';
+$lang['resendpwd'] = 'Establecer novo contrasinal para';
$lang['resendpwdmissing'] = 'Sentímolo, tes que cubrir todos os campos.';
$lang['resendpwdnouser'] = 'Sentímolo, non atopamos este usuario no noso banco de datos.';
$lang['resendpwdbadauth'] = 'Sentímolo, mais este código de autorización non é válido. Asegúrate de que usaches a ligazón completa de confirmación.';
@@ -91,7 +91,7 @@ $lang['searchmedia_in'] = 'Procurar en %s';
$lang['txt_upload'] = 'Escolle o arquivo para subir';
$lang['txt_filename'] = 'Subir como (opcional)';
$lang['txt_overwrt'] = 'Sobrescribir arquivo existente';
-$lang['maxuploadsize'] = 'Envío máx. de %s por ficheiro.';
+$lang['maxuploadsize'] = 'Subida máxima %s por arquivo.';
$lang['lockedby'] = 'Bloqueado actualmente por';
$lang['lockexpire'] = 'O bloqueo remata o';
$lang['js']['willexpire'] = 'O teu bloqueo para editares esta páxina vai caducar nun minuto.\nPara de evitar conflitos, emprega o botón de previsualización para reiniciares o contador do tempo de bloqueo.';
@@ -190,7 +190,7 @@ $lang['tools'] = 'Ferramentas';
$lang['user_tools'] = 'Ferramentas de usuario';
$lang['site_tools'] = 'Ferramentas do sitio';
$lang['page_tools'] = 'Ferramentas de páxina';
-$lang['skip_to_content'] = 'saltar ao contido';
+$lang['skip_to_content'] = 'Pasar ao contido';
$lang['sidebar'] = 'Barra lateral';
$lang['mail_newpage'] = 'páxina engadida:';
$lang['mail_changed'] = 'páxina mudada:';
@@ -262,7 +262,7 @@ $lang['subscr_style_digest'] = 'correo-e con resumo de trocos para cada páxin
$lang['subscr_style_list'] = 'lista de páxinas mudadas dende o último correo-e';
$lang['authmodfailed'] = 'Configuración de autenticación de usuario incorrecta. Por favor, informa ao Administrador do teu Wiki.';
$lang['authtempfail'] = 'A autenticación de usuario non está dispoñible de xeito temporal. De persistir esta situación, por favor, informa ao Administrador do teu Wiki.';
-$lang['authpwdexpire'] = 'O seu contrasinal vai caducar en %d días, razón pola cal debería cambialo axiña.';
+$lang['authpwdexpire'] = 'A túa contrasinal expirará en %d días, deberías cambiala pronto.';
$lang['i_chooselang'] = 'Escolle o teu idioma';
$lang['i_installer'] = 'Instalador do DokuWiki';
$lang['i_wikiname'] = 'Nome do Wiki';
diff --git a/inc/lang/gl/mailwrap.html b/inc/lang/gl/mailwrap.html
index 05ef4175a..19927c117 100644
--- a/inc/lang/gl/mailwrap.html
+++ b/inc/lang/gl/mailwrap.html
@@ -8,6 +8,6 @@
@HTMLBODY@
<br /><hr />
-<small>Esta mensaxe foi xerada por DokuWiki en @DOKUWIKIURL@.</small>
+<small>Este correo era xerado por DokuWiki en @DOKUWIKIURL@.</small>
</body>
</html> \ No newline at end of file
diff --git a/inc/lang/gl/resetpwd.txt b/inc/lang/gl/resetpwd.txt
index 7b662d8f5..d3d64e90d 100644
--- a/inc/lang/gl/resetpwd.txt
+++ b/inc/lang/gl/resetpwd.txt
@@ -1,3 +1,3 @@
-====== Definir novo contrasinal ======
+====== Establecer novo contrasinal ======
-Introduza un novo contrasinal para a súa conta neste wiki. \ No newline at end of file
+Por favor introduzca un novo contrasinal para a súa conta neste wiki. \ No newline at end of file
diff --git a/inc/media.php b/inc/media.php
index 6335bf210..572b1177c 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -535,32 +535,13 @@ function media_contentcheck($file,$mime){
* Send a notify mail on uploads
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @fixme this should embed thumbnails of images in HTML version
*/
function media_notify($id,$file,$mime,$old_rev=false){
- global $lang;
global $conf;
- global $INFO;
if(empty($conf['notify'])) return; //notify enabled?
- $text = rawLocale('uploadmail');
- $trep = array(
- 'MIME' => $mime,
- 'MEDIA' => ml($id,'',true,'&',true),
- 'SIZE' => filesize_h(filesize($file)),
- );
-
- if ($old_rev && $conf['mediarevisions']) {
- $trep['OLD'] = ml($id, "rev=$old_rev", true, '&', true);
- } else {
- $trep['OLD'] = '---';
- }
-
- $mail = new Mailer();
- $mail->to($conf['notify']);
- $mail->subject($lang['mail_upload'].' '.$id);
- $mail->setBody($text,$trep);
- return $mail->send();
+ $subscription = new Subscription();
+ return $subscription->send_media_diff($conf['notify'], 'uploadmail', $id, $old_rev, '');
}
/**
diff --git a/inc/plugin.php b/inc/plugin.php
index 153e89407..649fc1f26 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -189,7 +189,7 @@ class DokuWiki_Plugin {
*
* @return object helper plugin object
*/
- function loadHelper($name, $msg){
+ function loadHelper($name, $msg = true){
if (!plugin_isdisabled($name)){
$obj = plugin_load('helper',$name);
}else{
diff --git a/inc/search.php b/inc/search.php
index 53bd240e8..cc3e79006 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -16,12 +16,13 @@ if(!defined('DOKU_INC')) die('meh.');
*
* @param array ref $data The results of the search are stored here
* @param string $base Where to start the search
- * @param callback $func Callback (function name or arayy with object,method)
+ * @param callback $func Callback (function name or array with object,method)
* @param string $dir Current directory beyond $base
* @param int $lvl Recursion Level
+ * @param mixed $sort 'natural' to use natural order sorting (default); 'date' to sort by filemtime; leave empty to skip sorting.
* @author Andreas Gohr <andi@splitbrain.org>
*/
-function search(&$data,$base,$func,$opts,$dir='',$lvl=1,$sort=false){
+function search(&$data,$base,$func,$opts,$dir='',$lvl=1,$sort='natural'){
$dirs = array();
$files = array();
$filepaths = array();
@@ -39,17 +40,19 @@ function search(&$data,$base,$func,$opts,$dir='',$lvl=1,$sort=false){
$filepaths[] = $base.'/'.$dir.'/'.$file;
}
closedir($dh);
- if ($sort == 'date') {
- @array_multisort(array_map('filemtime', $filepaths), SORT_NUMERIC, SORT_DESC, $files);
- } else {
- sort($files);
+ if (!empty($sort)) {
+ if ($sort == 'date') {
+ @array_multisort(array_map('filemtime', $filepaths), SORT_NUMERIC, SORT_DESC, $files);
+ } else /* natural */ {
+ natsort($files);
+ }
+ natsort($dirs);
}
- sort($dirs);
//give directories to userfunction then recurse
foreach($dirs as $dir){
if (call_user_func_array($func, array(&$data,$base,$dir,'d',$lvl,$opts))){
- search($data,$base,$func,$opts,$dir,$lvl+1);
+ search($data,$base,$func,$opts,$dir,$lvl+1,$sort);
}
}
//now handle the files
diff --git a/inc/subscription.php b/inc/subscription.php
index 62cfd1509..2989de032 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -424,13 +424,55 @@ class Subscription {
$trep['DIFF'] = $tdiff;
$hrep['DIFF'] = $hdiff;
+ $headers = array('Message-Id' => $this->getMessageID($id));
+ if ($rev) {
+ $headers['In-Reply-To'] = $this->getMessageID($id, $rev);
+ }
+
return $this->send(
$subscriber_mail, $subject, $id,
- $template, $trep, $hrep
+ $template, $trep, $hrep, $headers
);
}
/**
+ * Send the diff for some media change
+ *
+ * @fixme this should embed thumbnails of images in HTML version
+ * @param string $subscriber_mail The target mail address
+ * @param string $template Mail template ('uploadmail', ...)
+ * @param string $id Media file for which the notification is
+ * @param int|bool $rev Old revision if any
+ * @return bool true if successfully sent
+ */
+ public function send_media_diff($subscriber_mail, $template, $id, $rev = false) {
+ global $conf;
+
+ $file = mediaFN($id);
+ list($mime, $ext) = mimetype($id);
+
+ $trep = array(
+ 'MIME' => $mime,
+ 'MEDIA' => ml($id,'',true,'&',true),
+ 'SIZE' => filesize_h(filesize($file)),
+ );
+
+ if ($rev && $conf['mediarevisions']) {
+ $trep['OLD'] = ml($id, "rev=$rev", true, '&', true);
+ } else {
+ $trep['OLD'] = '---';
+ }
+
+ $headers = array('Message-Id' => $this->getMessageID($id, @filemtime($file)));
+ if ($rev) {
+ $headers['In-Reply-To'] = $this->getMessageID($id, $rev);
+ }
+
+ $this->send($subscriber_mail, 'upload', $id, $template, $trep, null, $headers);
+
+ }
+
+ /**
* Send a notify mail on new registration
*
* @author Andreas Gohr <andi@splitbrain.org>
@@ -542,9 +584,10 @@ class Subscription {
* template (in text format)
* @param array $hrep Predefined parameters used to parse the
* template (in HTML format), null to default to $trep
+ * @param array $headers Additional mail headers in the form 'name' => 'value'
* @return bool
*/
- protected function send($subscriber_mail, $subject, $context, $template, $trep, $hrep = null) {
+ protected function send($subscriber_mail, $subject, $context, $template, $trep, $hrep = null, $headers = array()) {
global $lang;
global $conf;
@@ -560,10 +603,37 @@ class Subscription {
if(isset($trep['SUBSCRIBE'])) {
$mail->setHeader('List-Unsubscribe', '<'.$trep['SUBSCRIBE'].'>', false);
}
+
+ foreach ($headers as $header => $value) {
+ $mail->setHeader($header, $value);
+ }
+
return $mail->send();
}
/**
+ * Get a valid message id for a certain $id and revision (or the current revision)
+ * @param string $id The id of the page (or media file) the message id should be for
+ * @param string $rev The revision of the page, set to the current revision of the page $id if not set
+ * @return string
+ */
+ protected function getMessageID($id, $rev = NULL) {
+ static $listid = null;
+ if (is_null($listid)) {
+ $server = parse_url(DOKU_URL, PHP_URL_HOST);
+ $listid = join('.', array_reverse(explode('/', DOKU_BASE))).$server;
+ $listid = urlencode($listid);
+ $listid = strtolower(trim($listid, '.'));
+ }
+
+ if (is_null($rev)) {
+ $rev = @filemtime(wikiFN($id));
+ }
+
+ return "<$id?rev=$rev@$listid>";
+ }
+
+ /**
* Default callback for COMMON_NOTIFY_ADDRESSLIST
*
* Aggregates all email addresses of user who have subscribed the given page with 'every' style
diff --git a/inc/template.php b/inc/template.php
index 4af35cc2b..2c083c964 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -703,6 +703,7 @@ function tpl_get_action($type) {
}
break;
case 'media':
+ $params['ns'] = getNS($ID);
break;
default:
return '[unknown %s type]';
@@ -839,7 +840,9 @@ function tpl_youarehere($sep = ' » ') {
echo '<span class="bchead">'.$lang['youarehere'].': </span>';
// always print the startpage
+ echo '<span class="home">';
tpl_pagelink(':'.$conf['start']);
+ echo '</span>';
// print intermediate namespace links
$part = '';