From 15ae43bc55fffc8a9ccbf8215883532daf0d4a82 Mon Sep 17 00:00:00 2001
From: Borek Bernard
Date: Mon, 27 Feb 2012 20:42:06 +0100
Subject: Colon is no longer rewritten to semicolon for IIS 7.x and for older
versions of IIS, semicolon is displayed as is, not URL-encoded.
---
inc/common.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'inc')
diff --git a/inc/common.php b/inc/common.php
index 0c769c50d..26904dd46 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -323,12 +323,14 @@ 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/7.') === false) {
$id = strtr($id,':',';');
}
if($ue){
$id = rawurlencode($id);
$id = str_replace('%3A',':',$id); //keep as colon
+ $id = str_replace('%3B',';',$id); //keep as semicolon
$id = str_replace('%2F','/',$id); //keep as slash
}
return $id;
--
cgit v1.2.3
From 9664a2b801ce91ae3707306f01fb4cad528b1258 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sat, 14 Jul 2012 09:54:42 +0200
Subject: changed the link in the installer to point to wiki:welcome
---
inc/lang/ar/lang.php | 4 ++--
inc/lang/az/lang.php | 4 ++--
inc/lang/bg/lang.php | 4 ++--
inc/lang/ca-valencia/lang.php | 4 ++--
inc/lang/ca/lang.php | 4 ++--
inc/lang/cs/lang.php | 4 ++--
inc/lang/da/lang.php | 4 ++--
inc/lang/de-informal/lang.php | 4 ++--
inc/lang/de/lang.php | 4 ++--
inc/lang/el/lang.php | 4 ++--
inc/lang/en/lang.php | 4 ++--
inc/lang/eo/lang.php | 4 ++--
inc/lang/es/lang.php | 4 ++--
inc/lang/et/lang.php | 4 ++--
inc/lang/eu/lang.php | 4 ++--
inc/lang/fa/lang.php | 4 ++--
inc/lang/fi/lang.php | 4 ++--
inc/lang/fr/lang.php | 4 ++--
inc/lang/gl/lang.php | 4 ++--
inc/lang/he/lang.php | 4 ++--
inc/lang/hr/lang.php | 4 ++--
inc/lang/hu/lang.php | 4 ++--
inc/lang/ia/lang.php | 4 ++--
inc/lang/id/lang.php | 4 ++--
inc/lang/it/lang.php | 4 ++--
inc/lang/ja/lang.php | 4 ++--
inc/lang/ko/lang.php | 4 ++--
inc/lang/la/lang.php | 4 ++--
inc/lang/lv/lang.php | 4 ++--
inc/lang/mk/lang.php | 4 ++--
inc/lang/mr/lang.php | 4 ++--
inc/lang/ne/lang.php | 4 ++--
inc/lang/nl/lang.php | 4 ++--
inc/lang/no/lang.php | 4 ++--
inc/lang/pl/lang.php | 4 ++--
inc/lang/pt-br/lang.php | 4 ++--
inc/lang/pt/lang.php | 4 ++--
inc/lang/ro/lang.php | 4 ++--
inc/lang/ru/lang.php | 4 ++--
inc/lang/sk/lang.php | 4 ++--
inc/lang/sl/lang.php | 4 ++--
inc/lang/sq/lang.php | 4 ++--
inc/lang/sr/lang.php | 4 ++--
inc/lang/sv/lang.php | 4 ++--
inc/lang/tr/lang.php | 4 ++--
inc/lang/uk/lang.php | 4 ++--
inc/lang/zh-tw/lang.php | 4 ++--
inc/lang/zh/lang.php | 4 ++--
48 files changed, 96 insertions(+), 96 deletions(-)
(limited to 'inc')
diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php
index 350e26695..0f5566471 100644
--- a/inc/lang/ar/lang.php
+++ b/inc/lang/ar/lang.php
@@ -284,8 +284,8 @@ $lang['i_badhash'] = 'الملف dokuwiki.php غير مصنف أو
(hash=%s
)';
$lang['i_badval'] = 'القيمة %s
غير شرعية أو فارغة';
$lang['i_success'] = 'الإعدادات تمت بنجاح، يرجى حذف الملف install.php الآن.
-ثم تابع إلى دوكو ويكي الجديدة';
-$lang['i_failure'] = 'بعض الأخطاء حدثت أثنا كتابة ملفات الإعدادات، عليك تعديلها يدوياً قبل أن تستطيع استخدام دوكو ويكي الجديدة';
+ثم تابع إلى دوكو ويكي الجديدة';
+$lang['i_failure'] = 'بعض الأخطاء حدثت أثنا كتابة ملفات الإعدادات، عليك تعديلها يدوياً قبل أن تستطيع استخدام دوكو ويكي الجديدة';
$lang['i_policy'] = 'تصريح ACL مبدئي';
$lang['i_pol0'] = 'ويكي مفتوحة؛ أي القراءة والكتابة والتحميل مسموحة للجميع';
$lang['i_pol1'] = 'ويكي عامة؛ أي القراءة للجميع ولكن الكتابة والتحميل للمشتركين المسجلين فقط';
diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php
index fff6f34b7..384a347b7 100644
--- a/inc/lang/az/lang.php
+++ b/inc/lang/az/lang.php
@@ -208,8 +208,8 @@ $lang['i_writeerr'] = '%s
yaradıla bilmədi. Faylın/qo
$lang['i_badhash'] = 'dokuwiki.php tanıla bilmir və ya dəyişdirilmişdir (hash=%s
)';
$lang['i_badval'] = '%s
- səhv ya boş qiymətdir';
$lang['i_success'] = 'Konfiqurasiya uğurla başa çatdı. İndi siz install.php faylını silə bilərsiniz.
- Yeni DokuWiki-nizə xoş gəlmişsiniz!';
-$lang['i_failure'] = 'Konfiqurasiya fayllarına məlumat yazan zaman səhvlər tapıldı. Yəgin ki, yeni DokuWiki-nizi istifadə etmədən öncə, Siz o xətaları əl ilə düzəltməli olacaqsınız.';
+ Yeni DokuWiki-nizə xoş gəlmişsiniz!';
+$lang['i_failure'] = 'Konfiqurasiya fayllarına məlumat yazan zaman səhvlər tapıldı. Yəgin ki, yeni DokuWiki-nizi istifadə etmədən öncə, Siz o xətaları əl ilə düzəltməli olacaqsınız.';
$lang['i_policy'] = 'İlkin giriş haqları siyasəti';
$lang['i_pol0'] = 'Tam açıq wiki (oxumaq, yazmaq, fayl yükləmək hamıya olar)';
$lang['i_pol1'] = 'Acıq wiki (oxumaq hamıya olar, yazmaq və fayl yükləmək ancaq üzv olan istifadəçilərə olar)';
diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php
index 562dc78b3..7a9a20469 100644
--- a/inc/lang/bg/lang.php
+++ b/inc/lang/bg/lang.php
@@ -298,10 +298,10 @@ $lang['i_confexists'] = '%s
вече съществува'
$lang['i_writeerr'] = '%s
не можа да бъде създаден. Трябва да проверите правата за достъп до директорията/файла и да създадете файла ръчно.';
$lang['i_badhash'] = 'Файлът dokuwiki.php не може да бъде разпознат или е променен (hash=%s
)';
$lang['i_badval'] = '%s
- непозволена или празна стойност';
-$lang['i_success'] = 'Настройването приключи успешно. Вече можете да изтриете файла install.php. Продължете към Вашето ново DokuWiki.';
+$lang['i_success'] = 'Настройването приключи успешно. Вече можете да изтриете файла install.php. Продължете към Вашето ново DokuWiki.';
$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно,
- за да можете да ползвате Вашето ново DokuWiki.';
+ за да можете да ползвате Вашето ново DokuWiki.';
$lang['i_policy'] = 'Първоначална политика за достъп';
$lang['i_pol0'] = 'Отворено Wiki (всеки може да чете, пише и качва)';
$lang['i_pol1'] = 'Публично Wiki (всеки може да чете, само регистрирани пишат и качват)';
diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php
index e299f6427..e62010418 100644
--- a/inc/lang/ca-valencia/lang.php
+++ b/inc/lang/ca-valencia/lang.php
@@ -211,9 +211,9 @@ $lang['i_writeerr'] = 'No es pot crear %s
. Haurà de com
$lang['i_badhash'] = 'dokuwiki.php substituït o modificat (hash=%s
)';
$lang['i_badval'] = '%s
- valor illegal o buit';
$lang['i_success'] = 'La configuració ha finalisat correctament. Ya pot borrar l\'archiu install.php. Passe al
-nou DokuWiki.';
+nou DokuWiki.';
$lang['i_failure'] = 'Han aparegut alguns erros escrivint els archius de configuració. Deurà arreglar-los manualment abans de que
-puga utilisar el nou DokuWiki.';
+puga utilisar el nou DokuWiki.';
$lang['i_policy'] = 'Política inicial ACL';
$lang['i_pol0'] = 'Wiki obert (llegir, escriure i enviar tots)';
$lang['i_pol1'] = 'Wiki públic (llegir tots, escriure i enviar només usuaris registrats)';
diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php
index 3a1412617..7fc078419 100644
--- a/inc/lang/ca/lang.php
+++ b/inc/lang/ca/lang.php
@@ -208,8 +208,8 @@ $lang['i_confexists'] = '%s
ja existeix';
$lang['i_writeerr'] = 'No es pot crear %s
. Comproveu els permisos del directori i/o del fitxer i creeu el fitxer manualment.';
$lang['i_badhash'] = 'dokuwiki.php no reconegut o modificat (hash=%s
)';
$lang['i_badval'] = '%s
- valor il·legal o buit';
-$lang['i_success'] = 'La configuració s\'ha acabat amb èxit. Ara podeu suprimir el fitxer install.php. Aneu al vostre nou DokuWiki.';
-$lang['i_failure'] = 'S\'han produït alguns errors en escriure els fitxers de configuració. Potser caldrà que els arregleu manualment abans d\'utilitzar el vostre nou DokuWiki.';
+$lang['i_success'] = 'La configuració s\'ha acabat amb èxit. Ara podeu suprimir el fitxer install.php. Aneu al vostre nou DokuWiki.';
+$lang['i_failure'] = 'S\'han produït alguns errors en escriure els fitxers de configuració. Potser caldrà que els arregleu manualment abans d\'utilitzar el vostre nou DokuWiki.';
$lang['i_policy'] = 'Política ACL inicial';
$lang['i_pol0'] = 'Wiki obert (tothom pot llegir, escriure i penjar fitxers)';
$lang['i_pol1'] = 'Wiki públic (tothom pot llegir, els usuaris registrats poden escriure i penjar fitxers)';
diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php
index 608beafd8..11033ff68 100644
--- a/inc/lang/cs/lang.php
+++ b/inc/lang/cs/lang.php
@@ -278,8 +278,8 @@ $lang['i_confexists'] = '%s
již existuje';
$lang['i_writeerr'] = 'Nelze vytvořit %s
. Budete muset zkontrolovat práva k souborům či adresářům a vytvořit tento soubor ručně.';
$lang['i_badhash'] = 'soubor dokuwiki.php (hash=%s
) nebyl rozpoznán nebo byl upraven';
$lang['i_badval'] = '%s
- neplatná nebo prázdná hodnota';
-$lang['i_success'] = 'Konfigurace byla úspěšně dokončena. Nyní můžete smazat soubor install.php. Pokračujte do své nové DokuWiki.';
-$lang['i_failure'] = 'Vyskytly se nějaké chyby při zápisu do konfiguračních souborů. Budete je nejspíš muset upravit ručně před použitím své nové DokuWiki.';
+$lang['i_success'] = 'Konfigurace byla úspěšně dokončena. Nyní můžete smazat soubor install.php. Pokračujte do své nové DokuWiki.';
+$lang['i_failure'] = 'Vyskytly se nějaké chyby při zápisu do konfiguračních souborů. Budete je nejspíš muset upravit ručně před použitím své nové DokuWiki.';
$lang['i_policy'] = 'Úvodní politika ACL';
$lang['i_pol0'] = 'Otevřená wiki (čtení, zápis a upload pro všechny)';
$lang['i_pol1'] = 'Veřejná wiki (čtení pro všechny, zápis a upload pro registrované uživatele)';
diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php
index 97f2138b4..2c26cd3da 100644
--- a/inc/lang/da/lang.php
+++ b/inc/lang/da/lang.php
@@ -285,8 +285,8 @@ $lang['i_confexists'] = '%s
eksisterer allerede';
$lang['i_writeerr'] = 'Kunne ikke oprette %s
. Du bliver nød til at tjekke mappe/fil- tilladelserne og oprette filen manuelt.';
$lang['i_badhash'] = 'uigenkendelig eller modificeret dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- ulovlig eller tom værdi';
-$lang['i_success'] = 'Konfigurationen fulførtedes med success. Du kan nu slette install.php filen. Fortsætte til din nye DokuWiki.';
-$lang['i_failure'] = 'Nogle fejl forekom mens konfigurations filerne skulle skrives. Du er mulighvis nød til at fixe dem manuelt før du kan bruge din nye DokuWiki.';
+$lang['i_success'] = 'Konfigurationen fulførtedes med success. Du kan nu slette install.php filen. Fortsætte til din nye DokuWiki.';
+$lang['i_failure'] = 'Nogle fejl forekom mens konfigurations filerne skulle skrives. Du er mulighvis nød til at fixe dem manuelt før du kan bruge din nye DokuWiki.';
$lang['i_policy'] = 'Begyndende ACL politik';
$lang['i_pol0'] = 'Åben Wiki (alle kan læse, skrive og uploade)';
$lang['i_pol1'] = 'Offentlig Wiki (alle kan læse, kun registrerede brugere kan skrive og overføre)';
diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php
index 37469522f..cce898b15 100644
--- a/inc/lang/de-informal/lang.php
+++ b/inc/lang/de-informal/lang.php
@@ -287,8 +287,8 @@ $lang['i_confexists'] = '%s
existiert bereits';
$lang['i_writeerr'] = '%s
konnte nicht erzeugt werden. Du solltest die Verzeichnis-/Datei-Rechte überprüfen und die Datei manuell anlegen.';
$lang['i_badhash'] = 'Unbekannte oder modifizierte dokuwiki.php (Hash=%s
)';
$lang['i_badval'] = '%s
- unerlaubter oder leerer Wert';
-$lang['i_success'] = 'Die Konfiguration wurde erfolgreich abgeschlossen. Du kannst jetzt die install.php löschen. Dein neues DokuWiki ist jetzt für dich bereit.';
-$lang['i_failure'] = 'Es sind Fehler beim Schreiben der Konfigurationsdateien aufgetreten. Du musst diese vermutlich von Hand beheben, bevor du dein neues DokuWiki nutzen kannst.';
+$lang['i_success'] = 'Die Konfiguration wurde erfolgreich abgeschlossen. Du kannst jetzt die install.php löschen. Dein neues DokuWiki ist jetzt für dich bereit.';
+$lang['i_failure'] = 'Es sind Fehler beim Schreiben der Konfigurationsdateien aufgetreten. Du musst diese vermutlich von Hand beheben, bevor du dein neues DokuWiki nutzen kannst.';
$lang['i_policy'] = 'Anfangseinstellung für Zugangskontrolle (ACL)';
$lang['i_pol0'] = 'Offenes Wiki (lesen, schreiben, hochladen für alle)';
$lang['i_pol1'] = 'Öffentliches Wiki (lesen für alle, schreiben und hochladen für registrierte Nutzer)';
diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php
index 4ea75157b..07052fb3d 100644
--- a/inc/lang/de/lang.php
+++ b/inc/lang/de/lang.php
@@ -289,8 +289,8 @@ $lang['i_confexists'] = '%s
existiert bereits';
$lang['i_writeerr'] = '%s
konnte nicht erzeugt werden. Sie sollten die Verzeichnis-/Datei-Rechte überprüfen und die Datei manuell anlegen.';
$lang['i_badhash'] = 'Unbekannte oder modifizierte dokuwiki.php (Hash=%s
)';
$lang['i_badval'] = '%s
- unerlaubter oder leerer Wert';
-$lang['i_success'] = 'Die Konfiguration wurde erfolgreich abgeschlossen. Sie können jetzt die install.php löschen. Ihr neues DokuWiki ist jetzt für Sie bereit.';
-$lang['i_failure'] = 'Es sind Fehler beim Schreiben der Konfigurationsdateien aufgetreten. Sie müssen diese vermutlich von Hand beheben, bevor Sie Ihr neues DokuWiki nutzen können.';
+$lang['i_success'] = 'Die Konfiguration wurde erfolgreich abgeschlossen. Sie können jetzt die install.php löschen. Ihr neues DokuWiki ist jetzt für Sie bereit.';
+$lang['i_failure'] = 'Es sind Fehler beim Schreiben der Konfigurationsdateien aufgetreten. Sie müssen diese vermutlich von Hand beheben, bevor Sie Ihr neues DokuWiki nutzen können.';
$lang['i_policy'] = 'Anfangseinstellung für Zugangskontrolle (ACL)';
$lang['i_pol0'] = 'Offenes Wiki (lesen, schreiben, hochladen für alle)';
$lang['i_pol1'] = 'Öffentliches Wiki (lesen für alle, schreiben und hochladen für registrierte Nutzer)';
diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php
index 95f1a1ea5..d5bde6929 100644
--- a/inc/lang/el/lang.php
+++ b/inc/lang/el/lang.php
@@ -270,8 +270,8 @@ $lang['i_confexists'] = '%s
υπάρχει ήδη';
$lang['i_writeerr'] = 'Δεν είναι δυνατή η δημιουργία του %s
. Πρέπει να διορθώσετε τα δικαιώματα πρόσβασης αυτού του φακέλου/αρχείου και να δημιουργήσετε το αρχείο χειροκίνητα!';
$lang['i_badhash'] = 'Μη αναγνωρίσιμο ή τροποποιημένο αρχείο dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- λάθος ή ανύπαρκτη τιμή';
-$lang['i_success'] = 'Η εγκατάσταση ολοκληρώθηκε επιτυχώς. Μπορείτε πλέον να διαγράψετε το αρχείο install.php. Συνεχίστε στο νέο σας DokuWiki.';
-$lang['i_failure'] = 'Εμφανίστηκαν κάποια προβλήματα στη διαδικασία ανανέωσης των αρχείων ρυθμίσεων. Πιθανόν να χρειάζεται να τα τροποποιήσετε χειροκίνητα ώστε να μπορείτε να χρησιμοποιήσετε το νέο σας DokuWiki.';
+$lang['i_success'] = 'Η εγκατάσταση ολοκληρώθηκε επιτυχώς. Μπορείτε πλέον να διαγράψετε το αρχείο install.php. Συνεχίστε στο νέο σας DokuWiki.';
+$lang['i_failure'] = 'Εμφανίστηκαν κάποια προβλήματα στη διαδικασία ανανέωσης των αρχείων ρυθμίσεων. Πιθανόν να χρειάζεται να τα τροποποιήσετε χειροκίνητα ώστε να μπορείτε να χρησιμοποιήσετε το νέο σας DokuWiki.';
$lang['i_policy'] = 'Αρχική πολιτική Λίστας Δικαιωμάτων Πρόσβασης - ACL';
$lang['i_pol0'] = 'Ανοιχτό Wiki (όλοι μπορούν να διαβάσουν ή να δημιουργήσουν/τροποποιήσουν σελίδες και να μεταφορτώσουν αρχεία)';
$lang['i_pol1'] = 'Δημόσιο Wiki (όλοι μπορούν να διαβάσουν σελίδες αλλά μόνο οι εγγεγραμμένοι χρήστες μπορούν να δημιουργήσουν/τροποποιήσουν σελίδες και να μεταφορτώσουν αρχεία)';
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index 3c51ba224..73c3522fd 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -302,9 +302,9 @@ $lang['i_writeerr'] = 'Unable to create %s
. You will nee
$lang['i_badhash'] = 'unrecognised or modified dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- illegal or empty value';
$lang['i_success'] = 'The configuration was finished successfully. You may delete the install.php file now. Continue to
- your new DokuWiki.';
+ your new DokuWiki.';
$lang['i_failure'] = 'Some errors occurred while writing the configuration files. You may need to fix them manually before
- you can use your new DokuWiki.';
+ you can use your new DokuWiki.';
$lang['i_policy'] = 'Initial ACL policy';
$lang['i_pol0'] = 'Open Wiki (read, write, upload for everyone)';
$lang['i_pol1'] = 'Public Wiki (read for everyone, write and upload for registered users)';
diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php
index b2c64b2a6..3e0d86386 100644
--- a/inc/lang/eo/lang.php
+++ b/inc/lang/eo/lang.php
@@ -278,8 +278,8 @@ $lang['i_confexists'] = '%s
jam ekzistas';
$lang['i_writeerr'] = 'Ne eblas krei "%s
". Vi bezonas kontroli la permesojn de la dosier(uj)oj kaj mem krej la dosieron.';
$lang['i_badhash'] = 'dokuwiki.php ne estas rekonebla aŭ ĝi estas modifita (hash=%s
)';
$lang['i_badval'] = '%s
- malvalida aŭ malplena valoro';
-$lang['i_success'] = 'La agordado sukcese kompletiĝis. Vi povas forigi la dosieron nun. Pluiru al via nova DokuWiki.';
-$lang['i_failure'] = 'Kelkaj eraroj okazis dum la konservo de la agordaj dosieroj. Vi devas senpere korekti ilin antaŭ ol vi povos uzi vian novan DokuWiki-on. ';
+$lang['i_success'] = 'La agordado sukcese kompletiĝis. Vi povas forigi la dosieron nun. Pluiru al via nova DokuWiki.';
+$lang['i_failure'] = 'Kelkaj eraroj okazis dum la konservo de la agordaj dosieroj. Vi devas senpere korekti ilin antaŭ ol vi povos uzi vian novan DokuWiki-on. ';
$lang['i_policy'] = 'Komenca ACL-a agordo';
$lang['i_pol0'] = 'Malferma Vikio (legi, skribi, alŝuti povas ĉiuj)';
$lang['i_pol1'] = 'Publika Vikio (legi povas ĉiuj, skribi kaj alŝuti povas registritaj uzantoj)';
diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php
index ee3da258b..c09b12121 100644
--- a/inc/lang/es/lang.php
+++ b/inc/lang/es/lang.php
@@ -287,8 +287,8 @@ $lang['i_confexists'] = '%s
ya existe';
$lang['i_writeerr'] = 'Imposible crear %s
. Se necesita que usted controle los permisos del fichero/directorio y que cree el fichero manualmente.';
$lang['i_badhash'] = 'dokuwiki.php no reconocido o modificado (hash=%s
)';
$lang['i_badval'] = '%s
- valor ilegal o vacío';
-$lang['i_success'] = 'La configuración ha concluido correctamente. Ahora puede eliminar el archivo install.php. Visite su nuevo DokuWiki.';
-$lang['i_failure'] = 'Han ocurrido algunos errores durante la escritura de los ficheros de configuración. Puede ser que necesite corregirlos manualmente antes de poder usar su nuevo DokuWiki.';
+$lang['i_success'] = 'La configuración ha concluido correctamente. Ahora puede eliminar el archivo install.php. Visite su nuevo DokuWiki.';
+$lang['i_failure'] = 'Han ocurrido algunos errores durante la escritura de los ficheros de configuración. Puede ser que necesite corregirlos manualmente antes de poder usar su nuevo DokuWiki.';
$lang['i_policy'] = 'Política de ACL inicial';
$lang['i_pol0'] = 'Wiki abierto (leer, escribir y subir archivos para todos)';
$lang['i_pol1'] = 'Wiki público (leer para todos, escribir y subir archivos para usuarios registrados únicamente)';
diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php
index 5e5caa1c8..37d4538ec 100644
--- a/inc/lang/et/lang.php
+++ b/inc/lang/et/lang.php
@@ -223,8 +223,8 @@ $lang['i_permfail'] = 'Dokuwiki ei saa kirjutada faili %s
%s on juba olemas';
$lang['i_writeerr'] = 'Faili %s
ei lubata tekitada. Kontrolli kataloogi ja faili õigusi.';
$lang['i_badval'] = '%s
- lubamatu või tühi väärtus';
-$lang['i_success'] = 'Seadistamine on õnnelikult lõpule viidud. Sa võid nüüd kustutada faili install.php. Alusta oma uue DokuWiki täitmist.';
-$lang['i_failure'] = 'Konfiguratsiooni faili kirjutamisel esines vigu. Võimalik, et pead need käsitsi parandama enne uue DokuWiki täitma asumist.';
+$lang['i_success'] = 'Seadistamine on õnnelikult lõpule viidud. Sa võid nüüd kustutada faili install.php. Alusta oma uue DokuWiki täitmist.';
+$lang['i_failure'] = 'Konfiguratsiooni faili kirjutamisel esines vigu. Võimalik, et pead need käsitsi parandama enne uue DokuWiki täitma asumist.';
$lang['i_policy'] = 'Wiki õiguste algne poliitika';
$lang['i_pol0'] = 'Avatud (lugemine, kirjutamine ja üleslaadimine kõigile lubatud)';
$lang['i_pol1'] = 'Avalikuks lugemiseks (lugeda saavad kõik, kirjutada ja üles laadida vaid registreeritud kasutajad)';
diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php
index f7a517fe4..bac5b32fc 100644
--- a/inc/lang/eu/lang.php
+++ b/inc/lang/eu/lang.php
@@ -246,8 +246,8 @@ $lang['i_confexists'] = '%s
lehendik existitzen da';
$lang['i_writeerr'] = 'Ezin da %s
sortu. Direktorioaren/fitxategiaren baimenak egiaztatu eta sortu fitxategia eskuz.';
$lang['i_badhash'] = 'aldatutakoa edo ezezaguna den dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- balioa arauen aurka edo hutsa';
-$lang['i_success'] = 'Konfigurazioa arrakastaz amaitu da. Orain, install.php fitxategia ezabatu dezakezu. Jarraitu ezazu zure DokuWiki berrian.';
-$lang['i_failure'] = 'Akats batzuk gertatu dira konfigurazio fitxategiak idazterakoan. Hauek eskuz konpondu beharra izan dezakezu zure DokuWiki berria erabili ahal izan aurretik.';
+$lang['i_success'] = 'Konfigurazioa arrakastaz amaitu da. Orain, install.php fitxategia ezabatu dezakezu. Jarraitu ezazu zure DokuWiki berrian.';
+$lang['i_failure'] = 'Akats batzuk gertatu dira konfigurazio fitxategiak idazterakoan. Hauek eskuz konpondu beharra izan dezakezu zure DokuWiki berria erabili ahal izan aurretik.';
$lang['i_policy'] = 'Hasierako ACL politika';
$lang['i_pol0'] = 'Wiki Irekia (irakurri, idatzi, fitxategiak igo edonorentzat)';
$lang['i_pol1'] = 'Wiki Publikoa (irakurri edonorentzat, idatzi eta fitxategiak igo erregistratutako erabiltzaileentzat)';
diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php
index 1b8586d5a..4373058db 100644
--- a/inc/lang/fa/lang.php
+++ b/inc/lang/fa/lang.php
@@ -283,8 +283,8 @@ $lang['i_confexists'] = '%s
پیشتر موجود اس
$lang['i_writeerr'] = 'توانایی ایجاد %s
نیست. شما باید دسترسیهای شاخه یا فایل را بررسی کنید و فایل را به طور دستی ایجاد کنید.';
$lang['i_badhash'] = 'فایل dokuwiki.php غیرقابل تشخیص بوده یا تغییر کرده است (hash=%s
)';
$lang['i_badval'] = '%s
- غیرقانونی و یا مقادیر تهی';
-$lang['i_success'] = 'تنظیمات با موفقیت به پایان رسید. بهتر است فایل install.php رو حذف کنید. برای ادامه اینجا کلیک کنید.';
-$lang['i_failure'] = 'مشکلاتی در زمان نوشتن فایل تنظیمات پیش آمده است. شما باید این مشکلات را پیش از استفاده از DokuWiki برطرف کنید.';
+$lang['i_success'] = 'تنظیمات با موفقیت به پایان رسید. بهتر است فایل install.php رو حذف کنید. برای ادامه اینجا کلیک کنید.';
+$lang['i_failure'] = 'مشکلاتی در زمان نوشتن فایل تنظیمات پیش آمده است. شما باید این مشکلات را پیش از استفاده از DokuWiki برطرف کنید.';
$lang['i_policy'] = 'کنترل دسترسیهای اولیه';
$lang['i_pol0'] = 'ویکی باز (همه میتوانند بخوانند، بنویسند و فایل ارسال کنند)';
$lang['i_pol1'] = 'ویکی عمومی (همه میتوانند بخوانند، کاربران ثبت شده میتوانند بنویسند و فایل ارسال کنند)';
diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php
index ce15f68d0..82f821b1f 100644
--- a/inc/lang/fi/lang.php
+++ b/inc/lang/fi/lang.php
@@ -269,8 +269,8 @@ $lang['i_confexists'] = '%s
on jo olemassa';
$lang['i_writeerr'] = '%s
n luonti epäonnistui. Tarkista hakemiston/tiedoston oikeudet ja luo tiedosto käsin.';
$lang['i_badhash'] = 'tunnistamaton tai muokattu dokuwiki.php (tarkistussumma=%s
)';
$lang['i_badval'] = '%s
- väärä tai tyhjä arvo';
-$lang['i_success'] = 'Kokoonpano tehty onnistuneesti. Voit poistaa install.php tiedoston. Jatka uuteen DokuWikiisi.';
-$lang['i_failure'] = 'Joitain virheitä tapahtui kirjoitettaessa vaadittavia tiedostoja. Sinun pitää korjata ne käsin ennen kuin voit käyttää uutta DokuWikiäsi.';
+$lang['i_success'] = 'Kokoonpano tehty onnistuneesti. Voit poistaa install.php tiedoston. Jatka uuteen DokuWikiisi.';
+$lang['i_failure'] = 'Joitain virheitä tapahtui kirjoitettaessa vaadittavia tiedostoja. Sinun pitää korjata ne käsin ennen kuin voit käyttää uutta DokuWikiäsi.';
$lang['i_policy'] = 'Käyttöoikeuksien oletusmenettelytapa';
$lang['i_pol0'] = 'Avoin Wiki (luku, kirjoitus, tiedostojen lähetys on sallittu kaikille)';
$lang['i_pol1'] = 'Julkinen Wiki (luku kaikilla, kirjoitus ja tiedostojen lähetys rekisteröidyillä käyttäjillä)';
diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php
index a77be6965..aa9527a1d 100644
--- a/inc/lang/fr/lang.php
+++ b/inc/lang/fr/lang.php
@@ -291,8 +291,8 @@ $lang['i_confexists'] = '%s
existe déjà';
$lang['i_writeerr'] = 'Impossible de créer %s
. Vous devez vérifier les permissions des répertoires/fichiers et créer le fichier manuellement.';
$lang['i_badhash'] = 'dokuwiki.php non reconnu ou modifié (hash=%s
)';
$lang['i_badval'] = '%s
- valeur interdite ou vide';
-$lang['i_success'] = 'L\'installation s\'est terminée avec succès. Vous pouvez maintenant supprimer le fichier « install.php ». Continuer avec votre nouveau DokuWiki.';
-$lang['i_failure'] = 'Des erreurs sont survenues lors de l\'écriture des fichiers de configuration. Il vous faudra les corriger manuellement avant de pouvoir utiliser votre nouveau DokuWiki.';
+$lang['i_success'] = 'L\'installation s\'est terminée avec succès. Vous pouvez maintenant supprimer le fichier « install.php ». Continuer avec votre nouveau DokuWiki.';
+$lang['i_failure'] = 'Des erreurs sont survenues lors de l\'écriture des fichiers de configuration. Il vous faudra les corriger manuellement avant de pouvoir utiliser votre nouveau DokuWiki.';
$lang['i_policy'] = 'Politique d\'ACL initiale';
$lang['i_pol0'] = 'Wiki ouvert (lecture, écriture, envoi de fichiers pour tout le monde)';
$lang['i_pol1'] = 'Wiki public (lecture pour tout le monde, écriture et envoi de fichiers pour les utilisateurs enregistrés)';
diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php
index 9636d6c15..466f0fb8c 100644
--- a/inc/lang/gl/lang.php
+++ b/inc/lang/gl/lang.php
@@ -269,9 +269,9 @@ $lang['i_writeerr'] = 'Non se puido crear %s
. Terás de
$lang['i_badhash'] = 'dokuwiki.php irrecoñecíbel ou modificado (hash=%s
)';
$lang['i_badval'] = '%s
- ilegal ou valor baleiro';
$lang['i_success'] = 'A configuración rematou correctamente. Agora podes eliminar o arquivo install.php. Continúa deica o
- teu novo DokuWiki.';
+ teu novo DokuWiki.';
$lang['i_failure'] = 'Houbo algúns erros ao tentar escribir os arquivos de configuración. Pode que precises solucionalos de xeito manual antes
- de poderes empregar o teu novo DokuWiki.';
+ de poderes empregar o teu novo DokuWiki.';
$lang['i_policy'] = 'Regras iniciais da ACL';
$lang['i_pol0'] = 'Wiki Aberto (lectura, escritura, subida de arquivos para todas as persoas)';
$lang['i_pol1'] = 'Wiki Público (lectura para todas as persoas, escritura e subida de arquivos para usuarios rexistrados)';
diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php
index 00eb4549b..9cbcc3c4f 100644
--- a/inc/lang/he/lang.php
+++ b/inc/lang/he/lang.php
@@ -249,8 +249,8 @@ $lang['i_confexists'] = '%s
כבר קיים';
$lang['i_writeerr'] = 'אין אפשרות ליצור את %s
. נא לבדוק את הרשאות הקובץ/תיקייה וליצור את הקובץ ידנית.';
$lang['i_badhash'] = 'הקובץ Dokuwiki.php אינו מזוהה או שעבר שינויים (hash=%s
)';
$lang['i_badval'] = '%s
- הערך אינו חוקי או ריק';
-$lang['i_success'] = 'תהליך ההגדרה הסתיים בהצלחה. כעת ניתן למחוק את הקובץ install.php ולהמשיך אל ה־DokuWiki החדש שלך.';
-$lang['i_failure'] = 'מספר שגיאות אירעו בעת כתיבת קובצי התצורה. יתכן כי יהיה צורך לתקנם ידנית לפני שניתן יהיה להשתמש ב־DokuWiki החדש שלך.';
+$lang['i_success'] = 'תהליך ההגדרה הסתיים בהצלחה. כעת ניתן למחוק את הקובץ install.php ולהמשיך אל ה־DokuWiki החדש שלך.';
+$lang['i_failure'] = 'מספר שגיאות אירעו בעת כתיבת קובצי התצורה. יתכן כי יהיה צורך לתקנם ידנית לפני שניתן יהיה להשתמש ב־DokuWiki החדש שלך.';
$lang['i_policy'] = 'מדיניות ACL התחלתית';
$lang['i_pol0'] = 'ויקי פתוח (קריאה, כתיבה והעלאה לכולם)';
$lang['i_pol1'] = ' ויקי ציבורי (קריאה לכולם, כתיבה והעלאה למשתמשים רשומים)';
diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php
index a0438d915..ac2a740ef 100644
--- a/inc/lang/hr/lang.php
+++ b/inc/lang/hr/lang.php
@@ -247,8 +247,8 @@ $lang['i_confexists'] = '%s
već postoji';
$lang['i_writeerr'] = 'Ne može se kreirati %s
. Trebate provjeriti dozvole direktorija/datoteke i kreirati dokument ručno.';
$lang['i_badhash'] = 'neprepoznat ili promijenjen dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- nedozvoljena ili prazna vrijednost';
-$lang['i_success'] = 'Konfiguracija je uspješno završena. Sada možete obrisati install.php datoteku. Nastavite na vaš novi DokuWiki.';
-$lang['i_failure'] = 'Pojavile su se neke greške prilikom pisanja konfiguracijskih datoteka. Morati ćete ih ručno ispraviti da bi mogli koristiti vaš novi DokuWiki.';
+$lang['i_success'] = 'Konfiguracija je uspješno završena. Sada možete obrisati install.php datoteku. Nastavite na vaš novi DokuWiki.';
+$lang['i_failure'] = 'Pojavile su se neke greške prilikom pisanja konfiguracijskih datoteka. Morati ćete ih ručno ispraviti da bi mogli koristiti vaš novi DokuWiki.';
$lang['i_policy'] = 'Inicijalna ACL politika';
$lang['i_pol0'] = 'Otvoreni Wiki (čitanje, pisanje, učitavanje za sve)';
$lang['i_pol1'] = 'Javni Wiki (čitanje za sve, pisanje i učitavanje za registrirane korisnike)';
diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php
index 671b225f2..43b79b41b 100644
--- a/inc/lang/hu/lang.php
+++ b/inc/lang/hu/lang.php
@@ -252,8 +252,8 @@ $lang['i_confexists'] = '%s
már létezik.';
$lang['i_writeerr'] = 'Nem tudom ezt létrehozni: %s
. Ellenőrizd a könyvtár/fájl jogosultságokat, és hozd létre az állományt kézzel.';
$lang['i_badhash'] = 'A dokuwiki.php nem felismerhető vagy módosított (hash=%s
)';
$lang['i_badval'] = '%s
- nem helyes vagy üres érték';
-$lang['i_success'] = 'A beállítás sikeresen befejeződött. Most már letörölhető az install.php fájl. Látogasd meg az új DokuWikidet!';
-$lang['i_failure'] = 'Hiba lépett fel a konfigurációs állományok írásakor. Ki kell javítanod kézzel, mielőtt használni kezded az új DokuWikidet.';
+$lang['i_success'] = 'A beállítás sikeresen befejeződött. Most már letörölhető az install.php fájl. Látogasd meg az új DokuWikidet!';
+$lang['i_failure'] = 'Hiba lépett fel a konfigurációs állományok írásakor. Ki kell javítanod kézzel, mielőtt használni kezded az új DokuWikidet.';
$lang['i_policy'] = 'Kezdeti hozzáférési politika';
$lang['i_pol0'] = 'Nyitott Wiki (mindenki olvashatja, írhatja, és fájlokat tölthet fel)';
$lang['i_pol1'] = 'Publikus Wiki (mindenki olvashatja, de csak regisztrált felhasználók írhatják, és tölthetnek fel fájlokat)';
diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php
index d7be1eff3..aff133698 100644
--- a/inc/lang/ia/lang.php
+++ b/inc/lang/ia/lang.php
@@ -247,9 +247,9 @@ $lang['i_writeerr'] = 'Impossibile crear %s
. Tu debe ver
$lang['i_badhash'] = 'dokuwiki.php non recognoscite o modificate (hash=%s
)';
$lang['i_badval'] = '%s
- valor vacue o invalide';
$lang['i_success'] = 'Le configuration ha succedite. Tu pote ora deler le file install.php. Continua a
-tu nove DokuWiki.';
+tu nove DokuWiki.';
$lang['i_failure'] = 'Alcun errores occurreva durante le scriptura del files de configuration. Es possibile que tu debe remediar iste errores manualmente ante que
-tu pote usar tu nove DokuWiki.';
+tu pote usar tu nove DokuWiki.';
$lang['i_policy'] = 'Politica de ACL interne';
$lang['i_pol0'] = 'Wiki aperte (lectura, scriptura, incargamento pro omnes)';
$lang['i_pol1'] = 'Wiki public (lectura pro omnes, scriptura e incargamento pro usatores registrate)';
diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php
index 2302d4f6f..566e8dcb0 100644
--- a/inc/lang/id/lang.php
+++ b/inc/lang/id/lang.php
@@ -188,8 +188,8 @@ $lang['i_confexists'] = '%s
sudah ada';
$lang['i_writeerr'] = 'Tidak dapat membuat %s
. Anda harus memeriksa konfigurasi hak akses direktori/berkas dan membuatnya secara manual.';
$lang['i_badhash'] = 'dokuwiki.php tidak dikenal atau sudah diubah (hash=%s
)';
$lang['i_badval'] = '%s
- tidak valid atau belum diisi';
-$lang['i_success'] = 'Konfigurasi telah berhasil. Anda boleh menghapus berkas install.php sekarang. Lanjutkan ke DokuWiki baru Anda.';
-$lang['i_failure'] = 'Terdapat beberapa kesalahan dalam menulis berkas konfigurasi. Anda harus memperbaikinnya sendiri sebelum dapat menggunakan DokuWiki baru Anda.';
+$lang['i_success'] = 'Konfigurasi telah berhasil. Anda boleh menghapus berkas install.php sekarang. Lanjutkan ke DokuWiki baru Anda.';
+$lang['i_failure'] = 'Terdapat beberapa kesalahan dalam menulis berkas konfigurasi. Anda harus memperbaikinnya sendiri sebelum dapat menggunakan DokuWiki baru Anda.';
$lang['i_policy'] = 'Policy ACL awal';
$lang['i_pol0'] = 'Wiki Terbuka (baca, tulis, upload untuk semua orang)';
$lang['i_pol1'] = 'Wiki Publik (baca untuk semua orang, tulis dan upload untuk pengguna terdaftar)';
diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php
index 70082caae..6ae864f8b 100644
--- a/inc/lang/it/lang.php
+++ b/inc/lang/it/lang.php
@@ -281,8 +281,8 @@ $lang['i_confexists'] = '%s
esiste già';
$lang['i_writeerr'] = 'Impossibile creare %s
. E\' necessario verificare i permessi della directory o del file oppure creare il file manualmente.';
$lang['i_badhash'] = 'dokuwiki.php (hash=%s
) non riconosciuto o modificato';
$lang['i_badval'] = '%s
- valore vuoto o non valido';
-$lang['i_success'] = 'La configurazione è stata completata correttamente. Ora è possibile eliminare il file install.php. Poi, visita il tuo nuovo DokuWiki.';
-$lang['i_failure'] = 'Si sono verificati errori durante la scrittura dei file di configurazione. Potrebbe essere necessario correggerli manualmente prima di poter utilizzare il tuo nuovo DokuWiki.';
+$lang['i_success'] = 'La configurazione è stata completata correttamente. Ora è possibile eliminare il file install.php. Poi, visita il tuo nuovo DokuWiki.';
+$lang['i_failure'] = 'Si sono verificati errori durante la scrittura dei file di configurazione. Potrebbe essere necessario correggerli manualmente prima di poter utilizzare il tuo nuovo DokuWiki.';
$lang['i_policy'] = 'Regole di accesso iniziali';
$lang['i_pol0'] = 'Wiki Aperto (lettura, scrittura, caricamento file per tutti)';
$lang['i_pol1'] = 'Wiki Pubblico (lettura per tutti, scrittura e caricamento file per gli utenti registrati)';
diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php
index 490c84cc9..93300e20e 100644
--- a/inc/lang/ja/lang.php
+++ b/inc/lang/ja/lang.php
@@ -278,8 +278,8 @@ $lang['i_confexists'] = '%s
は既に存在します';
$lang['i_writeerr'] = '%s
を作成できません。ディレクトリとファイルの権限を確認し、それらを手動で作成する必要があります。';
$lang['i_badhash'] = 'dokuwiki.php が認識できないか、編集されています(hash=%s
)';
$lang['i_badval'] = '%s
- 正しくない、もしくは値が空です';
-$lang['i_success'] = '設定ファイルは正しく作成されました。作成した DokuWikiを使用するには install.php を削除してください。';
-$lang['i_failure'] = '設定ファイルの作成中にエラーが発生しました。作成した DokuWikiを使用する前に、それらの問題を手動で修正する必要があります。';
+$lang['i_success'] = '設定ファイルは正しく作成されました。作成した DokuWikiを使用するには install.php を削除してください。';
+$lang['i_failure'] = '設定ファイルの作成中にエラーが発生しました。作成した DokuWikiを使用する前に、それらの問題を手動で修正する必要があります。';
$lang['i_policy'] = 'ACL初期設定';
$lang['i_pol0'] = 'オープン Wiki(全ての人に、閲覧・書き込み・アップロードを許可)';
$lang['i_pol1'] = 'パブリック Wiki(閲覧は全ての人が可能、書き込み・アップロードは登録ユーザーのみ)';
diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php
index 7b4e30a49..1a618f1a7 100644
--- a/inc/lang/ko/lang.php
+++ b/inc/lang/ko/lang.php
@@ -279,8 +279,8 @@ $lang['i_confexists'] = '%s
(은)는 이미 존재합니다
$lang['i_writeerr'] = '%s
(을)를 만들 수 없습니다. 먼저 디렉토리/파일 권한을 확인하고 파일을 수동으로 만들기 바랍니다.';
$lang['i_badhash'] = 'dokuwiki.php를 인식할 수 없거나 원본 파일이 아닙니다. (해시=%s
)';
$lang['i_badval'] = '%s
- 유효하지 않거나 빈 값입니다.';
-$lang['i_success'] = '환경 설정이 성공적으로 끝났습니다. 지금 install.php를 지워도 상관없습니다. 새 DokuWiki로 들어갑니다.';
-$lang['i_failure'] = '환경 설정 파일에 쓰는 도중에 오류가 발생했습니다. 새 DokuWiki를 사용하기 전에 수동으로 문제를 해결할 필요가 있습니다.';
+$lang['i_success'] = '환경 설정이 성공적으로 끝났습니다. 지금 install.php를 지워도 상관없습니다. 새 DokuWiki로 들어갑니다.';
+$lang['i_failure'] = '환경 설정 파일에 쓰는 도중에 오류가 발생했습니다. 새 DokuWiki를 사용하기 전에 수동으로 문제를 해결할 필요가 있습니다.';
$lang['i_policy'] = '초기 ACL 정책';
$lang['i_pol0'] = '열린 위키 (누구나 읽기, 쓰기, 올리기가 가능합니다.)';
$lang['i_pol1'] = '공개 위키 (누구나 읽을 수 있지만, 등록된 사용자만 쓰기와 올리기가 가능합니다.)';
diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php
index 3970f453a..c7d654e96 100644
--- a/inc/lang/la/lang.php
+++ b/inc/lang/la/lang.php
@@ -246,8 +246,8 @@ $lang['i_confexists'] = '%s
iam est.';
$lang['i_writeerr'] = '%s
non creari potest. Manu illum creas.';
$lang['i_badhash'] = 'Ignotum uel mutatum dokuwiki.php (%s
)';
$lang['i_badval'] = '%s
non legitimum uel uacuom';
-$lang['i_success'] = 'Administratio feliciter perficitur. Delere install.php documentum potes. I ad hanc paginam ut continues.';
-$lang['i_failure'] = 'Aliqui errores dum documenta administrantur sunt. Manu onerare omnes potes priusquam tuo nouo uice uteris.';
+$lang['i_success'] = 'Administratio feliciter perficitur. Delere install.php documentum potes. I ad hanc paginam ut continues.';
+$lang['i_failure'] = 'Aliqui errores dum documenta administrantur sunt. Manu onerare omnes potes priusquam tuo nouo uice uteris.';
$lang['i_policy'] = 'ICA ratio prima';
$lang['i_pol0'] = 'Vicem aperire (omnes legere, scribere, onerare possunt)';
$lang['i_pol1'] = 'Publicus uicis (omnes legere, Sodales scribere et onerare possunt)';
diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php
index b02e7f471..67480abfc 100644
--- a/inc/lang/lv/lang.php
+++ b/inc/lang/lv/lang.php
@@ -264,8 +264,8 @@ $lang['i_confexists'] = '%s
jau ir';
$lang['i_writeerr'] = 'Nevar izveidot %s
. Jāpārbauda direktorijas/faila tiesības un fails jāizveido pašam.';
$lang['i_badhash'] = 'nepazīstams vai izmainīts dokuwiki.php fails (hash=%s
)';
$lang['i_badval'] = '%s
- neatļauta vai tukša vērtība';
-$lang['i_success'] = 'Konfigurēšana veiksmīgi pabeigta. Tagad vari nodzēst failu install.php. Tālāk turpini savā jaunajā DokuWiki.';
-$lang['i_failure'] = 'Rakstot konfigurācijas failu, gadījās dažas kļūmes. Pirms lieto savu jauno DokuWiki, tās varbūt jāizlabo.';
+$lang['i_success'] = 'Konfigurēšana veiksmīgi pabeigta. Tagad vari nodzēst failu install.php. Tālāk turpini savā jaunajā DokuWiki.';
+$lang['i_failure'] = 'Rakstot konfigurācijas failu, gadījās dažas kļūmes. Pirms lieto savu jauno DokuWiki, tās varbūt jāizlabo.';
$lang['i_policy'] = 'Sākotnējā ACL politika';
$lang['i_pol0'] = 'Atvērts Wiki (raksta, lasa un augšupielādē ikviens)';
$lang['i_pol1'] = 'Publisks Wiki (lasa ikviens, raksta un augšupielādē reģistrēti lietotāji)';
diff --git a/inc/lang/mk/lang.php b/inc/lang/mk/lang.php
index 62400063c..f04c51e37 100644
--- a/inc/lang/mk/lang.php
+++ b/inc/lang/mk/lang.php
@@ -214,8 +214,8 @@ $lang['i_confexists'] = '%s
веќе постои';
$lang['i_writeerr'] = 'Не може да се креира %s
. Треба да ги проверите пермисиите на директориумот/датотеката и рачно да ја креирате датотеката.';
$lang['i_badhash'] = 'непозната или изменете dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- нелегална или празна вредност';
-$lang['i_success'] = 'Конфигурацијата успешно заврши. Сега можете да ја избришете датотеката install.php. Продолжете до вашето ново DokuWiki.';
-$lang['i_failure'] = 'Се појавија некои грешки при запишувањето на конфигурациските датотеки. Можеби треба да ги поравите рачно пред да можете да го користите вашето ново DokuWiki.';
+$lang['i_success'] = 'Конфигурацијата успешно заврши. Сега можете да ја избришете датотеката install.php. Продолжете до вашето ново DokuWiki.';
+$lang['i_failure'] = 'Се појавија некои грешки при запишувањето на конфигурациските датотеки. Можеби треба да ги поравите рачно пред да можете да го користите вашето ново DokuWiki.';
$lang['i_policy'] = 'Почетна ACL политика';
$lang['i_pol0'] = 'Отвори вики (читај, запиши, качи за сите)';
$lang['i_pol1'] = 'Јавно вики (читај за сите, запиши и качи за регистрирани корисници)';
diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php
index 32781e6d4..c6064a610 100644
--- a/inc/lang/mr/lang.php
+++ b/inc/lang/mr/lang.php
@@ -258,8 +258,8 @@ $lang['i_confexists'] = '%s
आधीच अस्ति
$lang['i_writeerr'] = '%s
निर्माण करू शकलो नाही. तुम्हाला डिरेक्टरी / फाइल च्या परवानग्या तपासून स्वतःच ही फाइल बनवावी लागेल.';
$lang['i_badhash'] = 'अनाकलनीय किंवा बदललेले dokuwiki.php (hash=%s
)';
$lang['i_badval'] = 'code>%s - अवैध किंवा रिकामा मजकूर.';
-$lang['i_success'] = 'व्यवस्था लावण्याचे काम यशस्वीरीत्या पार पडले. आता तुम्ही install.php डिलीट करू शकता. तुमच्या नविन डॉक्युविकि वर जा.';
-$lang['i_failure'] = 'कॉन्फिगुरेशनच्या फाइल सुरक्षित करताना काही अडचणी आल्या आहेत. तुमची नवीन डॉक्युविकि वापरण्याआधी तुम्हाला ह्या फाइल स्वतः ठीक कराव्या लागतील.';
+$lang['i_success'] = 'व्यवस्था लावण्याचे काम यशस्वीरीत्या पार पडले. आता तुम्ही install.php डिलीट करू शकता. तुमच्या नविन डॉक्युविकि वर जा.';
+$lang['i_failure'] = 'कॉन्फिगुरेशनच्या फाइल सुरक्षित करताना काही अडचणी आल्या आहेत. तुमची नवीन डॉक्युविकि वापरण्याआधी तुम्हाला ह्या फाइल स्वतः ठीक कराव्या लागतील.';
$lang['i_policy'] = 'आरंभीची ACL पॉलिसी';
$lang['i_pol0'] = 'मुक्त विकी ( सर्वांना वाचन, लेखन व अपलोड करण्याची परवानगी )';
$lang['i_pol1'] = 'सार्वजनिक विकी ( सर्वांना वाचण्याची मुभा , लेखन व अपलोडची परवानगी फक्त नोंदणीकृत सदस्यांना )';
diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php
index 82ca389f7..bde40a670 100644
--- a/inc/lang/ne/lang.php
+++ b/inc/lang/ne/lang.php
@@ -191,8 +191,8 @@ $lang['i_confexists'] = '%s
पहिले देखि
$lang['i_writeerr'] = '%s
बनाउन असमर्थ । तपाईले डाइरेक्टरी / फाइल अनुमति जाच्नु पर्छ र फाइल आफैले बनाउनु पर्छ ।';
$lang['i_badhash'] = 'पहिचान हुन नसकेको वा परिवर्तित okuwiki.php (hash=code>%s)';
$lang['i_badval'] = '%s
- अवैध वा रित्तो मान ';
-$lang['i_success'] = 'स्थापना सफलरुपमा समाप्त भयो ।तपाई install.php मेट्न सक्नुहु्न्छ । तपाईको नयाँ DokuWiki निरन्तर गर्न सक्नुहुन्छ ।';
-$lang['i_failure'] = 'स्थापना समयमा केहि त्रुटि फेला पर्यो ।तपाईले आफैले यसलाई तपाईको नयाँ DokuWiki प्रयोग गर्नु अगि सच्याउनुपर्ने हुन्छ ।';
+$lang['i_success'] = 'स्थापना सफलरुपमा समाप्त भयो ।तपाई install.php मेट्न सक्नुहु्न्छ । तपाईको नयाँ DokuWiki निरन्तर गर्न सक्नुहुन्छ ।';
+$lang['i_failure'] = 'स्थापना समयमा केहि त्रुटि फेला पर्यो ।तपाईले आफैले यसलाई तपाईको नयाँ DokuWiki प्रयोग गर्नु अगि सच्याउनुपर्ने हुन्छ ।';
$lang['i_policy'] = 'सुरुको ACL निति';
$lang['i_pol0'] = 'खुल्ला विकि (पठन, लेखन , अपलोड ) सबैका लागि';
$lang['i_pol1'] = 'Public विकि (पठन सवैका लागि,लेखन र अपलोड दर्ता गरिएका प्रयपगकर्ताका लागि ) ';
diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php
index 911ffdc10..6d14a0e4b 100644
--- a/inc/lang/nl/lang.php
+++ b/inc/lang/nl/lang.php
@@ -286,8 +286,8 @@ $lang['i_confexists'] = '%s
bestaat reeds';
$lang['i_writeerr'] = 'Niet mogelijk om %s
aan te maken. Controleer de directory/bestandspermissies en maak het bestand handmatig aan.';
$lang['i_badhash'] = 'Onbekende of aangepaste dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- onjuiste of lege waarde';
-$lang['i_success'] = 'De configuratie is succesvol afgerond. Je kunt nu het bestand install.php verwijderen. Ga naar je nieuwe DokuWiki.';
-$lang['i_failure'] = 'Fouten deden zich voor tijdens het schrijven naar de configuratiebestanden. Pas deze aan voor je gebruik kunt maken van je nieuwe DokuWiki.';
+$lang['i_success'] = 'De configuratie is succesvol afgerond. Je kunt nu het bestand install.php verwijderen. Ga naar je nieuwe DokuWiki.';
+$lang['i_failure'] = 'Fouten deden zich voor tijdens het schrijven naar de configuratiebestanden. Pas deze aan voor je gebruik kunt maken van je nieuwe DokuWiki.';
$lang['i_policy'] = 'Initieel ACL-beleid';
$lang['i_pol0'] = 'Open wiki (lezen, schrijven, uploaden voor iedereen)';
$lang['i_pol1'] = 'Publieke wiki (lezen voor iedereen, schrijven en uploaden voor geregistreerde gebruikers)';
diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php
index 97ef741ef..81aa39612 100644
--- a/inc/lang/no/lang.php
+++ b/inc/lang/no/lang.php
@@ -282,9 +282,9 @@ $lang['i_writeerr'] = 'Kunne ikke opprette %s
. Du må sj
$lang['i_badhash'] = 'ikke gjenkjent eller modifisert dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- ugyldig eller tom verdi';
$lang['i_success'] = 'Konfigurasjonen ble vellykket fullført. Du kan slette install.php filen nå. Fortsett til
- din nye DokuWiki.';
+ din nye DokuWiki.';
$lang['i_failure'] = 'En eller flere feil oppstod ved skriving til konfigurasjonsfilene. Du må kanskje fikse dem manuelt før
- du kan bruke din nye DokuWiki.';
+ du kan bruke din nye DokuWiki.';
$lang['i_policy'] = 'Innledende ACL-politikk';
$lang['i_pol0'] = 'Åpen Wiki (les, skriv og opplasting for alle)';
$lang['i_pol1'] = 'Offentlig Wiki (les for alle, skriving og opplasting bare for registrerte brukere)';
diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php
index 79d18bbf5..0f0381e8f 100644
--- a/inc/lang/pl/lang.php
+++ b/inc/lang/pl/lang.php
@@ -285,8 +285,8 @@ $lang['i_confexists'] = '%s
już istnieje';
$lang['i_writeerr'] = 'Nie można utworzyć %s
. Sprawdź uprawnienia do katalogu lub pliku i stwórz plik ręcznie.';
$lang['i_badhash'] = 'nierozpoznany lub zmodyfikowany plik dokuwiki.php (skrót=%s
)';
$lang['i_badval'] = '%s
- nieprawidłowa wartość lub jej brak';
-$lang['i_success'] = 'Konfiguracja pomyślnie zakończona. Możesz teraz usunąć plik install.php. Przejdź do Twojego nowego DokuWiki.';
-$lang['i_failure'] = 'Podczas zapisu plików konfiguracyjnych wystąpiły błędy. Musisz usunąć wszystkie problemy, zanim zaczniesz korzystać z Twojego nowego DokuWiki.';
+$lang['i_success'] = 'Konfiguracja pomyślnie zakończona. Możesz teraz usunąć plik install.php. Przejdź do Twojego nowego DokuWiki.';
+$lang['i_failure'] = 'Podczas zapisu plików konfiguracyjnych wystąpiły błędy. Musisz usunąć wszystkie problemy, zanim zaczniesz korzystać z Twojego nowego DokuWiki.';
$lang['i_policy'] = 'Wstępna polityka uprawnień ACL';
$lang['i_pol0'] = 'Otwarte Wiki (odczyt, zapis i dodawanie plików dla wszystkich)';
$lang['i_pol1'] = 'Publiczne Wiki (odczyt dla wszystkich, zapis i dodawanie plików tylko dla zarejestrowanych użytkowników)';
diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php
index d6dc8f96b..26a73bfae 100644
--- a/inc/lang/pt-br/lang.php
+++ b/inc/lang/pt-br/lang.php
@@ -261,8 +261,8 @@ $lang['i_confexists'] = '%s
já existe';
$lang['i_writeerr'] = 'Não foi possível criar %s
. É necessário checar as permissões de arquivos/diretórios e criar o arquivo manualmente.';
$lang['i_badhash'] = 'dokuwiki.php não reconhecido ou modificado (hash=%s
)';
$lang['i_badval'] = '%s
- valor ilegal ou em branco';
-$lang['i_success'] = 'A configuração terminou com sucesso. Agora você deve excluir o arquivo install.php. Conheça o seu novo DokuWiki!';
-$lang['i_failure'] = 'Ocorreram alguns erros durante a escrita dos arquivos de configuração. É necessário corrigi-los manualmente antes de usar seu novo DokuWiki';
+$lang['i_success'] = 'A configuração terminou com sucesso. Agora você deve excluir o arquivo install.php. Conheça o seu novo DokuWiki!';
+$lang['i_failure'] = 'Ocorreram alguns erros durante a escrita dos arquivos de configuração. É necessário corrigi-los manualmente antes de usar seu novo DokuWiki';
$lang['i_policy'] = 'Política inicial de permissões';
$lang['i_pol0'] = 'Wiki aberto (leitura, escrita e envio de arquivos por todos)';
$lang['i_pol1'] = 'Wiki público (leitura por todos, escrita e envio de arquivos por usuários registrados)';
diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php
index a0b0f57e8..37b3fba8c 100644
--- a/inc/lang/pt/lang.php
+++ b/inc/lang/pt/lang.php
@@ -268,8 +268,8 @@ $lang['i_confexists'] = '%s
já existe';
$lang['i_writeerr'] = 'Não foi possível criar %s
. É preciso verificar as permissões e criar o ficheiro manualmente.';
$lang['i_badhash'] = 'dokuwiki.php não é o original ou não é reconhecido (hash=%s
)';
$lang['i_badval'] = '%s
- valor ilegal ou vazio';
-$lang['i_success'] = 'A instalação e configuração inicial foram bem sucedidas. Pode remover o install.php. Aceda ao seu novo Wiki a correr o DokuWiki.';
-$lang['i_failure'] = 'Ocorreram alguns erros durante a escrita nos ficheiros de configuração. Poderá ser preciso corrigi-los manualmente antes de poder aceder ao seu novo Wiki a correr o DokuWiki.';
+$lang['i_success'] = 'A instalação e configuração inicial foram bem sucedidas. Pode remover o install.php. Aceda ao seu novo Wiki a correr o DokuWiki.';
+$lang['i_failure'] = 'Ocorreram alguns erros durante a escrita nos ficheiros de configuração. Poderá ser preciso corrigi-los manualmente antes de poder aceder ao seu novo Wiki a correr o DokuWiki.';
$lang['i_policy'] = 'Politica ACL inicial';
$lang['i_pol0'] = 'Wiki Aberto (ler, escrever e carregar para todos)';
$lang['i_pol1'] = 'Wiki Público (ler para todos, escrever e carregar para utilizadores inscritos)';
diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php
index 41727e521..cb8e2ed0c 100644
--- a/inc/lang/ro/lang.php
+++ b/inc/lang/ro/lang.php
@@ -280,8 +280,8 @@ $lang['i_confexists'] = '%s
există deja';
$lang['i_writeerr'] = 'Nu s-a putut crea %s
. Trebuie să verificaţi drepturile directorului/fişierului şi să creaţi fişierul manual.';
$lang['i_badhash'] = 'dokuwiki.php nu a fost recunoscut sau a fost modificat (hash=%s
)';
$lang['i_badval'] = '%s
- valoare nepemisă sau neintrodusă';
-$lang['i_success'] = 'Configurarea a fost finalizată cu succes. Acum puteţi sterge fişierul install.php. Continuaţi cu your new DokuWiki.';
-$lang['i_failure'] = 'Au apărut erori la scrierea fişierelor de configurare. Va trebui să le corectaţi manual înainte de a putea folosi your new DokuWiki.';
+$lang['i_success'] = 'Configurarea a fost finalizată cu succes. Acum puteţi sterge fişierul install.php. Continuaţi cu your new DokuWiki.';
+$lang['i_failure'] = 'Au apărut erori la scrierea fişierelor de configurare. Va trebui să le corectaţi manual înainte de a putea folosi your new DokuWiki.';
$lang['i_policy'] = 'Politica ACL iniţială';
$lang['i_pol0'] = 'Wiki Deschisă (citeşte, scrie şi încarcă oricine)';
$lang['i_pol1'] = 'Wiki Deschisă (citeste oricine, scrie şi încarcă doar utilizatorul înregistrat)';
diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php
index 4c3d26b1d..920bc907f 100644
--- a/inc/lang/ru/lang.php
+++ b/inc/lang/ru/lang.php
@@ -291,8 +291,8 @@ $lang['i_writeerr'] = 'Не удалось создать %s%s
)';
$lang['i_badval'] = '%s
— недопустимое или пустое значение';
$lang['i_success'] = 'Конфигурация прошла успешно. Теперь вы можете удалить файл install.php. Переходите к
- своей новой «ДокуВики».';
-$lang['i_failure'] = 'При записи в файлы конфигурации были обнаружены ошибки. Возможно, вам придётся исправить их вручную, прежде чем вы сможете использовать свою новую «ДокуВики».';
+ своей новой «ДокуВики».';
+$lang['i_failure'] = 'При записи в файлы конфигурации были обнаружены ошибки. Возможно, вам придётся исправить их вручную, прежде чем вы сможете использовать свою новую «ДокуВики».';
$lang['i_policy'] = 'Исходная политика прав доступа';
$lang['i_pol0'] = 'Открытая вики (чтение, запись, закачка файлов для всех)';
$lang['i_pol1'] = 'Общедоступная вики (чтение для всех, запись и загрузка файлов для зарегистрированных пользователей)';
diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php
index 85e899b06..79a13ac35 100644
--- a/inc/lang/sk/lang.php
+++ b/inc/lang/sk/lang.php
@@ -268,8 +268,8 @@ $lang['i_confexists'] = '%s
už existuje';
$lang['i_writeerr'] = 'Nie je možné vytvoriť %s
. Potrebujete skontrolovať prístupové práva pre adresár/súbor a vytvoriť ho manuálne.';
$lang['i_badhash'] = 'neznámy alebo zmenený súbor dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- nesprávna alebo žiadna hodnota';
-$lang['i_success'] = 'Konfigurácia bola úspešne ukončená. Teraz môžete zmazať súbor install.php. Pokračujte vo vašej novej DokuWiki.';
-$lang['i_failure'] = 'Pri zápise konfiguračného súboru nastali nejaké chyby. Potrebujete ich opraviť manuálne pred tým, ako budete môcť používať vašu novú DokuWiki.';
+$lang['i_success'] = 'Konfigurácia bola úspešne ukončená. Teraz môžete zmazať súbor install.php. Pokračujte vo vašej novej DokuWiki.';
+$lang['i_failure'] = 'Pri zápise konfiguračného súboru nastali nejaké chyby. Potrebujete ich opraviť manuálne pred tým, ako budete môcť používať vašu novú DokuWiki.';
$lang['i_policy'] = 'Počiatočná ACL politika';
$lang['i_pol0'] = 'Otvorená Wiki (čítanie, zápis a nahrávanie pre každého)';
$lang['i_pol1'] = 'Verejná Wiki (čítanie pre každého, zápis a nahrávanie pre registrovaných užívateľov)';
diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php
index b34ab67e4..7cd16f7ed 100644
--- a/inc/lang/sl/lang.php
+++ b/inc/lang/sl/lang.php
@@ -271,8 +271,8 @@ $lang['i_confexists'] = 'Predmet %s
že obstaja.';
$lang['i_writeerr'] = 'Ni mogoče ustvariti predmeta %s
. Preveriti je treba dovoljenja datotek in map in nato ustvariti datoteko ročno.';
$lang['i_badhash'] = 'nepoznana ali spremenjena datoteka dokuwiki.php (razpršilo=%s
)';
$lang['i_badval'] = '%s
- neveljavna ali prazna vrednost';
-$lang['i_success'] = 'Nastavitev je uspešno končana. Datoteko install.php lahko sedaj izbrišete. Nadaljujte v novi DokuWiki.';
-$lang['i_failure'] = 'Med zapisovanjem nastavitvenih datotek je prišlo do napak. Preden lahko uporabite vaš DokuWiki, jih je treba odpraviti.';
+$lang['i_success'] = 'Nastavitev je uspešno končana. Datoteko install.php lahko sedaj izbrišete. Nadaljujte v novi DokuWiki.';
+$lang['i_failure'] = 'Med zapisovanjem nastavitvenih datotek je prišlo do napak. Preden lahko uporabite vaš DokuWiki, jih je treba odpraviti.';
$lang['i_policy'] = 'Začetna določila ACL';
$lang['i_pol0'] = 'Odprt Wiki (branje, zapis, nalaganje datotek je javno za vse)';
$lang['i_pol1'] = 'Javni Wiki (branje za vse, zapis in nalaganje datotek za prijavljene uporabnike)';
diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php
index 0e56b89d9..3c58d708d 100644
--- a/inc/lang/sq/lang.php
+++ b/inc/lang/sq/lang.php
@@ -223,8 +223,8 @@ $lang['i_confexists'] = '%s
ekziston njëherë';
$lang['i_writeerr'] = '%s
nuk mundi të krijohej. Duhet të kontrolloni lejet e dirkektorisë/skedarit dhe ta krijoni skedarin manualisht.';
$lang['i_badhash'] = 'dokuwiki.php e panjohur ose e ndryshuar (hash=code>%s)';
$lang['i_badval'] = '%s
- vlerë e palejuar ose boshe';
-$lang['i_success'] = 'Konfigurimi u mbarua me sukses. Tani mund ta fshini skedarin install.php. Vazhdoni tek DokuWiki juaj i ri..';
-$lang['i_failure'] = 'Ndodhën disa gabime gjatë shkrimit të skedarit të konfigurimit. Do t\'ju duhet t\'i rregulloni manualisht para se të përdorni DokuWiki-in tuaj të ri..';
+$lang['i_success'] = 'Konfigurimi u mbarua me sukses. Tani mund ta fshini skedarin install.php. Vazhdoni tek DokuWiki juaj i ri..';
+$lang['i_failure'] = 'Ndodhën disa gabime gjatë shkrimit të skedarit të konfigurimit. Do t\'ju duhet t\'i rregulloni manualisht para se të përdorni DokuWiki-in tuaj të ri..';
$lang['i_policy'] = 'Veprimi fillestar ACL';
$lang['i_pol0'] = 'Wiki i Hapur (lexim, shkrim, ngarkim për këdo)';
$lang['i_pol1'] = 'Wiki Publike (lexim për këdo, shkrim dhe ngarkim për përdoruesit e regjistruar)';
diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php
index a53f14ac9..875b1d695 100644
--- a/inc/lang/sr/lang.php
+++ b/inc/lang/sr/lang.php
@@ -244,8 +244,8 @@ $lang['i_confexists'] = '%s
већ постоји';
$lang['i_writeerr'] = 'Не могу да направим %s
. Проверите дозволе а затим ручно направите ову датотеку.';
$lang['i_badhash'] = 'dokuwiki.php није препознат или је измењен (hash=%s
)';
$lang['i_badval'] = '%s
- недозвољена или празна вредност';
-$lang['i_success'] = 'Подешавања су завршена. Сада можете обрисати датотеку install.php. Наставите у Ваш нови DokuWiki.';
-$lang['i_failure'] = 'Појавили су се проблеми при писању датотеке са подешавањима. Требало би да их ручно исправите пре него што ћете моћи да користите Ваш нови DokuWiki.';
+$lang['i_success'] = 'Подешавања су завршена. Сада можете обрисати датотеку install.php. Наставите у Ваш нови DokuWiki.';
+$lang['i_failure'] = 'Појавили су се проблеми при писању датотеке са подешавањима. Требало би да их ручно исправите пре него што ћете моћи да користите Ваш нови DokuWiki.';
$lang['i_policy'] = 'Иницијалне корисничке дозволе';
$lang['i_pol0'] = 'Отворени вики (читање, писање, слање датотека за све)';
$lang['i_pol1'] = 'Јавни вики (читање за све, писање и слање датотека само за регистроване кориснике)';
diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php
index 0c8f3276d..4cc97e8c6 100644
--- a/inc/lang/sv/lang.php
+++ b/inc/lang/sv/lang.php
@@ -246,9 +246,9 @@ $lang['i_writeerr'] = 'Kan inte skapa %s
. Kontrollera fi
$lang['i_badhash'] = 'okänd eller ändrad dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- felaktig eller blank';
$lang['i_success'] = 'Konfigurationen avslutades utan fel. Du kan radera filen install.php nu. Fortsätt till
- din nya DokuWiki.';
+ din nya DokuWiki.';
$lang['i_failure'] = 'Fel uppstod vid skrivning av konfigurationsfilerna. Du kan behöva ordna till dem manuellt innan
- du kan använda din nya DokuWiki.';
+ du kan använda din nya DokuWiki.';
$lang['i_policy'] = 'Initial ACL-policy';
$lang['i_pol0'] = 'Öppen wiki (alla får läsa, skriva och ladda upp filer)';
$lang['i_pol1'] = 'Publik wiki (alla får läsa, registrerade användare för skriva och ladda upp filer)';
diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php
index 77518ac36..cf75aac9d 100644
--- a/inc/lang/tr/lang.php
+++ b/inc/lang/tr/lang.php
@@ -225,8 +225,8 @@ $lang['i_confexists'] = '%s
zaten var';
$lang['i_writeerr'] = '%s
oluşturulamadı. Dosya/Klasör izin ayarlarını gözden geçirip dosyayı elle oluşturmalısınız.';
$lang['i_badhash'] = 'dokuwiki.php tanınamadı ya da değiştirilmiş (hash=%s
)';
$lang['i_badval'] = '%s
- Yanlış veya boş değer';
-$lang['i_success'] = 'Kurulum başarıyla tamamlandı. Şimdi install.php dosyasını silebilirsiniz. Yeni DokuWikinizi kullanabilirsiniz.';
-$lang['i_failure'] = 'Ayar dosyalarını yazarken bazı hatalar oluştu. Yeni DokuWikinizi kullanmadan önce bu hatalarınızı elle düzeltmeniz gerekebilir.';
+$lang['i_success'] = 'Kurulum başarıyla tamamlandı. Şimdi install.php dosyasını silebilirsiniz. Yeni DokuWikinizi kullanabilirsiniz.';
+$lang['i_failure'] = 'Ayar dosyalarını yazarken bazı hatalar oluştu. Yeni DokuWikinizi kullanmadan önce bu hatalarınızı elle düzeltmeniz gerekebilir.';
$lang['i_policy'] = 'İlk ACL ayarı';
$lang['i_pol0'] = 'Tamamen Açık Wiki (herkes okuyabilir, yazabilir ve dosya yükleyebilir)';
$lang['i_pol1'] = 'Açık Wiki (herkes okuyabilir, ancak sadece üye olanlar yazabilir ve dosya yükleyebilir)';
diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php
index b06cb9158..e38db2300 100644
--- a/inc/lang/uk/lang.php
+++ b/inc/lang/uk/lang.php
@@ -253,9 +253,9 @@ $lang['i_writeerr'] = 'Неможливо створити %s
$lang['i_badhash'] = 'Невпізнаний або модифікований dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- невірне або пусте значення.';
$lang['i_success'] = 'Налаштування завершено. Ви можете знищити файл install.php.
-Перейдіть до вашої нової ДокуВікі';
+Перейдіть до вашої нової ДокуВікі';
$lang['i_failure'] = 'При збереженні файлу конфігурації виникли помилки. Можливо вам доведеться виправити їх самостійно
-до початку використання вашої нової ДокуВікі.';
+до початку використання вашої нової ДокуВікі.';
$lang['i_policy'] = 'Початкова політика ACL';
$lang['i_pol0'] = 'Відкрита Вікі (читання, запис та завантаження файлів для всіх)';
$lang['i_pol1'] = 'Публічна Вікі (читання для всіх, запис та завантаження для зареєстрованих користувачів)';
diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php
index bbbbb71a6..41c79f57c 100644
--- a/inc/lang/zh-tw/lang.php
+++ b/inc/lang/zh-tw/lang.php
@@ -272,8 +272,8 @@ $lang['i_writeerr'] = '無法建立 %s
。您必須檢查
$lang['i_badhash'] = '無法辨識或被變更的 dokuwiki.php (hash=%s
)';
$lang['i_badval'] = '%s
- 非法或空白的值';
$lang['i_success'] = '設定已成功完成。您現在可以刪除 install.php 檔案。繼續到
-您的新 DokuWiki.';
-$lang['i_failure'] = '寫入設定檔時發生了一些錯誤。您必須在使用您的新 Dokuwiki 之前手動修正它們。';
+您的新 DokuWiki.';
+$lang['i_failure'] = '寫入設定檔時發生了一些錯誤。您必須在使用您的新 Dokuwiki 之前手動修正它們。';
$lang['i_policy'] = '初步的 ACL 政策';
$lang['i_pol0'] = '開放的維基 (任何人可讀取、寫入、上傳)';
$lang['i_pol1'] = '公開的維基 (任何人可讀取,註冊使用者可寫入與上傳)';
diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php
index 9ea0f5e7f..8b9644262 100644
--- a/inc/lang/zh/lang.php
+++ b/inc/lang/zh/lang.php
@@ -288,8 +288,8 @@ $lang['i_writeerr'] = '无法创建 %s
。您需要检查
$lang['i_badhash'] = '无法识别的或被修改的 dokuwiki.php(值=%s
)';
$lang['i_badval'] = '%s
- 非法或空值';
$lang['i_success'] = '配置成功完成。您现在可以删除 install.php 了。继续进入
- 您全新的 DokuWiki。';
-$lang['i_failure'] = '写入配置文件的时候产生一些错误。在使用 您全新安装的 DokuWiki 前
+ 您全新的 DokuWiki。';
+$lang['i_failure'] = '写入配置文件的时候产生一些错误。在使用 您全新安装的 DokuWiki 前
您需要手动修复它们。';
$lang['i_policy'] = '初始的 ACL 政策';
$lang['i_pol0'] = '开放的维基(任何人都有读、写、上传的权限)';
--
cgit v1.2.3
From b1730bd21bd9ce8807b80c4cfb044858c7af60d8 Mon Sep 17 00:00:00 2001
From: Tom N Harris
Date: Tue, 17 Jul 2012 19:45:48 -0400
Subject: Translatable string for "None" license selection
The position of the option was moved to the end of the list so
the English label "None of the above" will make sense.
---
inc/lang/en/lang.php | 1 +
1 file changed, 1 insertion(+)
(limited to 'inc')
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index 3c51ba224..2592b9a5c 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -311,6 +311,7 @@ $lang['i_pol1'] = 'Public Wiki (read for everyone, write and uplo
$lang['i_pol2'] = 'Closed Wiki (read, write, upload for registered users only)';
$lang['i_retry'] = 'Retry';
$lang['i_license'] = 'Please choose the license you want to put your content under:';
+$lang['i_license_none'] = 'None of the above';
$lang['recent_global'] = 'You\'re currently watching the changes inside the %s namespace. You can also view the recent changes of the whole wiki.';
$lang['years'] = '%d years ago';
--
cgit v1.2.3
From 1ea7a6bada66fc9b7a45f61b4892e4ea23196d89 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sat, 28 Jul 2012 14:55:45 +0200
Subject: support CONNECT for tunneling SSL via HTTP proxies FS#2431
The included test cases currently expect a squid at localhost:3128
---
inc/HTTPClient.php | 66 +++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 61 insertions(+), 5 deletions(-)
(limited to 'inc')
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index a25846c31..8d2c10be1 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -254,11 +254,7 @@ class HTTPClient {
if(!empty($uri['port'])) $headers['Host'].= ':'.$uri['port'];
$headers['User-Agent'] = $this->agent;
$headers['Referer'] = $this->referer;
- if ($this->keep_alive) {
- $headers['Connection'] = 'Keep-Alive';
- } else {
- $headers['Connection'] = 'Close';
- }
+
if($method == 'POST'){
if(is_array($data)){
if($headers['Content-Type'] == 'multipart/form-data'){
@@ -299,6 +295,14 @@ class HTTPClient {
return false;
}
+ // try establish a CONNECT tunnel for SSL
+ if($this->_ssltunnel($socket, $request_url)){
+ // no keep alive for tunnels
+ $this->keep_alive = false;
+ // tunnel is authed already
+ if(isset($headers['Proxy-Authentication'])) unset($headers['Proxy-Authentication']);
+ }
+
// keep alive?
if ($this->keep_alive) {
self::$connections[$connectionId] = $socket;
@@ -307,6 +311,15 @@ class HTTPClient {
}
}
+ if ($this->keep_alive && !$this->proxy_host) {
+ // RFC 2068, section 19.7.1: A client MUST NOT send the Keep-Alive
+ // connection token to a proxy server. We still do keep the connection the
+ // proxy alive (well except for CONNECT tunnels)
+ $headers['Connection'] = 'Keep-Alive';
+ } else {
+ $headers['Connection'] = 'Close';
+ }
+
try {
//set non-blocking
stream_set_blocking($socket, false);
@@ -484,6 +497,49 @@ class HTTPClient {
return true;
}
+ /**
+ * Tries to establish a CONNECT tunnel via Proxy
+ *
+ * Protocol, Servername and Port will be stripped from the request URL when a successful CONNECT happened
+ *
+ * @param ressource &$socket
+ * @param string &$requesturl
+ * @return bool true if a tunnel was established
+ */
+ function _ssltunnel(&$socket, &$requesturl){
+ if(!$this->proxy_host) return false;
+ $requestinfo = parse_url($requesturl);
+ if($requestinfo['scheme'] != 'https') return false;
+ if(!$requestinfo['port']) $requestinfo['port'] = 443;
+
+ // build request
+ $request = "CONNECT {$requestinfo['host']}:{$requestinfo['port']} HTTP/1.0".HTTP_NL;
+ $request .= "Host: {$requestinfo['host']}".HTTP_NL;
+ if($this->proxy_user) {
+ 'Proxy-Authorization Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass).HTTP_NL;
+ }
+ $request .= HTTP_NL;
+
+ $this->_debug('SSL Tunnel CONNECT',$request);
+ $this->_sendData($socket, $request, 'SSL Tunnel CONNECT');
+
+ // read headers from socket
+ $r_headers = '';
+ do{
+ $r_line = $this->_readLine($socket, 'headers');
+ $r_headers .= $r_line;
+ }while($r_line != "\r\n" && $r_line != "\n");
+
+ $this->_debug('SSL Tunnel Response',$r_headers);
+ if(preg_match('/^HTTP\/1\.0 200/i',$r_headers)){
+ if (stream_socket_enable_crypto($socket, true, STREAM_CRYPTO_METHOD_SSLv3_CLIENT)) {
+ $requesturl = $requestinfo['path'];
+ return true;
+ }
+ }
+ return false;
+ }
+
/**
* Safely write data to a socket
*
--
cgit v1.2.3
From 2240ea1f316156f3cb4475ea23a16246c999b6f0 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 12 Aug 2012 12:00:37 +0200
Subject: first start at refactoring the subscription system BROKEN
This introduces a class for nicer wrapping and easier testing. Some
functions were changed to provide nicer APIs (no throwing around of
unescaped regexps) and to simplify things (hopefully).
The refactoring isn't completed yet, so this will break the subscription
system.
The goal is to move as much subscription related stuff to this class as
possible. Currently there is some code in lib/exe/indexer.php and maybe
elsewhere (common.php?). Additionally everything should be covered by
tests. A few tests are included here already.
---
inc/load.php | 1 +
inc/subscription.php | 724 ++++++++++++++++++++++++++-------------------------
2 files changed, 376 insertions(+), 349 deletions(-)
(limited to 'inc')
diff --git a/inc/load.php b/inc/load.php
index b676518e7..bd6d39814 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -81,6 +81,7 @@ function load_autoload($name){
'Mailer' => DOKU_INC.'inc/Mailer.class.php',
'RemoteAPI' => DOKU_INC.'inc/remote.php',
'RemoteAPICore' => DOKU_INC.'inc/RemoteAPICore.php',
+ 'Subscription' => DOKU_INC.'inc/subscription.php',
'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php',
'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php',
diff --git a/inc/subscription.php b/inc/subscription.php
index 1f1aedfa4..856836cd5 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -12,399 +12,425 @@
* - subscription_lock
* - subscription_unlock
*
+ * @fixme handle $conf['subscribers'] and disable actions
+ *
* @author Adrian Lang
+ * @author Andreas Gohr
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
-/**
- * Get the name of the metafile tracking subscriptions to target page or
- * namespace
- *
- * @author Adrian Lang
- *
- * @param string $id The target page or namespace, specified by id; Namespaces
- * are identified by appending a colon.
- * @return string
- */
-function subscription_filename($id) {
- $meta_fname = '.mlist';
- if ((substr($id, -1, 1) === ':')) {
- $meta_froot = getNS($id);
- $meta_fname = '/' . $meta_fname;
- } else {
- $meta_froot = $id;
+class Subscription {
+
+ /**
+ * Return the subscription meta file for the given ID
+ *
+ * @author Adrian Lang
+ *
+ * @param string $id The target page or namespace, specified by id; Namespaces
+ * are identified by appending a colon.
+ * @return string
+ */
+ protected function file($id) {
+ $meta_fname = '.mlist';
+ if((substr($id, -1, 1) === ':')) {
+ $meta_froot = getNS($id);
+ $meta_fname = '/'.$meta_fname;
+ } else {
+ $meta_froot = $id;
+ }
+ return metaFN((string) $meta_froot, $meta_fname);
}
- return metaFN((string) $meta_froot, $meta_fname);
-}
-/**
- * Lock subscription info for an ID
- *
- * @author Adrian Lang
- * @param string $id The target page or namespace, specified by id; Namespaces
- * are identified by appending a colon.
- * @return string
- */
-function subscription_lock_filename ($id){
- global $conf;
- return $conf['lockdir'].'/_subscr_' . md5($id) . '.lock';
-}
+ /**
+ * Lock subscription info
+ *
+ * We don't use io_lock() her because we do not wait for the lock and use a larger stale time
+ *
+ * @author Adrian Lang
+ * @param string $id The target page or namespace, specified by id; Namespaces
+ * are identified by appending a colon.
+ * @return bool true, if you got a succesful lock
+ */
+ protected function lock($id) {
+ global $conf;
-/**
- * Creates a lock file for writing subscription data
- *
- * @todo add lock time parameter to io_lock() and use this instead
- * @param $id
- * @return bool
- */
-function subscription_lock($id) {
- global $conf;
- $lock = subscription_lock_filename($id);
+ $lock = $conf['lockdir'].'/_subscr_'.md5($id).'.lock';
- if (is_dir($lock) && time()-@filemtime($lock) > 60*5) {
- // looks like a stale lock - remove it
- @rmdir($lock);
+ if(is_dir($lock) && time() - @filemtime($lock) > 60 * 5) {
+ // looks like a stale lock - remove it
+ @rmdir($lock);
+ }
+
+ // try creating the lock directory
+ if(!@mkdir($lock, $conf['dmode'])) {
+ return false;
+ }
+
+ if($conf['dperm']) chmod($lock, $conf['dperm']);
+ return true;
}
- // try creating the lock directory
- if (!@mkdir($lock,$conf['dmode'])) {
- return false;
+ /**
+ * Unlock subscription info
+ *
+ * @author Adrian Lang
+ * @param string $id The target page or namespace, specified by id; Namespaces
+ * are identified by appending a colon.
+ * @return bool
+ */
+ protected function unlock($id) {
+ global $conf;
+ $lock = $conf['lockdir'].'/_subscr_'.md5($id).'.lock';
+ return @rmdir($lock);
}
- if($conf['dperm']) chmod($lock, $conf['dperm']);
- return true;
-}
+ /**
+ * Construct a regular expression for parsing a subscription definition line
+ *
+ * @author Andreas Gohr
+ *
+ * @param string|array $user
+ * @param string|array $style
+ * @param string|array $data
+ * @return string complete regexp including delimiters
+ * @throws Exception when no data is passed
+ */
+ protected function buildregex($user = null, $style = null, $data = null) {
+ // always work with arrays
+ $user = (array) $user;
+ $style = (array) $style;
+ $data = (array) $data;
-/**
- * Unlock subscription info for an ID
- *
- * @author Adrian Lang
- * @param string $id The target page or namespace, specified by id; Namespaces
- * are identified by appending a colon.
- * @return bool
- */
-function subscription_unlock($id) {
- $lockf = subscription_lock_filename($id);
- return @rmdir($lockf);
-}
+ // clean
+ $user = array_filter(array_map('trim', $user));
+ $style = array_filter(array_map('trim', $style));
+ $data = array_filter(array_map('trim', $data));
-/**
- * Set subscription information
- *
- * Allows to set subscription information for permanent storage in meta files.
- * Subscriptions consist of a target object, a subscribing user, a subscribe
- * style and optional data.
- * A subscription may be deleted by specifying an empty subscribe style.
- * Only one subscription per target and user is allowed.
- * The function returns false on error, otherwise true. Note that no error is
- * returned if a subscription should be deleted but the user is not subscribed
- * and the subscription meta file exists.
- *
- * @author Adrian Lang
- *
- * @param string $user The subscriber or unsubscriber
- * @param string $page The target object (page or namespace), specified by
- * id; Namespaces are identified by a trailing colon.
- * @param string $style The subscribe style; DokuWiki currently implements
- * “every”, “digest”, and “list”.
- * @param string $data An optional data blob
- * @param bool $overwrite Whether an existing subscription may be overwritten
- * @return bool
- */
-function subscription_set($user, $page, $style, $data = null,
- $overwrite = false) {
- global $lang;
- if (is_null($style)) {
- // Delete subscription.
- $file = subscription_filename($page);
- if (!@file_exists($file)) {
- msg(sprintf($lang['subscr_not_subscribed'], $user,
- prettyprint_id($page)), -1);
- return false;
- }
+ // user names are encoded
+ $user = array_map('auth_nameencode', $user);
- // io_deleteFromFile does not return false if no line matched.
- return io_deleteFromFile($file,
- subscription_regex(array('user' => auth_nameencode($user))),
- true);
- }
+ // quote
+ $user = array_map('preg_quote_cb', $user);
+ $style = array_map('preg_quote_cb', $style);
+ $data = array_map('preg_quote_cb', $data);
- // Delete subscription if one exists and $overwrite is true. If $overwrite
- // is false, fail.
- $subs = subscription_find($page, array('user' => $user));
- if (count($subs) > 0 && array_pop(array_keys($subs)) === $page) {
- if (!$overwrite) {
- msg(sprintf($lang['subscr_already_subscribed'], $user,
- prettyprint_id($page)), -1);
- return false;
+ // join
+ $user = join('|', $user);
+ $style = join('|', $style);
+ $data = join('|', $data);
+
+ // any data at all?
+ if($user.$style.$data === '') throw new Exception('no data passed');
+
+ // replace empty values, set which ones are optional
+ $sopt = '';
+ $dopt = '';
+ if($user === '') {
+ $user = '\S+';
}
- // Fail if deletion failed, else continue.
- if (!subscription_set($user, $page, null)) {
- return false;
+ if($style === '') {
+ $style = '\S+';
+ $sopt = '?';
+ }
+ if($data === '') {
+ $data = '\S+';
+ $dopt = '?';
}
- }
- $file = subscription_filename($page);
- $content = auth_nameencode($user) . ' ' . $style;
- if (!is_null($data)) {
- $content .= ' ' . $data;
+ // assemble
+ return "/^($user)(?:\\s+($style))$sopt(?:\\s+($data))$dopt$/";
}
- return io_saveFile($file, $content . "\n", true);
-}
-/**
- * Recursively search for matching subscriptions
- *
- * This function searches all relevant subscription files for a page or
- * namespace.
- *
- * @author Adrian Lang
- * @see function subscription_regex for $pre documentation
- *
- * @param string $page The target object’s (namespace or page) id
- * @param array $pre A hash of predefined values
- * @return array
- */
-function subscription_find($page, $pre) {
- // Construct list of files which may contain relevant subscriptions.
- $filenames = array(':' => subscription_filename(':'));
- do {
- $filenames[$page] = subscription_filename($page);
- $page = getNS(rtrim($page, ':')) . ':';
- } while ($page !== ':');
-
- // Handle files.
- $matches = array();
- foreach ($filenames as $cur_page => $filename) {
- if (!@file_exists($filename)) {
- continue;
- }
- $subscriptions = file($filename);
- foreach ($subscriptions as $subscription) {
- if (strpos($subscription, ' ') === false) {
- // This is an old subscription file.
- $subscription = trim($subscription) . " every\n";
- }
+ /**
+ * Recursively search for matching subscriptions
+ *
+ * This function searches all relevant subscription files for a page or
+ * namespace.
+ *
+ * @author Adrian Lang
+ *
+ * @param string $page The target object’s (namespace or page) id
+ * @param string|array $user
+ * @param string|array $style
+ * @param string|array $data
+ * @return array
+ */
+ public function subscribers($page, $user = null, $style = null, $data = null) {
+ // Construct list of files which may contain relevant subscriptions.
+ $files = array(':' => $this->file(':'));
+ do {
+ $files[$page] = $this->file($page);
+ $page = getNS(rtrim($page, ':')).':';
+ } while($page !== ':');
- list($user, $rest) = explode(' ', $subscription, 2);
- $subscription = rawurldecode($user) . " " . $rest;
+ $re = $this->buildregex($user, $style, $data);
- if (preg_match(subscription_regex($pre), $subscription,
- $line_matches) === 0) {
- continue;
- }
- $match = array_slice($line_matches, 1);
- if (!isset($matches[$cur_page])) {
- $matches[$cur_page] = array();
+ // Handle files.
+ $result = array();
+ foreach($files as $target => $file) {
+ if(!@file_exists($file)) continue;
+
+ $lines = file($file);
+ foreach($lines as $line) {
+ // fix old style subscription files
+ if(strpos($line, ' ') === false) $line = trim($line)." every\n";
+
+ // check for matching entries
+ if(!preg_match($re, $line, $m)) continue;
+
+ $u = rawurldecode($m[1]); // decode the user name
+ if(!isset($result[$target])) $result[$target] = array();
+ $result[$target][$u] = array($m[2], $m[3]); // add to result
}
- $matches[$cur_page][] = $match;
}
+ return array_reverse($result);
}
- return array_reverse($matches);
-}
-/**
- * Get data for $INFO['subscribed']
- *
- * $INFO['subscribed'] is either false if no subscription for the current page
- * and user is in effect. Else it contains an array of arrays with the fields
- * “target”, “style”, and optionally “data”.
- *
- * @author Adrian Lang
- */
-function get_info_subscribed() {
- global $ID;
- global $conf;
- if (!$conf['subscribers']) {
- return false;
- }
+ /**
+ * Adds a new subscription for the given page or namespace
+ *
+ * This will automatically overwrite any existent subscription for the given user on this
+ * *exact* page or namespace. It will *not* modify any subscription that may exist in higher namespaces.
+ *
+ * @param string $id The target page or namespace, specified by id; Namespaces
+ * are identified by appending a colon.
+ * @param string $user
+ * @param string $style
+ * @param string $data
+ * @throws Exception when user or style is empty
+ * @return bool
+ */
+ public function add($id, $user, $style, $data = '') {
+ // delete any existing subscription
+ $this->remove($id, $user);
- $subs = subscription_find($ID, array('user' => $_SERVER['REMOTE_USER']));
- if (count($subs) === 0) {
- return false;
- }
+ $user = auth_nameencode(trim($user));
+ $style = trim($style);
+ $data = trim($data);
- $_ret = array();
- foreach ($subs as $target => $subs_data) {
- $new = array('target' => $target,
- 'style' => $subs_data[0][0]);
- if (count($subs_data[0]) > 1) {
- $new['data'] = $subs_data[0][1];
- }
- $_ret[] = $new;
+ if(!$user) throw new Exception('no subscription user given');
+ if(!$style) throw new Exception('no subscription style given');
+
+ $line = "$user $style";
+ if($data) $line .= " $data";
+ $line .= "\n";
+
+ $file = $this->file($id);
+
+ return io_saveFile($file, $line, true);
}
- return $_ret;
-}
+ /**
+ * Removes a subscription for the given page or namespace
+ *
+ * This removes all subscriptions matching the given criteria on the given page or
+ * namespace. It will *not* modify any subscriptions that may exist in higher
+ * namespaces.
+ *
+ * @param string $id The target object’s (namespace or page) id
+ * @param string|array $user
+ * @param string|array $style
+ * @param string|array $data
+ * @return bool
+ */
+ public function remove($id, $user = null, $style = null, $data = null) {
+ $file = $this->file($id);
+ if(!file_exists($file)) return true;
-/**
- * Construct a regular expression parsing a subscription definition line
- *
- * @author Adrian Lang
- *
- * @param array $pre A hash of predefined values; “user”, “style”, and
- * “data” may be set to limit the results to
- * subscriptions matching these parameters. If
- * “escaped” is true, these fields are inserted into the
- * regular expression without escaping.
- *
- * @return string complete regexp including delimiters
- */
-function subscription_regex($pre = array()) {
- if (!isset($pre['escaped']) || $pre['escaped'] === false) {
- $pre = array_map('preg_quote_cb', $pre);
+ $re = $this->buildregex($user, $style, $data);
+ return io_deleteFromFile($file, $re, true);
}
- foreach (array('user', 'style', 'data') as $key) {
- if (!isset($pre[$key])) {
- $pre[$key] = '(\S+)';
+
+ /**
+ * Get data for $INFO['subscribed']
+ *
+ * $INFO['subscribed'] is either false if no subscription for the current page
+ * and user is in effect. Else it contains an array of arrays with the fields
+ * “target”, “style”, and optionally “data”.
+ *
+ * @param string $id Page ID, defaults to global $ID
+ * @param string $user User, defaults to $_SERVER['REMOTE_USER']
+ * @return array
+ * @author Adrian Lang
+ */
+ function user_subscription($id='', $user='') {
+ global $ID;
+ global $conf;
+ if(!$conf['subscribers']) return false;
+
+ if(!$id) $id = $ID;
+ if(!$user) $user = $_SERVER['REMOTE_USER'];
+
+
+ $subs = $this->subscribers($id, $user);
+ if(!count($subs)) return false;
+
+ $result = array();
+ foreach($subs as $target => $data) {
+ $result[] = array(
+ 'target' => $target,
+ 'style' => $data[$user][0],
+ 'data' => $data[$user][1]
+ );
}
+
+ return $result;
}
- return '/^' . $pre['user'] . '(?: ' . $pre['style'] .
- '(?: ' . $pre['data'] . ')?)?$/';
-}
-/**
- * Return a string with the email addresses of all the
- * users subscribed to a page
- *
- * This is the default action for COMMON_NOTIFY_ADDRESSLIST.
- *
- * @author Steven Danz
- * @author Adrian Lang
- *
- * @todo this does NOT return a string but uses a reference to write back, either fix function or docs
- * @param array $data Containing $id (the page id), $self (whether the author
- * should be notified, $addresslist (current email address
- * list)
- * @return string
- */
-function subscription_addresslist(&$data){
- global $conf;
- /** @var auth_basic $auth */
- global $auth;
+ /**
+ * Return a string with the email addresses of all the
+ * users subscribed to a page
+ *
+ * This is the default action for COMMON_NOTIFY_ADDRESSLIST.
+ *
+ * @author Steven Danz
+ * @author Adrian Lang
+ *
+ * @todo this does NOT return a string but uses a reference to write back, either fix function or docs
+ * @param array $data Containing $id (the page id), $self (whether the author
+ * should be notified, $addresslist (current email address
+ * list)
+ * @return string
+ */
+ function subscription_addresslist(&$data) {
+ global $conf;
+ /** @var auth_basic $auth */
+ global $auth;
- $id = $data['id'];
- $self = $data['self'];
- $addresslist = $data['addresslist'];
+ $id = $data['id'];
+ $self = $data['self'];
+ $addresslist = $data['addresslist'];
- if (!$conf['subscribers'] || $auth === null) {
- return '';
- }
- $pres = array('style' => 'every', 'escaped' => true);
- if (!$self && isset($_SERVER['REMOTE_USER'])) {
- $pres['user'] = '((?!' . preg_quote_cb($_SERVER['REMOTE_USER']) .
- '(?: |$))\S+)';
- }
- $subs = subscription_find($id, $pres);
- $emails = array();
- foreach ($subs as $by_targets) {
- foreach ($by_targets as $sub) {
- $info = $auth->getUserData($sub[0]);
- if ($info === false) continue;
- $level = auth_aclcheck($id, $sub[0], $info['grps']);
- if ($level >= AUTH_READ) {
- if (strcasecmp($info['mail'], $conf['notify']) != 0) {
- $emails[$sub[0]] = $info['mail'];
+ if(!$conf['subscribers'] || $auth === null) {
+ return '';
+ }
+ $pres = array('style' => 'every', 'escaped' => true);
+ if(!$self && isset($_SERVER['REMOTE_USER'])) {
+ $pres['user'] = '((?!'.preg_quote_cb($_SERVER['REMOTE_USER']).
+ '(?: |$))\S+)';
+ }
+ $subs = subscription_find($id, $pres);
+ $emails = array();
+ foreach($subs as $by_targets) {
+ foreach($by_targets as $sub) {
+ $info = $auth->getUserData($sub[0]);
+ if($info === false) continue;
+ $level = auth_aclcheck($id, $sub[0], $info['grps']);
+ if($level >= AUTH_READ) {
+ if(strcasecmp($info['mail'], $conf['notify']) != 0) {
+ $emails[$sub[0]] = $info['mail'];
+ }
}
}
}
+ $data['addresslist'] = trim($addresslist.','.implode(',', $emails), ',');
}
- $data['addresslist'] = trim($addresslist . ',' . implode(',', $emails), ',');
-}
-/**
- * Send a digest mail
- *
- * Sends a digest mail showing a bunch of changes.
- *
- * @author Adrian Lang
- *
- * @param string $subscriber_mail The target mail address
- * @param array $id The ID
- * @param int $lastupdate Time of the last notification
- */
-function subscription_send_digest($subscriber_mail, $id, $lastupdate) {
- $n = 0;
- do {
- $rev = getRevisions($id, $n++, 1);
- $rev = (count($rev) > 0) ? $rev[0] : null;
- } while (!is_null($rev) && $rev > $lastupdate);
-
- $replaces = array('NEWPAGE' => wl($id, '', true, '&'),
- 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&'));
- if (!is_null($rev)) {
- $subject = 'changed';
- $replaces['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
- $df = new Diff(explode("\n", rawWiki($id, $rev)),
- explode("\n", rawWiki($id)));
- $dformat = new UnifiedDiffFormatter();
- $replaces['DIFF'] = $dformat->format($df);
- } else {
- $subject = 'newpage';
- $replaces['OLDPAGE'] = 'none';
- $replaces['DIFF'] = rawWiki($id);
+ /**
+ * Send a digest mail
+ *
+ * Sends a digest mail showing a bunch of changes.
+ *
+ * @author Adrian Lang
+ *
+ * @param string $subscriber_mail The target mail address
+ * @param array $id The ID
+ * @param int $lastupdate Time of the last notification
+ */
+ function subscription_send_digest($subscriber_mail, $id, $lastupdate) {
+ $n = 0;
+ do {
+ $rev = getRevisions($id, $n++, 1);
+ $rev = (count($rev) > 0) ? $rev[0] : null;
+ } while(!is_null($rev) && $rev > $lastupdate);
+
+ $replaces = array(
+ 'NEWPAGE' => wl($id, '', true, '&'),
+ 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&')
+ );
+ if(!is_null($rev)) {
+ $subject = 'changed';
+ $replaces['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
+ $df = new Diff(explode("\n", rawWiki($id, $rev)),
+ explode("\n", rawWiki($id)));
+ $dformat = new UnifiedDiffFormatter();
+ $replaces['DIFF'] = $dformat->format($df);
+ } else {
+ $subject = 'newpage';
+ $replaces['OLDPAGE'] = 'none';
+ $replaces['DIFF'] = rawWiki($id);
+ }
+ subscription_send(
+ $subscriber_mail, $replaces, $subject, $id,
+ 'subscr_digest'
+ );
}
- subscription_send($subscriber_mail, $replaces, $subject, $id,
- 'subscr_digest');
-}
-/**
- * Send a list mail
- *
- * Sends a list mail showing a list of changed pages.
- *
- * @author Adrian Lang
- *
- * @param string $subscriber_mail The target mail address
- * @param array $ids Array of ids
- * @param string $ns_id The id of the namespace
- */
-function subscription_send_list($subscriber_mail, $ids, $ns_id) {
- if (count($ids) === 0) return;
- global $conf;
- $list = '';
- foreach ($ids as $id) {
- $list .= '* ' . wl($id, array(), true) . NL;
+ /**
+ * Send a list mail
+ *
+ * Sends a list mail showing a list of changed pages.
+ *
+ * @author Adrian Lang
+ *
+ * @param string $subscriber_mail The target mail address
+ * @param array $ids Array of ids
+ * @param string $ns_id The id of the namespace
+ */
+ function subscription_send_list($subscriber_mail, $ids, $ns_id) {
+ if(count($ids) === 0) return;
+ global $conf;
+ $list = '';
+ foreach($ids as $id) {
+ $list .= '* '.wl($id, array(), true).NL;
+ }
+ subscription_send(
+ $subscriber_mail,
+ array(
+ 'DIFF' => rtrim($list),
+ 'SUBSCRIBE' => wl(
+ $ns_id.$conf['start'],
+ array('do' => 'subscribe'),
+ true, '&'
+ )
+ ),
+ 'subscribe_list',
+ prettyprint_id($ns_id),
+ 'subscr_list'
+ );
}
- subscription_send($subscriber_mail,
- array('DIFF' => rtrim($list),
- 'SUBSCRIBE' => wl($ns_id . $conf['start'],
- array('do' => 'subscribe'),
- true, '&')),
- 'subscribe_list',
- prettyprint_id($ns_id),
- 'subscr_list');
-}
-/**
- * Helper function for sending a mail
- *
- * @author Adrian Lang
- *
- * @param string $subscriber_mail The target mail address
- * @param array $replaces Predefined parameters used to parse the
- * template
- * @param string $subject The lang id of the mail subject (without the
- * prefix “mail_”)
- * @param string $id The page or namespace id
- * @param string $template The name of the mail template
- * @return bool
- */
-function subscription_send($subscriber_mail, $replaces, $subject, $id, $template) {
- global $lang;
-
- $text = rawLocale($template);
- $trep = array_merge($replaces, array('PAGE' => $id));
-
- $subject = $lang['mail_' . $subject] . ' ' . $id;
- $mail = new Mailer();
- $mail->bcc($subscriber_mail);
- $mail->subject($subject);
- $mail->setBody($text,$trep);
- $mail->setHeader(
- 'List-Unsubscribe',
- '<'.wl($id,array('do'=>'subscribe'),true,'&').'>',
- false
- );
- return $mail->send();
-}
+ /**
+ * Helper function for sending a mail
+ *
+ * @author Adrian Lang
+ *
+ * @param string $subscriber_mail The target mail address
+ * @param array $replaces Predefined parameters used to parse the
+ * template
+ * @param string $subject The lang id of the mail subject (without the
+ * prefix “mail_”)
+ * @param string $id The page or namespace id
+ * @param string $template The name of the mail template
+ * @return bool
+ */
+ function subscription_send($subscriber_mail, $replaces, $subject, $id, $template) {
+ global $lang;
+
+ $text = rawLocale($template);
+ $trep = array_merge($replaces, array('PAGE' => $id));
+
+ $subject = $lang['mail_'.$subject].' '.$id;
+ $mail = new Mailer();
+ $mail->bcc($subscriber_mail);
+ $mail->subject($subject);
+ $mail->setBody($text, $trep);
+ $mail->setHeader(
+ 'List-Unsubscribe',
+ '<'.wl($id, array('do'=> 'subscribe'), true, '&').'>',
+ false
+ );
+ return $mail->send();
+ }
+
+}
\ No newline at end of file
--
cgit v1.2.3
From e920a0a10c3027700e61166a6f8d4ea29a9ff102 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 12 Aug 2012 14:00:53 +0200
Subject: handle empty changelog in getRecentsSince()
---
inc/changelog.php | 1 +
1 file changed, 1 insertion(+)
(limited to 'inc')
diff --git a/inc/changelog.php b/inc/changelog.php
index 24583b341..7ca7c62e9 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -254,6 +254,7 @@ function getRecentsSince($from,$to=null,$ns='',$flags=0){
} else {
$lines = @file($conf['changelog']);
}
+ if(!$lines) return $recent;
// we start searching at the end of the list
$lines = array_reverse($lines);
--
cgit v1.2.3
From adec979fd5453cf213b776d7dceaaaac4eb05713 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 12 Aug 2012 15:07:03 +0200
Subject: more subscription refactoring BROKEN
now the actual sending of bulk messages (digest, list) is reimplemented
and partially tested.
Still not complete
---
inc/common.php | 4 +-
inc/subscription.php | 191 +++++++++++++++++++++++++++++++++++++++------------
2 files changed, 149 insertions(+), 46 deletions(-)
(limited to 'inc')
diff --git a/inc/common.php b/inc/common.php
index ac7e744d8..29940d8a6 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -107,9 +107,11 @@ function pageinfo() {
$info['isadmin'] = false;
$info['ismanager'] = false;
if(isset($_SERVER['REMOTE_USER'])) {
+ $sub = new Subscription();
+
$info['userinfo'] = $USERINFO;
$info['perm'] = auth_quickaclcheck($ID);
- $info['subscribed'] = get_info_subscribed();
+ $info['subscribed'] = $sub->user_subscription();
$info['client'] = $_SERVER['REMOTE_USER'];
if($info['perm'] == AUTH_ADMIN) {
diff --git a/inc/subscription.php b/inc/subscription.php
index 856836cd5..804776ced 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -253,24 +253,23 @@ class Subscription {
* @return array
* @author Adrian Lang
*/
- function user_subscription($id='', $user='') {
+ function user_subscription($id = '', $user = '') {
global $ID;
global $conf;
if(!$conf['subscribers']) return false;
- if(!$id) $id = $ID;
+ if(!$id) $id = $ID;
if(!$user) $user = $_SERVER['REMOTE_USER'];
-
$subs = $this->subscribers($id, $user);
if(!count($subs)) return false;
$result = array();
- foreach($subs as $target => $data) {
+ foreach($subs as $target => $info) {
$result[] = array(
'target' => $target,
- 'style' => $data[$user][0],
- 'data' => $data[$user][1]
+ 'style' => $info[$user][0],
+ 'data' => $info[$user][1]
);
}
@@ -278,52 +277,100 @@ class Subscription {
}
/**
- * Return a string with the email addresses of all the
- * users subscribed to a page
+ * Send digest and list subscriptions
*
- * This is the default action for COMMON_NOTIFY_ADDRESSLIST.
+ * This sends mails to all subscribers that have a subscription for namespaces above
+ * the given page if the needed $conf['subscribe_time'] has passed already.
*
- * @author Steven Danz
- * @author Adrian Lang
+ * This function is called form lib/exe/indexer.php
*
- * @todo this does NOT return a string but uses a reference to write back, either fix function or docs
- * @param array $data Containing $id (the page id), $self (whether the author
- * should be notified, $addresslist (current email address
- * list)
- * @return string
+ * @param string $page
+ * @return int number of sent mails
*/
- function subscription_addresslist(&$data) {
- global $conf;
+ public function send_bulk($page) {
/** @var auth_basic $auth */
global $auth;
+ global $conf;
+ global $USERINFO;
+ $count = 0;
- $id = $data['id'];
- $self = $data['self'];
- $addresslist = $data['addresslist'];
+ $subscriptions = $this->subscribers($page, null, array('digest', 'list'));
- if(!$conf['subscribers'] || $auth === null) {
- return '';
- }
- $pres = array('style' => 'every', 'escaped' => true);
- if(!$self && isset($_SERVER['REMOTE_USER'])) {
- $pres['user'] = '((?!'.preg_quote_cb($_SERVER['REMOTE_USER']).
- '(?: |$))\S+)';
- }
- $subs = subscription_find($id, $pres);
- $emails = array();
- foreach($subs as $by_targets) {
- foreach($by_targets as $sub) {
- $info = $auth->getUserData($sub[0]);
- if($info === false) continue;
- $level = auth_aclcheck($id, $sub[0], $info['grps']);
- if($level >= AUTH_READ) {
- if(strcasecmp($info['mail'], $conf['notify']) != 0) {
- $emails[$sub[0]] = $info['mail'];
+ // remember current user info
+ $olduinfo = $USERINFO;
+ $olduser = $_SERVER['REMOTE_USER'];
+
+ foreach($subscriptions as $target => $users) {
+ if(!$this->lock($target)) continue;
+
+ foreach($users as $user => $info) {
+ list($style, $lastupdate) = $info;
+
+ $lastupdate = (int) $lastupdate;
+ if($lastupdate + $conf['subscribe_time'] > time()) {
+ // Less than the configured time period passed since last
+ // update.
+ continue;
+ }
+
+ // Work as the user to make sure ACLs apply correctly
+ $USERINFO = $auth->getUserData($user);
+ $_SERVER['REMOTE_USER'] = $user;
+ if($USERINFO === false) continue;
+ if(!$USERINFO['mail']) continue;
+
+ if(substr($target, -1, 1) === ':') {
+ // subscription target is a namespace, get all changes within
+ $changes = getRecentsSince($lastupdate, null, getNS($target));
+ } else {
+ // single page subscription, check ACL ourselves
+ if(auth_quickaclcheck($target) < AUTH_READ) continue;
+ $meta = p_get_metadata($target);
+ $changes = array($meta['last_change']);
+ }
+
+ // Filter out pages only changed in small and own edits
+ $change_ids = array();
+ foreach($changes as $rev) {
+ $n = 0;
+ while(!is_null($rev) && $rev['date'] >= $lastupdate &&
+ ($_SERVER['REMOTE_USER'] === $rev['user'] ||
+ $rev['type'] === DOKU_CHANGE_TYPE_MINOR_EDIT)) {
+ $rev = getRevisions($rev['id'], $n++, 1);
+ $rev = (count($rev) > 0) ? $rev[0] : null;
+ }
+
+ if(!is_null($rev) && $rev['date'] >= $lastupdate) {
+ // Some change was not a minor one and not by myself
+ $change_ids[] = $rev['id'];
}
}
+
+ // send it
+ if($style === 'digest') {
+ foreach($change_ids as $change_id) {
+ $this->send_digest(
+ $USERINFO['mail'], $change_id,
+ $lastupdate
+ );
+ $count++;
+ }
+ } elseif($style === 'list') {
+ $this->send_list($USERINFO['mail'], $change_ids, $target);
+ $count++;
+ }
+ // TODO: Handle duplicate subscriptions.
+
+ // Update notification time.
+ $this->add($target, $user, $style, time());
}
+ $this->unlock($target);
}
- $data['addresslist'] = trim($addresslist.','.implode(',', $emails), ',');
+
+ // restore current user info
+ $USERINFO = $olduinfo;
+ $_SERVER['REMOTE_USER'] = $olduser;
+ return $count;
}
/**
@@ -337,7 +384,7 @@ class Subscription {
* @param array $id The ID
* @param int $lastupdate Time of the last notification
*/
- function subscription_send_digest($subscriber_mail, $id, $lastupdate) {
+ protected function send_digest($subscriber_mail, $id, $lastupdate) {
$n = 0;
do {
$rev = getRevisions($id, $n++, 1);
@@ -360,7 +407,7 @@ class Subscription {
$replaces['OLDPAGE'] = 'none';
$replaces['DIFF'] = rawWiki($id);
}
- subscription_send(
+ $this->send(
$subscriber_mail, $replaces, $subject, $id,
'subscr_digest'
);
@@ -377,14 +424,14 @@ class Subscription {
* @param array $ids Array of ids
* @param string $ns_id The id of the namespace
*/
- function subscription_send_list($subscriber_mail, $ids, $ns_id) {
+ protected function send_list($subscriber_mail, $ids, $ns_id) {
if(count($ids) === 0) return;
global $conf;
$list = '';
foreach($ids as $id) {
$list .= '* '.wl($id, array(), true).NL;
}
- subscription_send(
+ $this->send(
$subscriber_mail,
array(
'DIFF' => rtrim($list),
@@ -414,7 +461,7 @@ class Subscription {
* @param string $template The name of the mail template
* @return bool
*/
- function subscription_send($subscriber_mail, $replaces, $subject, $id, $template) {
+ protected function send($subscriber_mail, $replaces, $subject, $id, $template) {
global $lang;
$text = rawLocale($template);
@@ -433,4 +480,58 @@ class Subscription {
return $mail->send();
}
+
+
+ // FIXME no refactoring below, yet
+
+ /**
+ * Return a string with the email addresses of all the
+ * users subscribed to a page
+ *
+ * This is the default action for COMMON_NOTIFY_ADDRESSLIST.
+ *
+ * @author Steven Danz
+ * @author Adrian Lang
+ *
+ * @todo this does NOT return a string but uses a reference to write back, either fix function or docs
+ * @param array $data Containing $id (the page id), $self (whether the author
+ * should be notified, $addresslist (current email address
+ * list)
+ * @return string
+ */
+ function subscription_addresslist(&$data) {
+ global $conf;
+ /** @var auth_basic $auth */
+ global $auth;
+
+ $id = $data['id'];
+ $self = $data['self'];
+ $addresslist = $data['addresslist'];
+
+ if(!$conf['subscribers'] || $auth === null) {
+ return '';
+ }
+ $pres = array('style' => 'every', 'escaped' => true);
+ if(!$self && isset($_SERVER['REMOTE_USER'])) {
+ $pres['user'] = '((?!'.preg_quote_cb($_SERVER['REMOTE_USER']).
+ '(?: |$))\S+)';
+ }
+ $subs = subscription_find($id, $pres);
+ $emails = array();
+ foreach($subs as $by_targets) {
+ foreach($by_targets as $sub) {
+ $info = $auth->getUserData($sub[0]);
+ if($info === false) continue;
+ $level = auth_aclcheck($id, $sub[0], $info['grps']);
+ if($level >= AUTH_READ) {
+ if(strcasecmp($info['mail'], $conf['notify']) != 0) {
+ $emails[$sub[0]] = $info['mail'];
+ }
+ }
+ }
+ }
+ $data['addresslist'] = trim($addresslist.','.implode(',', $emails), ',');
+ }
+
+
}
\ No newline at end of file
--
cgit v1.2.3
From 835242b0f53a72a555ad30543a1677108ce210af Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 12 Aug 2012 17:17:34 +0200
Subject: subscription system should work now again
This readds the last part of the subscription system: the normal "every"
subscriptions.
---
inc/common.php | 2 +-
inc/subscription.php | 57 ++++++++++++++++++++++------------------------------
2 files changed, 25 insertions(+), 34 deletions(-)
(limited to 'inc')
diff --git a/inc/common.php b/inc/common.php
index 29940d8a6..3cfeb3092 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1122,7 +1122,7 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
$data = array('id' => $id, 'addresslist' => '', 'self' => false);
trigger_event(
'COMMON_NOTIFY_ADDRESSLIST', $data,
- 'subscription_addresslist'
+ array(new Subscription(), 'notifyaddresses')
);
$bcc = $data['addresslist'];
if(empty($bcc)) return false;
diff --git a/inc/subscription.php b/inc/subscription.php
index 804776ced..9b02225f9 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -12,7 +12,7 @@
* - subscription_lock
* - subscription_unlock
*
- * @fixme handle $conf['subscribers'] and disable actions
+ * @fixme handle $conf['subscribers'] and disable actions and $auth == null
*
* @author Adrian Lang
* @author Andreas Gohr
@@ -480,26 +480,23 @@ class Subscription {
return $mail->send();
}
-
-
- // FIXME no refactoring below, yet
-
/**
- * Return a string with the email addresses of all the
- * users subscribed to a page
+ * Default callback for COMMON_NOTIFY_ADDRESSLIST
*
- * This is the default action for COMMON_NOTIFY_ADDRESSLIST.
+ * Aggregates all email addresses of user who have subscribed the given page with 'every' style
*
* @author Steven Danz
* @author Adrian Lang
*
- * @todo this does NOT return a string but uses a reference to write back, either fix function or docs
- * @param array $data Containing $id (the page id), $self (whether the author
- * should be notified, $addresslist (current email address
- * list)
+ * @todo move the whole functionality into this class, trigger SUBSCRIPTION_NOTIFY_ADDRESSLIST instead,
+ * use an array for the addresses within it
+ *
+ * @param array &$data Containing $id (the page id), $self (whether the author
+ * should be notified, $addresslist (current email address
+ * list)
* @return string
*/
- function subscription_addresslist(&$data) {
+ public function notifyaddresses(&$data) {
global $conf;
/** @var auth_basic $auth */
global $auth;
@@ -508,30 +505,24 @@ class Subscription {
$self = $data['self'];
$addresslist = $data['addresslist'];
- if(!$conf['subscribers'] || $auth === null) {
- return '';
- }
- $pres = array('style' => 'every', 'escaped' => true);
- if(!$self && isset($_SERVER['REMOTE_USER'])) {
- $pres['user'] = '((?!'.preg_quote_cb($_SERVER['REMOTE_USER']).
- '(?: |$))\S+)';
- }
- $subs = subscription_find($id, $pres);
- $emails = array();
- foreach($subs as $by_targets) {
- foreach($by_targets as $sub) {
- $info = $auth->getUserData($sub[0]);
- if($info === false) continue;
- $level = auth_aclcheck($id, $sub[0], $info['grps']);
+ $subscriptions = $this->subscribers($id, null, 'every');
+
+ $result = array();
+ foreach($subscriptions as $target => $users) {
+ foreach($users as $user => $info) {
+ $userinfo = $auth->getUserData($user);
+ if($userinfo === false) continue;
+ if(!$userinfo['mail']) continue;
+ if(!$self && $user == $_SERVER['REMOTE_USER']) continue; //skip our own changes
+
+ $level = auth_aclcheck($id, $user, $userinfo['grps']);
if($level >= AUTH_READ) {
- if(strcasecmp($info['mail'], $conf['notify']) != 0) {
- $emails[$sub[0]] = $info['mail'];
+ if(strcasecmp($userinfo['mail'], $conf['notify']) != 0) { //skip user who get notified elsewhere
+ $result[$user] = $userinfo['mail'];
}
}
}
}
- $data['addresslist'] = trim($addresslist.','.implode(',', $emails), ',');
+ $data['addresslist'] = trim($addresslist.','.implode(',', $result), ',');
}
-
-
}
\ No newline at end of file
--
cgit v1.2.3
From 84c1127cc070777c8cbcf488f5422bc4b71470a8 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 12 Aug 2012 17:30:01 +0200
Subject: correctly check if subscriptions are enabled
---
inc/common.php | 2 +-
inc/subscription.php | 26 ++++++++++++++++++++++----
2 files changed, 23 insertions(+), 5 deletions(-)
(limited to 'inc')
diff --git a/inc/common.php b/inc/common.php
index 3cfeb3092..b4a57b154 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1117,7 +1117,7 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
$to = $conf['notify'];
$bcc = '';
} elseif($who == 'subscribers') {
- if(!$conf['subscribers']) return false; //subscribers enabled?
+ if(!actionOK('subscribe')) return false; //subscribers enabled?
if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors
$data = array('id' => $id, 'addresslist' => '', 'self' => false);
trigger_event(
diff --git a/inc/subscription.php b/inc/subscription.php
index 9b02225f9..742f5b1a0 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -21,6 +21,15 @@
class Subscription {
+ /**
+ * Check if subscription system is enabled
+ *
+ * @return bool
+ */
+ public function isenabled() {
+ return actionOK('subscribe');
+ }
+
/**
* Return the subscription meta file for the given ID
*
@@ -156,6 +165,8 @@ class Subscription {
* @return array
*/
public function subscribers($page, $user = null, $style = null, $data = null) {
+ if(!$this->isenabled()) return array();
+
// Construct list of files which may contain relevant subscriptions.
$files = array(':' => $this->file(':'));
do {
@@ -201,6 +212,8 @@ class Subscription {
* @return bool
*/
public function add($id, $user, $style, $data = '') {
+ if(!$this->isenabled()) return false;
+
// delete any existing subscription
$this->remove($id, $user);
@@ -234,6 +247,8 @@ class Subscription {
* @return bool
*/
public function remove($id, $user = null, $style = null, $data = null) {
+ if(!$this->isenabled()) return false;
+
$file = $this->file($id);
if(!file_exists($file)) return true;
@@ -254,10 +269,9 @@ class Subscription {
* @author Adrian Lang
*/
function user_subscription($id = '', $user = '') {
- global $ID;
- global $conf;
- if(!$conf['subscribers']) return false;
+ if(!$this->isenabled()) return false;
+ global $ID;
if(!$id) $id = $ID;
if(!$user) $user = $_SERVER['REMOTE_USER'];
@@ -288,6 +302,8 @@ class Subscription {
* @return int number of sent mails
*/
public function send_bulk($page) {
+ if(!$this->isenabled()) return 0;
+
/** @var auth_basic $auth */
global $auth;
global $conf;
@@ -497,9 +513,11 @@ class Subscription {
* @return string
*/
public function notifyaddresses(&$data) {
- global $conf;
+ if(!$this->isenabled()) return false;
+
/** @var auth_basic $auth */
global $auth;
+ global $conf;
$id = $data['id'];
$self = $data['self'];
--
cgit v1.2.3
From a0519fdaeb59bd96d9071681a68c2dc1b646fc68 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 12 Aug 2012 17:47:47 +0200
Subject: fixed subscription management
now adding and removing subscriptions works again
---
inc/actions.php | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
(limited to 'inc')
diff --git a/inc/actions.php b/inc/actions.php
index 62b0e1800..721492bd4 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -700,21 +700,28 @@ function act_subscription($act){
$target = $params['target'];
$style = $params['style'];
- $data = $params['data'];
$action = $params['action'];
// Perform action.
- if (!subscription_set($_SERVER['REMOTE_USER'], $target, $style, $data)) {
+ $sub = new Subscription();
+ if($action == 'unsubscribe'){
+ $ok = $sub->remove($target, $_SERVER['REMOTE_USER'], $style);
+ }else{
+ $ok = $sub->add($target, $_SERVER['REMOTE_USER'], $style);
+ }
+
+ if($ok) {
+ msg(sprintf($lang["subscr_{$action}_success"], hsc($INFO['userinfo']['name']),
+ prettyprint_id($target)), 1);
+ act_redirect($ID, $act);
+ } else {
throw new Exception(sprintf($lang["subscr_{$action}_error"],
hsc($INFO['userinfo']['name']),
prettyprint_id($target)));
}
- msg(sprintf($lang["subscr_{$action}_success"], hsc($INFO['userinfo']['name']),
- prettyprint_id($target)), 1);
- act_redirect($ID, $act);
// Assure that we have valid data if act_redirect somehow fails.
- $INFO['subscribed'] = get_info_subscribed();
+ $INFO['subscribed'] = $sub->user_subscription();
return 'show';
}
--
cgit v1.2.3
From 02308d17ed15cd633ba1fd5cab11994c42065121 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 12 Aug 2012 18:01:30 +0200
Subject: initialize new subscriptions with current time
We don't want to create a bunch of mails whenever a namespace is
subscribed. Only changes *after* the subscription should be considered.
This patch adds the timestamp to "every" style subscriptions as well,
though this data is ignored.
---
inc/subscription.php | 1 +
1 file changed, 1 insertion(+)
(limited to 'inc')
diff --git a/inc/subscription.php b/inc/subscription.php
index 742f5b1a0..800329cb5 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -223,6 +223,7 @@ class Subscription {
if(!$user) throw new Exception('no subscription user given');
if(!$style) throw new Exception('no subscription style given');
+ if(!$data) $data = time(); //always add current time for new subscriptions
$line = "$user $style";
if($data) $line .= " $data";
--
cgit v1.2.3
From f036cff4fde59f0265f6123f6faf92cb8ba8bb26 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 12 Aug 2012 18:07:20 +0200
Subject: minor cleanup
---
inc/subscription.php | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
(limited to 'inc')
diff --git a/inc/subscription.php b/inc/subscription.php
index 800329cb5..74f4e4d03 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -1,24 +1,11 @@
* @author Andreas Gohr
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
-
class Subscription {
/**
@@ -511,10 +498,9 @@ class Subscription {
* @param array &$data Containing $id (the page id), $self (whether the author
* should be notified, $addresslist (current email address
* list)
- * @return string
*/
public function notifyaddresses(&$data) {
- if(!$this->isenabled()) return false;
+ if(!$this->isenabled()) return;
/** @var auth_basic $auth */
global $auth;
--
cgit v1.2.3
From 2ed38036a53a489d2fcadc46ce601f8c876fca31 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Fri, 21 Sep 2012 11:53:17 +0200
Subject: consolidate more notification code in subscription class
This is untested and probably broken currently
---
inc/auth.php | 11 +---
inc/common.php | 45 +++------------
inc/subscription.php | 159 +++++++++++++++++++++++++++++++++++++--------------
3 files changed, 126 insertions(+), 89 deletions(-)
(limited to 'inc')
diff --git a/inc/auth.php b/inc/auth.php
index cedfdee36..3fb937613 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -778,23 +778,18 @@ function register() {
return false;
}
- // create substitutions for use in notification email
- $substitutions = array(
- 'NEWUSER' => $_POST['login'],
- 'NEWNAME' => $_POST['fullname'],
- 'NEWEMAIL' => $_POST['email'],
- );
+ $subscription = new Subscription();
if(!$conf['autopasswd']) {
msg($lang['regsuccess2'], 1);
- notify('', 'register', '', $_POST['login'], false, $substitutions);
+ $subscription->send_register($_POST['login'], $_POST['fullname'], $_POST['email']);
return true;
}
// autogenerated password? then send him the password
if(auth_sendPassword($_POST['login'], $pass)) {
msg($lang['regsuccess'], 1);
- notify('', 'register', '', $_POST['login'], false, $substitutions);
+ $subscription->send_register($_POST['login'], $_POST['fullname'], $_POST['email']);
return true;
} else {
msg($lang['regmailfail'], -1);
diff --git a/inc/common.php b/inc/common.php
index b4a57b154..d17061a1b 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1113,9 +1113,8 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
// decide if there is something to do, eg. whom to mail
if($who == 'admin') {
if(empty($conf['notify'])) return false; //notify enabled?
- $text = rawLocale('mailtext');
- $to = $conf['notify'];
- $bcc = '';
+ $tpl = 'mailtext';
+ $to = $conf['notify'];
} elseif($who == 'subscribers') {
if(!actionOK('subscribe')) return false; //subscribers enabled?
if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors
@@ -1124,57 +1123,29 @@ function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace =
'COMMON_NOTIFY_ADDRESSLIST', $data,
array(new Subscription(), 'notifyaddresses')
);
- $bcc = $data['addresslist'];
- if(empty($bcc)) return false;
- $to = '';
- $text = rawLocale('subscr_single');
+ $to = $data['addresslist'];
+ if(empty($to)) return false;
+ $tpl = 'subscr_single';
} elseif($who == 'register') {
if(empty($conf['registernotify'])) return false;
$text = rawLocale('registermail');
$to = $conf['registernotify'];
- $bcc = '';
} else {
return false; //just to be safe
}
- // prepare replacements (keys not set in hrep will be taken from trep)
- $trep = array(
- 'NEWPAGE' => wl($id, '', true, '&'),
- 'PAGE' => $id,
- 'SUMMARY' => $summary
- );
- $trep = array_merge($trep, $replace);
- $hrep = array();
-
// prepare content
if($who == 'register') {
$subject = $lang['mail_new_user'].' '.$summary;
- } elseif($rev) {
- $subject = $lang['mail_changed'].' '.$id;
- $trep['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
- $df = new Diff(explode("\n", rawWiki($id, $rev)),
- explode("\n", rawWiki($id)));
- $dformat = new UnifiedDiffFormatter();
- $tdiff = $dformat->format($df);
-
- $DIFF_INLINESTYLES = true;
- $dformat = new InlineDiffFormatter();
- $hdiff = $dformat->format($df);
- $hdiff = '';
- $DIFF_INLINESTYLES = false;
} else {
- $subject = $lang['mail_newpage'].' '.$id;
- $trep['OLDPAGE'] = '---';
- $tdiff = rawWiki($id);
- $hdiff = nl2br(hsc($tdiff));
+ $subscription = new Subscription();
+ return $subscription->send_diff($to, $tpl, $id, $rev, $summary);
}
- $trep['DIFF'] = $tdiff;
- $hrep['DIFF'] = $hdiff;
+
// send mail
$mail = new Mailer();
$mail->to($to);
- $mail->bcc($bcc);
$mail->subject($subject);
$mail->setBody($text, $trep, $hrep);
if($who == 'subscribers') {
diff --git a/inc/subscription.php b/inc/subscription.php
index 74f4e4d03..4757b216c 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -377,16 +377,90 @@ class Subscription {
return $count;
}
+ /**
+ * Send the diff for some page change
+ *
+ * @param string $subscriber_mail The target mail address
+ * @param string $template Mail template, should be 'subscr_digest' or 'subscr_single'
+ * @param string $id Page for which the notification is
+ * @param int|null $rev Old revision if any
+ * @param string $summary Change summary if any
+ * @return bool true if successfully sent
+ */
+ public function send_diff($subscriber_mail, $template, $id, $rev = null, $summary = '') {
+ global $DIFF_INLINESTYLES;
+
+ // prepare replacements (keys not set in hrep will be taken from trep)
+ $trep = array(
+ 'PAGE' => $id,
+ 'NEWPAGE' => wl($id, '', true, '&'),
+ 'SUMMARY' => $summary,
+ 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&')
+ );
+ $hrep = array();
+
+ if($rev) {
+ $subject = 'changed';
+ $trep['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
+ $df = new Diff(explode("\n", rawWiki($id, $rev)),
+ explode("\n", rawWiki($id)));
+ $dformat = new UnifiedDiffFormatter();
+ $tdiff = $dformat->format($df);
+
+ $DIFF_INLINESTYLES = true;
+ $dformat = new InlineDiffFormatter();
+ $hdiff = $dformat->format($df);
+ $hdiff = '';
+ $DIFF_INLINESTYLES = false;
+
+ } else {
+ $subject = 'newpage';
+ $trep['OLDPAGE'] = '---';
+ $tdiff = rawWiki($id);
+ $hdiff = nl2br(hsc($tdiff));
+ }
+
+ $trep['DIFF'] = $tdiff;
+ $hrep['DIFF'] = $hdiff;
+
+ return $this->send(
+ $subscriber_mail, $subject, $id,
+ $template, $trep, $hrep
+ );
+ }
+
+ public function send_register($login, $fullname, $email) {
+ global $conf;
+ global $ID;
+ if(empty($conf['registernotify'])) return false;
+
+ $trep = array(
+ 'NEWUSER' => $login,
+ 'NEWNAME' => $fullname,
+ 'NEWEMAIL' => $email,
+ );
+
+ return $this->send(
+ $conf['registernotify'],
+ 'new_user',
+ $ID,
+ 'registermail',
+ $trep
+ );
+ }
+
/**
* Send a digest mail
*
- * Sends a digest mail showing a bunch of changes.
+ * Sends a digest mail showing a bunch of changes of a single page. Basically the same as send_diff()
+ * but determines the last known revision first
*
* @author Adrian Lang
*
* @param string $subscriber_mail The target mail address
* @param array $id The ID
* @param int $lastupdate Time of the last notification
+ * @return bool
*/
protected function send_digest($subscriber_mail, $id, $lastupdate) {
$n = 0;
@@ -395,25 +469,10 @@ class Subscription {
$rev = (count($rev) > 0) ? $rev[0] : null;
} while(!is_null($rev) && $rev > $lastupdate);
- $replaces = array(
- 'NEWPAGE' => wl($id, '', true, '&'),
- 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&')
- );
- if(!is_null($rev)) {
- $subject = 'changed';
- $replaces['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
- $df = new Diff(explode("\n", rawWiki($id, $rev)),
- explode("\n", rawWiki($id)));
- $dformat = new UnifiedDiffFormatter();
- $replaces['DIFF'] = $dformat->format($df);
- } else {
- $subject = 'newpage';
- $replaces['OLDPAGE'] = 'none';
- $replaces['DIFF'] = rawWiki($id);
- }
- $this->send(
- $subscriber_mail, $replaces, $subject, $id,
- 'subscr_digest'
+ return $this->send_diff(
+ $subscriber_mail,
+ 'subscr_digest',
+ $id, $rev
);
}
@@ -427,27 +486,35 @@ class Subscription {
* @param string $subscriber_mail The target mail address
* @param array $ids Array of ids
* @param string $ns_id The id of the namespace
+ * @return bool
*/
protected function send_list($subscriber_mail, $ids, $ns_id) {
if(count($ids) === 0) return;
- global $conf;
- $list = '';
+
+ $tlist = '';
+ $hlist = '';
foreach($ids as $id) {
- $list .= '* '.wl($id, array(), true).NL;
+ $link = wl($id, array(), true);
+ $tlist .= '* '.$link.NL;
+ $hlist .= '- '.hsc($id).'
'.NL;
}
- $this->send(
+ $hlist = '
';
+
+ $id = prettyprint_id($ns_id);
+ $trep = array(
+ 'DIFF' => rtrim($tlist),
+ 'PAGE' => $id,
+ 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&')
+ );
+ $hrep = array(
+ 'DIFF' => $hlist
+ );
+
+ return $this->send(
$subscriber_mail,
- array(
- 'DIFF' => rtrim($list),
- 'SUBSCRIBE' => wl(
- $ns_id.$conf['start'],
- array('do' => 'subscribe'),
- true, '&'
- )
- ),
'subscribe_list',
- prettyprint_id($ns_id),
- 'subscr_list'
+
+ 'subscr_list', $trep, $hrep
);
}
@@ -457,30 +524,34 @@ class Subscription {
* @author Adrian Lang
*
* @param string $subscriber_mail The target mail address
- * @param array $replaces Predefined parameters used to parse the
- * template
* @param string $subject The lang id of the mail subject (without the
* prefix “mail_”)
* @param string $id The page or namespace id
* @param string $template The name of the mail template
+ * @param array $trep Predefined parameters used to parse the
+ * template (in text format)
+ * @param array $hrep Predefined parameters used to parse the
+ * template (in HTML format), null to default to $trep
* @return bool
*/
- protected function send($subscriber_mail, $replaces, $subject, $id, $template) {
+ protected function send($subscriber_mail, $subject, $id, $template, $trep, $hrep = null) {
global $lang;
$text = rawLocale($template);
- $trep = array_merge($replaces, array('PAGE' => $id));
+ $trep = array_merge(
+ $trep, array(
+
+ )
+ );
$subject = $lang['mail_'.$subject].' '.$id;
$mail = new Mailer();
$mail->bcc($subscriber_mail);
$mail->subject($subject);
- $mail->setBody($text, $trep);
- $mail->setHeader(
- 'List-Unsubscribe',
- '<'.wl($id, array('do'=> 'subscribe'), true, '&').'>',
- false
- );
+ $mail->setBody($text, $trep, $hrep);
+ if(isset($trep['SUBSCRIBE'])){
+ $mail->setHeader('List-Unsubscribe', '<'.$trep['SUBSCRIBE'].'>', false);
+ }
return $mail->send();
}
--
cgit v1.2.3
From bee9f377bc547c99fe99b4e38199cb92cf668554 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sat, 3 Nov 2012 17:54:02 +0100
Subject: Completely rewritten Tar library
This new class is only losely based on our previous library. The
whole API was changed to make it more flexible and memory saving.
Some fisrt unit tests are included
---
inc/Tar.class.php | 614 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
inc/load.php | 1 +
2 files changed, 615 insertions(+)
create mode 100644 inc/Tar.class.php
(limited to 'inc')
diff --git a/inc/Tar.class.php b/inc/Tar.class.php
new file mode 100644
index 000000000..7f5e5af4a
--- /dev/null
+++ b/inc/Tar.class.php
@@ -0,0 +1,614 @@
+open('myfile.tgz');
+ * $toc = $tar->contents();
+ * print_r($toc);
+ *
+ * To extract the contents of an existing TAR archive, open() it and use extract() on it:
+ *
+ * $tar = new Tar();
+ * $tar->open('myfile.tgz');
+ * $tar->extract(/tmp);
+ *
+ * To create a new TAR archive directly on the filesystem (low memory requirements), create() it,
+ * add*() files and close() it:
+ *
+ * $tar = new Tar();
+ * $tar->create('myfile.tgz');
+ * $tar->addFile(...);
+ * $tar->addData(...);
+ * ...
+ * $tar->close();
+ *
+ * To create a TAR archive directly in memory, create() it, add*() files and then either save()
+ * or getData() it:
+ *
+ * $tar = new Tar();
+ * $tar->create();
+ * $tar->addFile(...);
+ * $tar->addData(...);
+ * ...
+ * $tar->save('myfile.tgz'); // compresses and saves it
+ * echo $tar->getArchive(Tar::COMPRESS_GZIP); // compresses and returns it
+ *
+ * @author Andreas Gohr
+ * @author Bouchon (Maxg)
+ * @license GPL 2
+ */
+class Tar {
+
+ const COMPRESS_AUTO = 0;
+ const COMPRESS_NONE = 1;
+ const COMPRESS_GZIP = 2;
+ const COMPRESS_BZIP = 3;
+
+ protected $file = '';
+ protected $comptype = Tar::COMPRESS_AUTO;
+ protected $fh;
+ protected $memory = '';
+ protected $closed = true;
+ protected $writeaccess = false;
+
+ /**
+ * Open an existing TAR file for reading
+ *
+ * @param string $file
+ * @param int $comptype
+ * @throws TarIOException
+ */
+ public function open($file, $comptype = Tar::COMPRESS_AUTO) {
+ // determine compression
+ if($comptype == Tar::COMPRESS_AUTO) $comptype = $this->filetype($file);
+ $this->compressioncheck($comptype);
+
+ $this->comptype = $comptype;
+ $this->file = $file;
+
+ if($this->comptype === Tar::COMPRESS_GZIP) {
+ $this->fh = @gzopen($this->file, 'rb');
+ } elseif($this->comptype === Tar::COMPRESS_BZIP) {
+ $this->fh = @bzopen($this->file, 'r');
+ } else {
+ $this->fh = @fopen($this->file, 'rb');
+ }
+
+ if(!$this->fh) throw(new TarIOException('Could not open file for reading: '.$this->file));
+ $this->closed = false;
+ }
+
+ /**
+ * Read the contents of a TAR archive
+ *
+ * This function lists the files stored in the archive, and returns an indexed array of associative
+ * arrays containing for each file the following information:
+ *
+ * checksum Tar Checksum of the file
+ * filename The full name of the stored file (up to 100 c.)
+ * mode UNIX permissions in DECIMAL, not octal
+ * uid The Owner ID
+ * gid The Group ID
+ * size Uncompressed filesize
+ * mtime Timestamp of last modification
+ * typeflag Empty for files, set for folders
+ * link Is it a symlink?
+ * uname Owner name
+ * gname Group name
+ *
+ * The archive is closed afer reading the contents, because rewinding is not possible in bzip2 streams.
+ * Reopen the file with open() again if you want to do additional operations
+ */
+ public function contents() {
+ if($this->closed || !$this->file) throw(new TarIOException('Can not read from a closed archive'));
+
+ $result = Array();
+ while($read = $this->readbytes(512)) {
+ $header = $this->parseHeader($read);
+ if(!is_array($header)) continue;
+
+ $this->skipbytes(ceil($header['size'] / 512) * 512, 1);
+ $result[] = $header;
+ }
+
+ $this->close();
+ return $result;
+ }
+
+ /**
+ * Extract an existing TAR archive
+ *
+ * The $strip parameter allows you to strip a certain number of path components from the filenames
+ * found in the tar file, similar to the --strip-components feature of GNU tar. This is triggered when
+ * an integer is passed as $strip.
+ * Alternatively a fixed string prefix may be passed in $strip. If the filename matches this prefix,
+ * the prefix will be stripped. It is recommended to give prefixes with a trailing slash.
+ *
+ * By default this will extract all files found in the archive. You can restrict the output using the $include
+ * and $exclude parameter. Both expect a full regular expression (including delimiters and modifiers). If
+ * $include is set only files that match this expression will be extracted. Files that match the $exclude
+ * expression will never be extracted. Both parameters can be used in combination. Expressions are matched against
+ * stripped filenames as described above.
+ *
+ * The archive is closed afer reading the contents, because rewinding is not possible in bzip2 streams.
+ * Reopen the file with open() again if you want to do additional operations
+ *
+ * @param string $outdir the target directory for extracting
+ * @param int|string $strip either the number of path components or a fixed prefix to strip
+ * @param string $exclude a regular expression of files to exclude
+ * @param string $include a regular expression of files to include
+ * @throws TarIOException
+ * @return array
+ */
+ function extract($outdir, $strip='', $exclude='', $include='') {
+ if($this->closed || !$this->file) throw(new TarIOException('Can not read from a closed archive'));
+
+ $outdir = rtrim($outdir,'/');
+ io_mkdir_p($outdir);
+ $striplen = strlen($strip);
+
+ $extracted = array();
+
+ while($dat = $this->readbytes(512)) {
+ // read the file header
+ $header = $this->parseHeader($dat);
+ if(!is_array($header)) continue;
+ if(!$header['filename']) continue;
+
+ // strip prefix
+ $filename = $this->cleanPath($header['filename']);
+ if(is_int($strip)) {
+ // if $strip is an integer we strip this many path components
+ $parts = explode('/',$filename);
+ if(!$header['typeflag']){
+ $base = array_pop($parts); // keep filename itself
+ }else{
+ $base = '';
+ }
+ $filename = join('/',array_slice($parts,$strip));
+ if($base) $filename .= "/$base";
+ }else{
+ // ifstrip is a string, we strip a prefix here
+ if(substr($filename,0,$striplen) == $strip) $filename = substr($filename,$striplen);
+ }
+
+ // check if this should be extracted
+ $extract = true;
+ if(!$filename){
+ $extract = false;
+ }else{
+ if($include){
+ if(preg_match($include, $filename)){
+ $extract = true;
+ }else{
+ $extract = false;
+ }
+ }
+ if($exclude && preg_match($exclude, $filename)){
+ $extract = false;
+ }
+ }
+
+ // Now do the extraction (or not)
+ if($extract) {
+ $extracted[] = $header;
+
+ $output = "$outdir/$filename";
+ $directory = ($header['typeflag']) ? $output : dirname($output);
+ io_mkdir_p($directory);
+
+ // is this a file?
+ if(!$header['typeflag']){
+ $fp = @fopen($output, "wb");
+ if(!$fp) throw(new TarIOException('Could not open file for writing: '.$output));
+
+ $size = floor($header['size'] / 512);
+ for($i = 0; $i < $size; $i++) {
+ fwrite($fp, $this->readbytes(512), 512);
+ }
+ if(($header['size'] % 512) != 0) fwrite($fp, $this->readbytes(512), $header['size'] % 512);
+
+ fclose($fp);
+ touch($output, $header['mtime']);
+ chmod($output, $header['perm']);
+ }else{
+ $this->skipbytes(ceil($header['size'] / 512) * 512); // the size is usually 0 for directories
+ }
+ }else{
+ $this->skipbytes(ceil($header['size'] / 512) * 512);
+ }
+ }
+
+ $this->close();
+ return $extracted;
+ }
+
+ /**
+ * Create a new TAR file
+ *
+ * If $file is empty, the tar file will be created in memory
+ *
+ * @param string $file
+ * @param int $comptype
+ * @param int $complevel
+ * @throws TarIOException
+ * @throws TarIllegalCompressionException
+ */
+ public function create($file = '', $comptype = Tar::COMPRESS_AUTO, $complevel = 9) {
+ // determine compression
+ if($comptype == Tar::COMPRESS_AUTO) $comptype = $this->filetype($file);
+ $this->compressioncheck($comptype);
+
+ $this->comptype = $comptype;
+ $this->file = $file;
+ $this->memory = '';
+ $this->fh = 0;
+
+ if($this->file) {
+ if($this->comptype === Tar::COMPRESS_GZIP) {
+ $this->fh = @gzopen($this->file, 'wb'.$complevel);
+ } elseif($this->comptype === Tar::COMPRESS_BZIP) {
+ $this->fh = @bzopen($this->file, 'w');
+ } else {
+ $this->fh = @fopen($this->file, 'wb');
+ }
+
+ if(!$this->fh) throw(new TarIOException('Could not open file for writing: '.$this->file));
+ }
+ $this->writeaccess = false;
+ $this->closed = false;
+ }
+
+ /**
+ * Add a file to the current TAR archive using an existing file in the filesystem
+ *
+ * @todo handle directory adding
+ * @param string $file the original file
+ * @param string $name the name to use for the file in the archive
+ * @throws TarBadFilename
+ * @throws TarIOException
+ */
+ public function addFile($file, $name = '') {
+ if($this->closed) throw(new TarIOException('Archive has been closed, files can no longer be added'));
+
+ if(!$name) $name = $file;
+ $name = $this->cleanPath($name);
+
+ // FIXME ustar should support up 256 chars
+ if(strlen($name) > 99) throw(new TarBadFilename('Filenames may not exceed 99 bytes: '.$name));
+
+ $fp = fopen($file, 'rb');
+ if(!$fp) throw(new TarIOException('Could not open file for reading: '.$file));
+
+ // create file header and copy all stat info from the original file
+ clearstatcache(false, $file);
+ $stat = stat($file);
+ $this->writeFileHeader(
+ $name,
+ $stat[4],
+ $stat[5],
+ fileperms($file),
+ filesize($file),
+ filemtime($file),
+ false
+ );
+
+ while(!feof($fp)) {
+ $packed = pack("a512", fread($fp, 512));
+ $this->writebytes($packed);
+ }
+ fclose($fp);
+ }
+
+ /**
+ * Add a file to the current TAR archive using in memory data
+ *
+ * @param $name
+ * @param $data
+ * @param int $uid
+ * @param int $gid
+ * @param int $perm
+ * @param int $mtime
+ * @throws TarIOException
+ * @throws TarBadFilename
+ */
+ public function addData($name, $data, $uid = 0, $gid = 0, $perm = 0666, $mtime = 0) {
+ if($this->closed) throw(new TarIOException('Archive has been closed, files can no longer be added'));
+
+ $name = $this->cleanPath($name);
+
+ // FIXME ustar should support up 256 chars
+ if(strlen($name) > 99) throw(new TarBadFilename('Filenames may not exceed 99 bytes: '.$name));
+
+ $len = strlen($data);
+
+ $this->writeFileHeader(
+ $name,
+ $uid,
+ $gid,
+ $perm,
+ $len,
+ ($mtime) ? $mtime : time(),
+ false
+ );
+
+ for($s = 0; $s < $len; $s += 512) {
+ $this->writebytes(pack("a512", substr($data, $s, 512)));
+ }
+ }
+
+ /**
+ * Add the closing footer to the archive if in write mode, close all file handles
+ *
+ * After a call to this function no more data can be added to the archive, for
+ * read access no reading is allowed anymore
+ *
+ * "Physically, an archive consists of a series of file entries terminated by an end-of-archive entry, which
+ * consists of two 512 blocks of zero bytes"
+ *
+ * @link http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html#SEC134
+ */
+ public function close() {
+ if($this->closed) return; // we did this already
+
+ // write footer
+ if($this->writeaccess){
+ $this->writebytes(pack("a512", ""));
+ $this->writebytes(pack("a512", ""));
+ }
+
+ // close file handles
+ if($this->file){
+ if($this->comptype === Tar::COMPRESS_GZIP){
+ gzclose($this->fh);
+ }elseif($this->comptype === Tar::COMPRESS_BZIP){
+ bzclose($this->fh);
+ }else{
+ fclose($this->fh);
+ }
+
+ $this->file = '';
+ $this->fh = 0;
+ }
+
+ $this->closed = true;
+ }
+
+ /**
+ * Returns the created in-memory archive data
+ *
+ * This implicitly calls close() on the Archive
+ */
+ public function getArchive($comptype = Tar::COMPRESS_AUTO, $complevel = 9) {
+ $this->close();
+
+ if($comptype === Tar::COMPRESS_AUTO) $comptype = $this->comptype;
+ $this->compressioncheck($comptype);
+
+ if($comptype === Tar::COMPRESS_GZIP) return gzcompress($this->memory, $complevel);
+ if($comptype === Tar::COMPRESS_BZIP) return bzcompress($this->memory);
+ return $this->memory;
+ }
+
+ /**
+ * Save the created in-memory archive data
+ *
+ * Note: It more memory effective to specify the filename in the create() function and
+ * let the library work on the new file directly.
+ *
+ * @param $file
+ * @param int $comptype
+ * @param int $complevel
+ * @throws TarIOException
+ */
+ public function save($file, $comptype = Tar::COMPRESS_AUTO, $complevel = 9) {
+ if($comptype === Tar::COMPRESS_AUTO) $comptype = $this->filetype($file);
+
+ if(!file_put_contents($file, $this->getArchive($comptype, $complevel))) {
+ throw(new TarIOException('Could not write to file: '.$file));
+ }
+ }
+
+ /**
+ * Read from the open file pointer
+ *
+ * @param int $length bytes to read
+ * @return string
+ */
+ protected function readbytes($length) {
+ if($this->comptype === Tar::COMPRESS_GZIP) {
+ return @gzread($this->fh, $length);
+ } elseif($this->comptype === Tar::COMPRESS_BZIP) {
+ return @bzread($this->fh, $length);
+ } else {
+ return @fread($this->fh, $length);
+ }
+ }
+
+ /**
+ * Write to the open filepointer or memory
+ *
+ * @param string $data
+ * @throws TarIOException
+ * @return int number of bytes written
+ */
+ protected function writebytes($data) {
+ if(!$this->file) {
+ $this->memory .= $data;
+ $written = strlen($data);
+ } elseif($this->comptype === Tar::COMPRESS_GZIP) {
+ $written = @gzwrite($this->fh, $data);
+ } elseif($this->comptype === Tar::COMPRESS_BZIP) {
+ $written = @bzwrite($this->fh, $data);
+ } else {
+ $written = @fwrite($this->fh, $data);
+ }
+ if($written === false) throw(new TarIOException('Failed to write to archive stream'));
+ return $written;
+ }
+
+ /**
+ * Skip forward in the open file pointer
+ *
+ * This is basically a wrapper around seek() (and a workarounf for bzip2)
+ *
+ * @param int $bytes seek to this position
+ */
+ function skipbytes($bytes) {
+ if($this->comptype === Tar::COMPRESS_GZIP){
+ @gzseek($this->fh, $bytes, SEEK_CUR);
+ }elseif($this->comptype === Tar::COMPRESS_BZIP){
+ // there is no seek in bzip2, we simply read on
+ @bzread($this->fh, $bytes);
+ }else{
+ @fseek($this->fh, $bytes, SEEK_CUR);
+ }
+ }
+
+ /**
+ * Write a file header
+ *
+ * @param string $name
+ * @param int $uid
+ * @param int $gid
+ * @param int $perm
+ * @param int $size
+ * @param int $mtime
+ * @param bool $isdir
+ */
+ protected function writeFileHeader($name, $uid, $gid, $perm, $size, $mtime, $isdir = false) {
+ // values are needed in octal
+ $uid = sprintf("%6s ", DecOct($uid));
+ $gid = sprintf("%6s ", DecOct($gid));
+ $perm = sprintf("%6s ", DecOct($perm));
+ $size = sprintf("%11s ", DecOct($size));
+ $mtime = sprintf("%11s", DecOct($mtime));
+ $dir = ($isdir) ? '5' : '';
+
+ $data_first = pack("a100a8a8a8a12A12", $name, $perm, $uid, $gid, $size, $mtime);
+ $data_last = pack("a1a100a6a2a32a32a8a8a155a12", $dir, '', '', '', '', '', '', '', '', "");
+
+ for($i = 0, $chks = 0; $i < 148; $i++)
+ $chks += ord($data_first[$i]);
+
+ for($i = 156, $chks += 256, $j = 0; $i < 512; $i++, $j++)
+ $chks += ord($data_last[$j]);
+
+ $this->writebytes($data_first);
+
+ $chks = pack("a8", sprintf("%6s ", DecOct($chks)));
+ $this->writebytes($chks.$data_last);
+ }
+
+ /**
+ * Decode the given tar file header
+ *
+ * @todo how to handle filenames >100 chars?
+ * @param string $block a 512 byte block containign the header data
+ * @return array|bool
+ */
+ protected function parseHeader($block) {
+ if(!$block || strlen($block) != 512) return false;
+
+ for($i = 0, $chks = 0; $i < 148; $i++)
+ $chks += ord($block[$i]);
+
+ for($i = 156, $chks += 256; $i < 512; $i++)
+ $chks += ord($block[$i]);
+
+ $headers = @unpack("a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor", $block);
+ if(!$headers) return false;
+
+ $return['checksum'] = OctDec(trim($headers['checksum']));
+ if($return['checksum'] != $chks) return false;
+
+ $return['filename'] = trim($headers['filename']);
+ $return['perm'] = OctDec(trim($headers['perm']));
+ $return['uid'] = OctDec(trim($headers['uid']));
+ $return['gid'] = OctDec(trim($headers['gid']));
+ $return['size'] = OctDec(trim($headers['size']));
+ $return['mtime'] = OctDec(trim($headers['mtime']));
+ $return['typeflag'] = $headers['typeflag'];
+ $return['link'] = trim($headers['link']);
+ $return['uname'] = trim($headers['uname']);
+ $return['gname'] = trim($headers['gname']);
+
+ return $return;
+ }
+
+ /**
+ * Cleans up a path and removes relative parts
+ *
+ * @param string $p_dir
+ * @return string
+ */
+ protected function cleanPath($p_dir) {
+ $r = '';
+ if($p_dir) {
+ $subf = explode("/", $p_dir);
+
+ for($i = count($subf) - 1; $i >= 0; $i--) {
+ if($subf[$i] == ".") {
+ # do nothing
+ } elseif($subf[$i] == "..") {
+ $i--;
+ } elseif(!$subf[$i] && $i != count($subf) - 1 && $i) {
+ # do nothing
+ } else {
+ $r = $subf[$i].($i != (count($subf) - 1) ? "/".$r : "");
+ }
+ }
+ }
+ return $r;
+ }
+
+ /**
+ * Checks if the given compression type is available and throws an exception if not
+ *
+ * @param $comptype
+ * @throws TarIllegalCompressionException
+ */
+ protected function compressioncheck($comptype) {
+ if($comptype === Tar::COMPRESS_GZIP && !function_exists('gzopen')) {
+ throw(new TarIllegalCompressionException('No gzip support available'));
+ }
+
+ if($comptype === Tar::COMPRESS_BZIP && !function_exists('bzopen')) {
+ throw(new TarIllegalCompressionException('No bzip2 support available'));
+ }
+ }
+
+ /**
+ * Guesses the wanted compression from the given filename extension
+ *
+ * You don't need to call this yourself. It's used when you pass Tar::COMPRESS_AUTO somewhere
+ *
+ * @param string $file
+ * @return int
+ */
+ public function filetype($file) {
+ $file = strtolower($file);
+ if(substr($file, -3) == '.gz' || substr($file, -4) == '.tgz') {
+ $comptype = Tar::COMPRESS_GZIP;
+ } elseif(substr($file, -4) == '.bz2' || substr($file, -4) == '.tbz') {
+ $comptype = Tar::COMPRESS_BZIP;
+ } else {
+ $comptype = Tar::COMPRESS_NONE;
+ }
+ return $comptype;
+ }
+}
+
+class TarBadFilename extends Exception {
+}
+
+class TarIOException extends Exception {
+}
+
+class TarIllegalCompressionException extends Exception {
+}
\ No newline at end of file
diff --git a/inc/load.php b/inc/load.php
index b8a279523..49c307054 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -71,6 +71,7 @@ function load_autoload($name){
'IXR_IntrospectionServer' => DOKU_INC.'inc/IXR_Library.php',
'Doku_Plugin_Controller'=> DOKU_INC.'inc/plugincontroller.class.php',
'GeSHi' => DOKU_INC.'inc/geshi.php',
+ 'Tar' => DOKU_INC.'inc/Tar.class.php',
'TarLib' => DOKU_INC.'inc/TarLib.class.php',
'ZipLib' => DOKU_INC.'inc/ZipLib.class.php',
'DokuWikiFeedCreator' => DOKU_INC.'inc/feedcreator.class.php',
--
cgit v1.2.3
From fba11f64c26a8dde5f64c57233b0da84fae35959 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sat, 3 Nov 2012 18:42:57 +0100
Subject: removed old TarLib and changed plugin manager to use new one
---
inc/TarLib.class.php | 921 ---------------------------------------------------
inc/load.php | 1 -
2 files changed, 922 deletions(-)
delete mode 100644 inc/TarLib.class.php
(limited to 'inc')
diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php
deleted file mode 100644
index e04c47cb8..000000000
--- a/inc/TarLib.class.php
+++ /dev/null
@@ -1,921 +0,0 @@
- (Maxg)
- * @author Christopher Smith
- */
-
-/**
- * Those constants represent the compression method to use.
- * COMPRESS_GZIP is used for the GZIP compression; COMPRESS_BZIP for
- * BZIP2 and COMPRESS_NONE for no compression.
- *
- * On the other hand, COMPRESS_AUTO is a bit harder. It will first check
- * if the zlib extensions are loaded.
- * If it is, GZIP will be used. Else it will check if the bz2 extensions
- * are loaded. If it is, BZIP2 will be used. Else no compression will be
- * performed.
- *
- * You can then use getCompression() to know the compression chosen.
- *
- * If you selected a compression which can't be used (i.e extension not
- * present), it will be just disabled, and won't produce any error !
- * As a consequence, getCompression() will return COMPRESS_NONE
- *
- * ARCHIVE_DYNAMIC can be passed as the first argument of the constructor, to
- * create an archive in memory instead of a file. See also: MaxgTar(),
- * getDynamicArchive() and writeArchive()
- *
- * ARCHIVE_RENAMECOMP is a flag that can be multiplied by the compression method
- * (i.e COMPRESS_AUTO * ARCHIVE_RENAMECOMP). This will add the correct extension
- * to the archive name, which is useful with COMPRESS_AUTO, ie .bz2 if you gave
- * COMPRESS_BZIP. See also getCompression(TRUE) which does exactly the
- * same
- *
- * COMPRESS_DETECT does exactly the opposite and try to detect the
- * compression to use to read the archive depending on its extension. (i.e if
- * the archive ends with .tar.gz TarLib will try to decompress it with
- * GZIP). See also setCompression()
- *
- * FULL_ARCHIVE is a -1 constant that means "the complete archive" when
- * extracting. This is explained in Extract()
- */
-#define('COMPRESS_GZIP',1);
-#define('COMPRESS_BZIP',2);
-#define('COMPRESS_AUTO',3);
-#define('COMPRESS_NONE',0);
-#define('TARLIB_VERSION','1.2');
-#define('FULL_ARCHIVE',-1);
-#define('ARCHIVE_DYNAMIC',0);
-#define('ARCHIVE_RENAMECOMP',5);
-#define('COMPRESS_DETECT',-1);
-
-class TarLib {
- var $_comptype;
- var $_compzlevel;
- var $_fp;
- var $_memdat;
- var $_nomf;
- var $_result;
- var $_initerror;
-
- const COMPRESS_GZIP = 1;
- const COMPRESS_BZIP = 2;
- const COMPRESS_AUTO = 3;
- const COMPRESS_NONE = 0;
- const TARLIB_VERSION = '1.2';
- const FULL_ARCHIVE = -1;
- const ARCHIVE_DYNAMIC = 0;
- const ARCHIVE_RENAMECOMP = 5;
- const COMPRESS_DETECT = -1;
-
- /**
- * constructor, initialize the class
- *
- * The constructor initialize the variables and prepare the class for the
- * archive, and return the object created. Note that you can use multiple
- * instances of the MaxgTar class, if you call this function another time and
- * store the object in an other variable.
- *
- * In fact, MaxgTar accepts the following arguments (all are optional) :
- *
- * filename can be either a file name (absolute or relative). In this
- * case, it can be used both for reading and writing. You can also open
- * remote archive if you add a protocole name at the beginning of the file
- * (ie https://host.dom/archive.tar.gz), but for reading only and if the
- * directive allow_url_fopen is enabled in PHP.INI (this can be checked with
- * TarInfo()). If you pass a file that doesn't exist, the script
- * will try to create it. If the archive already exists and contains files,
- * you can use Add() to append files.But by default this parameter
- * is ARCHIVE_DYNAMIC (write only) so the archive is created in memory and
- * can be sent to a file [writeArchive()] or to the client
- * [sendClient()]
- *
- * compression_type should be a constant that represents a type of
- * compression, or its integer value. The different values are described in
- * the constants.
- *
- * compression_level is an integer between 1 and 9 (by default) an
- * represent the GZIP or BZIP compression level. 1 produce fast compression,
- * and 9 produce smaller files. See the RFC 1952 for more infos.
- */
- function __construct($p_filen = TarLib::ARCHIVE_DYNAMIC, $p_comptype = TarLib::COMPRESS_AUTO, $p_complevel = 9) {
- $this->_initerror = 0;
- $this->_nomf = $p_filen;
- $flag = 0;
- if($p_comptype && $p_comptype % 5 == 0) {
- $p_comptype /= TarLib::ARCHIVE_RENAMECOMP;
- $flag = 1;
- }
-
- if($p_complevel > 0 && $p_complevel <= 9) $this->_compzlevel = $p_complevel;
- else $this->_compzlevel = 9;
-
- if($p_comptype == TarLib::COMPRESS_DETECT) {
- if(strtolower(substr($p_filen, -3)) == '.gz') $p_comptype = TarLib::COMPRESS_GZIP;
- elseif(strtolower(substr($p_filen, -4)) == '.bz2') $p_comptype = TarLib::COMPRESS_BZIP;
- else $p_comptype = TarLib::COMPRESS_NONE;
- }
-
- switch($p_comptype) {
- case TarLib::COMPRESS_GZIP:
- if(!extension_loaded('zlib')) $this->_initerror = -1;
- $this->_comptype = TarLib::COMPRESS_GZIP;
- break;
-
- case TarLib::COMPRESS_BZIP:
- if(!extension_loaded('bz2')) $this->_initerror = -2;
- $this->_comptype = TarLib::COMPRESS_BZIP;
- break;
-
- case TarLib::COMPRESS_AUTO:
- if(extension_loaded('zlib'))
- $this->_comptype = TarLib::COMPRESS_GZIP;
- elseif(extension_loaded('bz2'))
- $this->_comptype = TarLib::COMPRESS_BZIP;
- else
- $this->_comptype = TarLib::COMPRESS_NONE;
- break;
-
- default:
- $this->_comptype = TarLib::COMPRESS_NONE;
- }
-
- if($this->_initerror < 0) $this->_comptype = TarLib::COMPRESS_NONE;
-
- if($flag) $this->_nomf .= '.'.$this->getCompression(1);
- $this->_result = true;
- }
-
- /**
- * Recycle a TAR object.
- *
- * This function does exactly the same as TarLib (constructor), except it
- * returns a status code.
- */
- function setArchive($p_name = '', $p_comp = TarLib::COMPRESS_AUTO, $p_level = 9) {
- $this->_CompTar();
- $this->__construct($p_name, $p_comp, $p_level);
- return $this->_result;
- }
-
- /**
- * Get the compression used to generate the archive
- *
- * This is a very useful function when you're using dynamical archives.
- * Besides, if you let the script chose which compression to use, you'll have
- * a problem when you'll want to send it to the client if you don't know
- * which compression was used.
- *
- * There are two ways to call this function : if you call it without argument
- * or with FALSE, it will return the compression constants, explained on the
- * MaxgTar Constants. If you call it with GetExtension on TRUE it will
- * return the extension without starting dot (ie "tar" or "tar.bz2" or
- * "tar.gz")
- *
- * NOTE: This can be done with the flag ARCHIVE_RENAMECOMP, see the
- * MaxgTar Constants
- */
- function getCompression($ext = false) {
- $exts = Array('tar', 'tar.gz', 'tar.bz2');
- if($ext) return $exts[$this->_comptype];
- return $this->_comptype;
- }
-
- /**
- * Change the compression mode.
- *
- * This function will change the compression methode to read or write
- * the archive. See the MaxgTar Constants to see which constants you can use.
- * It may look strange, but it returns the GZIP compression level.
- */
- function setCompression($p_comp = TarLib::COMPRESS_AUTO) {
- $this->setArchive($this->_nomf, $p_comp, $this->_compzlevel);
- return $this->_compzlevel;
- }
-
- /**
- * Returns the compressed dynamic archive.
- *
- * When you're working with dynamic archives, use this function to grab
- * the final compressed archive in a string ready to be put in a SQL table or
- * in a file.
- */
- function getDynamicArchive() {
- return $this->_encode($this->_memdat);
- }
-
- /**
- * Write a dynamical archive into a file
- *
- * This function attempts to write a dynamicaly-genrated archive into
- * TargetFile on the webserver. It returns a TarErrorStr() status
- * code.
- *
- * To know the extension to add to the file if you're using AUTO_DETECT
- * compression, you can use getCompression().
- */
- function writeArchive($p_archive) {
- if(!$this->_memdat) return -7;
- $fp = @fopen($p_archive, 'wb');
- if(!$fp) return -6;
-
- fwrite($fp, $this->_memdat);
- fclose($fp);
-
- return true;
- }
-
- /**
- * Send a TAR archive to the client browser.
- *
- * This function will send an archive to the client, and return a status
- * code, but can behave differently depending on the arguments you give. All
- * arguments are optional.
- *
- * ClientName is used to specify the archive name to give to the browser. If
- * you don't give one, it will send the constructor filename or return an
- * error code in case of dynamical archive.
- *
- * FileName is optional and used to send a specific archive. Leave it blank
- * to send dynamical archives or the current working archive.
- *
- * If SendHeaders is enabled (by default), the library will send the HTTP
- * headers itself before it sends the contents. This headers are :
- * Content-Type, Content-Disposition, Content-Length and Accept-Range.
- *
- * Please note that this function DOES NOT stops the script so don't forget
- * to exit() to avoid your script sending other data and corrupt the archive.
- * Another note : for AUTO_DETECT dynamical archives you can know the
- * extension to add to the name with getCompression()
- */
- function sendClient($name = '', $archive = '', $headers = true) {
- if(!$name && !$this->_nomf) return -9;
- if(!$archive && !$this->_memdat) return -10;
- if(!$name) $name = utf8_basename($this->_nomf);
-
- if($archive) {
- if(!file_exists($archive)) return -11;
- }
- $decoded = $this->getDynamicArchive();
-
- if($headers) {
- header('Content-Type: application/x-gtar');
- header('Content-Disposition: attachment; filename='.utf8_basename($name));
- header('Accept-Ranges: bytes');
- header('Content-Length: '.($archive ? filesize($archive) : strlen($decoded)));
- }
-
- if($archive) {
- $fp = @fopen($archive, 'rb');
- if(!$fp) return -4;
-
- while(!feof($fp)) echo fread($fp, 2048);
- } else {
- echo $decoded;
- }
-
- return true;
- }
-
- /**
- * Extract part or totality of the archive.
- *
- * This function can extract files from an archive, and returns then a
- * status codes that can be converted with TarErrorStr() into a
- * human readable message.
- *
- * Only the first argument is required, What and it can be either the
- * constant FULL_ARCHIVE or an indexed array containing each file you want to
- * extract.
- *
- * To contains the target folder to extract the archive. It is optional and
- * the default value is '.' which means the current folder. If the target
- * folder doesn't exist, the script attempts to create it and give it
- * permissions 0777 by default.
- *
- * RemovePath is very usefull when you want to extract files from a subfoler
- * in the archive to a root folder. For instance, if you have a file in the
- * archive called some/sub/folder/test.txt and you want to extract it to the
- * script folder, you can call Extract with To = '.' and RemovePath =
- * 'some/sub/folder/'
- *
- * FileMode is optional and its default value is 0755. It is in fact the UNIX
- * permission in octal mode (prefixed with a 0) that will be given on each
- * extracted file.
- */
- function Extract($p_what = TarLib::FULL_ARCHIVE, $p_to = '.', $p_remdir = '', $p_mode = 0755) {
- if(!$this->_OpenRead()) return -4;
- // if(!@is_dir($p_to)) if(!@mkdir($p_to, 0777)) return -8; --CS
- if(!@is_dir($p_to)) if(!$this->_dirApp($p_to)) return -8; //--CS (route through correct dir fn)
-
- $ok = $this->_extractList($p_to, $p_what, $p_remdir, $p_mode);
- $this->_CompTar();
-
- return $ok;
- }
-
- /**
- * Create a new package with the given files
- *
- * This function will attempt to create a new archive with global headers
- * then add the given files into. If the archive is a real file, the
- * contents are written directly into the file. If it is a dynamic archive,
- * contents are only stored in memory. This function should not be used to
- * add files to an existing archive, you should use Add() instead.
- *
- * The FileList actually supports three different modes:
- *
- * - You can pass a string containing filenames separated by pipes '|'.
- * In this case thes file are read from the filesystem and the root folder
- * is the folder running script located. NOT RECOMMENDED
- *
- * - You can also give an indexed array containing the filenames. The
- * behaviour for the content reading is the same as above.
- *
- * - You can pass an array of arrays. For each file use an array where the
- * first element contains the filename and the second contains the file
- * contents. You can even add empty folders to the package if the filename
- * has a leading '/'. Once again, have a look at the exemples to understand
- * better.
- *
- * Note you can also give arrays with both dynamic contents and static files.
- *
- * The optional parameter RemovePath can be used to delete a part of the tree
- * of the filename you're adding, for instance if you're adding in the root
- * of a package a file that is stored somewhere in the server tree.
- *
- * On the contrary the parameter AddPath can be used to add a prefix folder
- * to the file you store. Note also that the RemovePath is applied before the
- * AddPath is added, so it HAS a sense to use both parameters together.
- */
- function Create($p_filelist, $p_add = '', $p_rem = '') {
- if(!$fl = $this->_fetchFilelist($p_filelist)) return -5;
- if(!$this->_OpenWrite()) return -6;
-
- $ok = $this->_addFileList($fl, $p_add, $p_rem);
-
- if($ok) {
- $this->_writeFooter();
- } else {
- $this->_CompTar();
- @unlink($this->_nomf);
- }
-
- return $ok;
- }
-
- /**
- * Add files to an existing package.
- *
- * This function does exactly the same as Create() exept it
- * will append the given files at the end of the archive.
- *
- * Note: This is only supported for dynamic in memory files and uncompressed
- * tar files
- *
- * This function returns a status code, you can use TarErrorStr() on
- * it to get the human-readable description of the error.
- */
- function Add($p_filelist, $p_add = '', $p_rem = '') {
- if($this->_nomf !== TarLib::ARCHIVE_DYNAMIC &&
- $this->_comptype !== TarLib::COMPRESS_NONE
- ) {
- return -12;
- }
-
- if(($this->_nomf !== TarLib::ARCHIVE_DYNAMIC && !$this->_fp) ||
- ($this->_nomf === TarLib::ARCHIVE_DYNAMIC && !$this->_memdat)
- ) {
- return $this->Create($p_filelist, $p_add, $p_rem);
- }
-
- if(!$fl = $this->_fetchFilelist($p_filelist)) return -5;
- return $this->_append($fl, $p_add, $p_rem);
- }
-
- /**
- * Read the contents of a TAR archive
- *
- * This function attempts to get the list of the files stored in the
- * archive, and return either an error code or an indexed array of
- * associative array containing for each file the following information :
- *
- * checksum Tar Checksum of the file
- * filename The full name of the stored file (up to 100 c.)
- * mode UNIX permissions in DECIMAL, not octal
- * uid The Owner ID
- * gid The Group ID
- * size Uncompressed filesize
- * mtime Timestamp of last modification
- * typeflag Empty for files, set for folders
- * link For the links, did you guess it ?
- * uname Owner name
- * gname Group name
- */
- function ListContents() {
- if(!$this->_nomf) return -3;
- if(!$this->_OpenRead()) return -4;
-
- $result = Array();
-
- while($dat = $this->_read(512)) {
- $dat = $this->_readHeader($dat);
- if(!is_array($dat)) continue;
-
- $this->_seek(ceil($dat['size'] / 512) * 512, 1);
- $result[] = $dat;
- }
-
- return $result;
- }
-
- /**
- * Convert a status code into a human readable message
- *
- * Some MaxgTar functions like Create(), Add() ... return numerical
- * status code. You can pass them to this function to grab their english
- * equivalent.
- */
- function TarErrorStr($i) {
- $ecodes = Array(
- 1 => true,
- 0 => "Undocumented error",
- -1 => "Can't use COMPRESS_GZIP compression : ZLIB extensions are not loaded !",
- -2 => "Can't use COMPRESS_BZIP compression : BZ2 extensions are not loaded !",
- -3 => "You must set a archive file to read the contents !",
- -4 => "Can't open the archive file for read !",
- -5 => "Invalide file list !",
- -6 => "Can't open the archive in write mode !",
- -7 => "There is no ARCHIVE_DYNAMIC to write !",
- -8 => "Can't create the directory to extract files !",
- -9 => "Please pass a archive name to send if you made created an ARCHIVE_DYNAMIC !",
- -10 => "You didn't pass an archive filename and there is no stored ARCHIVE_DYNAMIC !",
- -11 => "Given archive doesn't exist !",
- -12 => "Appending not supported for compressed files"
- );
-
- return isset($ecodes[$i]) ? $ecodes[$i] : $ecodes[0];
- }
-
- /**
- * Seek in the data stream
- *
- * @todo probably broken for bzip tars
- * @param int $p_flen seek to this position
- * @param bool $tell seek from current position?
- */
- function _seek($p_flen, $tell = false) {
- if($this->_nomf === TarLib::ARCHIVE_DYNAMIC)
- $this->_memdat = substr($this->_memdat, 0, ($tell ? strlen($this->_memdat) : 0) + $p_flen);
- elseif($this->_comptype == TarLib::COMPRESS_GZIP)
- @gzseek($this->_fp, ($tell ? @gztell($this->_fp) : 0) + $p_flen);
- elseif($this->_comptype == TarLib::COMPRESS_BZIP)
- @fseek($this->_fp, ($tell ? @ftell($this->_fp) : 0) + $p_flen);
- else
- @fseek($this->_fp, ($tell ? @ftell($this->_fp) : 0) + $p_flen);
- }
-
- /**
- * Open the archive for reading
- *
- * @return bool true if succesfull
- */
- function _OpenRead() {
- if($this->_comptype == TarLib::COMPRESS_GZIP)
- $this->_fp = @gzopen($this->_nomf, 'rb');
- elseif($this->_comptype == TarLib::COMPRESS_BZIP)
- $this->_fp = @bzopen($this->_nomf, 'rb');
- else
- $this->_fp = @fopen($this->_nomf, 'rb');
-
- return ($this->_fp ? true : false);
- }
-
- /**
- * Open the archive for writing
- *
- * @param string $add filemode
- * @return bool true on success
- */
- function _OpenWrite($add = 'w') {
- if($this->_nomf === TarLib::ARCHIVE_DYNAMIC) return true;
-
- if($this->_comptype == TarLib::COMPRESS_GZIP)
- $this->_fp = @gzopen($this->_nomf, $add.'b'.$this->_compzlevel);
- elseif($this->_comptype == TarLib::COMPRESS_BZIP)
- $this->_fp = @bzopen($this->_nomf, $add.'b');
- else
- $this->_fp = @fopen($this->_nomf, $add.'b');
-
- return ($this->_fp ? true : false);
- }
-
- /**
- * Closes the open file pointer
- */
- function _CompTar() {
- if($this->_nomf === TarLib::ARCHIVE_DYNAMIC || !$this->_fp) return;
-
- if($this->_comptype == TarLib::COMPRESS_GZIP) @gzclose($this->_fp);
- elseif($this->_comptype == TarLib::COMPRESS_BZIP) @bzclose($this->_fp);
- else @fclose($this->_fp);
- }
-
- /**
- * Read from the open file pointer
- *
- * @param int $p_len bytes to read
- * @return string
- */
- function _read($p_len) {
- if($this->_comptype == TarLib::COMPRESS_GZIP)
- return @gzread($this->_fp, $p_len);
- elseif($this->_comptype == TarLib::COMPRESS_BZIP)
- return @bzread($this->_fp, $p_len);
- else
- return @fread($this->_fp, $p_len);
- }
-
- /**
- * Write to the open filepointer or memory
- *
- * @param string $p_data
- * @return int
- */
- function _write($p_data) {
- if($this->_nomf === TarLib::ARCHIVE_DYNAMIC) {
- $this->_memdat .= $p_data;
- return strlen($p_data);
- } elseif($this->_comptype == TarLib::COMPRESS_GZIP) {
- return @gzwrite($this->_fp, $p_data);
- } elseif($this->_comptype == TarLib::COMPRESS_BZIP) {
- return @bzwrite($this->_fp, $p_data);
- } else {
- return @fwrite($this->_fp, $p_data);
- }
- }
-
- /**
- * Compress given data according to the set compression method
- *
- * @param $p_dat
- * @return string
- */
- function _encode($p_dat) {
- if($this->_comptype == TarLib::COMPRESS_GZIP)
- return gzencode($p_dat, $this->_compzlevel);
- elseif($this->_comptype == TarLib::COMPRESS_BZIP)
- return bzcompress($p_dat, $this->_compzlevel);
- else return $p_dat;
- }
-
- /**
- * Decode the given tar file header
- *
- * @param $p_dat
- * @return array|bool
- */
- function _readHeader($p_dat) {
- if(!$p_dat || strlen($p_dat) != 512) return false;
-
- for($i = 0, $chks = 0; $i < 148; $i++)
- $chks += ord($p_dat[$i]);
-
- for($i = 156, $chks += 256; $i < 512; $i++)
- $chks += ord($p_dat[$i]);
-
- $headers = @unpack("a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor", $p_dat);
- if(!$headers) return false;
-
- $return['checksum'] = OctDec(trim($headers['checksum']));
- if($return['checksum'] != $chks) return false;
-
- $return['filename'] = trim($headers['filename']);
- $return['mode'] = OctDec(trim($headers['mode']));
- $return['uid'] = OctDec(trim($headers['uid']));
- $return['gid'] = OctDec(trim($headers['gid']));
- $return['size'] = OctDec(trim($headers['size']));
- $return['mtime'] = OctDec(trim($headers['mtime']));
- $return['typeflag'] = $headers['typeflag'];
- $return['link'] = trim($headers['link']);
- $return['uname'] = trim($headers['uname']);
- $return['gname'] = trim($headers['gname']);
-
- return $return;
- }
-
- /**
- * Builds a normalized file list
- *
- * @todo remove string support, use saner format
- *
- * @param $p_filelist
- * @return array|bool
- */
- function _fetchFilelist($p_filelist) {
- if(!$p_filelist || (is_array($p_filelist) && !@count($p_filelist))) return false;
-
- if(is_string($p_filelist)) {
- $p_filelist = explode('|', $p_filelist);
- if(!is_array($p_filelist)) $p_filelist = Array($p_filelist);
- }
-
- return $p_filelist;
- }
-
- /**
- * Adds files given as file list
- *
- * @param array $p_fl
- * @param string $p_addir
- * @param string $p_remdir
- * @return bool
- */
- function _addFileList($p_fl, $p_addir, $p_remdir) {
- foreach($p_fl as $file) {
- if(($file == $this->_nomf && $this->_nomf !== TarLib::ARCHIVE_DYNAMIC) || !$file || (!is_array($file) && !file_exists($file)))
- continue;
-
- if(!$this->_addFile($file, $p_addir, $p_remdir))
- continue;
-
- if(@is_dir($file)) {
- $d = @opendir($file);
-
- if(!$d) continue;
- readdir($d);
- readdir($d);
-
- while($f = readdir($d)) {
- if($file != ".") $tmplist[0] = "$file/$f";
- else $tmplist[0] = $d;
-
- $this->_addFileList($tmplist, $p_addir, $p_remdir);
- }
-
- closedir($d);
- unset($tmplist, $f);
- }
- }
- return true;
- }
-
- /**
- * Adds a single file
- *
- * @param array|string $p_fn
- * @param string $p_addir
- * @param string $p_remdir
- * @return bool
- */
- function _addFile($p_fn, $p_addir = '', $p_remdir = '') {
- $data = false;
- if(is_array($p_fn)) list($p_fn, $data) = $p_fn;
- $sname = $p_fn;
-
- if($p_remdir) {
- if(substr($p_remdir, -1) != '/') $p_remdir .= "/";
-
- if(substr($sname, 0, strlen($p_remdir)) == $p_remdir)
- $sname = substr($sname, strlen($p_remdir));
- }
-
- if($p_addir) $sname = $p_addir.(substr($p_addir, -1) == '/' ? '' : "/").$sname;
-
- // FIXME ustar should support up 256 chars
- if(strlen($sname) > 99) return false;
-
- if(@is_dir($p_fn)) {
- if(!$this->_writeFileHeader($p_fn, $sname)) return false;
- } else {
- if(!$data) {
- $fp = fopen($p_fn, 'rb');
- if(!$fp) return false;
- }
-
- if(!$this->_writeFileHeader($p_fn, $sname, ($data ? strlen($data) : false))) return false;
-
- if(!$data) {
- while(!feof($fp)) {
- $packed = pack("a512", fread($fp, 512));
- $this->_write($packed);
- }
- fclose($fp);
- } else {
- $len = strlen($data);
- for($s = 0; $s < $len; $s += 512) {
- $this->_write(pack("a512", substr($data, $s, 512)));
- }
- }
- }
-
- return true;
- }
-
- /**
- * Write the header for a file in the TAR archive
- *
- * @param string $p_file
- * @param string $p_sname
- * @param bool $p_data
- * @return bool
- */
- function _writeFileHeader($p_file, $p_sname, $p_data = false) {
- if(!$p_data) {
- if(!$p_sname) $p_sname = $p_file;
- $p_sname = $this->_pathTrans($p_sname);
-
- $h_info = stat($p_file);
- $h[0] = sprintf("%6s ", DecOct($h_info[4]));
- $h[] = sprintf("%6s ", DecOct($h_info[5]));
- $h[] = sprintf("%6s ", DecOct(fileperms($p_file)));
- clearstatcache();
- $h[] = sprintf("%11s ", DecOct(filesize($p_file)));
- $h[] = sprintf("%11s", DecOct(filemtime($p_file)));
-
- $dir = @is_dir($p_file) ? '5' : '';
- } else {
- $dir = '';
- $p_data = sprintf("%11s ", DecOct($p_data));
- $time = sprintf("%11s ", DecOct(time()));
- $h = Array(" 0 ", " 0 ", " 40777 ", $p_data, $time);
- }
-
- $data_first = pack("a100a8a8a8a12A12", $p_sname, $h[2], $h[0], $h[1], $h[3], $h[4]);
- $data_last = pack("a1a100a6a2a32a32a8a8a155a12", $dir, '', '', '', '', '', '', '', '', "");
-
- for($i = 0, $chks = 0; $i < 148; $i++)
- $chks += ord($data_first[$i]);
-
- for($i = 156, $chks += 256, $j = 0; $i < 512; $i++, $j++)
- $chks += ord($data_last[$j]);
-
- $this->_write($data_first);
-
- $chks = pack("a8", sprintf("%6s ", DecOct($chks)));
- $this->_write($chks.$data_last);
-
- return true;
- }
-
- /**
- * Append the given files to the already open archive
- *
- * @param array $p_filelist
- * @param string $p_addir
- * @param string $p_remdir
- * @return bool|int
- */
- function _append($p_filelist, $p_addir = "", $p_remdir = "") {
- if(!$this->_fp) if(!$this->_OpenWrite('a')) return -6;
-
- if($this->_nomf === TarLib::ARCHIVE_DYNAMIC) {
- $this->_memdat = substr($this->_memdat, 0, -512 * 2); // remove footer
- } else {
- clearstatcache();
- $s = filesize($this->_nomf);
-
- $this->_seek($s - (512 * 2)); // remove footer
- }
-
- $ok = $this->_addFileList($p_filelist, $p_addir, $p_remdir);
- $this->_writeFooter();
-
- return $ok;
- }
-
- /**
- * Cleans up a path and removes relative parts
- *
- * @param string $p_dir
- * @return string
- */
- function _pathTrans($p_dir) {
- $r = '';
- if($p_dir) {
- $subf = explode("/", $p_dir);
-
- for($i = count($subf) - 1; $i >= 0; $i--) {
- if($subf[$i] == ".") {
- # do nothing
- } elseif($subf[$i] == "..") {
- $i--;
- } elseif(!$subf[$i] && $i != count($subf) - 1 && $i) {
- # do nothing
- } else {
- $r = $subf[$i].($i != (count($subf) - 1) ? "/".$r : "");
- }
- }
- }
- return $r;
- }
-
- /**
- * Add the closing footer to the archive
- *
- * Physically, an archive consists of a series of file entries terminated by an end-of-archive entry, which
- * consists of two 512 blocks of zero bytes
- *
- * @link http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html#SEC134
- */
- function _writeFooter() {
- $this->_write(pack("a512", ""));
- $this->_write(pack("a512", ""));
- }
-
- /**
- * @param $p_to
- * @param $p_files
- * @param $p_remdir
- * @param int $p_mode
- * @return array|bool|int|string
- */
- function _extractList($p_to, $p_files, $p_remdir, $p_mode = 0755) {
- if(!$p_to || ($p_to[0] != "/" && substr($p_to, 0, 3) != "../" && substr($p_to, 1, 3) != ":\\" && substr($p_to, 1, 2) != ":/")) /*" // <- PHP Coder bug */
- $p_to = "./$p_to";
-
- if($p_remdir && substr($p_remdir, -1) != '/') $p_remdir .= '/';
- $p_remdirs = strlen($p_remdir);
- while($dat = $this->_read(512)) {
- $headers = $this->_readHeader($dat);
- if(!$headers['filename']) continue;
-
- if($p_files == -1 || $p_files[0] == -1) {
- $extract = true;
- } else {
- $extract = false;
-
- foreach($p_files as $f) {
- if(substr($f, -1) == "/") {
- if((strlen($headers['filename']) > strlen($f)) && (substr($headers['filename'], 0, strlen($f)) == $f)) {
- $extract = true;
- break;
- }
- } elseif($f == $headers['filename']) {
- $extract = true;
- break;
- }
- }
- }
-
- if($extract) {
- $det[] = $headers;
- if($p_remdir && substr($headers['filename'], 0, $p_remdirs) == $p_remdir)
- $headers['filename'] = substr($headers['filename'], $p_remdirs);
-
- if($headers['filename'].'/' == $p_remdir && $headers['typeflag'] == '5') continue;
-
- if($p_to != "./" && $p_to != "/") {
- while($p_to{-1} == "/") $p_to = substr($p_to, 0, -1);
-
- if($headers['filename']{0} == "/")
- $headers['filename'] = $p_to.$headers['filename'];
- else
- $headers['filename'] = $p_to."/".$headers['filename'];
- }
-
- $ok = $this->_dirApp($headers['typeflag'] == "5" ? $headers['filename'] : dirname($headers['filename']));
- if($ok < 0) return $ok;
-
- if(!$headers['typeflag']) {
- if(!$fp = @fopen($headers['filename'], "wb")) return -6;
- $n = floor($headers['size'] / 512);
-
- for($i = 0; $i < $n; $i++) {
- fwrite($fp, $this->_read(512), 512);
- }
- if(($headers['size'] % 512) != 0) fwrite($fp, $this->_read(512), $headers['size'] % 512);
-
- fclose($fp);
- touch($headers['filename'], $headers['mtime']);
- chmod($headers['filename'], $p_mode);
- } else {
- $this->_seek(ceil($headers['size'] / 512) * 512, 1);
- }
- } else $this->_seek(ceil($headers['size'] / 512) * 512, 1);
- }
- return $det;
- }
-
- /**
- * Create a directory hierarchy in filesystem
- *
- * @param string $d
- * @return bool
- */
- function _dirApp($d) {
- // map to dokuwiki function (its more robust)
- return io_mkdir_p($d);
- }
-
-}
-
diff --git a/inc/load.php b/inc/load.php
index 49c307054..2ea0d8efd 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -72,7 +72,6 @@ function load_autoload($name){
'Doku_Plugin_Controller'=> DOKU_INC.'inc/plugincontroller.class.php',
'GeSHi' => DOKU_INC.'inc/geshi.php',
'Tar' => DOKU_INC.'inc/Tar.class.php',
- 'TarLib' => DOKU_INC.'inc/TarLib.class.php',
'ZipLib' => DOKU_INC.'inc/ZipLib.class.php',
'DokuWikiFeedCreator' => DOKU_INC.'inc/feedcreator.class.php',
'Doku_Parser_Mode' => DOKU_INC.'inc/parser/parser.php',
--
cgit v1.2.3
From 421a2704022cbc8fa07ab673c2d503199f460b8e Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 4 Nov 2012 10:36:58 +0100
Subject: Tar: Added extraction support for long file names
Supports POSIX ustar prefixes and GNU longlink entries
---
inc/Tar.class.php | 43 ++++++++++++++++++++++++++++---------------
1 file changed, 28 insertions(+), 15 deletions(-)
(limited to 'inc')
diff --git a/inc/Tar.class.php b/inc/Tar.class.php
index 7f5e5af4a..8da30e736 100644
--- a/inc/Tar.class.php
+++ b/inc/Tar.class.php
@@ -204,7 +204,7 @@ class Tar {
// is this a file?
if(!$header['typeflag']){
- $fp = @fopen($output, "wb");
+ $fp = fopen($output, "wb");
if(!$fp) throw(new TarIOException('Could not open file for writing: '.$output));
$size = floor($header['size'] / 512);
@@ -508,7 +508,6 @@ class Tar {
/**
* Decode the given tar file header
*
- * @todo how to handle filenames >100 chars?
* @param string $block a 512 byte block containign the header data
* @return array|bool
*/
@@ -521,22 +520,36 @@ class Tar {
for($i = 156, $chks += 256; $i < 512; $i++)
$chks += ord($block[$i]);
- $headers = @unpack("a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor", $block);
- if(!$headers) return false;
+ $header = @unpack("a100filename/a8perm/a8uid/a8gid/a12size/a12mtime/a8checksum/a1typeflag/a100link/a6magic/a2version/a32uname/a32gname/a8devmajor/a8devminor/a155prefix", $block);
+ if(!$header) return false;
- $return['checksum'] = OctDec(trim($headers['checksum']));
+ $return['checksum'] = OctDec(trim($header['checksum']));
if($return['checksum'] != $chks) return false;
- $return['filename'] = trim($headers['filename']);
- $return['perm'] = OctDec(trim($headers['perm']));
- $return['uid'] = OctDec(trim($headers['uid']));
- $return['gid'] = OctDec(trim($headers['gid']));
- $return['size'] = OctDec(trim($headers['size']));
- $return['mtime'] = OctDec(trim($headers['mtime']));
- $return['typeflag'] = $headers['typeflag'];
- $return['link'] = trim($headers['link']);
- $return['uname'] = trim($headers['uname']);
- $return['gname'] = trim($headers['gname']);
+ $return['filename'] = trim($header['filename']);
+ $return['perm'] = OctDec(trim($header['perm']));
+ $return['uid'] = OctDec(trim($header['uid']));
+ $return['gid'] = OctDec(trim($header['gid']));
+ $return['size'] = OctDec(trim($header['size']));
+ $return['mtime'] = OctDec(trim($header['mtime']));
+ $return['typeflag'] = $header['typeflag'];
+ $return['link'] = trim($header['link']);
+ $return['uname'] = trim($header['uname']);
+ $return['gname'] = trim($header['gname']);
+
+ // Handle ustar Posix compliant path prefixes
+ if(trim($header['prefix'])) $return['filename'] = trim($header['prefix']).'/'.$return['filename'];
+
+ // Handle Long-Link entries from GNU Tar
+ if($return['typeflag'] == 'L'){
+ // following data block(s) is the filename
+ $filename = trim($this->readbytes(ceil($header['size'] / 512) * 512));
+ // next block is the real header
+ $block = $this->readbytes(512);
+ $return = $this->parseHeader($block);
+ // overwrite the filename
+ $return['filename'] = $filename;
+ }
return $return;
}
--
cgit v1.2.3
From 90a1db709d3590e849a5a4966fbdf8fb58ae75cd Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Sun, 4 Nov 2012 11:31:20 +0100
Subject: Tar: support for creating archives with long filenames
The library now creates either a POSIX ustar prefix or a GNU longlink
entry for files which have a name longer than 100 bytes
---
inc/Tar.class.php | 121 +++++++++++++++++++++++++++++-------------------------
1 file changed, 64 insertions(+), 57 deletions(-)
(limited to 'inc')
diff --git a/inc/Tar.class.php b/inc/Tar.class.php
index 8da30e736..59e14c705 100644
--- a/inc/Tar.class.php
+++ b/inc/Tar.class.php
@@ -4,6 +4,8 @@
* To keep things simple, the modification of existing archives is not supported. It handles
* uncompressed, gzip and bzip2 compressed tar files.
*
+ * Long pathnames (>100 chars) are supported in POSIX ustar and GNU longlink formats.
+ *
* To list the contents of an existing TAR archive, open() it and use contents() on it:
*
* $tar = new Tar();
@@ -145,10 +147,10 @@ class Tar {
* @throws TarIOException
* @return array
*/
- function extract($outdir, $strip='', $exclude='', $include='') {
+ function extract($outdir, $strip = '', $exclude = '', $include = '') {
if($this->closed || !$this->file) throw(new TarIOException('Can not read from a closed archive'));
- $outdir = rtrim($outdir,'/');
+ $outdir = rtrim($outdir, '/');
io_mkdir_p($outdir);
$striplen = strlen($strip);
@@ -164,32 +166,32 @@ class Tar {
$filename = $this->cleanPath($header['filename']);
if(is_int($strip)) {
// if $strip is an integer we strip this many path components
- $parts = explode('/',$filename);
- if(!$header['typeflag']){
+ $parts = explode('/', $filename);
+ if(!$header['typeflag']) {
$base = array_pop($parts); // keep filename itself
- }else{
+ } else {
$base = '';
}
- $filename = join('/',array_slice($parts,$strip));
+ $filename = join('/', array_slice($parts, $strip));
if($base) $filename .= "/$base";
- }else{
+ } else {
// ifstrip is a string, we strip a prefix here
- if(substr($filename,0,$striplen) == $strip) $filename = substr($filename,$striplen);
+ if(substr($filename, 0, $striplen) == $strip) $filename = substr($filename, $striplen);
}
// check if this should be extracted
$extract = true;
- if(!$filename){
+ if(!$filename) {
$extract = false;
- }else{
- if($include){
- if(preg_match($include, $filename)){
+ } else {
+ if($include) {
+ if(preg_match($include, $filename)) {
$extract = true;
- }else{
+ } else {
$extract = false;
}
}
- if($exclude && preg_match($exclude, $filename)){
+ if($exclude && preg_match($exclude, $filename)) {
$extract = false;
}
}
@@ -203,7 +205,7 @@ class Tar {
io_mkdir_p($directory);
// is this a file?
- if(!$header['typeflag']){
+ if(!$header['typeflag']) {
$fp = fopen($output, "wb");
if(!$fp) throw(new TarIOException('Could not open file for writing: '.$output));
@@ -216,10 +218,10 @@ class Tar {
fclose($fp);
touch($output, $header['mtime']);
chmod($output, $header['perm']);
- }else{
+ } else {
$this->skipbytes(ceil($header['size'] / 512) * 512); // the size is usually 0 for directories
}
- }else{
+ } else {
$this->skipbytes(ceil($header['size'] / 512) * 512);
}
}
@@ -261,7 +263,7 @@ class Tar {
if(!$this->fh) throw(new TarIOException('Could not open file for writing: '.$this->file));
}
$this->writeaccess = false;
- $this->closed = false;
+ $this->closed = false;
}
/**
@@ -270,7 +272,6 @@ class Tar {
* @todo handle directory adding
* @param string $file the original file
* @param string $name the name to use for the file in the archive
- * @throws TarBadFilename
* @throws TarIOException
*/
public function addFile($file, $name = '') {
@@ -279,9 +280,6 @@ class Tar {
if(!$name) $name = $file;
$name = $this->cleanPath($name);
- // FIXME ustar should support up 256 chars
- if(strlen($name) > 99) throw(new TarBadFilename('Filenames may not exceed 99 bytes: '.$name));
-
$fp = fopen($file, 'rb');
if(!$fp) throw(new TarIOException('Could not open file for reading: '.$file));
@@ -294,8 +292,7 @@ class Tar {
$stat[5],
fileperms($file),
filesize($file),
- filemtime($file),
- false
+ filemtime($file)
);
while(!feof($fp)) {
@@ -306,26 +303,21 @@ class Tar {
}
/**
- * Add a file to the current TAR archive using in memory data
+ * Add a file to the current TAR archive using the given $data as content
*
- * @param $name
- * @param $data
- * @param int $uid
- * @param int $gid
- * @param int $perm
- * @param int $mtime
+ * @param string $name
+ * @param string $data
+ * @param int $uid
+ * @param int $gid
+ * @param int $perm
+ * @param int $mtime
* @throws TarIOException
- * @throws TarBadFilename
*/
public function addData($name, $data, $uid = 0, $gid = 0, $perm = 0666, $mtime = 0) {
if($this->closed) throw(new TarIOException('Archive has been closed, files can no longer be added'));
$name = $this->cleanPath($name);
-
- // FIXME ustar should support up 256 chars
- if(strlen($name) > 99) throw(new TarBadFilename('Filenames may not exceed 99 bytes: '.$name));
-
- $len = strlen($data);
+ $len = strlen($data);
$this->writeFileHeader(
$name,
@@ -333,8 +325,7 @@ class Tar {
$gid,
$perm,
$len,
- ($mtime) ? $mtime : time(),
- false
+ ($mtime) ? $mtime : time()
);
for($s = 0; $s < $len; $s += 512) {
@@ -357,23 +348,23 @@ class Tar {
if($this->closed) return; // we did this already
// write footer
- if($this->writeaccess){
+ if($this->writeaccess) {
$this->writebytes(pack("a512", ""));
$this->writebytes(pack("a512", ""));
}
// close file handles
- if($this->file){
- if($this->comptype === Tar::COMPRESS_GZIP){
+ if($this->file) {
+ if($this->comptype === Tar::COMPRESS_GZIP) {
gzclose($this->fh);
- }elseif($this->comptype === Tar::COMPRESS_BZIP){
+ } elseif($this->comptype === Tar::COMPRESS_BZIP) {
bzclose($this->fh);
- }else{
+ } else {
fclose($this->fh);
}
$this->file = '';
- $this->fh = 0;
+ $this->fh = 0;
}
$this->closed = true;
@@ -460,12 +451,12 @@ class Tar {
* @param int $bytes seek to this position
*/
function skipbytes($bytes) {
- if($this->comptype === Tar::COMPRESS_GZIP){
+ if($this->comptype === Tar::COMPRESS_GZIP) {
@gzseek($this->fh, $bytes, SEEK_CUR);
- }elseif($this->comptype === Tar::COMPRESS_BZIP){
+ } elseif($this->comptype === Tar::COMPRESS_BZIP) {
// there is no seek in bzip2, we simply read on
@bzread($this->fh, $bytes);
- }else{
+ } else {
@fseek($this->fh, $bytes, SEEK_CUR);
}
}
@@ -479,19 +470,38 @@ class Tar {
* @param int $perm
* @param int $size
* @param int $mtime
- * @param bool $isdir
+ * @param string $typeflag Set to '5' for directories
*/
- protected function writeFileHeader($name, $uid, $gid, $perm, $size, $mtime, $isdir = false) {
+ protected function writeFileHeader($name, $uid, $gid, $perm, $size, $mtime, $typeflag = '') {
+ // handle filename length restrictions
+ $prefix = '';
+ $namelen = strlen($name);
+ if($namelen > 100) {
+ $file = basename($name);
+ $dir = dirname($name);
+ if(strlen($file) > 100 || strlen($dir) > 155) {
+ // we're still too large, let's use GNU longlink
+ $this->writeFileHeader('././@LongLink', 0, 0, 0, $namelen, 0, 'L');
+ for($s = 0; $s < $namelen; $s += 512) {
+ $this->writebytes(pack("a512", substr($name, $s, 512)));
+ }
+ $name = substr($name, 0, 100); // cut off name
+ } else {
+ // we're fine when splitting, use POSIX ustar
+ $prefix = $dir;
+ $name = $file;
+ }
+ }
+
// values are needed in octal
$uid = sprintf("%6s ", DecOct($uid));
$gid = sprintf("%6s ", DecOct($gid));
$perm = sprintf("%6s ", DecOct($perm));
$size = sprintf("%11s ", DecOct($size));
$mtime = sprintf("%11s", DecOct($mtime));
- $dir = ($isdir) ? '5' : '';
$data_first = pack("a100a8a8a8a12A12", $name, $perm, $uid, $gid, $size, $mtime);
- $data_last = pack("a1a100a6a2a32a32a8a8a155a12", $dir, '', '', '', '', '', '', '', '', "");
+ $data_last = pack("a1a100a6a2a32a32a8a8a155a12", $typeflag, '', 'ustar', '', '', '', '', '', $prefix, "");
for($i = 0, $chks = 0; $i < 148; $i++)
$chks += ord($data_first[$i]);
@@ -541,11 +551,11 @@ class Tar {
if(trim($header['prefix'])) $return['filename'] = trim($header['prefix']).'/'.$return['filename'];
// Handle Long-Link entries from GNU Tar
- if($return['typeflag'] == 'L'){
+ if($return['typeflag'] == 'L') {
// following data block(s) is the filename
$filename = trim($this->readbytes(ceil($header['size'] / 512) * 512));
// next block is the real header
- $block = $this->readbytes(512);
+ $block = $this->readbytes(512);
$return = $this->parseHeader($block);
// overwrite the filename
$return['filename'] = $filename;
@@ -617,9 +627,6 @@ class Tar {
}
}
-class TarBadFilename extends Exception {
-}
-
class TarIOException extends Exception {
}
--
cgit v1.2.3
From 35349ab097171f0f9cb6114cffd780abb69c56a6 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Tue, 6 Nov 2012 20:57:25 +0100
Subject: added simple compatibility wrapper for old TarLib
---
inc/TarLib.class.php | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++
inc/load.php | 1 +
2 files changed, 88 insertions(+)
create mode 100644 inc/TarLib.class.php
(limited to 'inc')
diff --git a/inc/TarLib.class.php b/inc/TarLib.class.php
new file mode 100644
index 000000000..ae08039ec
--- /dev/null
+++ b/inc/TarLib.class.php
@@ -0,0 +1,87 @@
+error('__construct', '$file');
+
+ $this->file = $file;
+ switch($comptype) {
+ case TarLib::COMPRESS_AUTO:
+ case TarLib::COMPRESS_DETECT:
+ $comptype = Tar::COMPRESS_AUTO;
+ break;
+ case TarLib::COMPRESS_GZIP:
+ $comptype = Tar::COMPRESS_GZIP;
+ break;
+ case TarLib::COMPRESS_BZIP:
+ $comptype = Tar::COMPRESS_BZIP;
+ break;
+ default:
+ $comptype = Tar::COMPRESS_NONE;
+ }
+
+ $this->complevel = $complevel;
+
+ try {
+ $this->tar = new Tar();
+ $this->tar->open($file, $comptype);
+ } catch(Exception $e) {
+ $this->_result = false;
+ }
+ }
+
+ function Extract($p_what = TarLib::FULL_ARCHIVE, $p_to = '.', $p_remdir = '', $p_mode = 0755) {
+ if($p_what != TarLib::FULL_ARCHIVE) {
+ $this->error('Extract', 'Ep_what');
+ return 0;
+ }
+
+ try {
+ $this->tar->extract($p_to, $p_remdir);
+ } catch(Exception $e) {
+ return 0;
+ }
+ return 1;
+ }
+
+ function error($func, $param = '') {
+ $error = 'TarLib is deprecated and should no longer be used.';
+
+ if($param) {
+ $error .= "In this compatibility wrapper, the function '$func' does not accept your value for".
+ "the parameter '$param' anymore.";
+ } else {
+ $error .= "The function '$func' no longer exists in this compatibility wrapper.";
+ }
+
+ msg($error, -1);
+ }
+
+ function __call($name, $arguments) {
+ $this->error($name);
+ }
+}
\ No newline at end of file
diff --git a/inc/load.php b/inc/load.php
index 2ea0d8efd..49c307054 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -72,6 +72,7 @@ function load_autoload($name){
'Doku_Plugin_Controller'=> DOKU_INC.'inc/plugincontroller.class.php',
'GeSHi' => DOKU_INC.'inc/geshi.php',
'Tar' => DOKU_INC.'inc/Tar.class.php',
+ 'TarLib' => DOKU_INC.'inc/TarLib.class.php',
'ZipLib' => DOKU_INC.'inc/ZipLib.class.php',
'DokuWikiFeedCreator' => DOKU_INC.'inc/feedcreator.class.php',
'Doku_Parser_Mode' => DOKU_INC.'inc/parser/parser.php',
--
cgit v1.2.3
From 3161005d07beb46bb8a866ec56a768938571ec9d Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Mon, 12 Nov 2012 21:22:26 +0100
Subject: check for unicode preg capabilities in UTF-8 lib FS#2636
We now have two defines for checking for UTF-8 and Unicode property
support in PREG and use them to work around FS#2636 on older systems.
---
inc/fulltext.php | 15 +++++++++++----
inc/infoutils.php | 4 ++--
inc/utf8.php | 19 +++++++++++++++++++
3 files changed, 32 insertions(+), 6 deletions(-)
(limited to 'inc')
diff --git a/inc/fulltext.php b/inc/fulltext.php
index eab8850dc..7ee386063 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -394,10 +394,17 @@ function ft_snippet_re_preprocess($term) {
return $term;
}
- // unicode word boundaries
- // see http://stackoverflow.com/a/2449017/172068
- $BL = '(?
Date: Mon, 12 Nov 2012 21:29:23 +0100
Subject: Czech language update
---
inc/lang/cs/lang.php | 2 ++
1 file changed, 2 insertions(+)
(limited to 'inc')
diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php
index a53da327a..cfb8e8eb3 100644
--- a/inc/lang/cs/lang.php
+++ b/inc/lang/cs/lang.php
@@ -12,6 +12,7 @@
* @author Vojta Beran
* @author zbynek.krivka@seznam.cz
* @author Bohumir Zamecnik
+ * @author Jakub A. Těšínský (j@kub.cz)
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -197,6 +198,7 @@ $lang['user_tools'] = 'Uživatelské nástroje';
$lang['site_tools'] = 'Nástroje pro tento web';
$lang['page_tools'] = 'Nástroje pro stránku';
$lang['skip_to_content'] = 'jít k obsahu';
+$lang['sidebar'] = 'Postranní lišta';
$lang['mail_newpage'] = 'nová stránka:';
$lang['mail_changed'] = 'změna stránky:';
$lang['mail_subscribe_list'] = 'stránky změněné ve jmenném prostoru:';
--
cgit v1.2.3
From de78e4ef14515e4248d5f637558ec451e018799c Mon Sep 17 00:00:00 2001
From: Anael Mobilia
Date: Mon, 12 Nov 2012 21:43:53 +0100
Subject: French language update
---
inc/lang/fr/admin.txt | 3 +-
inc/lang/fr/adminplugins.txt | 2 +-
inc/lang/fr/backlinks.txt | 2 +-
inc/lang/fr/conflict.txt | 4 +-
inc/lang/fr/diff.txt | 2 +-
inc/lang/fr/draft.txt | 4 +-
inc/lang/fr/edit.txt | 2 +-
inc/lang/fr/index.txt | 4 +-
inc/lang/fr/install.html | 10 +--
inc/lang/fr/lang.php | 172 +++++++++++++++++++++---------------------
inc/lang/fr/locked.txt | 2 +-
inc/lang/fr/mailtext.txt | 2 +-
inc/lang/fr/mailwrap.html | 2 +-
inc/lang/fr/newpage.txt | 2 +-
inc/lang/fr/norev.txt | 2 +-
inc/lang/fr/password.txt | 2 +-
inc/lang/fr/preview.txt | 2 +-
inc/lang/fr/pwconfirm.txt | 8 +-
inc/lang/fr/read.txt | 2 +-
inc/lang/fr/register.txt | 2 +-
inc/lang/fr/registermail.txt | 6 +-
inc/lang/fr/resendpwd.txt | 2 +-
inc/lang/fr/stopwords.txt | 4 +-
inc/lang/fr/subscr_digest.txt | 4 +-
inc/lang/fr/subscr_form.txt | 2 +-
inc/lang/fr/subscr_list.txt | 2 +-
inc/lang/fr/subscr_single.txt | 4 +-
inc/lang/fr/uploadmail.txt | 4 +-
28 files changed, 130 insertions(+), 129 deletions(-)
(limited to 'inc')
diff --git a/inc/lang/fr/admin.txt b/inc/lang/fr/admin.txt
index 4477a512b..eeeb2317a 100644
--- a/inc/lang/fr/admin.txt
+++ b/inc/lang/fr/admin.txt
@@ -1,4 +1,3 @@
====== Administration ======
-Ci-dessous, vous trouverez une liste des tâches administratives disponibles dans DokuWiki.
-
+Ci-dessous, vous trouverez une liste des tâches d'administration disponibles dans DokuWiki.
diff --git a/inc/lang/fr/adminplugins.txt b/inc/lang/fr/adminplugins.txt
index 42a3538ab..0b2bf18db 100644
--- a/inc/lang/fr/adminplugins.txt
+++ b/inc/lang/fr/adminplugins.txt
@@ -1 +1 @@
-===== Modules supplémentaires =====
\ No newline at end of file
+===== Extensions =====
\ No newline at end of file
diff --git a/inc/lang/fr/backlinks.txt b/inc/lang/fr/backlinks.txt
index 6902b43e3..8e6d27d95 100644
--- a/inc/lang/fr/backlinks.txt
+++ b/inc/lang/fr/backlinks.txt
@@ -1,4 +1,4 @@
====== Pages pointant sur la page en cours ======
-Ceci est la liste des pages qui pointent sur la page en cours.
+Ceci est la liste des pages qui semblent pointer sur la page actuelle.
diff --git a/inc/lang/fr/conflict.txt b/inc/lang/fr/conflict.txt
index 8f527ee21..e34ec9743 100644
--- a/inc/lang/fr/conflict.txt
+++ b/inc/lang/fr/conflict.txt
@@ -1,6 +1,6 @@
-====== Une version plus récente existe déjà ======
+====== Une version plus récente existe ======
-Une version plus récente du document que vous avez modifié existe déjà. Cela se produit lorsqu'un autre utilisateur enregistre le document pendant que vous le modifiez.
+Une version plus récente du document que vous avez modifié existe. Cela se produit lorsqu'un autre utilisateur enregistre une nouvelle version du document alors que vous le modifiez.
Examinez attentivement les différences ci-dessous et décidez quelle version conserver. Si vous choisissez « Enregistrer », votre version sera enregistrée. Cliquez sur « Annuler » pour conserver la version actuelle.
diff --git a/inc/lang/fr/diff.txt b/inc/lang/fr/diff.txt
index 773695d6d..8569f3497 100644
--- a/inc/lang/fr/diff.txt
+++ b/inc/lang/fr/diff.txt
@@ -1,4 +1,4 @@
====== Différences ======
-Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.
+Cette page vous affiche les différences entre la révision choisie et la version actuelle de la page.
diff --git a/inc/lang/fr/draft.txt b/inc/lang/fr/draft.txt
index a48554298..ab383ee2c 100644
--- a/inc/lang/fr/draft.txt
+++ b/inc/lang/fr/draft.txt
@@ -1,6 +1,6 @@
====== Un fichier brouillon a été trouvé ======
-La dernière modification de cette page ne s'est pas terminée proprement. Dokuwiki a enregistré automatiquement un brouillon de votre travail que vous pouvez utiliser pour votre modification. Ci-dessous figurent les données enregistrées lors de votre dernière session.
+La dernière modification de cette page ne s'est pas terminée correctement. DokuWiki a enregistré automatiquement un brouillon de votre travail que vous pouvez utiliser pour votre modification. Ci-dessous figurent les données enregistrées lors de votre dernière session.
-À vous de décider si vous souhaitez //récupérer// votre session de modification passée, //supprimer// le brouillon enregistré automatiquement ou //annuler// le processus d'édition.
+À vous de décider si vous souhaitez //récupérer// votre session de modification précédente, //supprimer// le brouillon enregistré automatiquement ou //annuler// le processus d'édition.
diff --git a/inc/lang/fr/edit.txt b/inc/lang/fr/edit.txt
index e30f1b78b..df8c9fc9e 100644
--- a/inc/lang/fr/edit.txt
+++ b/inc/lang/fr/edit.txt
@@ -1,2 +1,2 @@
-Modifiez cette page et cliquez sur « Enregistrer ». Voyez le [[:wiki:syntax|guide de la mise en page]] pour une aide à propos du formatage. Veuillez ne modifier cette page que si vous pouvez l'**améliorer**. Si vous souhaitez faire des tests, faites vos premiers pas dans le [[:playground:playground|bac à sable]].
+Modifiez cette page et cliquez sur « Enregistrer ». Voyez le [[:wiki:syntax|guide de mise en page]] pour une aide à propos du formatage. Veuillez ne modifier cette page que si vous pouvez l'**améliorer**. Si vous souhaitez faire des tests, faites vos premiers pas dans le [[:playground:playground|bac à sable]].
diff --git a/inc/lang/fr/index.txt b/inc/lang/fr/index.txt
index c66c656ab..15e16734c 100644
--- a/inc/lang/fr/index.txt
+++ b/inc/lang/fr/index.txt
@@ -1,4 +1,4 @@
-====== Index ======
+====== Plan du site ======
-Voici un index de toutes les pages disponibles, triées par [[doku>fr:namespaces|catégorie]].
+Voici un plan du site de toutes les pages disponibles, triées par [[doku>fr:namespaces|catégories]].
diff --git a/inc/lang/fr/install.html b/inc/lang/fr/install.html
index 91c9f2edf..6dcba25dc 100644
--- a/inc/lang/fr/install.html
+++ b/inc/lang/fr/install.html
@@ -1,13 +1,13 @@
-Cette page vous assiste dans la première installation et la
+
Cette page vous assiste dans l'installation et la
configuration de DokuWiki.
-Pour plus d'information sur cet installeur, reportez-vous à sa
+Pour plus d'informations sur cet installateur, reportez-vous à sa
page de
documentation.
DokuWiki utilise des fichiers textes ordinaires pour stocker les pages du
wiki et les autres informations associées à ces pages
-(tel que images, index de recherche, anciennes révisions, etc.). Pour fonctionner correctement, DokuWiki doit avoir accès en écriture aux différents répertoires qui contiennent ces fichiers. L'installeur n'est pas capable de modifier les permissions sur les répertoires. Ceci doit être effectué directement sur la ligne de commande de votre shell, ou, si vous êtes hébergé, via FTP ou votre panneau de contrôle (tel que cPanel).
+(par exemple, les images, les index de recherche, les anciennes révisions, ...). Pour fonctionner correctement, DokuWiki doit avoir accès en écriture aux différents répertoires qui contiennent ces fichiers. Cet installateur n'est pas capable de modifier les autorisations sur les répertoires. Cette opération doit-être effectué directement depuis votre ligne de commande shell, ou, si vous êtes hébergé, via FTP ou votre panneau de contrôle (par exemple cPanel, Plesk, ...).
-Cet installeur va paramétrer votre configuration de DokuWiki pour des ACL, qui permettront l'accès à un identifiant administrateur et l'accès au menu d'administration de DokuWiki pour l'ajout de modules externes (greffons), la gestion d'utilisateurs, la gestion de l'accès aux pages du wiki et les modifications des paramètres de configuration. Il n'est pas nécessaire au fonctionnement de DokuWiki, néanmoins il facilite l'administration de DokuWiki.
+Cet installateur va paramétrer votre configuration de DokuWiki pour des contrôle d'accès (ACL), qui permettront l'accès à un identifiant administrateur et l'accès au menu d'administration de DokuWiki pour l'ajout d'extensions, la gestion d'utilisateurs, la gestion de l'accès aux pages du wiki et les modifications des paramètres de configuration. Les contrôle d'accès ne sont pas nécessaires au fonctionnement de DokuWiki, néanmoins elles facilitent l'administration de DokuWiki.
-Les utilisateurs expérimentés ou ceux nécessitant des paramétrages particuliers devraient se reporter aux liens suivants pour les détails concernant les instructions d'installation et les paramètres de configuration.
+Les utilisateurs expérimentés ou les utilisateurs possédants des besoins de configurations spécifiques devraient se reporter aux liens suivants pour les détails concernant les instructions d'installation et les paramètres de configuration.
diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php
index c4080bc50..44cf04e04 100644
--- a/inc/lang/fr/lang.php
+++ b/inc/lang/fr/lang.php
@@ -25,6 +25,7 @@
* @author skimpax@gmail.com
* @author Yannick Aure
* @author Olivier DUVAL
+ * @author Anael Mobilia
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -73,17 +74,17 @@ $lang['user'] = 'Utilisateur';
$lang['pass'] = 'Mot de passe';
$lang['newpass'] = 'Nouveau mot de passe';
$lang['oldpass'] = 'Mot de passe actuel';
-$lang['passchk'] = 'Répéter nouveau mot de passe';
+$lang['passchk'] = 'Répétez le mot de passe';
$lang['remember'] = 'Mémoriser';
$lang['fullname'] = 'Nom';
$lang['email'] = 'Adresse de courriel';
$lang['profile'] = 'Profil utilisateur';
$lang['badlogin'] = 'L\'utilisateur ou le mot de passe est incorrect.';
$lang['minoredit'] = 'Modification mineure';
-$lang['draftdate'] = 'Brouillon auto-enregistré le';
+$lang['draftdate'] = 'Brouillon enregistré de manière automatique le';
$lang['nosecedit'] = 'La page a changé entre temps, les informations de la section sont obsolètes ; la page complète a été chargée à la place.';
$lang['regmissing'] = 'Désolé, vous devez remplir tous les champs.';
-$lang['reguexists'] = 'Désolé, ce nom d\'utilisateur est déjà pris.';
+$lang['reguexists'] = 'Désolé, ce nom d\'utilisateur est déjà utilisé.';
$lang['regsuccess'] = 'L\'utilisateur a été créé. Le mot de passe a été expédié par courriel.';
$lang['regsuccess2'] = 'L\'utilisateur a été créé.';
$lang['regmailfail'] = 'Il semble y avoir un problème à l\'envoi du courriel. Contactez l\'administrateur.';
@@ -92,94 +93,94 @@ $lang['regbadpass'] = 'Les deux mots de passe fournis sont différent
$lang['regpwmail'] = 'Votre mot de passe DokuWiki';
$lang['reghere'] = 'Vous n\'avez pas encore de compte ? Enregistrez-vous ici ';
$lang['profna'] = 'Ce wiki ne permet pas de modifier les profils';
-$lang['profnochange'] = 'Pas de changement, rien à faire.';
+$lang['profnochange'] = 'Pas de modification, rien à faire.';
$lang['profnoempty'] = 'Un nom ou une adresse de courriel vide n\'est pas permis.';
$lang['profchanged'] = 'Mise à jour du profil réussie.';
-$lang['pwdforget'] = 'Mot de passe oublié ? Faites-vous envoyer votre mot de passe ';
+$lang['pwdforget'] = 'Mot de passe oublié ? Obtenez-en un nouveau';
$lang['resendna'] = 'Ce wiki ne permet pas le renvoi de mot de passe.';
$lang['resendpwd'] = 'Définir un nouveau mot de passe pour';
$lang['resendpwdmissing'] = 'Désolé, vous devez remplir tous les champs.';
-$lang['resendpwdnouser'] = 'Désolé, cet utilisateur est introuvable dans notre base.';
-$lang['resendpwdbadauth'] = 'Désolé, ce code d\'authentification est invalide. Assurez-vous d\'avoir utilisé le lien de confirmation.';
-$lang['resendpwdconfirm'] = 'Un lien de confirmation vous a été envoyé par courriel.';
+$lang['resendpwdnouser'] = 'Désolé, cet utilisateur n\'existe pas dans notre base de données.';
+$lang['resendpwdbadauth'] = 'Désolé, ce code d\'authentification est invalide. Assurez-vous d\'avoir utilisé le lien de confirmation intégral.';
+$lang['resendpwdconfirm'] = 'Un lien de confirmation vous a été expédié par courriel.';
$lang['resendpwdsuccess'] = 'Votre nouveau mot de passe vous a été expédié par courriel.';
-$lang['license'] = 'Sauf mention contraire, le contenu de ce wiki est placé sous la licence suivante :';
+$lang['license'] = 'Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante :';
$lang['licenseok'] = 'Note : En modifiant cette page, vous acceptez que le contenu soit placé sous les termes de la licence suivante :';
$lang['searchmedia'] = 'Chercher le nom de fichier :';
$lang['searchmedia_in'] = 'Chercher dans %s';
$lang['txt_upload'] = 'Sélectionnez un fichier à envoyer ';
-$lang['txt_filename'] = 'Donnez un « wikiname » (optionnel) ';
-$lang['txt_overwrt'] = 'Écraser le fichier cible';
-$lang['maxuploadsize'] = 'Téléverser max. %s par fichier';
+$lang['txt_filename'] = 'Envoyer en tant que (optionnel) ';
+$lang['txt_overwrt'] = 'Écraser le fichier cible (s\'il existe)';
+$lang['maxuploadsize'] = 'Taille d\'envoi maximale : %s par fichier';
$lang['lockedby'] = 'Actuellement bloqué par';
$lang['lockexpire'] = 'Le blocage expire à';
-$lang['js']['willexpire'] = 'Votre verrouillage pour la modification de cette page expire dans une minute.\nPour éviter les conflits, utilisez le bouton « Aperçu » pour réinitialiser le minuteur.';
+$lang['js']['willexpire'] = 'Votre blocage pour la modification de cette page expire dans une minute.\nPour éviter les conflits, utilisez le bouton « Aperçu » pour réinitialiser le minuteur.';
$lang['js']['notsavedyet'] = 'Les modifications non enregistrées seront perdues. Voulez-vous vraiment continuer ?';
$lang['js']['searchmedia'] = 'Chercher des fichiers';
-$lang['js']['keepopen'] = 'Gardez cette fenêtre toujours ouverte';
-$lang['js']['hidedetails'] = 'Masquer détails';
+$lang['js']['keepopen'] = 'Toujours conserver cette fenêtre ouverte';
+$lang['js']['hidedetails'] = 'Masquer les détails';
$lang['js']['mediatitle'] = 'Paramètres de lien';
$lang['js']['mediadisplay'] = 'Type de lien';
$lang['js']['mediaalign'] = 'Alignement';
-$lang['js']['mediasize'] = 'Taille d\'image';
+$lang['js']['mediasize'] = 'Taille de l\'image';
$lang['js']['mediatarget'] = 'Cible du lien';
$lang['js']['mediaclose'] = 'Fermer';
$lang['js']['mediainsert'] = 'Insérer';
$lang['js']['mediadisplayimg'] = 'Afficher l\'image.';
$lang['js']['mediadisplaylnk'] = 'N\'afficher que le lien.';
$lang['js']['mediasmall'] = 'Petite taille';
-$lang['js']['mediamedium'] = 'taille moyenne';
+$lang['js']['mediamedium'] = 'Taille moyenne';
$lang['js']['medialarge'] = 'Grande taille';
-$lang['js']['mediaoriginal'] = 'taille d\'origine';
+$lang['js']['mediaoriginal'] = 'Taille originelle';
$lang['js']['medialnk'] = 'Lien vers la page de détail';
$lang['js']['mediadirect'] = 'Lien direct vers l\'original';
$lang['js']['medianolnk'] = 'Aucun lien';
$lang['js']['medianolink'] = 'Ne pas lier l\'image';
-$lang['js']['medialeft'] = 'Aligner l\'image sur la gauche.';
-$lang['js']['mediaright'] = 'Aligner l\'image sur la droite.';
-$lang['js']['mediacenter'] = 'Centrer l\'image';
+$lang['js']['medialeft'] = 'Aligner l\'image à gauche.';
+$lang['js']['mediaright'] = 'Aligner l\'image à droite.';
+$lang['js']['mediacenter'] = 'Centrer l\'image.';
$lang['js']['medianoalign'] = 'Ne pas aligner.';
$lang['js']['nosmblinks'] = 'Les liens vers les partages Windows ne fonctionnent qu\'avec Microsoft Internet Explorer.\nVous pouvez toujours copier puis coller le lien.';
$lang['js']['linkwiz'] = 'Assistant Lien';
$lang['js']['linkto'] = 'Lien vers :';
-$lang['js']['del_confirm'] = 'Effacer cette entrée ?';
-$lang['js']['restore_confirm'] = 'Voulez vous vraiment restaurer cette version ?';
-$lang['js']['media_diff'] = 'Voir les différences:';
+$lang['js']['del_confirm'] = 'Voulez-vous vraiment effacer ce(s) élément(s) ?';
+$lang['js']['restore_confirm'] = 'Voulez-vous vraiment restaurer cette version ?';
+$lang['js']['media_diff'] = 'Voir les différences :';
$lang['js']['media_diff_both'] = 'Côte à côte';
$lang['js']['media_diff_opacity'] = 'Calque';
$lang['js']['media_diff_portions'] = 'Curseur';
$lang['js']['media_select'] = 'Sélection de fichiers…';
-$lang['js']['media_upload_btn'] = 'Télécharger';
+$lang['js']['media_upload_btn'] = 'Envoyer';
$lang['js']['media_done_btn'] = 'Terminé';
-$lang['js']['media_drop'] = 'Déposez des fichiers ici pour les télécharger';
+$lang['js']['media_drop'] = 'Déposez des fichiers ici pour les envoyer';
$lang['js']['media_cancel'] = 'supprimer';
$lang['js']['media_overwrt'] = 'Écraser les fichiers existants';
$lang['rssfailed'] = 'Une erreur s\'est produite en récupérant ce flux : ';
$lang['nothingfound'] = 'Pas de réponse.';
-$lang['mediaselect'] = 'Sélection de fichier';
+$lang['mediaselect'] = 'Sélection de fichiers';
$lang['fileupload'] = 'Envoi de fichier';
-$lang['uploadsucc'] = 'Téléversement réussi';
-$lang['uploadfail'] = 'Le téléversement n\'a pas réussi. Les permissions sont-elles correctes ?';
-$lang['uploadwrong'] = 'Téléversement refusé. Cette extension de fichier est interdite !';
-$lang['uploadexist'] = 'Le fichier existe. Téléversement avorté.';
-$lang['uploadbadcontent'] = 'Le contenu envoyé ne correspond pas à l\'extension du fichier %s.';
-$lang['uploadspam'] = 'Le téléversement a été bloqué par la liste noire antispam.';
-$lang['uploadxss'] = 'Le téléversement a été bloqué car son contenu est peut-être malveillant.';
-$lang['uploadsize'] = 'Le fichier téléversé était trop gros. (max. %s)';
+$lang['uploadsucc'] = 'Envoi réussi';
+$lang['uploadfail'] = 'L\'envoi a échoué. Les autorisations sont-elles correctes ?';
+$lang['uploadwrong'] = 'Envoi refusé. Cette extension de fichier est interdite !';
+$lang['uploadexist'] = 'Le fichier existe déjà. L\'envoi a été annulé.';
+$lang['uploadbadcontent'] = 'Le contenu envoyé ne correspond pas à l\'extension du fichier (%s).';
+$lang['uploadspam'] = 'L\'envoi a été bloqué par la liste noire de l\'anti-spam.';
+$lang['uploadxss'] = 'L\'envoi a été bloqué car son contenu est peut-être malveillant.';
+$lang['uploadsize'] = 'Le fichier envoyé était trop gros. (max. : %s)';
$lang['deletesucc'] = 'Le fichier « %s » a été effacé.';
-$lang['deletefail'] = 'Le fichier « %s » n\'a pu être effacé, vérifier les permissions.';
-$lang['mediainuse'] = 'Le fichier « %s » n\'a pas été effacé, il est en cours d\'utilisation.';
+$lang['deletefail'] = 'Le fichier « %s » n\'a pas pu être effacé. Vérifiez les autorisations.';
+$lang['mediainuse'] = 'Le fichier « %s » n\'a pas été effacé : il est en toujours utilisé.';
$lang['namespaces'] = 'Catégories';
$lang['mediafiles'] = 'Fichiers disponibles dans';
$lang['accessdenied'] = 'Vous n\'êtes pas autorisé à voir cette page.';
$lang['mediausage'] = 'Utilisez la syntaxe suivante pour faire référence à ce fichier :';
$lang['mediaview'] = 'Afficher le fichier original';
$lang['mediaroot'] = 'racine';
-$lang['mediaupload'] = 'Téléverser un fichier dans la catégorie actuelle. Pour créer des sous-catégories, préfixez le nom du fichier par le nom de la sous-catégorie séparée par un double-point.';
-$lang['mediaextchange'] = 'Extension du fichier changée de .%s en .%s !';
+$lang['mediaupload'] = 'Envoyez un fichier dans la catégorie actuelle. Pour créer des sous-catégories, préfixez en le nom du fichier séparées par un double-point, après avoir choisis le(s) fichier(s). Le(s) fichier(s) peuvent également être envoyé(s) par glisser-déposer (drag & drop)';
+$lang['mediaextchange'] = 'Extension du fichier modifiée de .%s en .%s !';
$lang['reference'] = 'Références pour';
-$lang['ref_inuse'] = 'Le fichier ne peut être effacé car il est utilisé par les pages suivantes :';
-$lang['ref_hidden'] = 'Des références existent dans des pages que vous n\'avez pas la permission de lire';
+$lang['ref_inuse'] = 'Le fichier ne peut être effacé car il est toujours utilisé par les pages suivantes :';
+$lang['ref_hidden'] = 'Des références sont présentes dans des pages que vous ne pouvez pas voir (autorisations insuffisantes)';
$lang['hits'] = 'Occurrences trouvées';
$lang['quickhits'] = 'Pages trouvées ';
$lang['toc'] = 'Table des matières';
@@ -187,7 +188,7 @@ $lang['current'] = 'Version actuelle';
$lang['yours'] = 'Votre version';
$lang['diff'] = 'Différences avec la version actuelle';
$lang['diff2'] = 'Différences entre les versions sélectionnées';
-$lang['difflink'] = 'Lien vers cette vue';
+$lang['difflink'] = 'Lien vers cette vue comparative';
$lang['diff_type'] = 'Voir les différences :';
$lang['diff_inline'] = 'Sur une seule ligne';
$lang['diff_side'] = 'Côte à côte';
@@ -196,18 +197,19 @@ $lang['breadcrumb'] = 'Piste';
$lang['youarehere'] = 'Vous êtes ici';
$lang['lastmod'] = 'Dernière modification';
$lang['by'] = 'par';
-$lang['deleted'] = 'effacée';
+$lang['deleted'] = 'supprimée';
$lang['created'] = 'créée';
-$lang['restored'] = 'ancienne révision restaurée';
+$lang['restored'] = 'ancienne révision (%s) restaurée';
$lang['external_edit'] = 'modification externe';
$lang['summary'] = 'Résumé';
-$lang['noflash'] = 'Le greffon Adobe Flash est nécessaire pour afficher ce contenu.';
+$lang['noflash'] = 'L\'extension Adobe Flash est nécessaire pour afficher ce contenu.';
$lang['download'] = 'Télécharger un extrait';
$lang['tools'] = 'Outils';
-$lang['user_tools'] = 'Outils d\'utilisateurs';
-$lang['site_tools'] = 'Outils du Site';
-$lang['page_tools'] = 'Outils de la Page';
+$lang['user_tools'] = 'Outils pour utilisateurs';
+$lang['site_tools'] = 'Outils du site';
+$lang['page_tools'] = 'Outils de la page';
$lang['skip_to_content'] = 'Aller au contenu';
+$lang['sidebar'] = 'Panneau latéral';
$lang['mail_newpage'] = 'page ajoutée :';
$lang['mail_changed'] = 'page modifiée :';
$lang['mail_subscribe_list'] = 'pages modifiées dans la catégorie :';
@@ -215,13 +217,13 @@ $lang['mail_new_user'] = 'nouvel utilisateur :';
$lang['mail_upload'] = 'fichier envoyé :';
$lang['changes_type'] = 'Voir les changements';
$lang['pages_changes'] = 'Pages';
-$lang['media_changes'] = 'Fichier multimédias';
+$lang['media_changes'] = 'Fichiers multimédias';
$lang['both_changes'] = 'Pages et fichiers multimédias';
-$lang['qb_bold'] = 'Emphase forte (gras)';
-$lang['qb_italic'] = 'Emphase (italique)';
-$lang['qb_underl'] = 'Souligné';
+$lang['qb_bold'] = 'Gras';
+$lang['qb_italic'] = 'Italique';
+$lang['qb_underl'] = 'Soulignage';
$lang['qb_code'] = 'Code « machine à écrire »';
-$lang['qb_strike'] = 'Texte barré';
+$lang['qb_strike'] = 'Barré';
$lang['qb_h1'] = 'Titre de niveau 1';
$lang['qb_h2'] = 'Titre de niveau 2';
$lang['qb_h3'] = 'Titre de niveau 3';
@@ -237,14 +239,14 @@ $lang['qb_extlink'] = 'Lien externe';
$lang['qb_hr'] = 'Ligne horizontale';
$lang['qb_ol'] = 'Liste numérotée';
$lang['qb_ul'] = 'Liste à puce';
-$lang['qb_media'] = 'Ajouter des images ou d\'autres fichiers';
+$lang['qb_media'] = 'Ajouter des images ou autres fichiers';
$lang['qb_sig'] = 'Insérer une signature';
$lang['qb_smileys'] = 'Émoticones';
$lang['qb_chars'] = 'Caractères spéciaux';
$lang['upperns'] = 'Aller à la catégorie parente';
$lang['admin_register'] = 'Ajouter un nouvel utilisateur';
$lang['metaedit'] = 'Modifier les métadonnées';
-$lang['metasaveerr'] = 'Erreur lors de l\'écriture des métadonnées';
+$lang['metasaveerr'] = 'Erreur lors de l\'enregistrement des métadonnées';
$lang['metasaveok'] = 'Métadonnées enregistrées';
$lang['img_backto'] = 'Retour à';
$lang['img_title'] = 'Titre';
@@ -252,7 +254,7 @@ $lang['img_caption'] = 'Légende';
$lang['img_date'] = 'Date';
$lang['img_fname'] = 'Nom de fichier';
$lang['img_fsize'] = 'Taille';
-$lang['img_artist'] = 'Auteur';
+$lang['img_artist'] = 'Photographe';
$lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Appareil photo';
@@ -261,47 +263,47 @@ $lang['img_width'] = 'Largeur';
$lang['img_height'] = 'Hauteur';
$lang['img_manager'] = 'Voir dans le gestionnaire de médias';
$lang['subscr_subscribe_success'] = '%s a été ajouté à la liste de souscription de %s';
-$lang['subscr_subscribe_error'] = 'Erreur en ajoutant %s à la liste de souscription de %s';
+$lang['subscr_subscribe_error'] = 'Erreur à l\'ajout de %s à la liste de souscription de %s';
$lang['subscr_subscribe_noaddress'] = 'Il n\'y a pas d\'adresse associée à votre identifiant, vous ne pouvez pas être ajouté à la liste de souscription';
-$lang['subscr_unsubscribe_success'] = '%s a été retiré de la liste de souscription de %s';
-$lang['subscr_unsubscribe_error'] = 'Erreur en retirant %s de la liste de souscription de %s';
+$lang['subscr_unsubscribe_success'] = '%s a été supprimé de la liste de souscription de %s';
+$lang['subscr_unsubscribe_error'] = 'Erreur au retrait de %s de la liste de souscription de %s';
$lang['subscr_already_subscribed'] = '%s est déjà souscrit à %s';
$lang['subscr_not_subscribed'] = '%s n\'est pas souscrit à %s';
-$lang['subscr_m_not_subscribed'] = 'Vous n\'avez pas souscrit pour l\'instant à la page actuelle ou la catégorie';
+$lang['subscr_m_not_subscribed'] = 'Vous n\'avez pas souscrit pour l\'instant à la page actuelle ou à la catégorie';
$lang['subscr_m_new_header'] = 'Ajouter une souscription';
$lang['subscr_m_current_header'] = 'Souscriptions actives';
$lang['subscr_m_unsubscribe'] = 'Annuler la souscription';
$lang['subscr_m_subscribe'] = 'Souscrire';
$lang['subscr_m_receive'] = 'Recevoir';
-$lang['subscr_style_every'] = 'Envoyer un courriel à chaque modification';
+$lang['subscr_style_every'] = 'Recevoir un courriel à chaque modification';
$lang['subscr_style_digest'] = 'Courriel, tous les %.2f jours, résumant les modifications de chaque page';
$lang['subscr_style_list'] = 'Liste des pages modifiées depuis le dernier courriel (tous les %.2f jours)';
-$lang['authmodfailed'] = 'Mauvais paramétrage de l\'authentification. Merci d\'informer l\'administrateur du Wiki.';
-$lang['authtempfail'] = 'L\'authentification est temporairement indisponible. Si cela perdure, merci d\'informer l\'administrateur du Wiki.';
+$lang['authmodfailed'] = 'Mauvais paramétrage de l\'authentification. Merci d\'en informer l\'administrateur du wiki.';
+$lang['authtempfail'] = 'L\'authentification est temporairement indisponible. Si cela perdure, merci d\'en informer l\'administrateur du wiki.';
$lang['authpwdexpire'] = 'Votre mot de passe expirera dans %d jours, vous devriez le changer bientôt.';
$lang['i_chooselang'] = 'Choisissez votre langue';
-$lang['i_installer'] = 'Installeur DokuWiki';
+$lang['i_installer'] = 'Installateur DokuWiki';
$lang['i_wikiname'] = 'Nom du wiki';
-$lang['i_enableacl'] = 'Activer les ACL (recommandé)';
+$lang['i_enableacl'] = 'Activer le contrôle d\'accès (recommandé)';
$lang['i_superuser'] = 'Super-utilisateur';
-$lang['i_problems'] = 'L\'installeur a détecté les problèmes indiqués ci-dessous. Vous ne pouvez poursuivre tant qu\'ils n\'auront pas été corrigés.';
-$lang['i_modified'] = 'Pour des raisons de sécurité ce script ne fonctionne qu\'avec une installation neuve et non modifiée de DokuWiki. Vous devriez ré-extraire les fichiers depuis le paquet téléchargé ou consulter les instructions d\'installation de DokuWiki';
-$lang['i_funcna'] = 'La fonction PHP %s
n\'est pas disponible. Peut-être que votre hébergeur l\'a désactivée ?';
+$lang['i_problems'] = 'L\'installateur a détecté les problèmes indiqués ci-dessous. Vous ne pouvez pas poursuivre l\'installation tant qu\'ils n\'auront pas été corrigés.';
+$lang['i_modified'] = 'Pour des raisons de sécurité, ce script ne fonctionne qu\'avec une installation neuve et non modifiée de DokuWiki. Vous devriez ré-extraire les fichiers depuis le paquet téléchargé ou consulter les instructions d\'installation de DokuWiki';
+$lang['i_funcna'] = 'La fonction PHP %s
n\'est pas disponible. Peut-être que votre hébergeur web l\'a désactivée ?';
$lang['i_phpver'] = 'Votre version de PHP (%s) est antérieure à la version requise (%s). Vous devez mettre à jour votre installation de PHP.';
-$lang['i_permfail'] = '%s
n\'est pas accessible en écriture pour DokuWiki. Vous devez corriger les permissions de ce répertoire !';
+$lang['i_permfail'] = '%s
n\'est pas accessible en écriture pour DokuWiki. Vous devez corriger les autorisations de ce répertoire !';
$lang['i_confexists'] = '%s
existe déjà';
-$lang['i_writeerr'] = 'Impossible de créer %s
. Vous devez vérifier les permissions des répertoires/fichiers et créer le fichier manuellement.';
+$lang['i_writeerr'] = 'Impossible de créer %s
. Vous devez vérifier les autorisations des répertoires/fichiers et créer le fichier manuellement.';
$lang['i_badhash'] = 'dokuwiki.php non reconnu ou modifié (hash=%s
)';
$lang['i_badval'] = '%s
- valeur interdite ou vide';
$lang['i_success'] = 'L\'installation s\'est terminée avec succès. Vous pouvez maintenant supprimer le fichier « install.php ». Continuer avec votre nouveau DokuWiki.';
$lang['i_failure'] = 'Des erreurs sont survenues lors de l\'écriture des fichiers de configuration. Il vous faudra les corriger manuellement avant de pouvoir utiliser votre nouveau DokuWiki.';
-$lang['i_policy'] = 'Politique d\'ACL initiale';
+$lang['i_policy'] = 'Politique de contrôle d\'accès initiale';
$lang['i_pol0'] = 'Wiki ouvert (lecture, écriture, envoi de fichiers pour tout le monde)';
$lang['i_pol1'] = 'Wiki public (lecture pour tout le monde, écriture et envoi de fichiers pour les utilisateurs enregistrés)';
$lang['i_pol2'] = 'Wiki fermé (lecture, écriture, envoi de fichiers pour les utilisateurs enregistrés uniquement)';
$lang['i_retry'] = 'Réessayer';
-$lang['i_license'] = 'Veuillez choisir la licence sous laquelle placer votre contenu :';
-$lang['recent_global'] = 'Vous êtes actuellement en train de regarder les modifications au sein de la catégorie %s. Vous pouvez aussi voir les récentes modifications sur tout le wiki.';
+$lang['i_license'] = 'Veuillez choisir la licence sous laquelle vous souhaitez placer votre contenu :';
+$lang['recent_global'] = 'Vous êtes actuellement en train de regarder les modifications au sein de la catégorie %s. Vous pouvez également afficher les derniers changements sur l\'ensemble du wiki.';
$lang['years'] = 'il y a %d ans';
$lang['months'] = 'il y a %d mois';
$lang['weeks'] = 'il y a %d semaines';
@@ -309,27 +311,27 @@ $lang['days'] = 'il y a %d jours';
$lang['hours'] = 'il y a %d heures';
$lang['minutes'] = 'il y a %d minutes';
$lang['seconds'] = 'il y a %d secondes';
-$lang['wordblock'] = 'Vos modifications n\'ont pas été sauvegardées parce qu\'elles contiennent des textes non autorisé (spam).';
-$lang['media_uploadtab'] = 'Télécharger';
+$lang['wordblock'] = 'Vos modifications n\'ont pas été enregistrées car elles contiennent du texte non autorisé (spam).';
+$lang['media_uploadtab'] = 'Envoyer';
$lang['media_searchtab'] = 'Rechercher';
$lang['media_file'] = 'Fichier';
$lang['media_viewtab'] = 'Voir';
$lang['media_edittab'] = 'Éditer';
$lang['media_historytab'] = 'Historique';
-$lang['media_list_thumbs'] = 'Aperçus';
+$lang['media_list_thumbs'] = 'Miniatures';
$lang['media_list_rows'] = 'Lignes';
-$lang['media_sort_name'] = 'Tri par nom';
-$lang['media_sort_date'] = 'Tri par date';
-$lang['media_namespaces'] = 'Choisissez un espace de nom';
-$lang['media_files'] = 'Fichiers de %s';
-$lang['media_upload'] = 'Télécharger dans %s.';
-$lang['media_search'] = 'Chercher dans %s.';
+$lang['media_sort_name'] = 'Nom';
+$lang['media_sort_date'] = 'Date';
+$lang['media_namespaces'] = 'Choisissez une catégorie';
+$lang['media_files'] = 'Fichiers dans %s';
+$lang['media_upload'] = 'Envoyer vers %s.';
+$lang['media_search'] = 'Rechercher dans %s.';
$lang['media_view'] = '%s';
$lang['media_viewold'] = '%s dans %s';
$lang['media_edit'] = 'Éditer %s';
$lang['media_history'] = 'Historique de %s';
$lang['media_meta_edited'] = 'métadonnées éditées';
-$lang['media_perm_read'] = 'Désolé, vous n\'avez pas les droits pour lire les fichiers.';
-$lang['media_perm_upload'] = 'Désolé, vous n\'avez pas les droits pour télécharger des fichiers.';
-$lang['media_update'] = 'Télécharger une nouvelle version';
+$lang['media_perm_read'] = 'Désolé, vous n\'avez pas l\'autorisation de voir les fichiers.';
+$lang['media_perm_upload'] = 'Désolé, vous n\'avez pas l\'autorisation d\'envoyer des fichiers.';
+$lang['media_update'] = 'Envoyer une nouvelle version';
$lang['media_restore'] = 'Restaurer cette version';
diff --git a/inc/lang/fr/locked.txt b/inc/lang/fr/locked.txt
index 82cdd7373..fe88b57c8 100644
--- a/inc/lang/fr/locked.txt
+++ b/inc/lang/fr/locked.txt
@@ -1,3 +1,3 @@
====== Page bloquée ======
-Cette page est actuellement bloquée pour modification par un autre utilisateur. Vous devez attendre que l'autre utilisateur ait terminé ou que le blocage de la page expire.
+Cette page est actuellement bloquée pour modification par un autre utilisateur. Vous devez attendre que cet utilisateur ait terminé ou que le blocage de la page expire.
diff --git a/inc/lang/fr/mailtext.txt b/inc/lang/fr/mailtext.txt
index 3c2d53292..3f191756a 100644
--- a/inc/lang/fr/mailtext.txt
+++ b/inc/lang/fr/mailtext.txt
@@ -14,5 +14,5 @@ Utilisateur : @USER@
--
-Ce courriel a été généré par DokuWiki
+Ce courriel a été généré par DokuWiki depuis
@DOKUWIKIURL@
diff --git a/inc/lang/fr/mailwrap.html b/inc/lang/fr/mailwrap.html
index 2b674196b..aa5011021 100644
--- a/inc/lang/fr/mailwrap.html
+++ b/inc/lang/fr/mailwrap.html
@@ -8,6 +8,6 @@
@HTMLBODY@
-Ce courriel a été automatiquement généré par DokuWiki à l'adresse @DOKUWIKIURL@.
+Ce courriel a été automatiquement généré par DokuWiki depuis @DOKUWIKIURL@.