summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/DifferenceEngine.php2
-rw-r--r--inc/Input.class.php1
-rw-r--r--inc/RemoteAPICore.php6
-rw-r--r--inc/auth.php28
-rw-r--r--inc/farm.php2
-rw-r--r--inc/html.php22
-rw-r--r--inc/infoutils.php4
-rw-r--r--inc/lang/cs/lang.php19
-rw-r--r--inc/lang/de-informal/lang.php8
-rw-r--r--inc/lang/de/admin.txt2
-rw-r--r--inc/lang/de/backlinks.txt2
-rw-r--r--inc/lang/en/lang.php2
-rw-r--r--inc/lang/eo/lang.php11
-rw-r--r--inc/lang/ko/diff.txt2
-rw-r--r--inc/lang/ko/draft.txt2
-rw-r--r--inc/lang/ko/edit.txt2
-rw-r--r--inc/lang/ko/index.txt2
-rw-r--r--inc/lang/ko/lang.php64
-rw-r--r--inc/lang/ko/mailwrap.html20
-rw-r--r--inc/lang/ko/newpage.txt2
-rw-r--r--inc/lang/ko/norev.txt2
-rw-r--r--inc/lang/ko/password.txt2
-rw-r--r--inc/lang/ko/register.txt2
-rw-r--r--inc/lang/ko/resetpwd.txt2
-rw-r--r--inc/lang/ko/searchpage.txt2
-rw-r--r--inc/lang/ko/subscr_digest.txt2
-rw-r--r--inc/lang/ko/subscr_list.txt2
-rw-r--r--inc/lang/ko/subscr_single.txt2
-rw-r--r--inc/lang/ne/lang.php21
-rw-r--r--inc/lang/pt-br/lang.php9
-rw-r--r--inc/lang/pt/lang.php107
-rw-r--r--inc/lang/ru/denied.txt2
-rw-r--r--inc/lang/ru/diff.txt2
-rw-r--r--inc/lang/ru/lang.php49
-rw-r--r--inc/lang/ru/mailtext.txt16
-rw-r--r--inc/lang/ru/password.txt1
-rw-r--r--inc/lang/ru/registermail.txt14
-rw-r--r--inc/lang/ru/subscr_single.txt1
-rw-r--r--inc/lang/ru/uploadmail.txt16
-rw-r--r--inc/lang/sl/lang.php15
-rw-r--r--inc/lessc.inc.php398
-rw-r--r--inc/parser/code.php4
-rw-r--r--inc/parser/handler.php218
-rw-r--r--inc/parser/lexer.php414
-rw-r--r--inc/parser/metadata.php752
-rw-r--r--inc/parser/parser.php22
-rw-r--r--inc/parser/renderer.php42
-rw-r--r--inc/parser/xhtml.php65
-rw-r--r--inc/plugincontroller.class.php2
-rw-r--r--inc/subscription.php4
50 files changed, 1313 insertions, 1080 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
index 07df7a4be..3c955cf88 100644
--- a/inc/DifferenceEngine.php
+++ b/inc/DifferenceEngine.php
@@ -826,7 +826,7 @@ class DiffFormatter {
* @param $str string Text string to escape
* @return string The escaped string.
*/
- function _escape($str){
+ function _escape($str){
return $str;
}
}
diff --git a/inc/Input.class.php b/inc/Input.class.php
index 35aecdb45..7434d2b2c 100644
--- a/inc/Input.class.php
+++ b/inc/Input.class.php
@@ -238,7 +238,6 @@ class PostInput extends Input {
/**
* Internal class used for $_GET access in Input class
-
*/
class GetInput extends Input {
protected $access;
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php
index 4c940b39e..3a713baca 100644
--- a/inc/RemoteAPICore.php
+++ b/inc/RemoteAPICore.php
@@ -506,8 +506,8 @@ class RemoteAPICore {
}
/**
- * Returns the permissions of a given wiki page
- */
+ * Returns the permissions of a given wiki page
+ */
function aclCheck($id) {
$id = $this->resolvePageId($id);
return auth_quickaclcheck($id);
@@ -772,7 +772,7 @@ class RemoteAPICore {
$id = cleanID($id);
if(empty($id)) {
global $conf;
- $id = cleanID($conf['start']);
+ $id = cleanID($conf['start']);
}
return $id;
}
diff --git a/inc/auth.php b/inc/auth.php
index 1c0bf5b4f..8be270bfc 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -48,15 +48,15 @@ function auth_setup() {
// try to load auth backend from plugins
foreach ($plugin_controller->getList('auth') as $plugin) {
- if ($conf['authtype'] === $plugin) {
- $auth = $plugin_controller->load('auth', $plugin);
- break;
- } elseif ('auth' . $conf['authtype'] === $plugin) {
- // matches old auth backends (pre-Weatherwax)
- $auth = $plugin_controller->load('auth', $plugin);
- msg('Your authtype setting is deprecated. You must set $conf[\'authtype\'] = "auth' . $conf['authtype'] . '"'
- . ' in your configuration (see <a href="https://www.dokuwiki.org/auth">Authentication Backends</a>)',-1,'','',MSG_ADMINS_ONLY);
- }
+ if ($conf['authtype'] === $plugin) {
+ $auth = $plugin_controller->load('auth', $plugin);
+ break;
+ } elseif ('auth' . $conf['authtype'] === $plugin) {
+ // matches old auth backends (pre-Weatherwax)
+ $auth = $plugin_controller->load('auth', $plugin);
+ msg('Your authtype setting is deprecated. You must set $conf[\'authtype\'] = "auth' . $conf['authtype'] . '"'
+ . ' in your configuration (see <a href="https://www.dokuwiki.org/auth">Authentication Backends</a>)',-1,'','',MSG_ADMINS_ONLY);
+ }
}
if(!isset($auth) || !$auth){
@@ -65,10 +65,10 @@ function auth_setup() {
}
if ($auth->success == false) {
- // degrade to unauthenticated user
- unset($auth);
- auth_logoff();
- msg($lang['authtempfail'], -1);
+ // degrade to unauthenticated user
+ unset($auth);
+ auth_logoff();
+ msg($lang['authtempfail'], -1);
return false;
}
@@ -1061,7 +1061,7 @@ function auth_deleteprofile(){
if(!$INPUT->post->bool('delete')) return false;
if(!checkSecurityToken()) return false;
- // action prevented or auth module disallows
+ // action prevented or auth module disallows
if(!actionOK('profile_delete') || !$auth->canDo('delUser')) {
msg($lang['profnodelete'], -1);
return false;
diff --git a/inc/farm.php b/inc/farm.php
index 54fff3ec6..54692928d 100644
--- a/inc/farm.php
+++ b/inc/farm.php
@@ -20,7 +20,7 @@
* @author virtual host part of farm_confpath() based on conf_path() from Drupal.org's /includes/bootstrap.inc
* (see https://github.com/drupal/drupal/blob/7.x/includes/bootstrap.inc#L537)
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
-*/
+ */
// DOKU_FARMDIR needs to be set in preload.php, here the fallback is the same as DOKU_INC would be (if it was set already)
if(!defined('DOKU_FARMDIR')) define('DOKU_FARMDIR', fullpath(dirname(__FILE__).'/../').'/');
diff --git a/inc/html.php b/inc/html.php
index a2a726406..03e9dc751 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1240,20 +1240,20 @@ function html_diff($text='',$intro=true,$type=null){
}
function html_insert_softbreaks($diffhtml) {
- // search the diff html string for both:
- // - html tags, so these can be ignored
- // - long strings of characters without breaking characters
- return preg_replace_callback('/<[^>]*>|[^<> ]{12,}/','html_softbreak_callback',$diffhtml);
+ // search the diff html string for both:
+ // - html tags, so these can be ignored
+ // - long strings of characters without breaking characters
+ return preg_replace_callback('/<[^>]*>|[^<> ]{12,}/','html_softbreak_callback',$diffhtml);
}
function html_softbreak_callback($match){
- // if match is an html tag, return it intact
- if ($match[0]{0} == '<') return $match[0];
+ // if match is an html tag, return it intact
+ if ($match[0]{0} == '<') return $match[0];
- // its a long string without a breaking character,
- // make certain characters into breaking characters by inserting a
- // breaking character (zero length space, U+200B / #8203) in front them.
- $regex = <<< REGEX
+ // its a long string without a breaking character,
+ // make certain characters into breaking characters by inserting a
+ // breaking character (zero length space, U+200B / #8203) in front them.
+ $regex = <<< REGEX
(?(?= # start a conditional expression with a positive look ahead ...
&\#?\\w{1,6};) # ... for html entities - we don't want to split them (ok to catch some invalid combinations)
&\#?\\w{1,6}; # yes pattern - a quicker match for the html entity, since we know we have one
@@ -1262,7 +1262,7 @@ function html_softbreak_callback($match){
)+ # end conditional expression
REGEX;
- return preg_replace('<'.$regex.'>xu','\0&#8203;',$match[0]);
+ return preg_replace('<'.$regex.'>xu','\0&#8203;',$match[0]);
}
/**
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 71e642995..4c279e692 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -26,13 +26,13 @@ function checkUpdateMessages(){
// check if new messages needs to be fetched
if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
@touch($cf);
- dbglog("checkUpdatesMessages(): downloading messages.txt");
+ dbglog("checkUpdateMessages(): downloading messages.txt");
$http = new DokuHTTPClient();
$http->timeout = 12;
$data = $http->get(DOKU_MESSAGEURL.$updateVersion);
io_saveFile($cf,$data);
}else{
- dbglog("checkUpdatesMessages(): messages.txt up to date");
+ dbglog("checkUpdateMessages(): messages.txt up to date");
$data = io_readFile($cf);
}
diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php
index c01b72a1b..a11200b85 100644
--- a/inc/lang/cs/lang.php
+++ b/inc/lang/cs/lang.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * Czech language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Bohumir Zamecnik <bohumir@zamecnik.org>
* @author Tomas Valenta <t.valenta@sh.cvut.cz>
* @author Tomas Valenta <tomas@valenta.cz>
@@ -14,6 +14,7 @@
* @author Bohumir Zamecnik <bohumir.zamecnik@gmail.com>
* @author Jakub A. Těšínský (j@kub.cz)
* @author mkucera66@seznam.cz
+ * @author Zbyněk Křivka <krivka@fit.vutbr.cz>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -57,6 +58,7 @@ $lang['btn_revert'] = 'Vrátit zpět';
$lang['btn_register'] = 'Registrovat';
$lang['btn_apply'] = 'Použít';
$lang['btn_media'] = 'Správa médií';
+$lang['btn_deleteuser'] = 'Odstranit můj účet';
$lang['loggedinas'] = 'Přihlášen(a) jako';
$lang['user'] = 'Uživatelské jméno';
$lang['pass'] = 'Heslo';
@@ -68,6 +70,7 @@ $lang['fullname'] = 'Celé jméno';
$lang['email'] = 'E-mail';
$lang['profile'] = 'Uživatelský profil';
$lang['badlogin'] = 'Zadané uživatelské jméno a heslo není správně.';
+$lang['badpassconfirm'] = 'Bohužel špatné heslo';
$lang['minoredit'] = 'Drobné změny';
$lang['draftdate'] = 'Koncept automaticky uložen v';
$lang['nosecedit'] = 'Stránka byla v mezičase změněna. Informace o sekci již nebylo platné, byla načtena celá stránka.';
@@ -84,6 +87,11 @@ $lang['profna'] = 'Tato wiki neumožňuje změnu profilu';
$lang['profnochange'] = 'Žádné změny nebyly provedeny.';
$lang['profnoempty'] = 'Nelze zadat prázdné jméno nebo mailová adresa.';
$lang['profchanged'] = 'Uživatelský profil změněn.';
+$lang['profnodelete'] = 'Tato wiki nepodporuje mazání uživatelů';
+$lang['profdeleteuser'] = 'Smazat účet';
+$lang['profdeleted'] = 'Váš uživatelský účet byl z této wiki smazán';
+$lang['profconfdelete'] = 'Chci smazat můj účet z této wiki. <br/> Tato akce je nevratná.';
+$lang['profconfdeletemissing'] = 'Potvrzovací tlačítko nezaškrtnuto';
$lang['pwdforget'] = 'Zapomněli jste heslo? Nechte si zaslat nové';
$lang['resendna'] = 'Tato wiki neumožňuje zasílání nových hesel.';
$lang['resendpwd'] = 'Nastavit nové heslo pro';
@@ -153,7 +161,7 @@ $lang['uploadsucc'] = 'Přenos proběhl v pořádku';
$lang['uploadfail'] = 'Chyba při načítání. Možná kvůli špatně nastaveným právům?';
$lang['uploadwrong'] = 'Načtení souboru s takovouto příponou není dovoleno.';
$lang['uploadexist'] = 'Soubor už existuje, necháme ho být.';
-$lang['uploadbadcontent'] = 'Obsah načteného dokumentu %s neodpovídá jeho příponě.';
+$lang['uploadbadcontent'] = 'Nahraný obsah neodpovídá jeho příponě souboru %s.';
$lang['uploadspam'] = 'Načtený dokument byl odmítnut, je na spamovém blacklistu.';
$lang['uploadxss'] = 'Načtený dokument byl odmítnut. Zdá se, že obsahuje škodlivé věci.';
$lang['uploadsize'] = 'Nahraný soubor byl příliš velký (max. %s)';
@@ -204,7 +212,7 @@ $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:';
$lang['mail_new_user'] = 'nový uživatel:';
-$lang['mail_upload'] = 'načtený dokument:';
+$lang['mail_upload'] = 'nahraný soubor:';
$lang['changes_type'] = 'Prohlednou změny ';
$lang['pages_changes'] = 'stránek';
$lang['media_changes'] = 'souborů médií';
@@ -293,6 +301,9 @@ $lang['i_pol1'] = 'Veřejná wiki (čtení pro všechny, zápis a
$lang['i_pol2'] = 'Uzavřená wiki (čtení, zápis a upload pouze pro registrované uživatele)';
$lang['i_retry'] = 'Zkusit znovu';
$lang['i_license'] = 'Vyberte prosím licenci obsahu:';
+$lang['i_license_none'] = 'Nezobrazovat žádné licenční informace';
+$lang['i_pop_field'] = 'Prosím, pomozte nám vylepšit DokuWiki:';
+$lang['i_pop_label'] = 'Jednou měsíčně zaslat anonymní data o využívání DokuWiki jejím vývojářům';
$lang['recent_global'] = 'Právě si prohlížíte změny ve jmenném prostoru <b>%s</b>. Také si můžete <a href="%s">zobrazit změny v celé wiki</a>.';
$lang['years'] = 'před %d roky';
$lang['months'] = 'před %d měsíci';
diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php
index 4ee9a0eed..265cb7e1b 100644
--- a/inc/lang/de-informal/lang.php
+++ b/inc/lang/de-informal/lang.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * german informal language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Andreas Gohr <andi@splitbrain.org>
* @author Christof <gagi@fin.de>
* @author Anika Henke <anika@selfthinker.org>
@@ -94,10 +94,10 @@ $lang['profnochange'] = 'Keine Änderungen, nichts zu tun.';
$lang['profnoempty'] = 'Es muss ein Name oder eine E-Mail Adresse angegeben werden.';
$lang['profchanged'] = 'Benutzerprofil erfolgreich geändert.';
$lang['profnodelete'] = 'Dieses Wiki unterstützt nicht das Löschen von Benutzern.';
-$lang['profdeleteuser'] = 'Benutzerprofil löschen';
+$lang['profdeleteuser'] = 'Benutzerprofil löschen';
$lang['profdeleted'] = 'Dein Benutzerprofil wurde im Wiki gelöscht.';
$lang['profconfdelete'] = 'Ich möchte mein Benutzerprofil löschen.<br/> Diese Aktion ist nicht umkehrbar.';
-$lang['profconfdeletemissing'] = 'Bestätigungs-Checkbox wurde nicht angehakt.';
+$lang['profconfdeletemissing'] = 'Bestätigungs-Checkbox wurde nicht angehakt.';
$lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an';
$lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.';
$lang['resendpwd'] = 'Neues Passwort setzen für';
diff --git a/inc/lang/de/admin.txt b/inc/lang/de/admin.txt
index c52f343ea..f079f7e91 100644
--- a/inc/lang/de/admin.txt
+++ b/inc/lang/de/admin.txt
@@ -1,4 +1,4 @@
====== Administration ======
-Folgende administrative Aufgaben stehen in DokuWiki zur Verfügung.
+Folgende administrative Aufgaben stehen in DokuWiki zur Verfügung:
diff --git a/inc/lang/de/backlinks.txt b/inc/lang/de/backlinks.txt
index b797b0003..1ffa815c2 100644
--- a/inc/lang/de/backlinks.txt
+++ b/inc/lang/de/backlinks.txt
@@ -1,5 +1,5 @@
====== Links hierher ======
-Dies ist eine Liste der Seiten, die zurück zur momentanen Seite linken.
+Dies ist eine Liste der Seiten, welche zurück zur momentanen Seite verlinken.
diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php
index 630ccb3ff..97ac36da9 100644
--- a/inc/lang/en/lang.php
+++ b/inc/lang/en/lang.php
@@ -84,7 +84,7 @@ $lang['profnochange'] = 'No changes, nothing to do.';
$lang['profnoempty'] = 'An empty name or email address is not allowed.';
$lang['profchanged'] = 'User profile successfully updated.';
$lang['profnodelete'] = 'This wiki does not support deleting users';
-$lang['profdeleteuser'] = 'Delete Account';
+$lang['profdeleteuser'] = 'Delete Account';
$lang['profdeleted'] = 'Your user account has been deleted from this wiki';
$lang['profconfdelete'] = 'I wish to remove my account from this wiki. <br/> This action can not be undone.';
$lang['profconfdeletemissing'] = 'Confirmation check box not ticked';
diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php
index 1bafe5191..f000fcd36 100644
--- a/inc/lang/eo/lang.php
+++ b/inc/lang/eo/lang.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * Esperanta dosiero
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Antono Vasiljev <esperanto.minsk ĈE tut.by>
* @author Felipe Castro <fefcas@yahoo.com.br>
* @author Felipe Castro <fefcas@uol.com.br>
@@ -53,6 +53,7 @@ $lang['btn_revert'] = 'Restarigi';
$lang['btn_register'] = 'Registriĝi';
$lang['btn_apply'] = 'Apliki';
$lang['btn_media'] = 'Medio-administrilo';
+$lang['btn_deleteuser'] = 'Forigi mian aliĝon';
$lang['loggedinas'] = 'Ensalutinta kiel';
$lang['user'] = 'Uzant-nomo';
$lang['pass'] = 'Pasvorto';
@@ -64,6 +65,7 @@ $lang['fullname'] = 'Kompleta nomo';
$lang['email'] = 'Retpoŝto';
$lang['profile'] = 'Uzanto-profilo';
$lang['badlogin'] = 'Pardonu, uzant-nomo aŭ pasvorto estis erara.';
+$lang['badpassconfirm'] = 'Pardonu, la pasvorto malĝustis';
$lang['minoredit'] = 'Etaj modifoj';
$lang['draftdate'] = 'Lasta konservo de la skizo:';
$lang['nosecedit'] = 'La paĝo ŝanĝiĝis intertempe, sekcio-informo estis malĝisdata, tial la tuta paĝo estas reŝargita.';
@@ -80,6 +82,11 @@ $lang['profna'] = 'Tiu ĉi vikio ne ebligas modifon en la profilo
$lang['profnochange'] = 'Neniu ŝanĝo, nenio farinda.';
$lang['profnoempty'] = 'Malplena nomo aŭ retadreso ne estas permesata.';
$lang['profchanged'] = 'La profilo de la uzanto sukcese ĝisdatiĝis.';
+$lang['profnodelete'] = 'Tiu ĉi vikio ne subtenas forigo de uzantoj';
+$lang['profdeleteuser'] = 'Forigi aliĝon';
+$lang['profdeleted'] = 'Via uzant-aliĝo estis forigata de tiu ĉi vikio';
+$lang['profconfdelete'] = 'Mi deziras forigi mian aliĝon de tiu ĉi vikio. <br/> Tiu ĉi ago ne povos esti malfarata.';
+$lang['profconfdeletemissing'] = 'Konfirmilo ne estas markita';
$lang['pwdforget'] = 'Ĉu vi forgesis vian pasvorton? Prenu novan';
$lang['resendna'] = 'Tiu ĉi vikio ne ebligas resendon de la pasvortoj.';
$lang['resendpwd'] = 'Sendi novan pasvorton al';
diff --git a/inc/lang/ko/diff.txt b/inc/lang/ko/diff.txt
index 09ec51d35..3fef83221 100644
--- a/inc/lang/ko/diff.txt
+++ b/inc/lang/ko/diff.txt
@@ -1,3 +1,3 @@
====== 차이 ======
-이 문서의 선택한 두 판 사이의 차이를 보여줍니다. \ No newline at end of file
+문서의 선택한 두 판 사이의 차이를 보여줍니다. \ No newline at end of file
diff --git a/inc/lang/ko/draft.txt b/inc/lang/ko/draft.txt
index fc875f46e..7e700f725 100644
--- a/inc/lang/ko/draft.txt
+++ b/inc/lang/ko/draft.txt
@@ -1,5 +1,5 @@
====== 문서 초안 있음 ======
-이 문서의 마지막 편집 세션은 올바르게 끝나지 않았습니다. 도쿠위키는 작업 도중 자동으로 저장된 문서 초안을 사용해 편집을 계속 할 수 있습니다. 마지막 세션 동안 저장된 문서 초안을 아래에서 볼 수 있습니다.
+이 문서의 마지막 편집 세션은 올바르게 끝나지 않았습니다. 도쿠위키는 작업 도중 자동으로 저장된 초안을 사용해 편집을 계속 할 수 있습니다. 마지막 세션 동안 저장된 초안을 아래에서 볼 수 있습니다.
비정상적으로 끝난 편집 세션을 **되돌릴**지 여부를 결정하고, 자동으로 저장되었던 초안을 **삭제**하거나 편집 과정을 **취소**하세요. \ No newline at end of file
diff --git a/inc/lang/ko/edit.txt b/inc/lang/ko/edit.txt
index f5aa865d9..8da90266c 100644
--- a/inc/lang/ko/edit.txt
+++ b/inc/lang/ko/edit.txt
@@ -1 +1 @@
-문서를 편집하고 ''저장''을 누르세요. 위키 구문은 [[wiki:syntax]]를 참고하세요. 이 문서를 **더 좋게 만들 자신이 있을 때**에만 편집하세요. 연습을 하고 싶다면 먼저 [[playground:playground|연습장]]에 가서 연습하세요. \ No newline at end of file
+문서를 편집하고 ''저장''을 누르세요. 위키 구문은 [[wiki:syntax]]를 참고하세요. 문서를 **더 좋게 만들 자신이 있을 때**에만 편집하세요. 연습을 하고 싶다면 먼저 [[playground:playground|연습장]]에 가서 연습하세요. \ No newline at end of file
diff --git a/inc/lang/ko/index.txt b/inc/lang/ko/index.txt
index a98bf877e..ce94e09c8 100644
--- a/inc/lang/ko/index.txt
+++ b/inc/lang/ko/index.txt
@@ -1,3 +1,3 @@
====== 사이트맵 ======
-[[doku>ko:namespaces|이름공간]]에서 정렬한 모든 문서의 목록입니다. \ No newline at end of file
+[[doku>ko:namespaces|이름공간]] 순으로 정렬한 모든 문서의 사이트맵입니다. \ No newline at end of file
diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php
index a54aad71d..f43e78331 100644
--- a/inc/lang/ko/lang.php
+++ b/inc/lang/ko/lang.php
@@ -46,28 +46,28 @@ $lang['btn_subscribe'] = '구독 관리';
$lang['btn_profile'] = '개인 정보 바꾸기';
$lang['btn_reset'] = '재설정';
$lang['btn_resendpwd'] = '새 비밀번호 설정';
-$lang['btn_draft'] = '문서 초안 편집';
-$lang['btn_recover'] = '문서 초안 되돌리기';
-$lang['btn_draftdel'] = '문서 초안 삭제';
+$lang['btn_draft'] = '초안 편집';
+$lang['btn_recover'] = '초안 되돌리기';
+$lang['btn_draftdel'] = '초안 삭제';
$lang['btn_revert'] = '되돌리기';
$lang['btn_register'] = '등록';
$lang['btn_apply'] = '적용';
$lang['btn_media'] = '미디어 관리';
$lang['btn_deleteuser'] = '내 계정 제거';
-$lang['loggedinas'] = '다음 사용자로 로그인';
+$lang['loggedinas'] = '로그인한 사용자';
$lang['user'] = '사용자 이름';
$lang['pass'] = '비밀번호';
$lang['newpass'] = '새 비밀번호';
$lang['oldpass'] = '현재 비밀번호 확인';
$lang['passchk'] = '비밀번호 다시 확인';
$lang['remember'] = '기억하기';
-$lang['fullname'] = '실제 이름';
+$lang['fullname'] = '실명';
$lang['email'] = '이메일';
$lang['profile'] = '개인 정보';
$lang['badlogin'] = '죄송하지만 사용자 이름이나 비밀번호가 잘못되었습니다.';
$lang['badpassconfirm'] = '죄송하지만 비밀번호가 잘못되었습니다';
$lang['minoredit'] = '사소한 바뀜';
-$lang['draftdate'] = '문서 초안 자동 저장 시간';
+$lang['draftdate'] = '초안 자동 저장 시간';
$lang['nosecedit'] = '한동안 문서가 바뀌었으며, 문단 정보가 오래되어 문서 전체를 대신 열었습니다.';
$lang['regmissing'] = '죄송하지만 모든 필드를 채워야 합니다.';
$lang['reguexists'] = '죄송하지만 같은 이름을 사용하는 사용자가 있습니다.';
@@ -92,7 +92,7 @@ $lang['resendna'] = '이 위키는 비밀번호 재설정을 지원
$lang['resendpwd'] = '다음으로 새 비밀번호 보내기';
$lang['resendpwdmissing'] = '죄송하지만 모든 필드를 채워야 합니다.';
$lang['resendpwdnouser'] = '죄송하지만 데이터베이스에서 이 사용자를 찾을 수 없습니다.';
-$lang['resendpwdbadauth'] = '죄송하지만 인증 코드가 올바르지 않습니다. 잘못된 확인 링크인지 확인하시기 바랍니다.';
+$lang['resendpwdbadauth'] = '죄송하지만 인증 코드가 올바르지 않습니다. 잘못된 확인 링크인지 확인하세요.';
$lang['resendpwdconfirm'] = '확인 링크를 이메일로 보냈습니다.';
$lang['resendpwdsuccess'] = '새 비밀번호를 이메일로 보냈습니다.';
$lang['license'] = '별도로 라이선스를 알리지 않을 경우, 이 위키의 내용은 다음의 라이선스에 따라 사용할 수 있습니다:';
@@ -102,7 +102,7 @@ $lang['searchmedia_in'] = '%s에서 찾기';
$lang['txt_upload'] = '올릴 파일 선택';
$lang['txt_filename'] = '올릴 파일 이름 입력 (선택 사항)';
$lang['txt_overwrt'] = '기존 파일에 덮어쓰기';
-$lang['maxuploadsize'] = '최대 올리기 용량입니다. 파일당 %s입니다.';
+$lang['maxuploadsize'] = '최대 올리기 용량. 파일당 %s입니다.';
$lang['lockedby'] = '현재 잠겨진 사용자';
$lang['lockexpire'] = '잠금 해제 시간';
$lang['js']['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리 보기를 눌러 잠금 시간을 다시 설정하세요.';
@@ -152,28 +152,28 @@ $lang['mediaselect'] = '미디어 파일';
$lang['fileupload'] = '미디어 파일 올리기';
$lang['uploadsucc'] = '올리기 성공';
$lang['uploadfail'] = '올리기를 실패했습니다. 잘못된 권한 때문일지도 모릅니다.';
-$lang['uploadwrong'] = '올리기를 거부했습니다. 금지된 파일 확장자입니다!';
+$lang['uploadwrong'] = '올리기가 거부되었습니다. 금지된 파일 확장자입니다!';
$lang['uploadexist'] = '파일이 이미 존재합니다.';
$lang['uploadbadcontent'] = '올린 파일이 %s 파일 확장자와 일치하지 않습니다.';
$lang['uploadspam'] = '스팸 차단 목록이 올리기를 차단했습니다.';
$lang['uploadxss'] = '악성 코드의 가능성이 있어 올리기를 차단했습니다.';
$lang['uploadsize'] = '올린 파일이 너무 큽니다. (최대 %s)';
$lang['deletesucc'] = '"%s" 파일이 삭제되었습니다.';
-$lang['deletefail'] = '"%s" 파일을 삭제할 수 없습니다 - 삭제 권한이 있는지 확인하세요.';
+$lang['deletefail'] = '"%s" 파일을 삭제할 수 없습니다 - 권한이 있는지 확인하세요.';
$lang['mediainuse'] = '"%s" 파일을 삭제할 수 없습니다 - 아직 사용 중입니다.';
$lang['namespaces'] = '이름공간';
$lang['mediafiles'] = '사용할 수 있는 파일 목록';
$lang['accessdenied'] = '이 문서를 볼 권한이 없습니다.';
$lang['mediausage'] = '이 파일을 참고하려면 다음 문법을 사용하세요:';
$lang['mediaview'] = '원본 파일 보기';
-$lang['mediaroot'] = '루트 (root)';
+$lang['mediaroot'] = '루트';
$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 선택한 파일 이름 앞에 쌍점(:)으로 구분되는 이름을 붙이면 됩니다. 파일을 드래그 앤 드롭해 선택할 수 있습니다.';
$lang['mediaextchange'] = '파일 확장자가 .%s에서 .%s(으)로 바뀌었습니다!';
$lang['reference'] = '참고';
$lang['ref_inuse'] = '다음 문서에서 아직 사용 중이므로 파일을 삭제할 수 없습니다:';
$lang['ref_hidden'] = '문서의 일부 참고는 읽을 수 있는 권한이 없습니다';
$lang['hits'] = '조회 수';
-$lang['quickhits'] = '일치하는 문서 이름';
+$lang['quickhits'] = '일치하는 문서이름';
$lang['toc'] = '목차';
$lang['current'] = '현재';
$lang['yours'] = '판';
@@ -186,22 +186,22 @@ $lang['diff_side'] = '다중 창 방식';
$lang['line'] = '줄';
$lang['breadcrumb'] = '추적';
$lang['youarehere'] = '현재 위치';
-$lang['lastmod'] = '마지막으로 수정함';
-$lang['by'] = '작성자';
-$lang['deleted'] = '삭제함';
+$lang['lastmod'] = '마지막으로 수정됨';
+$lang['by'] = '저자';
+$lang['deleted'] = '제거됨';
$lang['created'] = '새로 만듦';
$lang['restored'] = '이전 판으로 되돌림 (%s)';
$lang['external_edit'] = '바깥 편집';
$lang['summary'] = '편집 요약';
-$lang['noflash'] = '이 콘텐츠를 표시하기 위해서 <a href="http://www.adobe.com/products/flashplayer/">Adobe 플래시 플러그인</a>이 필요합니다.';
+$lang['noflash'] = '이 내용을 표시하기 위해서 <a href="http://www.adobe.com/products/flashplayer/">Adobe 플래시 플러그인</a>이 필요합니다.';
$lang['download'] = '조각 다운로드';
$lang['tools'] = '도구';
$lang['user_tools'] = '사용자 도구';
$lang['site_tools'] = '사이트 도구';
$lang['page_tools'] = '문서 도구';
-$lang['skip_to_content'] = '콘텐츠 넘기기';
+$lang['skip_to_content'] = '내용으로 건너뛰기';
$lang['sidebar'] = '사이드바';
-$lang['mail_newpage'] = '문서 추가함:';
+$lang['mail_newpage'] = '문서 추가됨:';
$lang['mail_changed'] = '문서 바뀜:';
$lang['mail_subscribe_list'] = '이름공간에서 바뀐 문서:';
$lang['mail_new_user'] = '새 사용자:';
@@ -212,7 +212,7 @@ $lang['media_changes'] = '미디어 파일';
$lang['both_changes'] = '문서와 미디어 파일 모두';
$lang['qb_bold'] = '굵은 글씨';
$lang['qb_italic'] = '기울인 글씨';
-$lang['qb_underl'] = '밑줄 그어진 글씨';
+$lang['qb_underl'] = '밑줄 글씨';
$lang['qb_code'] = '코드 글씨';
$lang['qb_strike'] = '취소선 글씨';
$lang['qb_h1'] = '1단계 문단 제목';
@@ -236,16 +236,16 @@ $lang['qb_smileys'] = '이모티콘';
$lang['qb_chars'] = '특수 문자';
$lang['upperns'] = '상위 이름공간으로 이동';
$lang['admin_register'] = '새 사용자 추가';
-$lang['metaedit'] = '메타 데이터 편집';
-$lang['metasaveerr'] = '메타 데이터 쓰기 실패';
-$lang['metasaveok'] = '메타 데이터 저장됨';
+$lang['metaedit'] = '메타데이터 편집';
+$lang['metasaveerr'] = '메타데이터 쓰기 실패';
+$lang['metasaveok'] = '메타데이터 저장됨';
$lang['img_backto'] = '뒤로';
$lang['img_title'] = '제목';
$lang['img_caption'] = '설명';
$lang['img_date'] = '날짜';
-$lang['img_fname'] = '파일 이름';
+$lang['img_fname'] = '파일이름';
$lang['img_fsize'] = '크기';
-$lang['img_artist'] = '만든이';
+$lang['img_artist'] = '촬영자';
$lang['img_copyr'] = '저작권';
$lang['img_format'] = '포맷';
$lang['img_camera'] = '카메라';
@@ -270,14 +270,14 @@ $lang['subscr_style_every'] = '모든 바뀜을 이메일로 받기';
$lang['subscr_style_digest'] = '각 문서의 바뀜을 요약 (매 %.2f일 마다)';
$lang['subscr_style_list'] = '마지막 이메일 이후 바뀐 문서의 목록 (매 %.2f일 마다)';
$lang['authmodfailed'] = '잘못된 사용자 인증 설정입니다. 위키 관리자에게 문의하시기 바랍니다.';
-$lang['authtempfail'] = '사용자 인증이 일시적으로 사용할 수 없습니다. 만약 계속해서 문제가 발생하면 위키 관리자에게 문의하시기 바랍니다.';
+$lang['authtempfail'] = '사용자 인증을 일시적으로 사용할 수 없습니다. 만약 계속해서 문제가 발생하면 위키 관리자에게 문의하시기 바랍니다.';
$lang['authpwdexpire'] = '비밀번호를 바꾼지 %d일이 지났으며, 비민번호를 곧 바꿔야 합니다.';
$lang['i_chooselang'] = '사용할 언어를 선택하세요';
$lang['i_installer'] = 'DokuWiki 설치';
$lang['i_wikiname'] = '위키 이름';
$lang['i_enableacl'] = 'ACL 활성화 (권장)';
$lang['i_superuser'] = '슈퍼 유저';
-$lang['i_problems'] = '설치하는 동안 아래와 같은 문제가 발생했습니다. 문제를 해결한 후 설치를 계속하세요.';
+$lang['i_problems'] = '설치하는 동안 아래와 같은 문제가 발생했습니다. 문제를 해결한 후 설치를 계속할 수 있습니다.';
$lang['i_modified'] = '보안 상의 이유로 이 스크립트는 수정되지 않은 새 도쿠위키 설치에서만 동작됩니다.
다운로드한 압축 패키지를 다시 설치하거나 <a href="http://dokuwiki.org/ko:install">도쿠위키 설치 과정</a>을 참고해서 설치하세요.';
$lang['i_funcna'] = '<code>%s</code> PHP 함수를 사용할 수 없습니다. 호스트 제공자가 어떤 이유에서인지 막아 놓았을지 모릅니다.';
@@ -300,13 +300,13 @@ $lang['i_pop_field'] = '도쿠위키 경험을 개선하는 데 도움
$lang['i_pop_label'] = '한 달에 한 번씩, 도쿠위키 개발자에게 익명의 사용 데이터를 보냅니다';
$lang['recent_global'] = '현재 <b>%s</b> 이름공간을 구독 중입니다. <a href="%s">전체 위키의 최근 바뀜도 볼 수</a> 있습니다.';
$lang['years'] = '%d년 전';
-$lang['months'] = '%d개월 전';
+$lang['months'] = '%d달 전';
$lang['weeks'] = '%d주 전';
$lang['days'] = '%d일 전';
$lang['hours'] = '%d시간 전';
$lang['minutes'] = '%d분 전';
$lang['seconds'] = '%d초 전';
-$lang['wordblock'] = '차단 문구(스팸 문구)를 포함하고 있어서 저장하지 않았습니다.';
+$lang['wordblock'] = '차단 문구(스팸)를 포함하고 있어서 바뀜을 저장하지 않았습니다.';
$lang['media_uploadtab'] = '올리기';
$lang['media_searchtab'] = '찾기';
$lang['media_file'] = '파일';
@@ -320,13 +320,13 @@ $lang['media_sort_date'] = '날짜';
$lang['media_namespaces'] = '이름공간 선택';
$lang['media_files'] = '%s에 있는 파일';
$lang['media_upload'] = '%s에 올리기';
-$lang['media_search'] = '%s 찾기';
+$lang['media_search'] = '%s에서 찾기';
$lang['media_view'] = '%s';
$lang['media_viewold'] = '%s (%s에 있음)';
$lang['media_edit'] = '%s 편집';
-$lang['media_history'] = '%s 문서의 판 내역';
-$lang['media_meta_edited'] = '메타 데이터 편집됨';
-$lang['media_perm_read'] = '죄송하지만 파일을 읽을 권한이 없습니다.';
+$lang['media_history'] = '%s의 내역';
+$lang['media_meta_edited'] = '메타데이터 편집됨';
+$lang['media_perm_read'] = '죄송하지만 파일을 읽을 권한이 없습니다.';
$lang['media_perm_upload'] = '죄송하지만 파일을 올릴 권한이 없습니다.';
$lang['media_update'] = '새 판 올리기';
$lang['media_restore'] = '이 판으로 되돌리기';
diff --git a/inc/lang/ko/mailwrap.html b/inc/lang/ko/mailwrap.html
index 885730428..ef061f10f 100644
--- a/inc/lang/ko/mailwrap.html
+++ b/inc/lang/ko/mailwrap.html
@@ -1,13 +1,13 @@
<html>
- <head>
- <title>@TITLE@</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- </head>
- <body>
+<head>
+ <title>@TITLE@</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
- @HTMLBODY@
+@HTMLBODY@
- <br /><hr />
- <small>@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다.</small>
- </body>
- </html> \ No newline at end of file
+<br /><hr />
+<small>이 메일은 @DOKUWIKIURL@에서 도쿠위키가 생성했습니다.</small>
+</body>
+</html>
diff --git a/inc/lang/ko/newpage.txt b/inc/lang/ko/newpage.txt
index 0c8b8f685..a553cf9c2 100644
--- a/inc/lang/ko/newpage.txt
+++ b/inc/lang/ko/newpage.txt
@@ -1,3 +1,3 @@
====== 이 주제는 아직 없습니다 ======
-아직 없는 주제에 대한 링크를 따라왔습니다. "문서 만들기"버튼을 클릭해 새로 만들 수 있습니다. \ No newline at end of file
+아직 없는 주제에 대한 링크를 따라왔습니다. "문서 만들기"를 클릭해 새로 만들 수 있습니다. \ No newline at end of file
diff --git a/inc/lang/ko/norev.txt b/inc/lang/ko/norev.txt
index af9756d29..5cb7360d7 100644
--- a/inc/lang/ko/norev.txt
+++ b/inc/lang/ko/norev.txt
@@ -1,3 +1,3 @@
====== 지정한 판 없음 ======
-지정한 판이 존재하지 않습니다. "이전 판" 버튼을 사용해 이 문서의 이전 판 목록을 보세요. \ No newline at end of file
+지정한 판이 존재하지 않습니다. 이 문서의 이전 판 목록을 보려면 "이전 판"을 클릭하세요. \ No newline at end of file
diff --git a/inc/lang/ko/password.txt b/inc/lang/ko/password.txt
index 086a413cc..790f6b479 100644
--- a/inc/lang/ko/password.txt
+++ b/inc/lang/ko/password.txt
@@ -1,6 +1,6 @@
@FULLNAME@님 안녕하세요!
-여기에 @DOKUWIKIURL@의 @TITLE@의 사용자 정보가 있습니다.
+여기에 @DOKUWIKIURL@에서 @TITLE@의 사용자 정보가 있습니다.
로그인 : @LOGIN@
비밀번호 : @PASSWORD@
diff --git a/inc/lang/ko/register.txt b/inc/lang/ko/register.txt
index cd2ff6e30..4df968896 100644
--- a/inc/lang/ko/register.txt
+++ b/inc/lang/ko/register.txt
@@ -1,3 +1,3 @@
====== 새 사용자 등록 ======
-이 위키에 새 계정을 만드려면 아래의 모든 내용을 입력하세요. **올바른 이메일 주소**를 사용하세요. 비밀번호를 입력하는 곳이 없다면 비밀번호는 이 이메일로 보내집니다. 사용자 이름은 올바른 [[doku>ko:pagename|문서 이름]]이어야 합니다. \ No newline at end of file
+이 위키에 새 계정을 만드려면 아래의 모든 내용을 입력하세요. **올바른 이메일 주소**를 사용하세요. 비밀번호를 입력하는 곳이 없다면 비밀번호는 이 이메일로 보내집니다. 사용자 이름은 올바른 [[doku>ko:pagename|문서이름]]이어야 합니다. \ No newline at end of file
diff --git a/inc/lang/ko/resetpwd.txt b/inc/lang/ko/resetpwd.txt
index ed909456f..cc2ec6a94 100644
--- a/inc/lang/ko/resetpwd.txt
+++ b/inc/lang/ko/resetpwd.txt
@@ -1,3 +1,3 @@
====== 새 비밀번호 설정 ======
-이 위키 계정의 새 비밀번호를 입력하세요. \ No newline at end of file
+이 위키에 있는 계정의 새 비밀번호를 입력하세요. \ No newline at end of file
diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt
index b12477db0..cb9bae2e0 100644
--- a/inc/lang/ko/searchpage.txt
+++ b/inc/lang/ko/searchpage.txt
@@ -1,5 +1,5 @@
====== 찾기 ======
-아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 문서를 찾지 못하였다면, "문서 만들기"나 "문서 편집" 버튼을 사용해 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다.
+아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 문서를 찾지 못하였다면, "문서 만들기"나 "문서 편집"을 사용해 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다.
===== 결과 ===== \ No newline at end of file
diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt
index 36ee2502c..7a044736a 100644
--- a/inc/lang/ko/subscr_digest.txt
+++ b/inc/lang/ko/subscr_digest.txt
@@ -11,7 +11,7 @@
새 판 : @NEWPAGE@
-이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
+문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요.
--
diff --git a/inc/lang/ko/subscr_list.txt b/inc/lang/ko/subscr_list.txt
index bd0fdaed8..57aa78cf7 100644
--- a/inc/lang/ko/subscr_list.txt
+++ b/inc/lang/ko/subscr_list.txt
@@ -7,7 +7,7 @@
@DIFF@
--------------------------------------------------------
-이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
+문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요.
--
diff --git a/inc/lang/ko/subscr_single.txt b/inc/lang/ko/subscr_single.txt
index 89fc06b18..ed5478441 100644
--- a/inc/lang/ko/subscr_single.txt
+++ b/inc/lang/ko/subscr_single.txt
@@ -13,7 +13,7 @@
이전 판 : @OLDPAGE@
새 판 : @NEWPAGE@
-이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
+문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요.
--
diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php
index 908b1a1dd..25040353a 100644
--- a/inc/lang/ne/lang.php
+++ b/inc/lang/ne/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Nepali language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Saroj Kumar Dhakal <lotusnagarkot@gmail.com>
* @author Saroj Kumar Dhakal <lotusnagarkot@yahoo.com>
*/
@@ -37,7 +38,6 @@ $lang['btn_back'] = 'पछाडि';
$lang['btn_backlink'] = 'पछाडिका लिङ्कहरु ';
$lang['btn_backtomedia'] = 'मिडिया छनौटमा फर्कनुहोस्';
$lang['btn_subscribe'] = 'पृष्ठ परिवर्तन ग्राह्य गर्नुहोस्';
-$lang['btn_unsubscribe'] = 'पृष्ठ परिवर्तन अग्राह्य गर्नुहोस्';
$lang['btn_profile'] = 'प्रोफाइल अध्यावधिक गर्नुहोस् ';
$lang['btn_reset'] = 'पूर्वरुपमा फर्काउनुहोस';
$lang['btn_draft'] = ' ड्राफ्ट सम्पादन गर्नुहोस् ';
@@ -85,8 +85,12 @@ $lang['txt_filename'] = 'अर्को रुपमा अपलो
$lang['txt_overwrt'] = 'रहेको उहि नामको फाइललाई मेटाउने';
$lang['lockedby'] = 'अहिले ताल्चा लगाइएको';
$lang['lockexpire'] = 'ताल्चा अवधि सकिने :';
-$lang['js']['willexpire'] = 'तपाईलले यो पृष्ठ सम्पादन गर्न लगाउनु भएको ताल्चाको अवधि एक मिनेट भित्र सकिदै छ। \n द्वन्द हुन नदिन पूर्वरुप वा ताल्चा समय परिवर्तन गर्नुहोस् ।';
+$lang['js']['willexpire'] = 'तपाईलले यो पृष्ठ सम्पादन गर्न लगाउनु भएको ताल्चाको अवधि एक मिनेट भित्र सकिदै छ। \n द्वन्द हुन नदिन पूर्वरुप वा ताल्चा समय परिवर्तन गर्नुहोस् ।';
$lang['js']['notsavedyet'] = 'तपाईले वचन गर्नु नभएको परिवर्रन हराउने छ। \n साच्चै जारी गर्नुहुन्छ ।';
+$lang['js']['keepopen'] = 'छनौटमा विन्डो खुला राख्नुहोस् ';
+$lang['js']['hidedetails'] = 'जानकारी लुकाउनु होस् ';
+$lang['js']['nosmblinks'] = 'विन्डोहरु लिङ्क गर्दा माइक्रो सफ्ट एक्सप्लोररमामात्र काम साझा हुन्छ । तर कपि गर्न र टास्न मिल्छ। ';
+$lang['js']['del_confirm'] = 'साच्चै छानिएका वस्तुहरु मेट्ने हो ?';
$lang['rssfailed'] = 'यो फिड लिइ आउदा गल्ति भयो ।';
$lang['nothingfound'] = 'केहि पनि भेटिएन ।';
$lang['mediaselect'] = 'मिडिया फाइलहरू ';
@@ -103,9 +107,6 @@ $lang['deletefail'] = '"%s" मेट्न सकिएन - अन
$lang['mediainuse'] = 'फाइल "%s" मेटिएको छैन - प्रयोगमा छ।';
$lang['namespaces'] = 'नेमस्पेसहरु ';
$lang['mediafiles'] = ' उपलब्ध फाइलहरु ';
-$lang['js']['keepopen'] = 'छनौटमा विन्डो खुला राख्नुहोस् ';
-$lang['js']['hidedetails'] = 'जानकारी लुकाउनु होस् ';
-$lang['js']['nosmblinks'] = 'विन्डोहरु लिङ्क गर्दा माइक्रो सफ्ट एक्सप्लोररमामात्र काम साझा हुन्छ । तर कपि गर्न र टास्न मिल्छ। ';
$lang['mediausage'] = 'फाइललाई रेफरेन्स गर्न निम्न सुत्र प्रयोग गर्नुहोस् :';
$lang['mediaview'] = 'सक्कली फाइल हेर्नुहोस् ';
$lang['mediaroot'] = 'रुट(मूख्य प्रयोगकर्ता)';
@@ -153,7 +154,6 @@ $lang['qb_media'] = 'तस्विर र अरु फाइल
$lang['qb_sig'] = 'हस्ताक्षर थप्नुहोस् ';
$lang['qb_smileys'] = 'स्माइलीहरु ';
$lang['qb_chars'] = 'विशेष वर्णहरु ';
-$lang['js']['del_confirm'] = 'साच्चै छानिएका वस्तुहरु मेट्ने हो ?';
$lang['admin_register'] = 'नयाँ प्रयोगकर्ता थप्नुहोस् ';
$lang['metaedit'] = 'मेटाडेटा सम्पादन गर्नुहोस्';
$lang['metasaveerr'] = 'मेटाडाटा लेखन असफल';
@@ -169,11 +169,6 @@ $lang['img_copyr'] = 'सर्वाधिकार';
$lang['img_format'] = 'ढाचा';
$lang['img_camera'] = 'क्यामेरा';
$lang['img_keywords'] = 'खोज शब्द';
-$lang['subscribe_success'] = '%s ,%s को ग्राह्यताको लागि थपियो ';
-$lang['subscribe_error'] = '%s ,%s को ग्राह्यताको लागि थपिदा त्रुटि';
-$lang['subscribe_noaddress'] = 'तपाईको खातासँग कुनै पनि ठेगाना संबन्धित छैन , तपाईलाई ग्रहाक सुचीमा राखन मिलेन।';
-$lang['unsubscribe_success'] = '%s लाई %s को ग्रहाक सुचीबाट हटाइयो';
-$lang['unsubscribe_error'] = '%s लाई %s को ग्राहक सुचीबाट हटाउदा त्रुटि';
$lang['authmodfailed'] = 'खराब प्रयोगकर्ता प्रामाणिकरण विधि ।तपाईको विकी एड्मिनलाई खवर गर्नुहोस् ।';
$lang['authtempfail'] = 'प्रयोगकर्ता प्रामाणिकरण अस्थाइरुपमा अनुपलब्ध छ। यदि यो समस्या रहि रहेमा तपाईको विकि एड्मिनलाई खवर गर्नुहोला ।';
$lang['i_chooselang'] = 'भाषा छान्नुहोस् ';
diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php
index a92afc0a0..70946e747 100644
--- a/inc/lang/pt-br/lang.php
+++ b/inc/lang/pt-br/lang.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * Brazilian Portuguese language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Luis Fernando Enciso <lfenciso@certto.com.br>
* @author Alauton/Loug
* @author Frederico Gonçalves Guimarães <frederico@teia.bio.br>
@@ -63,6 +63,7 @@ $lang['btn_revert'] = 'Restaurar';
$lang['btn_register'] = 'Cadastre-se';
$lang['btn_apply'] = 'Aplicar';
$lang['btn_media'] = 'Gerenciador de mídias';
+$lang['btn_deleteuser'] = 'Remover minha conta';
$lang['loggedinas'] = 'Identificado(a) como';
$lang['user'] = 'Nome de usuário';
$lang['pass'] = 'Senha';
@@ -74,6 +75,7 @@ $lang['fullname'] = 'Nome completo';
$lang['email'] = 'E-mail';
$lang['profile'] = 'Perfil do usuário';
$lang['badlogin'] = 'Desculpe, mas o nome de usuário ou a senha estão incorretos.';
+$lang['badpassconfirm'] = 'Desculpe, mas a senha está errada ';
$lang['minoredit'] = 'Alterações mínimas';
$lang['draftdate'] = 'O rascunho foi salvo automaticamente em';
$lang['nosecedit'] = 'A página foi modificada nesse intervalo de tempo. Como a informação da seção estava desatualizada, foi carregada a página inteira.';
@@ -90,6 +92,9 @@ $lang['profna'] = 'Esse wiki não suporta modificações do perfi
$lang['profnochange'] = 'Sem alterações, nada para fazer.';
$lang['profnoempty'] = 'Não são permitidos nomes ou endereços de e-mail em branco.';
$lang['profchanged'] = 'O perfil do usuário foi atualizado com sucesso.';
+$lang['profnodelete'] = 'Esse wiki não suporta a exclusão de usuários ';
+$lang['profdeleteuser'] = 'Excluir a conta';
+$lang['profdeleted'] = 'Sua conta de usuário foi excluída desse wiki';
$lang['pwdforget'] = 'Esqueceu sua senha? Solicite outra';
$lang['resendna'] = 'Esse wiki não tem suporte para o reenvio de senhas.';
$lang['resendpwd'] = 'Definir a nova senha para';
diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php
index ac9c59c3e..ad85c194b 100644
--- a/inc/lang/pt/lang.php
+++ b/inc/lang/pt/lang.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * Portuguese language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author José Carlos Monteiro <jose.c.monteiro@netcabo.pt>
* @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com>
* @author Enrico Nicoletto <liverig@gmail.com>
@@ -12,12 +12,11 @@
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
-$lang['doublequoteopening'] = '“';//&ldquo;
-$lang['doublequoteclosing'] = '”';//&rdquo;
-$lang['singlequoteopening'] = '‘';//&lsquo;
-$lang['singlequoteclosing'] = '’';//&rsquo;
-$lang['apostrophe'] = '’';//&rsquo;
-
+$lang['doublequoteopening'] = '“';
+$lang['doublequoteclosing'] = '”';
+$lang['singlequoteopening'] = '‘';
+$lang['singlequoteclosing'] = '’';
+$lang['apostrophe'] = '’';
$lang['btn_edit'] = 'Editar página';
$lang['btn_source'] = 'Ver fonte';
$lang['btn_show'] = 'Ver página';
@@ -52,7 +51,7 @@ $lang['btn_revert'] = 'Restaurar';
$lang['btn_register'] = 'Registar';
$lang['btn_apply'] = 'Aplicar';
$lang['btn_media'] = 'Gestor de Media';
-
+$lang['btn_deleteuser'] = 'Remover a Minha Conta';
$lang['loggedinas'] = 'Está em sessão como';
$lang['user'] = 'Utilizador';
$lang['pass'] = 'Senha';
@@ -67,7 +66,6 @@ $lang['badlogin'] = 'O utilizador inválido ou senha inválida.';
$lang['minoredit'] = 'Alterações Menores';
$lang['draftdate'] = 'Rascunho automaticamente gravado em';
$lang['nosecedit'] = 'A página foi modificada entretanto. Como a informação da secção estava desactualizada, foi carregada a página inteira.';
-
$lang['regmissing'] = 'Por favor, preencha todos os campos.';
$lang['reguexists'] = 'Este utilizador já está inscrito. Por favor escolha outro nome de utilizador.';
$lang['regsuccess'] = 'O utilizador foi criado e a senha foi enviada para o endereço de correio electrónico usado na inscrição.';
@@ -77,12 +75,13 @@ $lang['regbadmail'] = 'O endereço de correio electrónico é inváli
$lang['regbadpass'] = 'As duas senhas não são idênticas, por favor tente de novo.';
$lang['regpwmail'] = 'A sua senha DokuWiki';
$lang['reghere'] = 'Para se registar, clique em';
-
$lang['profna'] = 'Este Wiki não suporta modificações aos perfis.';
$lang['profnochange'] = 'Nada alteração, nada a fazer.';
$lang['profnoempty'] = 'Não são permitidos nomes ou endereços em branco.';
$lang['profchanged'] = 'Perfil do utilizador actualizado com sucesso.';
-
+$lang['profnodelete'] = 'Esta wiki não suporta remoção de utilizadores';
+$lang['profdeleteuser'] = 'Apagar Conta';
+$lang['profdeleted'] = 'A sua conta de utilizador foi removida desta wiki';
$lang['pwdforget'] = 'Esqueceu a sua senha? Pedir nova senha';
$lang['resendna'] = 'Este wiki não suporta reenvio de senhas.';
$lang['resendpwdmissing'] = 'É preciso preencher todos os campos.';
@@ -90,10 +89,8 @@ $lang['resendpwdnouser'] = 'Não foi possível encontrar este utilizador.'
$lang['resendpwdbadauth'] = 'O código de autenticação não é válido. Por favor, assegure-se de que o link de confirmação está completo.';
$lang['resendpwdconfirm'] = 'O link de confirmação foi enviado por e-mail.';
$lang['resendpwdsuccess'] = 'A nova senha foi enviada por e-mail.';
-
$lang['license'] = 'Excepto menção em contrário, o conteúdo neste wiki está sob a seguinte licença:';
$lang['licenseok'] = 'Nota: Ao editar esta página você aceita disponibilizar o seu conteúdo sob a seguinte licença:';
-
$lang['searchmedia'] = 'Procurar nome de ficheiro:';
$lang['searchmedia_in'] = 'Procurar em %s';
$lang['txt_upload'] = 'Escolha ficheiro para carregar';
@@ -102,9 +99,7 @@ $lang['txt_overwrt'] = 'Escrever por cima do ficheiro já existente';
$lang['lockedby'] = 'Bloqueado por';
$lang['lockexpire'] = 'Expira em';
$lang['js']['willexpire'] = 'O bloqueio de edição para este documento irá expirar num minuto.\nPara evitar conflitos use o botão Prever para re-iniciar o temporizador de bloqueio.';
-
$lang['js']['notsavedyet'] = 'Alterações não gravadas serão perdidas.';
-
$lang['js']['searchmedia'] = 'Procurar por ficheiros';
$lang['js']['keepopen'] = 'Mantenha a janela aberta durante a selecção';
$lang['js']['hidedetails'] = 'Esconder Detalhes';
@@ -135,6 +130,16 @@ $lang['js']['linkwiz'] = 'Assistente de Criação de Ligação';
$lang['js']['linkto'] = 'Ligação para:';
$lang['js']['del_confirm'] = 'Remover o(s) item(s) selecionados?';
$lang['js']['restore_confirm'] = 'Restaurar esta versão?';
+$lang['js']['media_diff'] = 'Ver diferenças:';
+$lang['js']['media_diff_both'] = 'Lado a Lado';
+$lang['js']['media_diff_opacity'] = 'Sobreposição';
+$lang['js']['media_diff_portions'] = 'Slider';
+$lang['js']['media_select'] = 'Selecione ficheiros…';
+$lang['js']['media_upload_btn'] = 'Enviar';
+$lang['js']['media_done_btn'] = 'Feito';
+$lang['js']['media_drop'] = 'Largue ficheiros aqui para enviar';
+$lang['js']['media_cancel'] = 'remover';
+$lang['js']['media_overwrt'] = 'Escrever por cima de ficheiros existentes';
$lang['rssfailed'] = 'Ocorreu um erro neste canal RSS: ';
$lang['nothingfound'] = 'Nada foi encontrado.';
$lang['mediaselect'] = 'Selecção de ficheiros';
@@ -184,15 +189,21 @@ $lang['external_edit'] = 'Edição externa';
$lang['summary'] = 'Sumário da Edição';
$lang['noflash'] = 'O <a href="http://www.adobe.com/products/flashplayer/">Plugin Adobe Flash</a> é necessário para exibir este conteúdo.';
$lang['download'] = 'Descarregar Snippet';
-$lang['changes_type'] = 'Ver alterações de';
-$lang['pages_changes'] = 'Páginas';
-$lang['media_changes'] = 'Ficheiros Media';
-$lang['both_changes'] = 'Tanto páginas como ficheiros media';
+$lang['tools'] = 'Ferramentas';
+$lang['user_tools'] = 'Ferramentas de Utilizador';
+$lang['site_tools'] = 'Ferramentas de Site';
+$lang['page_tools'] = 'Ferramentas de Página';
+$lang['skip_to_content'] = 'saltar para conteúdo';
+$lang['sidebar'] = 'Barra Lateral';
$lang['mail_newpage'] = 'documento adicionado:';
$lang['mail_changed'] = 'documento modificado:';
$lang['mail_subscribe_list'] = 'páginas alteradas no espaço de nome:';
$lang['mail_new_user'] = 'Novo utilizador:';
$lang['mail_upload'] = 'Ficheiro carregado:';
+$lang['changes_type'] = 'Ver alterações de';
+$lang['pages_changes'] = 'Páginas';
+$lang['media_changes'] = 'Ficheiros Media';
+$lang['both_changes'] = 'Tanto páginas como ficheiros media';
$lang['qb_bold'] = 'Texto com Ênfase';
$lang['qb_italic'] = 'Texto Itálico';
$lang['qb_underl'] = 'Texto Sublinhado';
@@ -254,6 +265,7 @@ $lang['subscr_style_digest'] = '"digest email" de alterações em cada página
$lang['subscr_style_list'] = 'lista de páginas alteradas desde o último email (cada %.2f dias)';
$lang['authmodfailed'] = 'Configuração de autenticação errada. Por favor, informe o Wiki Admin.';
$lang['authtempfail'] = 'Autenticação temporariamente indisponível. Se a situação persistir, por favor informe o Wiki Admin.';
+$lang['authpwdexpire'] = 'A sua senha expirará dentro de %d dias, deve mudá-la em breve.';
$lang['i_chooselang'] = 'Escolha a linguagem';
$lang['i_installer'] = 'Instalador do DokuWiki';
$lang['i_wikiname'] = 'Nome Wiki';
@@ -276,6 +288,9 @@ $lang['i_pol1'] = 'Wiki Público (ler para todos, escrever e carr
$lang['i_pol2'] = 'Wiki Fechado (ler, escrever e carregar somente para utilizadores inscritos)';
$lang['i_retry'] = 'Repetir';
$lang['i_license'] = 'Por favor escolha a licença sob a qual quer colocar o seu conteúdo:';
+$lang['i_license_none'] = 'Não mostrar nenhuma informação de licença';
+$lang['i_pop_field'] = 'Por favor ajude-nos a melhorar a experiência Dokuwiki:';
+$lang['i_pop_label'] = 'Uma vez por mês, enviar dados anónimos de uso para os desenvolvedores DokuWiki';
$lang['recent_global'] = 'Você está a observar as alterações dentro do espaço de nomes <b>%s</b>. Também é possível ver as <a href="%s">modificações recentes no wiki inteiro</a>.';
$lang['years'] = '%d anos atrás';
$lang['months'] = '%d meses atrás';
@@ -285,35 +300,23 @@ $lang['hours'] = '%d horas atrás';
$lang['minutes'] = '%d minutos atrás';
$lang['seconds'] = '%d segundos atrás';
$lang['wordblock'] = 'A sua alteração não foi guardada porque contém texto bloqueado (spam).';
-
-$lang['media_uploadtab'] = 'Enviar';
-$lang['media_searchtab'] = 'Procurar';
-$lang['media_viewtab'] = 'Ver';
-$lang['media_edittab'] = 'Editar';
-$lang['media_historytab'] = 'Histórico';
-$lang['media_sort'] = 'Ordenar';
-$lang['media_sort_name'] = 'Ordenar por nome';
-$lang['media_sort_date'] = 'Ordenar por data';
-$lang['media_upload'] = 'Enviar para o grupo <strong>%s</strong>.';
-$lang['media_search'] = 'Procurar no grupo <strong>%s</strong>.';
-$lang['media_view'] = '%s';
-$lang['media_edit'] = 'Editar %s';
-$lang['media_history'] = 'Histórico do %s';
-$lang['media_meta_edited']= 'metadata editada';
-$lang['media_perm_read'] = 'Perdão, não tem permissão para ler ficheiros.';
-$lang['media_perm_upload']= 'Perdão, não tem permissão para enviar ficheiros.';
-$lang['media_update'] = 'enviar nova versão';
-$lang['media_restore'] = 'Restaurar esta versão';
-
-$lang['js']['media_diff'] = 'Ver diferenças:';
-$lang['js']['media_diff_both'] = 'Lado a Lado';
-$lang['js']['media_diff_opacity'] = 'Sobreposição';
-$lang['js']['media_diff_portions'] = 'Slider'; // Needs translation. 'Deslizador' ?
-
-$lang['js']['media_select'] = 'Selecione ficheiros…';
-$lang['js']['media_upload_btn'] = 'Enviar';
-$lang['js']['media_done_btn'] = 'Feito';
-$lang['js']['media_drop'] = 'Largue ficheiros aqui para enviar';
-$lang['js']['media_cancel'] = 'remover';
-$lang['js']['media_overwrt'] = 'Escrever por cima de ficheiros existentes';
-
+$lang['media_uploadtab'] = 'Enviar';
+$lang['media_searchtab'] = 'Procurar';
+$lang['media_file'] = 'Ficheiro';
+$lang['media_viewtab'] = 'Ver';
+$lang['media_edittab'] = 'Editar';
+$lang['media_historytab'] = 'Histórico';
+$lang['media_list_rows'] = 'Linhas';
+$lang['media_sort_name'] = 'Ordenar por nome';
+$lang['media_sort_date'] = 'Ordenar por data';
+$lang['media_files'] = 'Ficheiros em %s';
+$lang['media_upload'] = 'Enviar para o grupo <strong>%s</strong>.';
+$lang['media_search'] = 'Procurar no grupo <strong>%s</strong>.';
+$lang['media_view'] = '%s';
+$lang['media_edit'] = 'Editar %s';
+$lang['media_history'] = 'Histórico do %s';
+$lang['media_meta_edited'] = 'metadata editada';
+$lang['media_perm_read'] = 'Perdão, não tem permissão para ler ficheiros.';
+$lang['media_perm_upload'] = 'Perdão, não tem permissão para enviar ficheiros.';
+$lang['media_update'] = 'enviar nova versão';
+$lang['media_restore'] = 'Restaurar esta versão';
diff --git a/inc/lang/ru/denied.txt b/inc/lang/ru/denied.txt
index 2cc33cff7..f7f53ce88 100644
--- a/inc/lang/ru/denied.txt
+++ b/inc/lang/ru/denied.txt
@@ -1,3 +1,3 @@
====== Доступ запрещён ======
-Извините, у вас не хватает прав для этого действия. Может быть, вы забыли войти в вики под своим логином?
+Извините, у вас не хватает прав для этого действия. Может быть вы забыли войти в вики под своим логином?
diff --git a/inc/lang/ru/diff.txt b/inc/lang/ru/diff.txt
index 4d1d4d031..80252614f 100644
--- a/inc/lang/ru/diff.txt
+++ b/inc/lang/ru/diff.txt
@@ -1,4 +1,4 @@
====== Различия ======
-Здесь показаны различия между выбранной ревизией и текущей версией данной страницы.
+Здесь показаны различия между двумя версиями данной страницы.
diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php
index 18a18c686..dcd39333d 100644
--- a/inc/lang/ru/lang.php
+++ b/inc/lang/ru/lang.php
@@ -64,7 +64,7 @@ $lang['btn_draftdel'] = 'Удалить черновик';
$lang['btn_revert'] = 'Восстановить';
$lang['btn_register'] = 'Зарегистрироваться';
$lang['btn_apply'] = 'Применить';
-$lang['btn_media'] = 'Media Manager';
+$lang['btn_media'] = 'Управление медиафайлами';
$lang['btn_deleteuser'] = 'Удалить мой аккаунт';
$lang['loggedinas'] = 'Зашли как';
$lang['user'] = 'Логин';
@@ -77,13 +77,13 @@ $lang['fullname'] = 'Полное имя';
$lang['email'] = 'Эл. адрес';
$lang['profile'] = 'Профиль пользователя';
$lang['badlogin'] = 'Извините, неверное имя пользователя или пароль.';
-$lang['badpassconfirm'] = 'Простите, пароль не верный';
+$lang['badpassconfirm'] = 'Простите, пароль неверный';
$lang['minoredit'] = 'Небольшие изменения';
$lang['draftdate'] = 'Черновик сохранён';
$lang['nosecedit'] = 'За это время страница была изменена и информация о секции устарела. Загружена полная версия страницы.';
$lang['regmissing'] = 'Извините, вам следует заполнить все поля.';
$lang['reguexists'] = 'Извините, пользователь с таким логином уже существует.';
-$lang['regsuccess'] = 'Пользователь создан, пароль выслан на адрес электронной почты.';
+$lang['regsuccess'] = 'Пользователь создан; пароль выслан на адрес электронной почты.';
$lang['regsuccess2'] = 'Пользователь создан.';
$lang['regmailfail'] = 'Похоже есть проблема с отправкой пароля по почте. Пожалуйста, сообщите об этом администратору.';
$lang['regbadmail'] = 'Данный вами адрес электронной почты выглядит неправильным. Если вы считаете это ошибкой, сообщите администратору.';
@@ -94,10 +94,11 @@ $lang['profna'] = 'Данная вики не поддержив
$lang['profnochange'] = 'Изменений не было внесено, профиль не обновлён.';
$lang['profnoempty'] = 'Логин и адрес электронной почты не могут быть пустыми.';
$lang['profchanged'] = 'Профиль пользователя успешно обновлён.';
-$lang['profnodelete'] = 'Удаленный пользователь не может работать с этим документом';
+$lang['profnodelete'] = 'Удалённый пользователь не может работать с этим документом';
$lang['profdeleteuser'] = 'Удалить аккаунт';
-$lang['profdeleted'] = 'Ваш аккаунт был удален из этой wiki';
-$lang['profconfdelete'] = 'Я хочу удалить мой аккаунт из этой wiki. <br />Это действие необратимо';
+$lang['profdeleted'] = 'Ваш аккаунт был удален из этой вики';
+$lang['profconfdelete'] = 'Я хочу удалить мой аккаунт из этой вики.<br />Это действие необратимо.';
+$lang['profconfdeletemissing'] = 'Флажок подтверждения не установлен';
$lang['pwdforget'] = 'Забыли пароль? Получите новый';
$lang['resendna'] = 'Данная вики не поддерживает повторную отправку пароля.';
$lang['resendpwd'] = 'Установить новый пароль для';
@@ -116,7 +117,7 @@ $lang['txt_overwrt'] = 'Перезаписать существующ
$lang['maxuploadsize'] = 'Максимальный размер загружаемого файла %s';
$lang['lockedby'] = 'В данный момент заблокирован';
$lang['lockexpire'] = 'Блокировка истекает в';
-$lang['js']['willexpire'] = 'Ваша блокировка этой страницы на редактирование истекает в течении минуты.\nЧтобы предотвратить конфликты используйте кнопку "Просмотр" для сброса таймера блокировки.';
+$lang['js']['willexpire'] = 'Ваша блокировка этой страницы на редактирование истекает в течение минуты.\nЧтобы предотвратить конфликты используйте кнопку «Просмотр» для сброса таймера блокировки.';
$lang['js']['notsavedyet'] = 'Несохранённые изменения будут потеряны. Вы действительно хотите продолжить?';
$lang['js']['searchmedia'] = 'Поиск файлов';
$lang['js']['keepopen'] = 'Не закрывать окно после выбора';
@@ -148,8 +149,8 @@ $lang['js']['linkto'] = 'Ссылка на:';
$lang['js']['del_confirm'] = 'Вы на самом деле желаете удалить выбранное?';
$lang['js']['restore_confirm'] = 'Действительно восстановить эту версию?';
$lang['js']['media_diff'] = 'Просмотр отличий:';
-$lang['js']['media_diff_both'] = 'Рядом';
-$lang['js']['media_diff_opacity'] = 'Наложением';
+$lang['js']['media_diff_both'] = 'рядом';
+$lang['js']['media_diff_opacity'] = 'наложением';
$lang['js']['media_diff_portions'] = 'Частями';
$lang['js']['media_select'] = 'Выбрать файлы…';
$lang['js']['media_upload_btn'] = 'Загрузить';
@@ -169,9 +170,9 @@ $lang['uploadbadcontent'] = 'Содержание файла не соот
$lang['uploadspam'] = 'Загрузка заблокирована спам-фильтром.';
$lang['uploadxss'] = 'Загрузка заблокирована по соображениям безопасности.';
$lang['uploadsize'] = 'Загруженный файл был слишком большой. (макс. %s)';
-$lang['deletesucc'] = 'Файл "%s" был удалён.';
-$lang['deletefail'] = 'Невозможно удалить файл "%s". Проверьте права доступа к файлу.';
-$lang['mediainuse'] = 'Файл "%s" не был удалён — файл всё ещё используется.';
+$lang['deletesucc'] = 'Файл «%s» был удалён.';
+$lang['deletefail'] = 'Невозможно удалить файл «%s». Проверьте права доступа к файлу.';
+$lang['mediainuse'] = 'Файл «%s» не был удалён — файл всё ещё используется.';
$lang['namespaces'] = 'Пространства имён';
$lang['mediafiles'] = 'Доступные файлы';
$lang['accessdenied'] = 'Вы не можете просмотреть эту страницу.';
@@ -192,8 +193,8 @@ $lang['diff'] = 'показать отличия от теку
$lang['diff2'] = 'Показать различия между ревизиями ';
$lang['difflink'] = 'Ссылка на это сравнение';
$lang['diff_type'] = 'Посмотреть отличия';
-$lang['diff_inline'] = 'Встроенный';
-$lang['diff_side'] = 'Бок о бок';
+$lang['diff_inline'] = 'встроенный';
+$lang['diff_side'] = 'бок о бок';
$lang['line'] = 'Строка';
$lang['breadcrumb'] = 'Вы посетили';
$lang['youarehere'] = 'Вы находитесь здесь';
@@ -211,16 +212,16 @@ $lang['user_tools'] = 'Инструменты пользовател
$lang['site_tools'] = 'Инструменты сайта';
$lang['page_tools'] = 'Инструменты страницы';
$lang['skip_to_content'] = 'Перейти к содержанию';
-$lang['sidebar'] = 'Боковая колонна';
+$lang['sidebar'] = 'Боковая панель';
$lang['mail_newpage'] = 'страница добавлена:';
$lang['mail_changed'] = 'страница изменена:';
$lang['mail_subscribe_list'] = 'изменились страницы в пространстве имён:';
$lang['mail_new_user'] = 'новый пользователь:';
$lang['mail_upload'] = 'файл закачан:';
$lang['changes_type'] = 'Посмотреть изменения';
-$lang['pages_changes'] = 'Страниц';
-$lang['media_changes'] = 'Медиа файлов';
-$lang['both_changes'] = 'И страниц и медиа файлов';
+$lang['pages_changes'] = 'страниц';
+$lang['media_changes'] = 'медиафайлов';
+$lang['both_changes'] = 'и страниц, и медиафайлов';
$lang['qb_bold'] = 'Полужирный';
$lang['qb_italic'] = 'Курсив';
$lang['qb_underl'] = 'Подчёркнутый';
@@ -241,7 +242,7 @@ $lang['qb_extlink'] = 'Внешняя ссылка';
$lang['qb_hr'] = 'Разделитель';
$lang['qb_ol'] = 'Элемент нумерованного списка';
$lang['qb_ul'] = 'Элемент ненумерованного списка';
-$lang['qb_media'] = 'Добавить изображения или другие файлы';
+$lang['qb_media'] = 'Добавить изображения или другие файлы (откроется в новом окне)';
$lang['qb_sig'] = 'Вставить подпись';
$lang['qb_smileys'] = 'Смайлики';
$lang['qb_chars'] = 'Специальные символы';
@@ -278,7 +279,7 @@ $lang['subscr_m_unsubscribe'] = 'Отменить подписку';
$lang['subscr_m_subscribe'] = 'Подписаться';
$lang['subscr_m_receive'] = 'Получить';
$lang['subscr_style_every'] = 'уведомлять о каждом изменении';
-$lang['subscr_style_digest'] = 'информационное электронное письмо со списком изменений для каждоый страницы (каждые %.2f дней)';
+$lang['subscr_style_digest'] = 'информационное электронное письмо со списком изменений для каждой страницы (каждые %.2f дней)';
$lang['subscr_style_list'] = 'список изменённых страниц со времени последнего отправленного электронного письма (каждые %.2f дней)';
$lang['authmodfailed'] = 'Неправильная конфигурация аутентификации пользователя. Пожалуйста, сообщите об этом своему администратору вики.';
$lang['authtempfail'] = 'Аутентификация пользователей временно недоступна. Если проблема продолжается какое-то время, пожалуйста, сообщите об этом своему администратору вики.';
@@ -309,8 +310,8 @@ $lang['i_pol2'] = 'Закрытая вики (чтение, за
$lang['i_retry'] = 'Повторить попытку';
$lang['i_license'] = 'Пожалуйста, выберите тип лицензии для своей вики:';
$lang['i_license_none'] = 'Не отображать информацию о лицензионных операциях';
-$lang['i_pop_field'] = 'Пожалуйста, помогите нам улучшить DokuWiki:';
-$lang['i_pop_label'] = 'Отправлять раз в месяц анонимную пользовательскую информацию разработчикам DokuWiki';
+$lang['i_pop_field'] = 'Пожалуйста, помогите нам улучшить «ДокуВики»:';
+$lang['i_pop_label'] = 'Отправлять раз в месяц анонимную пользовательскую информацию разработчикам «ДокуВики»';
$lang['recent_global'] = 'Вы просматриваете изменения в пространстве имён <b>%s</b>. Вы можете также <a href="%s">просмотреть недавние изменения во всей вики</a>.';
$lang['years'] = '%d лет назад';
$lang['months'] = '%d месяц(ев) назад';
@@ -340,7 +341,7 @@ $lang['media_viewold'] = '%s в %s
$lang['media_edit'] = 'Правка %s';
$lang['media_history'] = 'История %s';
$lang['media_meta_edited'] = 'метаданные изменены';
-$lang['media_perm_read'] = 'Извините, у Вас недостаточно прав для чтения файлов.';
-$lang['media_perm_upload'] = 'Извините, у Вас недостаточно прав для загрузки файлов.';
+$lang['media_perm_read'] = 'Извините, у вас недостаточно прав для чтения файлов.';
+$lang['media_perm_upload'] = 'Извините, у вас недостаточно прав для загрузки файлов.';
$lang['media_update'] = 'Загрузить новую версию';
$lang['media_restore'] = 'Восстановить эту версию';
diff --git a/inc/lang/ru/mailtext.txt b/inc/lang/ru/mailtext.txt
index 53d3431a3..2b3f76bbd 100644
--- a/inc/lang/ru/mailtext.txt
+++ b/inc/lang/ru/mailtext.txt
@@ -1,13 +1,13 @@
В вашей вики была добавлена или изменена страница. Подробности:
-Дата : @DATE@
-Браузер : @BROWSER@
-IP-адрес : @IPADDRESS@
-Хост : @HOSTNAME@
-Старая версия : @OLDPAGE@
-Новая версия : @NEWPAGE@
-Сводка изменений : @SUMMARY@
-Пользователь : @USER@
+Дата: @DATE@
+Браузер: @BROWSER@
+IP-адрес: @IPADDRESS@
+Хост: @HOSTNAME@
+Старая версия: @OLDPAGE@
+Новая версия: @NEWPAGE@
+Сводка изменений: @SUMMARY@
+Пользователь: @USER@
@DIFF@
diff --git a/inc/lang/ru/password.txt b/inc/lang/ru/password.txt
index 91117ca56..eb100f334 100644
--- a/inc/lang/ru/password.txt
+++ b/inc/lang/ru/password.txt
@@ -3,7 +3,6 @@
Ваши данные для @TITLE@ (@DOKUWIKIURL@)
Имя пользователя: @LOGIN@
-
Пароль: @PASSWORD@
--
diff --git a/inc/lang/ru/registermail.txt b/inc/lang/ru/registermail.txt
index 77094e8d8..fc862b034 100644
--- a/inc/lang/ru/registermail.txt
+++ b/inc/lang/ru/registermail.txt
@@ -1,13 +1,13 @@
Был зарегистрирован новый пользователь. Подробности:
-Логин : @NEWUSER@
-Полное имя : @NEWNAME@
-Эл. адрес : @NEWEMAIL@
+Логин: @NEWUSER@
+Полное имя: @NEWNAME@
+Эл. адрес: @NEWEMAIL@
-Дата : @DATE@
-Браузер : @BROWSER@
-Адрес IP : @IPADDRESS@
-Хост : @HOSTNAME@
+Дата: @DATE@
+Браузер: @BROWSER@
+Адрес IP: @IPADDRESS@
+Хост: @HOSTNAME@
--
Это сообщение было сгенерировано «ДокуВики» по адресу
diff --git a/inc/lang/ru/subscr_single.txt b/inc/lang/ru/subscr_single.txt
index 0e67d8f59..911a48e96 100644
--- a/inc/lang/ru/subscr_single.txt
+++ b/inc/lang/ru/subscr_single.txt
@@ -1,6 +1,5 @@
Привет.
-
Страница @PAGE@ в вики @TITLE@ изменилась.
Список изменений:
diff --git a/inc/lang/ru/uploadmail.txt b/inc/lang/ru/uploadmail.txt
index 77f79231e..f696f2c44 100644
--- a/inc/lang/ru/uploadmail.txt
+++ b/inc/lang/ru/uploadmail.txt
@@ -1,14 +1,14 @@
В вашу вики был закачан файл. Подробная информация:
-Файл : @MEDIA@
+Файл: @MEDIA@
Старая версия: @OLD@
-Дата : @DATE@
-Браузер : @BROWSER@
-Адрес IP : @IPADDRESS@
-Хост : @HOSTNAME@
-Размер : @SIZE@
-Тип MIME : @MIME@
-Пользователь : @USER@
+Дата: @DATE@
+Браузер: @BROWSER@
+Адрес IP: @IPADDRESS@
+Хост: @HOSTNAME@
+Размер: @SIZE@
+Тип MIME: @MIME@
+Пользователь: @USER@
--
Это письмо было сгенерировано «ДокуВики» по адресу
diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php
index 5c4316b01..05ca90695 100644
--- a/inc/lang/sl/lang.php
+++ b/inc/lang/sl/lang.php
@@ -1,13 +1,14 @@
<?php
+
/**
- * Slovenian language file
- *
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Jaka Kranjc <lynxlupodian@hotmail.com>
* @author Boštjan Seničar <senicar@gmail.com>
* @author Dejan Levec <webphp@gmail.com>
* @author Gregor Skumavc (grega.skumavc@gmail.com)
* @author Matej Urbančič (mateju@svn.gnome.org)
+ * @author Matej Urbančič <mateju@svn.gnome.org>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -43,6 +44,7 @@ $lang['btn_backtomedia'] = 'Nazaj na izbiro predstavnih datotek';
$lang['btn_subscribe'] = 'Urejanje naročnin';
$lang['btn_profile'] = 'Posodobi profil';
$lang['btn_reset'] = 'Ponastavi';
+$lang['btn_resendpwd'] = 'Nastavi novo geslo';
$lang['btn_draft'] = 'Uredi osnutek';
$lang['btn_recover'] = 'Obnovi osnutek';
$lang['btn_draftdel'] = 'Izbriši osnutek';
@@ -50,6 +52,7 @@ $lang['btn_revert'] = 'Povrni';
$lang['btn_register'] = 'Prijava';
$lang['btn_apply'] = 'Uveljavi';
$lang['btn_media'] = 'Urejevalnik predstavnih vsebin';
+$lang['btn_deleteuser'] = 'Odstrani račun';
$lang['loggedinas'] = 'Prijava kot';
$lang['user'] = 'Uporabniško ime';
$lang['pass'] = 'Geslo';
@@ -61,6 +64,7 @@ $lang['fullname'] = 'Pravo ime';
$lang['email'] = 'Elektronski naslov';
$lang['profile'] = 'Uporabniški profil';
$lang['badlogin'] = 'Uporabniško ime ali geslo je napačno.';
+$lang['badpassconfirm'] = 'Napaka! Geslo ni pravo.';
$lang['minoredit'] = 'Manjše spremembe';
$lang['draftdate'] = 'Samodejno shranjevanje osnutka je omogočeno';
$lang['nosecedit'] = 'Stran je bila v vmesnem času spremenjena. Podatki strani so bili zastareli, zato se je celotna vsebina naložila znova.';
@@ -77,8 +81,12 @@ $lang['profna'] = 'DokuWiki ne podpira spreminjanja profila.';
$lang['profnochange'] = 'Brez sprememb.';
$lang['profnoempty'] = 'Prazno polje elektronskega naslova ali imena ni dovoljeno.';
$lang['profchanged'] = 'Uporabniški profil je uspešno posodobljen.';
+$lang['profnodelete'] = 'Ni omogočena podpora za brisanje uporabnikov.';
+$lang['profdeleteuser'] = 'Izbriši račun';
+$lang['profdeleted'] = 'Uporabniški račun je izbrisan.';
$lang['pwdforget'] = 'Ali ste pozabili geslo? Pridobite si novo geslo.';
$lang['resendna'] = 'DokuWiki ne podpira možnosti ponovnega pošiljanja gesel.';
+$lang['resendpwd'] = 'Nastavi novo geslo za';
$lang['resendpwdmissing'] = 'Izpolniti je treba vsa polja.';
$lang['resendpwdnouser'] = 'Podanega uporabniškega imena v podatkovni zbirki ni mogoče najti.';
$lang['resendpwdbadauth'] = 'Koda za overitev ni prava. Prepričajte se, da ste uporabili celotno povezavo za potrditev.';
@@ -279,6 +287,7 @@ $lang['i_pol1'] = 'Javni Wiki (branje za vse, zapis in nalaganje
$lang['i_pol2'] = 'Zaprt Wiki (berejo in urejajo lahko le prijavljeni uporabniki)';
$lang['i_retry'] = 'Ponovni poskus';
$lang['i_license'] = 'Izbor dovoljenja objave vsebine:';
+$lang['i_license_none'] = 'Ne pokaži podrobnosti dovoljenja.';
$lang['recent_global'] = 'Trenutno so prikazane spremembe znotraj imenskega prostora <b>%s</b>. Mogoče si je ogledati tudi spremembe <a href="%s">celotnega sistema Wiki</a>.';
$lang['years'] = '%d let nazaj';
$lang['months'] = '%d mesecev nazaj';
diff --git a/inc/lessc.inc.php b/inc/lessc.inc.php
index 5c81ad2a9..0699de52f 100644
--- a/inc/lessc.inc.php
+++ b/inc/lessc.inc.php
@@ -1,7 +1,7 @@
<?php
/**
- * lessphp v0.3.9
+ * lessphp v0.4.0
* http://leafo.net/lessphp
*
* LESS css compiler, adapted from http://lesscss.org
@@ -38,7 +38,7 @@
* handling things like indentation.
*/
class lessc {
- static public $VERSION = "v0.3.9";
+ static public $VERSION = "v0.4.0";
static protected $TRUE = array("keyword", "true");
static protected $FALSE = array("keyword", "false");
@@ -55,6 +55,8 @@ class lessc {
protected $numberPrecision = null;
+ protected $allParsedFiles = array();
+
// set to the parser that generated the current line when compiling
// so we know how to create error messages
protected $sourceParser = null;
@@ -103,12 +105,17 @@ class lessc {
if (substr_compare($url, '.css', -4, 4) === 0) return false;
$realPath = $this->findImport($url);
+
if ($realPath === null) return false;
if ($this->importDisabled) {
return array(false, "/* import disabled */");
}
+ if (isset($this->allParsedFiles[realpath($realPath)])) {
+ return array(false, null);
+ }
+
$this->addParsedFile($realPath);
$parser = $this->makeParser($realPath);
$root = $parser->parse(file_get_contents($realPath));
@@ -276,6 +283,8 @@ class lessc {
foreach ($this->sortProps($block->props) as $prop) {
$this->compileProp($prop, $block, $out);
}
+
+ $out->lines = array_values(array_unique($out->lines));
}
protected function sortProps($props, $split = false) {
@@ -450,7 +459,7 @@ class lessc {
return $left == $right;
}
- protected function patternMatch($block, $callingArgs) {
+ protected function patternMatch($block, $orderedArgs, $keywordArgs) {
// match the guards if it has them
// any one of the groups must have all its guards pass for a match
if (!empty($block->guards)) {
@@ -458,7 +467,7 @@ class lessc {
foreach ($block->guards as $guardGroup) {
foreach ($guardGroup as $guard) {
$this->pushEnv();
- $this->zipSetArgs($block->args, $callingArgs);
+ $this->zipSetArgs($block->args, $orderedArgs, $keywordArgs);
$negate = false;
if ($guard[0] == "negate") {
@@ -487,24 +496,34 @@ class lessc {
}
}
- $numCalling = count($callingArgs);
-
if (empty($block->args)) {
- return $block->isVararg || $numCalling == 0;
+ return $block->isVararg || empty($orderedArgs) && empty($keywordArgs);
+ }
+
+ $remainingArgs = $block->args;
+ if ($keywordArgs) {
+ $remainingArgs = array();
+ foreach ($block->args as $arg) {
+ if ($arg[0] == "arg" && isset($keywordArgs[$arg[1]])) {
+ continue;
+ }
+
+ $remainingArgs[] = $arg;
+ }
}
$i = -1; // no args
// try to match by arity or by argument literal
- foreach ($block->args as $i => $arg) {
+ foreach ($remainingArgs as $i => $arg) {
switch ($arg[0]) {
case "lit":
- if (empty($callingArgs[$i]) || !$this->eq($arg[1], $callingArgs[$i])) {
+ if (empty($orderedArgs[$i]) || !$this->eq($arg[1], $orderedArgs[$i])) {
return false;
}
break;
case "arg":
// no arg and no default value
- if (!isset($callingArgs[$i]) && !isset($arg[2])) {
+ if (!isset($orderedArgs[$i]) && !isset($arg[2])) {
return false;
}
break;
@@ -519,14 +538,19 @@ class lessc {
} else {
$numMatched = $i + 1;
// greater than becuase default values always match
- return $numMatched >= $numCalling;
+ return $numMatched >= count($orderedArgs);
}
}
- protected function patternMatchAll($blocks, $callingArgs) {
+ protected function patternMatchAll($blocks, $orderedArgs, $keywordArgs, $skip=array()) {
$matches = null;
foreach ($blocks as $block) {
- if ($this->patternMatch($block, $callingArgs)) {
+ // skip seen blocks that don't have arguments
+ if (isset($skip[$block->id]) && !isset($block->args)) {
+ continue;
+ }
+
+ if ($this->patternMatch($block, $orderedArgs, $keywordArgs)) {
$matches[] = $block;
}
}
@@ -535,7 +559,7 @@ class lessc {
}
// attempt to find blocks matched by path and args
- protected function findBlocks($searchIn, $path, $args, $seen=array()) {
+ protected function findBlocks($searchIn, $path, $orderedArgs, $keywordArgs, $seen=array()) {
if ($searchIn == null) return null;
if (isset($seen[$searchIn->id])) return null;
$seen[$searchIn->id] = true;
@@ -545,7 +569,7 @@ class lessc {
if (isset($searchIn->children[$name])) {
$blocks = $searchIn->children[$name];
if (count($path) == 1) {
- $matches = $this->patternMatchAll($blocks, $args);
+ $matches = $this->patternMatchAll($blocks, $orderedArgs, $keywordArgs, $seen);
if (!empty($matches)) {
// This will return all blocks that match in the closest
// scope that has any matching block, like lessjs
@@ -555,7 +579,7 @@ class lessc {
$matches = array();
foreach ($blocks as $subBlock) {
$subMatches = $this->findBlocks($subBlock,
- array_slice($path, 1), $args, $seen);
+ array_slice($path, 1), $orderedArgs, $keywordArgs, $seen);
if (!is_null($subMatches)) {
foreach ($subMatches as $sm) {
@@ -567,39 +591,51 @@ class lessc {
return count($matches) > 0 ? $matches : null;
}
}
-
if ($searchIn->parent === $searchIn) return null;
- return $this->findBlocks($searchIn->parent, $path, $args, $seen);
+ return $this->findBlocks($searchIn->parent, $path, $orderedArgs, $keywordArgs, $seen);
}
// sets all argument names in $args to either the default value
// or the one passed in through $values
- protected function zipSetArgs($args, $values) {
- $i = 0;
+ protected function zipSetArgs($args, $orderedValues, $keywordValues) {
$assignedValues = array();
- foreach ($args as $a) {
+
+ $i = 0;
+ foreach ($args as $a) {
if ($a[0] == "arg") {
- if ($i < count($values) && !is_null($values[$i])) {
- $value = $values[$i];
+ if (isset($keywordValues[$a[1]])) {
+ // has keyword arg
+ $value = $keywordValues[$a[1]];
+ } elseif (isset($orderedValues[$i])) {
+ // has ordered arg
+ $value = $orderedValues[$i];
+ $i++;
} elseif (isset($a[2])) {
+ // has default value
$value = $a[2];
- } else $value = null;
+ } else {
+ $this->throwError("Failed to assign arg " . $a[1]);
+ $value = null; // :(
+ }
$value = $this->reduce($value);
$this->set($a[1], $value);
$assignedValues[] = $value;
+ } else {
+ // a lit
+ $i++;
}
- $i++;
}
// check for a rest
$last = end($args);
if ($last[0] == "rest") {
- $rest = array_slice($values, count($args) - 1);
+ $rest = array_slice($orderedValues, count($args) - 1);
$this->set($last[1], $this->reduce(array("list", " ", $rest)));
}
- $this->env->arguments = $assignedValues;
+ // wow is this the only true use of PHP's + operator for arrays?
+ $this->env->arguments = $assignedValues + $orderedValues;
}
// compile a prop and update $lines or $blocks appropriately
@@ -624,8 +660,28 @@ class lessc {
case 'mixin':
list(, $path, $args, $suffix) = $prop;
- $args = array_map(array($this, "reduce"), (array)$args);
- $mixins = $this->findBlocks($block, $path, $args);
+ $orderedArgs = array();
+ $keywordArgs = array();
+ foreach ((array)$args as $arg) {
+ $argval = null;
+ switch ($arg[0]) {
+ case "arg":
+ if (!isset($arg[2])) {
+ $orderedArgs[] = $this->reduce(array("variable", $arg[1]));
+ } else {
+ $keywordArgs[$arg[1]] = $this->reduce($arg[2]);
+ }
+ break;
+
+ case "lit":
+ $orderedArgs[] = $this->reduce($arg[1]);
+ break;
+ default:
+ $this->throwError("Unknown arg type: " . $arg[0]);
+ }
+ }
+
+ $mixins = $this->findBlocks($block, $path, $orderedArgs, $keywordArgs);
if ($mixins === null) {
// fwrite(STDERR,"failed to find block: ".implode(" > ", $path)."\n");
@@ -633,7 +689,7 @@ class lessc {
}
foreach ($mixins as $mixin) {
- if ($mixin === $block && !$args) {
+ if ($mixin === $block && !$orderedArgs) {
continue;
}
@@ -648,7 +704,7 @@ class lessc {
if (isset($mixin->args)) {
$haveArgs = true;
$this->pushEnv();
- $this->zipSetArgs($mixin->args, $args);
+ $this->zipSetArgs($mixin->args, $orderedArgs, $keywordArgs);
}
$oldParent = $mixin->parent;
@@ -705,7 +761,9 @@ class lessc {
list(,$importId) = $prop;
$import = $this->env->imports[$importId];
if ($import[0] === false) {
- $out->lines[] = $import[1];
+ if (isset($import[1])) {
+ $out->lines[] = $import[1];
+ }
} else {
list(, $bottom, $parser, $importDir) = $import;
$this->compileImportedProps($bottom, $block, $out, $parser, $importDir);
@@ -793,6 +851,60 @@ class lessc {
}
}
+ protected function lib_pow($args) {
+ list($base, $exp) = $this->assertArgs($args, 2, "pow");
+ return pow($this->assertNumber($base), $this->assertNumber($exp));
+ }
+
+ protected function lib_pi() {
+ return pi();
+ }
+
+ protected function lib_mod($args) {
+ list($a, $b) = $this->assertArgs($args, 2, "mod");
+ return $this->assertNumber($a) % $this->assertNumber($b);
+ }
+
+ protected function lib_tan($num) {
+ return tan($this->assertNumber($num));
+ }
+
+ protected function lib_sin($num) {
+ return sin($this->assertNumber($num));
+ }
+
+ protected function lib_cos($num) {
+ return cos($this->assertNumber($num));
+ }
+
+ protected function lib_atan($num) {
+ $num = atan($this->assertNumber($num));
+ return array("number", $num, "rad");
+ }
+
+ protected function lib_asin($num) {
+ $num = asin($this->assertNumber($num));
+ return array("number", $num, "rad");
+ }
+
+ protected function lib_acos($num) {
+ $num = acos($this->assertNumber($num));
+ return array("number", $num, "rad");
+ }
+
+ protected function lib_sqrt($num) {
+ return sqrt($this->assertNumber($num));
+ }
+
+ protected function lib_extract($value) {
+ list($list, $idx) = $this->assertArgs($value, 2, "extract");
+ $idx = $this->assertNumber($idx);
+ // 1 indexed
+ if ($list[0] == "list" && isset($list[2][$idx - 1])) {
+ return $list[2][$idx - 1];
+ }
+ }
+
protected function lib_isnumber($value) {
return $this->toBool($value[0] == "number");
}
@@ -1085,6 +1197,25 @@ class lessc {
$this->throwError($error);
}
+ protected function assertArgs($value, $expectedArgs, $name="") {
+ if ($expectedArgs == 1) {
+ return $value;
+ } else {
+ if ($value[0] !== "list" || $value[1] != ",") $this->throwError("expecting list");
+ $values = $value[2];
+ $numValues = count($values);
+ if ($expectedArgs != $numValues) {
+ if ($name) {
+ $name = $name . ": ";
+ }
+
+ $this->throwError("${name}expecting $expectedArgs arguments, got $numValues");
+ }
+
+ return $values;
+ }
+ }
+
protected function toHSL($color) {
if ($color[0] == 'hsl') return $color;
@@ -1229,6 +1360,10 @@ class lessc {
$var = $this->compileValue($reduced);
$res = $this->reduce(array("variable", $this->vPrefix . $var));
+ if ($res[0] == "raw_color") {
+ $res = $this->coerceColor($res);
+ }
+
if (empty($value[2])) $res = $this->lib_e($res);
return $res;
@@ -1690,7 +1825,6 @@ class lessc {
$this->importDir = (array)$this->importDir;
$this->importDir[] = $pi['dirname'].'/';
- $this->allParsedFiles = array();
$this->addParsedFile($fname);
$out = $this->compile(file_get_contents($fname), $fname);
@@ -2313,7 +2447,7 @@ class lessc_parser {
// mixin
if ($this->mixinTags($tags) &&
- ($this->argumentValues($argv) || true) &&
+ ($this->argumentDef($argv, $isVararg) || true) &&
($this->keyword($suffix) || true) && $this->end())
{
$tags = $this->fixTags($tags);
@@ -2781,38 +2915,18 @@ class lessc_parser {
return false;
}
- // consume a list of property values delimited by ; and wrapped in ()
- protected function argumentValues(&$args, $delim = ',') {
- $s = $this->seek();
- if (!$this->literal('(')) return false;
-
- $values = array();
- while (true) {
- if ($this->expressionList($value)) $values[] = $value;
- if (!$this->literal($delim)) break;
- else {
- if ($value == null) $values[] = null;
- $value = null;
- }
- }
-
- if (!$this->literal(')')) {
- $this->seek($s);
- return false;
- }
-
- $args = $values;
- return true;
- }
-
// consume an argument definition list surrounded by ()
// each argument is a variable name with optional value
// or at the end a ... or a variable named followed by ...
- protected function argumentDef(&$args, &$isVararg, $delim = ',') {
+ // arguments are separated by , unless a ; is in the list, then ; is the
+ // delimiter.
+ protected function argumentDef(&$args, &$isVararg) {
$s = $this->seek();
if (!$this->literal('(')) return false;
$values = array();
+ $delim = ",";
+ $method = "expressionList";
$isVararg = false;
while (true) {
@@ -2821,28 +2935,77 @@ class lessc_parser {
break;
}
- if ($this->variable($vname)) {
- $arg = array("arg", $vname);
- $ss = $this->seek();
- if ($this->assign() && $this->expressionList($value)) {
- $arg[] = $value;
- } else {
- $this->seek($ss);
- if ($this->literal("...")) {
- $arg[0] = "rest";
- $isVararg = true;
+ if ($this->$method($value)) {
+ if ($value[0] == "variable") {
+ $arg = array("arg", $value[1]);
+ $ss = $this->seek();
+
+ if ($this->assign() && $this->$method($rhs)) {
+ $arg[] = $rhs;
+ } else {
+ $this->seek($ss);
+ if ($this->literal("...")) {
+ $arg[0] = "rest";
+ $isVararg = true;
+ }
}
+
+ $values[] = $arg;
+ if ($isVararg) break;
+ continue;
+ } else {
+ $values[] = array("lit", $value);
}
- $values[] = $arg;
- if ($isVararg) break;
- continue;
}
- if ($this->value($literal)) {
- $values[] = array("lit", $literal);
- }
- if (!$this->literal($delim)) break;
+ if (!$this->literal($delim)) {
+ if ($delim == "," && $this->literal(";")) {
+ // found new delim, convert existing args
+ $delim = ";";
+ $method = "propertyValue";
+
+ // transform arg list
+ if (isset($values[1])) { // 2 items
+ $newList = array();
+ foreach ($values as $i => $arg) {
+ switch($arg[0]) {
+ case "arg":
+ if ($i) {
+ $this->throwError("Cannot mix ; and , as delimiter types");
+ }
+ $newList[] = $arg[2];
+ break;
+ case "lit":
+ $newList[] = $arg[1];
+ break;
+ case "rest":
+ $this->throwError("Unexpected rest before semicolon");
+ }
+ }
+
+ $newList = array("list", ", ", $newList);
+
+ switch ($values[0][0]) {
+ case "arg":
+ $newArg = array("arg", $values[0][1], $newList);
+ break;
+ case "lit":
+ $newArg = array("lit", $newList);
+ break;
+ }
+
+ } elseif ($values) { // 1 item
+ $newArg = $values[0];
+ }
+
+ if ($newArg) {
+ $values = array($newArg);
+ }
+ } else {
+ break;
+ }
+ }
}
if (!$this->literal(')')) {
@@ -2884,32 +3047,69 @@ class lessc_parser {
}
// a bracketed value (contained within in a tag definition)
- protected function tagBracket(&$value) {
+ protected function tagBracket(&$parts, &$hasExpression) {
// speed shortcut
if (isset($this->buffer[$this->count]) && $this->buffer[$this->count] != "[") {
return false;
}
$s = $this->seek();
- if ($this->literal('[') && $this->to(']', $c, true) && $this->literal(']', false)) {
- $value = '['.$c.']';
- // whitespace?
- if ($this->whitespace()) $value .= " ";
- // escape parent selector, (yuck)
- $value = str_replace($this->lessc->parentSelector, "$&$", $value);
- return true;
- }
+ $hasInterpolation = false;
- $this->seek($s);
- return false;
- }
+ if ($this->literal("[", false)) {
+ $attrParts = array("[");
+ // keyword, string, operator
+ while (true) {
+ if ($this->literal("]", false)) {
+ $this->count--;
+ break; // get out early
+ }
- protected function tagExpression(&$value) {
- $s = $this->seek();
- if ($this->literal("(") && $this->expression($exp) && $this->literal(")")) {
- $value = array('exp', $exp);
- return true;
+ if ($this->match('\s+', $m)) {
+ $attrParts[] = " ";
+ continue;
+ }
+ if ($this->string($str)) {
+ // escape parent selector, (yuck)
+ foreach ($str[2] as &$chunk) {
+ $chunk = str_replace($this->lessc->parentSelector, "$&$", $chunk);
+ }
+
+ $attrParts[] = $str;
+ $hasInterpolation = true;
+ continue;
+ }
+
+ if ($this->keyword($word)) {
+ $attrParts[] = $word;
+ continue;
+ }
+
+ if ($this->interpolation($inter, false)) {
+ $attrParts[] = $inter;
+ $hasInterpolation = true;
+ continue;
+ }
+
+ // operator, handles attr namespace too
+ if ($this->match('[|-~\$\*\^=]+', $m)) {
+ $attrParts[] = $m[0];
+ continue;
+ }
+
+ break;
+ }
+
+ if ($this->literal("]", false)) {
+ $attrParts[] = "]";
+ foreach ($attrParts as $part) {
+ $parts[] = $part;
+ }
+ $hasExpression = $hasExpression || $hasInterpolation;
+ return true;
+ }
+ $this->seek($s);
}
$this->seek($s);
@@ -2925,13 +3125,9 @@ class lessc_parser {
$s = $this->seek();
- if (!$simple && $this->tagExpression($tag)) {
- return true;
- }
-
$hasExpression = false;
$parts = array();
- while ($this->tagBracket($first)) $parts[] = $first;
+ while ($this->tagBracket($parts, $hasExpression));
$oldWhite = $this->eatWhiteDefault;
$this->eatWhiteDefault = false;
@@ -2941,9 +3137,7 @@ class lessc_parser {
$parts[] = $m[1];
if ($simple) break;
- while ($this->tagBracket($brack)) {
- $parts[] = $brack;
- }
+ while ($this->tagBracket($parts, $hasExpression));
continue;
}
@@ -3334,7 +3528,7 @@ class lessc_parser {
break;
case '"':
case "'":
- if (preg_match('/'.$min[0].'.*?'.$min[0].'/', $text, $m, 0, $count))
+ if (preg_match('/'.$min[0].'.*?(?<!\\\\)'.$min[0].'/', $text, $m, 0, $count))
$count += strlen($m[0]) - 1;
break;
case '//':
diff --git a/inc/parser/code.php b/inc/parser/code.php
index 6e159b041..0b8e3ee02 100644
--- a/inc/parser/code.php
+++ b/inc/parser/code.php
@@ -15,7 +15,7 @@ class Doku_Renderer_code extends Doku_Renderer {
*
* When the correct block was found it exits the script.
*/
- function code($text, $language = NULL, $filename='' ) {
+ function code($text, $language = null, $filename='' ) {
global $INPUT;
if(!$language) $language = 'txt';
if(!$filename) $filename = 'snippet.'.$language;
@@ -36,7 +36,7 @@ class Doku_Renderer_code extends Doku_Renderer {
/**
* Wraps around code()
*/
- function file($text, $language = NULL, $filename='') {
+ function file($text, $language = null, $filename='') {
$this->code($text, $language, $filename);
}
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 1cf32aaed..6e6cca1a9 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -4,9 +4,9 @@ if (!defined('DOKU_PARSER_EOL')) define('DOKU_PARSER_EOL',"\n"); // add this t
class Doku_Handler {
- var $Renderer = NULL;
+ var $Renderer = null;
- var $CallWriter = NULL;
+ var $CallWriter = null;
var $calls = array();
@@ -35,8 +35,8 @@ class Doku_Handler {
$this->CallWriter->finalise();
if ( $this->status['section'] ) {
- $last_call = end($this->calls);
- array_push($this->calls,array('section_close',array(), $last_call[2]));
+ $last_call = end($this->calls);
+ array_push($this->calls,array('section_close',array(), $last_call[2]));
}
if ( $this->rewriteBlocks ) {
@@ -75,7 +75,7 @@ class Doku_Handler {
$data = $plugin->handle($match, $state, $pos, $this);
}
if ($data !== false) {
- $this->addPluginCall($pluginname,$data,$state,$pos,$match);
+ $this->addPluginCall($pluginname,$data,$state,$pos,$match);
}
return true;
}
@@ -190,8 +190,8 @@ class Doku_Handler {
// footnotes can not be nested - however due to limitations in lexer it can't be prevented
// we will still enter a new footnote mode, we just do nothing
if ($this->_footnote) {
- $this->_addCall('cdata',array($match), $pos);
- break;
+ $this->_addCall('cdata',array($match), $pos);
+ break;
}
$this->_footnote = true;
@@ -203,8 +203,8 @@ class Doku_Handler {
case DOKU_LEXER_EXIT:
// check whether we have already exitted the footnote mode, can happen if the modes were nested
if (!$this->_footnote) {
- $this->_addCall('cdata',array($match), $pos);
- break;
+ $this->_addCall('cdata',array($match), $pos);
+ break;
}
$this->_footnote = false;
@@ -423,7 +423,7 @@ class Doku_Handler {
// Split title from URL
$link = explode('|',$link,2);
if ( !isset($link[1]) ) {
- $link[1] = NULL;
+ $link[1] = null;
} else if ( preg_match('/^\{\{[^\}]+\}\}$/',$link[1]) ) {
// If the title is an image, convert it to an array containing the image details
$link[1] = Doku_Handler_Parse_Media($link[1]);
@@ -433,7 +433,7 @@ class Doku_Handler {
//decide which kind of link it is
if ( preg_match('/^[a-zA-Z0-9\.]+>{1}.*$/u',$link[0]) ) {
- // Interwiki
+ // Interwiki
$interwiki = explode('>',$link[0],2);
$this->_addCall(
'interwikilink',
@@ -441,35 +441,35 @@ class Doku_Handler {
$pos
);
}elseif ( preg_match('/^\\\\\\\\[^\\\\]+?\\\\/u',$link[0]) ) {
- // Windows Share
+ // Windows Share
$this->_addCall(
'windowssharelink',
array($link[0],$link[1]),
$pos
);
}elseif ( preg_match('#^([a-z0-9\-\.+]+?)://#i',$link[0]) ) {
- // external link (accepts all protocols)
+ // external link (accepts all protocols)
$this->_addCall(
'externallink',
array($link[0],$link[1]),
$pos
);
}elseif ( preg_match('<'.PREG_PATTERN_VALID_EMAIL.'>',$link[0]) ) {
- // E-Mail (pattern above is defined in inc/mail.php)
+ // E-Mail (pattern above is defined in inc/mail.php)
$this->_addCall(
'emaillink',
array($link[0],$link[1]),
$pos
);
}elseif ( preg_match('!^#.+!',$link[0]) ){
- // local link
+ // local link
$this->_addCall(
'locallink',
array(substr($link[0],1),$link[1]),
$pos
);
}else{
- // internal link
+ // internal link
$this->_addCall(
'internallink',
array($link[0],$link[1]),
@@ -481,12 +481,12 @@ class Doku_Handler {
}
function filelink($match, $state, $pos) {
- $this->_addCall('filelink',array($match, NULL), $pos);
+ $this->_addCall('filelink',array($match, null), $pos);
return true;
}
function windowssharelink($match, $state, $pos) {
- $this->_addCall('windowssharelink',array($match, NULL), $pos);
+ $this->_addCall('windowssharelink',array($match, null), $pos);
return true;
}
@@ -520,10 +520,10 @@ class Doku_Handler {
$p['details'] = (preg_match('/\b(desc|detail)/',$params));
if (preg_match('/\b(\d+)([dhm])\b/',$params,$match)) {
- $period = array('d' => 86400, 'h' => 3600, 'm' => 60);
- $p['refresh'] = max(600,$match[1]*$period[$match[2]]); // n * period in seconds, minimum 10 minutes
+ $period = array('d' => 86400, 'h' => 3600, 'm' => 60);
+ $p['refresh'] = max(600,$match[1]*$period[$match[2]]); // n * period in seconds, minimum 10 minutes
} else {
- $p['refresh'] = 14400; // default to 4 hours
+ $p['refresh'] = 14400; // default to 4 hours
}
$this->_addCall('rss',array($link,$p),$pos);
@@ -550,7 +550,7 @@ class Doku_Handler {
function emaillink($match, $state, $pos) {
$email = preg_replace(array('/^</','/>$/'),'',$match);
- $this->_addCall('emaillink',array($email, NULL), $pos);
+ $this->_addCall('emaillink',array($email, null), $pos);
return true;
}
@@ -631,12 +631,12 @@ function Doku_Handler_Parse_Media($match) {
} else if ( $lalign ) {
$align = 'left';
} else {
- $align = NULL;
+ $align = null;
}
// The title...
if ( !isset($link[1]) ) {
- $link[1] = NULL;
+ $link[1] = null;
}
//remove aligning spaces
@@ -654,11 +654,11 @@ function Doku_Handler_Parse_Media($match) {
//parse width and height
if(preg_match('#(\d+)(x(\d+))?#i',$param,$size)){
- ($size[1]) ? $w = $size[1] : $w = NULL;
- ($size[3]) ? $h = $size[3] : $h = NULL;
+ ($size[1]) ? $w = $size[1] : $w = null;
+ ($size[3]) ? $h = $size[3] : $h = null;
} else {
- $w = NULL;
- $h = NULL;
+ $w = null;
+ $h = null;
}
//get linking command
@@ -1034,7 +1034,7 @@ class Doku_Handler_Preformatted {
break;
case 'preformatted_end':
if (trim($this->text)) {
- $this->CallWriter->writeCall(array('preformatted',array($this->text),$this->pos));
+ $this->CallWriter->writeCall(array('preformatted',array($this->text),$this->pos));
}
// see FS#1699 & FS#1652, add 'eol' instructions to ensure proper triggering of following p_open
$this->CallWriter->writeCall(array('eol',array(),$this->pos));
@@ -1247,12 +1247,12 @@ class Doku_Handler_Table {
}
$this->tableCalls[] = array($this->lastCellType.'_close',array(),$call[2]);
- $this->tableCalls[] = array($call[0].'_open',array(1,NULL,1),$call[2]);
+ $this->tableCalls[] = array($call[0].'_open',array(1,null,1),$call[2]);
$this->lastCellType = $call[0];
} else {
- $this->tableCalls[] = array($call[0].'_open',array(1,NULL,1),$call[2]);
+ $this->tableCalls[] = array($call[0].'_open',array(1,null,1),$call[2]);
$this->lastCellType = $call[0];
$this->firstCell = false;
@@ -1289,116 +1289,116 @@ class Doku_Handler_Table {
$call = $this->tableCalls[$key];
switch ($call[0]) {
- case 'tablerow_open':
+ case 'tablerow_open':
- $lastRow++;
- $lastCell = 0;
- break;
+ $lastRow++;
+ $lastCell = 0;
+ break;
- case 'tablecell_open':
- case 'tableheader_open':
+ case 'tablecell_open':
+ case 'tableheader_open':
- $lastCell++;
- $cellKey[$lastRow][$lastCell] = $key;
- break;
+ $lastCell++;
+ $cellKey[$lastRow][$lastCell] = $key;
+ break;
- case 'table_align':
+ case 'table_align':
- $prev = in_array($this->tableCalls[$key-1][0], array('tablecell_open', 'tableheader_open'));
- $next = in_array($this->tableCalls[$key+1][0], array('tablecell_close', 'tableheader_close'));
- // If the cell is empty, align left
- if ($prev && $next) {
- $this->tableCalls[$key-1][1][1] = 'left';
+ $prev = in_array($this->tableCalls[$key-1][0], array('tablecell_open', 'tableheader_open'));
+ $next = in_array($this->tableCalls[$key+1][0], array('tablecell_close', 'tableheader_close'));
+ // If the cell is empty, align left
+ if ($prev && $next) {
+ $this->tableCalls[$key-1][1][1] = 'left';
- // If the previous element was a cell open, align right
- } elseif ($prev) {
- $this->tableCalls[$key-1][1][1] = 'right';
+ // If the previous element was a cell open, align right
+ } elseif ($prev) {
+ $this->tableCalls[$key-1][1][1] = 'right';
- // If the next element is the close of an element, align either center or left
- } elseif ( $next) {
- if ( $this->tableCalls[$cellKey[$lastRow][$lastCell]][1][1] == 'right' ) {
- $this->tableCalls[$cellKey[$lastRow][$lastCell]][1][1] = 'center';
- } else {
- $this->tableCalls[$cellKey[$lastRow][$lastCell]][1][1] = 'left';
- }
+ // If the next element is the close of an element, align either center or left
+ } elseif ( $next) {
+ if ( $this->tableCalls[$cellKey[$lastRow][$lastCell]][1][1] == 'right' ) {
+ $this->tableCalls[$cellKey[$lastRow][$lastCell]][1][1] = 'center';
+ } else {
+ $this->tableCalls[$cellKey[$lastRow][$lastCell]][1][1] = 'left';
+ }
- }
+ }
- // Now convert the whitespace back to cdata
- $this->tableCalls[$key][0] = 'cdata';
- break;
+ // Now convert the whitespace back to cdata
+ $this->tableCalls[$key][0] = 'cdata';
+ break;
- case 'colspan':
+ case 'colspan':
- $this->tableCalls[$key-1][1][0] = false;
+ $this->tableCalls[$key-1][1][0] = false;
- for($i = $key-2; $i >= $cellKey[$lastRow][1]; $i--) {
+ for($i = $key-2; $i >= $cellKey[$lastRow][1]; $i--) {
- if ( $this->tableCalls[$i][0] == 'tablecell_open' || $this->tableCalls[$i][0] == 'tableheader_open' ) {
+ if ( $this->tableCalls[$i][0] == 'tablecell_open' || $this->tableCalls[$i][0] == 'tableheader_open' ) {
- if ( false !== $this->tableCalls[$i][1][0] ) {
- $this->tableCalls[$i][1][0]++;
- break;
- }
+ if ( false !== $this->tableCalls[$i][1][0] ) {
+ $this->tableCalls[$i][1][0]++;
+ break;
+ }
+ }
}
- }
- $toDelete[] = $key-1;
- $toDelete[] = $key;
- $toDelete[] = $key+1;
- break;
+ $toDelete[] = $key-1;
+ $toDelete[] = $key;
+ $toDelete[] = $key+1;
+ break;
- case 'rowspan':
+ case 'rowspan':
- if ( $this->tableCalls[$key-1][0] == 'cdata' ) {
- // ignore rowspan if previous call was cdata (text mixed with :::) we don't have to check next call as that wont match regex
- $this->tableCalls[$key][0] = 'cdata';
+ if ( $this->tableCalls[$key-1][0] == 'cdata' ) {
+ // ignore rowspan if previous call was cdata (text mixed with :::) we don't have to check next call as that wont match regex
+ $this->tableCalls[$key][0] = 'cdata';
- } else {
+ } else {
- $spanning_cell = null;
- for($i = $lastRow-1; $i > 0; $i--) {
+ $spanning_cell = null;
+ for($i = $lastRow-1; $i > 0; $i--) {
- if ( $this->tableCalls[$cellKey[$i][$lastCell]][0] == 'tablecell_open' || $this->tableCalls[$cellKey[$i][$lastCell]][0] == 'tableheader_open' ) {
+ if ( $this->tableCalls[$cellKey[$i][$lastCell]][0] == 'tablecell_open' || $this->tableCalls[$cellKey[$i][$lastCell]][0] == 'tableheader_open' ) {
- if ($this->tableCalls[$cellKey[$i][$lastCell]][1][2] >= $lastRow - $i) {
- $spanning_cell = $i;
- break;
- }
+ if ($this->tableCalls[$cellKey[$i][$lastCell]][1][2] >= $lastRow - $i) {
+ $spanning_cell = $i;
+ break;
+ }
+ }
}
- }
- if (is_null($spanning_cell)) {
- // No spanning cell found, so convert this cell to
- // an empty one to avoid broken tables
- $this->tableCells[$key][1][1] = '';
- continue;
- }
- $this->tableCalls[$cellKey[$spanning_cell][$lastCell]][1][2]++;
+ if (is_null($spanning_cell)) {
+ // No spanning cell found, so convert this cell to
+ // an empty one to avoid broken tables
+ $this->tableCells[$key][1][1] = '';
+ continue;
+ }
+ $this->tableCalls[$cellKey[$spanning_cell][$lastCell]][1][2]++;
- $this->tableCalls[$key-1][1][2] = false;
+ $this->tableCalls[$key-1][1][2] = false;
- $toDelete[] = $key-1;
- $toDelete[] = $key;
- $toDelete[] = $key+1;
- }
- break;
+ $toDelete[] = $key-1;
+ $toDelete[] = $key;
+ $toDelete[] = $key+1;
+ }
+ break;
- case 'tablerow_close':
+ case 'tablerow_close':
- // Fix broken tables by adding missing cells
- while (++$lastCell < $this->maxCols) {
- array_splice($this->tableCalls, $key, 0, array(
- array('tablecell_open', array(1, null, 1), $call[2]),
- array('cdata', array(''), $call[2]),
- array('tablecell_close', array(), $call[2])));
- $key += 3;
- }
+ // Fix broken tables by adding missing cells
+ while (++$lastCell < $this->maxCols) {
+ array_splice($this->tableCalls, $key, 0, array(
+ array('tablecell_open', array(1, null, 1), $call[2]),
+ array('cdata', array(''), $call[2]),
+ array('tablecell_close', array(), $call[2])));
+ $key += 3;
+ }
- break;
+ break;
}
}
diff --git a/inc/parser/lexer.php b/inc/parser/lexer.php
index b5bcb9612..2e84eca7c 100644
--- a/inc/parser/lexer.php
+++ b/inc/parser/lexer.php
@@ -1,18 +1,18 @@
<?php
/**
-* Author Markus Baker: http://www.lastcraft.com
-* Version adapted from Simple Test: http://sourceforge.net/projects/simpletest/
-* For an intro to the Lexer see:
-* http://www.phppatterns.com/index.php/article/articleview/106/1/2/
-* @author Marcus Baker
-* @package Doku
-* @subpackage Lexer
-* @version $Id: lexer.php,v 1.1 2005/03/23 23:14:09 harryf Exp $
-*/
+ * Author Markus Baker: http://www.lastcraft.com
+ * Version adapted from Simple Test: http://sourceforge.net/projects/simpletest/
+ * For an intro to the Lexer see:
+ * http://www.phppatterns.com/index.php/article/articleview/106/1/2/
+ * @author Marcus Baker
+ * @package Doku
+ * @subpackage Lexer
+ * @version $Id: lexer.php,v 1.1 2005/03/23 23:14:09 harryf Exp $
+ */
/**
-* Init path constant
-*/
+ * Init path constant
+ */
if(!defined('DOKU_INC')) die('meh.');
/**#@+
@@ -26,11 +26,12 @@ define("DOKU_LEXER_SPECIAL", 5);
/**#@-*/
/**
- * Compounded regular expression. Any of
- * the contained patterns could match and
- * when one does it's label is returned.
- * @package Doku
- * @subpackage Lexer
+ * Compounded regular expression. Any of
+ * the contained patterns could match and
+ * when one does it's label is returned.
+ *
+ * @package Doku
+ * @subpackage Lexer
*/
class Doku_LexerParallelRegex {
var $_patterns;
@@ -39,10 +40,11 @@ class Doku_LexerParallelRegex {
var $_case;
/**
- * Constructor. Starts with no patterns.
- * @param boolean $case True for case sensitive, false
- * for insensitive.
- * @access public
+ * Constructor. Starts with no patterns.
+ *
+ * @param boolean $case True for case sensitive, false
+ * for insensitive.
+ * @access public
*/
function Doku_LexerParallelRegex($case) {
$this->_case = $case;
@@ -52,15 +54,16 @@ class Doku_LexerParallelRegex {
}
/**
- * Adds a pattern with an optional label.
- * @param mixed $pattern Perl style regex. Must be UTF-8
- * encoded. If its a string, the (, )
- * lose their meaning unless they
- * form part of a lookahead or
- * lookbehind assertation.
- * @param string $label Label of regex to be returned
- * on a match. Label must be ASCII
- * @access public
+ * Adds a pattern with an optional label.
+ *
+ * @param mixed $pattern Perl style regex. Must be UTF-8
+ * encoded. If its a string, the (, )
+ * lose their meaning unless they
+ * form part of a lookahead or
+ * lookbehind assertation.
+ * @param string $label Label of regex to be returned
+ * on a match. Label must be ASCII
+ * @access public
*/
function addPattern($pattern, $label = true) {
$count = count($this->_patterns);
@@ -70,13 +73,13 @@ class Doku_LexerParallelRegex {
}
/**
- * Attempts to match all patterns at once against
- * a string.
- * @param string $subject String to match against.
- * @param string $match First matched portion of
- * subject.
- * @return boolean True on success.
- * @access public
+ * Attempts to match all patterns at once against a string.
+ *
+ * @param string $subject String to match against.
+ * @param string $match First matched portion of
+ * subject.
+ * @return boolean True on success.
+ * @access public
*/
function match($subject, &$match) {
if (count($this->_patterns) == 0) {
@@ -98,14 +101,14 @@ class Doku_LexerParallelRegex {
}
/**
- * Attempts to split the string against all patterns at once
+ * Attempts to split the string against all patterns at once
*
- * @param string $subject String to match against.
- * @param array $split The split result: array containing, pre-match, match & post-match strings
- * @return boolean True on success.
- * @access public
+ * @param string $subject String to match against.
+ * @param array $split The split result: array containing, pre-match, match & post-match strings
+ * @return boolean True on success.
+ * @access public
*
- * @author Christopher Smith <chris@jalakai.co.uk>
+ * @author Christopher Smith <chris@jalakai.co.uk>
*/
function split($subject, &$split) {
if (count($this->_patterns) == 0) {
@@ -143,12 +146,13 @@ class Doku_LexerParallelRegex {
}
/**
- * Compounds the patterns into a single
- * regular expression separated with the
- * "or" operator. Caches the regex.
- * Will automatically escape (, ) and / tokens.
- * @param array $patterns List of patterns in order.
- * @access private
+ * Compounds the patterns into a single
+ * regular expression separated with the
+ * "or" operator. Caches the regex.
+ * Will automatically escape (, ) and / tokens.
+ *
+ * @param array $patterns List of patterns in order.
+ * @access private
*/
function _getCompoundedRegex() {
if ($this->_regex == null) {
@@ -176,25 +180,25 @@ class Doku_LexerParallelRegex {
*/
switch($elt) {
- case '(':
- $pattern .= '\(';
- break;
- case ')':
- if ($level > 0)
- $level--; /* closing (? */
- else
- $pattern .= '\\';
- $pattern .= ')';
- break;
- case '(?':
- $level++;
- $pattern .= '(?';
- break;
- default:
- if (substr($elt, 0, 1) == '\\')
- $pattern .= $elt;
- else
- $pattern .= str_replace('/', '\/', $elt);
+ case '(':
+ $pattern .= '\(';
+ break;
+ case ')':
+ if ($level > 0)
+ $level--; /* closing (? */
+ else
+ $pattern .= '\\';
+ $pattern .= ')';
+ break;
+ case '(?':
+ $level++;
+ $pattern .= '(?';
+ break;
+ default:
+ if (substr($elt, 0, 1) == '\\')
+ $pattern .= $elt;
+ else
+ $pattern .= str_replace('/', '\/', $elt);
}
}
$this->_patterns[$i] = "($pattern)";
@@ -205,9 +209,9 @@ class Doku_LexerParallelRegex {
}
/**
- * Accessor for perl regex mode flags to use.
- * @return string Perl regex flags.
- * @access private
+ * Accessor for perl regex mode flags to use.
+ * @return string Perl regex flags.
+ * @access private
*/
function _getPerlMatchingFlags() {
return ($this->_case ? "msS" : "msSi");
@@ -215,47 +219,47 @@ class Doku_LexerParallelRegex {
}
/**
- * States for a stack machine.
- * @package Lexer
- * @subpackage Lexer
+ * States for a stack machine.
+ * @package Lexer
+ * @subpackage Lexer
*/
class Doku_LexerStateStack {
var $_stack;
/**
- * Constructor. Starts in named state.
- * @param string $start Starting state name.
- * @access public
+ * Constructor. Starts in named state.
+ * @param string $start Starting state name.
+ * @access public
*/
function Doku_LexerStateStack($start) {
$this->_stack = array($start);
}
/**
- * Accessor for current state.
- * @return string State.
- * @access public
+ * Accessor for current state.
+ * @return string State.
+ * @access public
*/
function getCurrent() {
return $this->_stack[count($this->_stack) - 1];
}
/**
- * Adds a state to the stack and sets it
- * to be the current state.
- * @param string $state New state.
- * @access public
+ * Adds a state to the stack and sets it
+ * to be the current state.
+ * @param string $state New state.
+ * @access public
*/
function enter($state) {
array_push($this->_stack, $state);
}
/**
- * Leaves the current state and reverts
- * to the previous one.
- * @return boolean False if we drop off
- * the bottom of the list.
- * @access public
+ * Leaves the current state and reverts
+ * to the previous one.
+ * @return boolean False if we drop off
+ * the bottom of the list.
+ * @access public
*/
function leave() {
if (count($this->_stack) == 1) {
@@ -267,13 +271,13 @@ class Doku_LexerStateStack {
}
/**
- * Accepts text and breaks it into tokens.
- * Some optimisation to make the sure the
- * content is only scanned by the PHP regex
- * parser once. Lexer modes must not start
- * with leading underscores.
- * @package Doku
- * @subpackage Lexer
+ * Accepts text and breaks it into tokens.
+ * Some optimisation to make the sure the
+ * content is only scanned by the PHP regex
+ * parser once. Lexer modes must not start
+ * with leading underscores.
+ * @package Doku
+ * @subpackage Lexer
*/
class Doku_Lexer {
var $_regexes;
@@ -283,13 +287,13 @@ class Doku_Lexer {
var $_case;
/**
- * Sets up the lexer in case insensitive matching
- * by default.
- * @param Doku_Parser $parser Handling strategy by
- * reference.
- * @param string $start Starting handler.
- * @param boolean $case True for case sensitive.
- * @access public
+ * Sets up the lexer in case insensitive matching
+ * by default.
+ * @param Doku_Parser $parser Handling strategy by
+ * reference.
+ * @param string $start Starting handler.
+ * @param boolean $case True for case sensitive.
+ * @access public
*/
function Doku_Lexer(&$parser, $start = "accept", $case = false) {
$this->_case = $case;
@@ -300,15 +304,15 @@ class Doku_Lexer {
}
/**
- * Adds a token search pattern for a particular
- * parsing mode. The pattern does not change the
- * current mode.
- * @param string $pattern Perl style regex, but ( and )
- * lose the usual meaning.
- * @param string $mode Should only apply this
- * pattern when dealing with
- * this type of input.
- * @access public
+ * Adds a token search pattern for a particular
+ * parsing mode. The pattern does not change the
+ * current mode.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $mode Should only apply this
+ * pattern when dealing with
+ * this type of input.
+ * @access public
*/
function addPattern($pattern, $mode = "accept") {
if (! isset($this->_regexes[$mode])) {
@@ -318,17 +322,17 @@ class Doku_Lexer {
}
/**
- * Adds a pattern that will enter a new parsing
- * mode. Useful for entering parenthesis, strings,
- * tags, etc.
- * @param string $pattern Perl style regex, but ( and )
- * lose the usual meaning.
- * @param string $mode Should only apply this
- * pattern when dealing with
- * this type of input.
- * @param string $new_mode Change parsing to this new
- * nested mode.
- * @access public
+ * Adds a pattern that will enter a new parsing
+ * mode. Useful for entering parenthesis, strings,
+ * tags, etc.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $mode Should only apply this
+ * pattern when dealing with
+ * this type of input.
+ * @param string $new_mode Change parsing to this new
+ * nested mode.
+ * @access public
*/
function addEntryPattern($pattern, $mode, $new_mode) {
if (! isset($this->_regexes[$mode])) {
@@ -338,12 +342,12 @@ class Doku_Lexer {
}
/**
- * Adds a pattern that will exit the current mode
- * and re-enter the previous one.
- * @param string $pattern Perl style regex, but ( and )
- * lose the usual meaning.
- * @param string $mode Mode to leave.
- * @access public
+ * Adds a pattern that will exit the current mode
+ * and re-enter the previous one.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $mode Mode to leave.
+ * @access public
*/
function addExitPattern($pattern, $mode) {
if (! isset($this->_regexes[$mode])) {
@@ -353,16 +357,16 @@ class Doku_Lexer {
}
/**
- * Adds a pattern that has a special mode. Acts as an entry
- * and exit pattern in one go, effectively calling a special
- * parser handler for this token only.
- * @param string $pattern Perl style regex, but ( and )
- * lose the usual meaning.
- * @param string $mode Should only apply this
- * pattern when dealing with
- * this type of input.
- * @param string $special Use this mode for this one token.
- * @access public
+ * Adds a pattern that has a special mode. Acts as an entry
+ * and exit pattern in one go, effectively calling a special
+ * parser handler for this token only.
+ * @param string $pattern Perl style regex, but ( and )
+ * lose the usual meaning.
+ * @param string $mode Should only apply this
+ * pattern when dealing with
+ * this type of input.
+ * @param string $special Use this mode for this one token.
+ * @access public
*/
function addSpecialPattern($pattern, $mode, $special) {
if (! isset($this->_regexes[$mode])) {
@@ -372,24 +376,24 @@ class Doku_Lexer {
}
/**
- * Adds a mapping from a mode to another handler.
- * @param string $mode Mode to be remapped.
- * @param string $handler New target handler.
- * @access public
+ * Adds a mapping from a mode to another handler.
+ * @param string $mode Mode to be remapped.
+ * @param string $handler New target handler.
+ * @access public
*/
function mapHandler($mode, $handler) {
$this->_mode_handlers[$mode] = $handler;
}
/**
- * Splits the page text into tokens. Will fail
- * if the handlers report an error or if no
- * content is consumed. If successful then each
- * unparsed and parsed token invokes a call to the
- * held listener.
- * @param string $raw Raw HTML text.
- * @return boolean True on success, else false.
- * @access public
+ * Splits the page text into tokens. Will fail
+ * if the handlers report an error or if no
+ * content is consumed. If successful then each
+ * unparsed and parsed token invokes a call to the
+ * held listener.
+ * @param string $raw Raw HTML text.
+ * @return boolean True on success, else false.
+ * @access public
*/
function parse($raw) {
if (! isset($this->_parser)) {
@@ -418,18 +422,18 @@ class Doku_Lexer {
}
/**
- * Sends the matched token and any leading unmatched
- * text to the parser changing the lexer to a new
- * mode if one is listed.
- * @param string $unmatched Unmatched leading portion.
- * @param string $matched Actual token match.
- * @param string $mode Mode after match. A boolean
- * false mode causes no change.
- * @param int $pos Current byte index location in raw doc
- * thats being parsed
- * @return boolean False if there was any error
- * from the parser.
- * @access private
+ * Sends the matched token and any leading unmatched
+ * text to the parser changing the lexer to a new
+ * mode if one is listed.
+ * @param string $unmatched Unmatched leading portion.
+ * @param string $matched Actual token match.
+ * @param string $mode Mode after match. A boolean
+ * false mode causes no change.
+ * @param int $pos Current byte index location in raw doc
+ * thats being parsed
+ * @return boolean False if there was any error
+ * from the parser.
+ * @access private
*/
function _dispatchTokens($unmatched, $matched, $mode = false, $initialPos, $matchPos) {
if (! $this->_invokeParser($unmatched, DOKU_LEXER_UNMATCHED, $initialPos) ){
@@ -456,50 +460,50 @@ class Doku_Lexer {
}
/**
- * Tests to see if the new mode is actually to leave
- * the current mode and pop an item from the matching
- * mode stack.
- * @param string $mode Mode to test.
- * @return boolean True if this is the exit mode.
- * @access private
+ * Tests to see if the new mode is actually to leave
+ * the current mode and pop an item from the matching
+ * mode stack.
+ * @param string $mode Mode to test.
+ * @return boolean True if this is the exit mode.
+ * @access private
*/
function _isModeEnd($mode) {
return ($mode === "__exit");
}
/**
- * Test to see if the mode is one where this mode
- * is entered for this token only and automatically
- * leaves immediately afterwoods.
- * @param string $mode Mode to test.
- * @return boolean True if this is the exit mode.
- * @access private
+ * Test to see if the mode is one where this mode
+ * is entered for this token only and automatically
+ * leaves immediately afterwoods.
+ * @param string $mode Mode to test.
+ * @return boolean True if this is the exit mode.
+ * @access private
*/
function _isSpecialMode($mode) {
return (strncmp($mode, "_", 1) == 0);
}
/**
- * Strips the magic underscore marking single token
- * modes.
- * @param string $mode Mode to decode.
- * @return string Underlying mode name.
- * @access private
+ * Strips the magic underscore marking single token
+ * modes.
+ * @param string $mode Mode to decode.
+ * @return string Underlying mode name.
+ * @access private
*/
function _decodeSpecial($mode) {
return substr($mode, 1);
}
/**
- * Calls the parser method named after the current
- * mode. Empty content will be ignored. The lexer
- * has a parser handler for each mode in the lexer.
- * @param string $content Text parsed.
- * @param boolean $is_match Token is recognised rather
- * than unparsed data.
- * @param int $pos Current byte index location in raw doc
- * thats being parsed
- * @access private
+ * Calls the parser method named after the current
+ * mode. Empty content will be ignored. The lexer
+ * has a parser handler for each mode in the lexer.
+ * @param string $content Text parsed.
+ * @param boolean $is_match Token is recognised rather
+ * than unparsed data.
+ * @param int $pos Current byte index location in raw doc
+ * thats being parsed
+ * @access private
*/
function _invokeParser($content, $is_match, $pos) {
if (($content === "") || ($content === false)) {
@@ -513,26 +517,26 @@ class Doku_Lexer {
// modes starting with plugin_ are all handled by the same
// handler but with an additional parameter
if(substr($handler,0,7)=='plugin_'){
- list($handler,$plugin) = explode('_',$handler,2);
- return $this->_parser->$handler($content, $is_match, $pos, $plugin);
+ list($handler,$plugin) = explode('_',$handler,2);
+ return $this->_parser->$handler($content, $is_match, $pos, $plugin);
}
return $this->_parser->$handler($content, $is_match, $pos);
}
/**
- * Tries to match a chunk of text and if successful
- * removes the recognised chunk and any leading
- * unparsed data. Empty strings will not be matched.
- * @param string $raw The subject to parse. This is the
- * content that will be eaten.
- * @return array Three item list of unparsed
- * content followed by the
- * recognised token and finally the
- * action the parser is to take.
- * True if no match, false if there
- * is a parsing error.
- * @access private
+ * Tries to match a chunk of text and if successful
+ * removes the recognised chunk and any leading
+ * unparsed data. Empty strings will not be matched.
+ * @param string $raw The subject to parse. This is the
+ * content that will be eaten.
+ * @return array Three item list of unparsed
+ * content followed by the
+ * recognised token and finally the
+ * action the parser is to take.
+ * True if no match, false if there
+ * is a parsing error.
+ * @access private
*/
function _reduce(&$raw) {
if (! isset($this->_regexes[$this->_mode->getCurrent()])) {
@@ -550,9 +554,9 @@ class Doku_Lexer {
}
/**
-* Escapes regex characters other than (, ) and /
-* @TODO
-*/
+ * Escapes regex characters other than (, ) and /
+ * @TODO
+ */
function Doku_Lexer_Escape($str) {
//$str = addslashes($str);
$chars = array(
diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php
index d64fe4d77..094c3ad05 100644
--- a/inc/parser/metadata.php
+++ b/inc/parser/metadata.php
@@ -23,442 +23,448 @@ require_once DOKU_INC . 'inc/parser/renderer.php';
*/
class Doku_Renderer_metadata extends Doku_Renderer {
- var $doc = '';
- var $meta = array();
- var $persistent = array();
+ var $doc = '';
+ var $meta = array();
+ var $persistent = array();
- var $headers = array();
- var $capture = true;
- var $store = '';
- var $firstimage = '';
+ var $headers = array();
+ var $capture = true;
+ var $store = '';
+ var $firstimage = '';
- function getFormat(){
- return 'metadata';
- }
+ function getFormat(){
+ return 'metadata';
+ }
+
+ function document_start(){
+ global $ID;
+
+ $this->headers = array();
+
+ // external pages are missing create date
+ if(!$this->persistent['date']['created']){
+ $this->persistent['date']['created'] = filectime(wikiFN($ID));
+ }
+ if(!isset($this->persistent['user'])){
+ $this->persistent['user'] = '';
+ }
+ if(!isset($this->persistent['creator'])){
+ $this->persistent['creator'] = '';
+ }
+ // reset metadata to persistent values
+ $this->meta = $this->persistent;
+ }
+
+ function document_end(){
+ global $ID;
- function document_start(){
- global $ID;
+ // store internal info in metadata (notoc,nocache)
+ $this->meta['internal'] = $this->info;
- $this->headers = array();
+ if (!isset($this->meta['description']['abstract'])){
+ // cut off too long abstracts
+ $this->doc = trim($this->doc);
+ if (strlen($this->doc) > 500)
+ $this->doc = utf8_substr($this->doc, 0, 500).'…';
+ $this->meta['description']['abstract'] = $this->doc;
+ }
+
+ $this->meta['relation']['firstimage'] = $this->firstimage;
+
+ if(!isset($this->meta['date']['modified'])){
+ $this->meta['date']['modified'] = filemtime(wikiFN($ID));
+ }
- // external pages are missing create date
- if(!$this->persistent['date']['created']){
- $this->persistent['date']['created'] = filectime(wikiFN($ID));
}
- if(!isset($this->persistent['user'])){
- $this->persistent['user'] = '';
+
+ function toc_additem($id, $text, $level) {
+ global $conf;
+
+ //only add items within configured levels
+ if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']){
+ // the TOC is one of our standard ul list arrays ;-)
+ $this->meta['description']['tableofcontents'][] = array(
+ 'hid' => $id,
+ 'title' => $text,
+ 'type' => 'ul',
+ 'level' => $level-$conf['toptoclevel']+1
+ );
+ }
+
}
- if(!isset($this->persistent['creator'])){
- $this->persistent['creator'] = '';
+
+ function header($text, $level, $pos) {
+ if (!isset($this->meta['title'])) $this->meta['title'] = $text;
+
+ // add the header to the TOC
+ $hid = $this->_headerToLink($text,'true');
+ $this->toc_additem($hid, $text, $level);
+
+ // add to summary
+ if ($this->capture && ($level > 1)) $this->doc .= DOKU_LF.$text.DOKU_LF;
}
- // reset metadata to persistent values
- $this->meta = $this->persistent;
- }
- function document_end(){
- global $ID;
+ function section_open($level){}
+ function section_close(){}
- // store internal info in metadata (notoc,nocache)
- $this->meta['internal'] = $this->info;
+ function cdata($text){
+ if ($this->capture) $this->doc .= $text;
+ }
- if (!isset($this->meta['description']['abstract'])){
- // cut off too long abstracts
- $this->doc = trim($this->doc);
- if (strlen($this->doc) > 500)
- $this->doc = utf8_substr($this->doc, 0, 500).'…';
- $this->meta['description']['abstract'] = $this->doc;
+ function p_open(){
+ if ($this->capture) $this->doc .= DOKU_LF;
}
- $this->meta['relation']['firstimage'] = $this->firstimage;
+ function p_close(){
+ if ($this->capture){
+ if (strlen($this->doc) > 250) $this->capture = false;
+ else $this->doc .= DOKU_LF;
+ }
+ }
- if(!isset($this->meta['date']['modified'])){
- $this->meta['date']['modified'] = filemtime(wikiFN($ID));
+ function linebreak(){
+ if ($this->capture) $this->doc .= DOKU_LF;
}
- }
+ function hr(){
+ if ($this->capture){
+ if (strlen($this->doc) > 250) $this->capture = false;
+ else $this->doc .= DOKU_LF.'----------'.DOKU_LF;
+ }
+ }
- function toc_additem($id, $text, $level) {
- global $conf;
+ /**
+ * Callback for footnote start syntax
+ *
+ * All following content will go to the footnote instead of
+ * the document. To achieve this the previous rendered content
+ * is moved to $store and $doc is cleared
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ function footnote_open() {
+ if ($this->capture){
+ // move current content to store and record footnote
+ $this->store = $this->doc;
+ $this->doc = '';
+ }
+ }
- //only add items within configured levels
- if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']){
- // the TOC is one of our standard ul list arrays ;-)
- $this->meta['description']['tableofcontents'][] = array(
- 'hid' => $id,
- 'title' => $text,
- 'type' => 'ul',
- 'level' => $level-$conf['toptoclevel']+1
- );
+ /**
+ * Callback for footnote end syntax
+ *
+ * All rendered content is moved to the $footnotes array and the old
+ * content is restored from $store again
+ *
+ * @author Andreas Gohr
+ */
+ function footnote_close() {
+ if ($this->capture){
+ // restore old content
+ $this->doc = $this->store;
+ $this->store = '';
+ }
}
- }
+ function listu_open(){
+ if ($this->capture) $this->doc .= DOKU_LF;
+ }
- function header($text, $level, $pos) {
- if (!isset($this->meta['title'])) $this->meta['title'] = $text;
+ function listu_close(){
+ if ($this->capture && (strlen($this->doc) > 250)) $this->capture = false;
+ }
- // add the header to the TOC
- $hid = $this->_headerToLink($text,'true');
- $this->toc_additem($hid, $text, $level);
+ function listo_open(){
+ if ($this->capture) $this->doc .= DOKU_LF;
+ }
- // add to summary
- if ($this->capture && ($level > 1)) $this->doc .= DOKU_LF.$text.DOKU_LF;
- }
+ function listo_close(){
+ if ($this->capture && (strlen($this->doc) > 250)) $this->capture = false;
+ }
- function section_open($level){}
- function section_close(){}
+ function listitem_open($level){
+ if ($this->capture) $this->doc .= str_repeat(DOKU_TAB, $level).'* ';
+ }
- function cdata($text){
- if ($this->capture) $this->doc .= $text;
- }
+ function listitem_close(){
+ if ($this->capture) $this->doc .= DOKU_LF;
+ }
- function p_open(){
- if ($this->capture) $this->doc .= DOKU_LF;
- }
+ function listcontent_open(){}
+ function listcontent_close(){}
- function p_close(){
- if ($this->capture){
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF;
+ function unformatted($text){
+ if ($this->capture) $this->doc .= $text;
}
- }
- function linebreak(){
- if ($this->capture) $this->doc .= DOKU_LF;
- }
+ function preformatted($text){
+ if ($this->capture) $this->doc .= $text;
+ }
- function hr(){
- if ($this->capture){
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF.'----------'.DOKU_LF;
+ function file($text, $lang = null, $file = null){
+ if ($this->capture){
+ $this->doc .= DOKU_LF.$text;
+ if (strlen($this->doc) > 250) $this->capture = false;
+ else $this->doc .= DOKU_LF;
+ }
}
- }
- /**
- * Callback for footnote start syntax
- *
- * All following content will go to the footnote instead of
- * the document. To achieve this the previous rendered content
- * is moved to $store and $doc is cleared
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- function footnote_open() {
- if ($this->capture){
- // move current content to store and record footnote
- $this->store = $this->doc;
- $this->doc = '';
+ function quote_open(){
+ if ($this->capture) $this->doc .= DOKU_LF.DOKU_TAB.'"';
}
- }
- /**
- * Callback for footnote end syntax
- *
- * All rendered content is moved to the $footnotes array and the old
- * content is restored from $store again
- *
- * @author Andreas Gohr
- */
- function footnote_close() {
- if ($this->capture){
- // restore old content
- $this->doc = $this->store;
- $this->store = '';
- }
- }
-
- function listu_open(){
- if ($this->capture) $this->doc .= DOKU_LF;
- }
-
- function listu_close(){
- if ($this->capture && (strlen($this->doc) > 250)) $this->capture = false;
- }
-
- function listo_open(){
- if ($this->capture) $this->doc .= DOKU_LF;
- }
-
- function listo_close(){
- if ($this->capture && (strlen($this->doc) > 250)) $this->capture = false;
- }
-
- function listitem_open($level){
- if ($this->capture) $this->doc .= str_repeat(DOKU_TAB, $level).'* ';
- }
-
- function listitem_close(){
- if ($this->capture) $this->doc .= DOKU_LF;
- }
-
- function listcontent_open(){}
- function listcontent_close(){}
-
- function unformatted($text){
- if ($this->capture) $this->doc .= $text;
- }
-
- function preformatted($text){
- if ($this->capture) $this->doc .= $text;
- }
-
- function file($text, $lang = null, $file = null){
- if ($this->capture){
- $this->doc .= DOKU_LF.$text;
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF;
- }
- }
-
- function quote_open(){
- if ($this->capture) $this->doc .= DOKU_LF.DOKU_TAB.'"';
- }
-
- function quote_close(){
- if ($this->capture){
- $this->doc .= '"';
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF;
- }
- }
-
- function code($text, $language = NULL, $file = null){
- if ($this->capture){
- $this->doc .= DOKU_LF.$text;
- if (strlen($this->doc) > 250) $this->capture = false;
- else $this->doc .= DOKU_LF;
- }
- }
-
- function acronym($acronym){
- if ($this->capture) $this->doc .= $acronym;
- }
-
- function smiley($smiley){
- if ($this->capture) $this->doc .= $smiley;
- }
-
- function entity($entity){
- if ($this->capture) $this->doc .= $entity;
- }
+ function quote_close(){
+ if ($this->capture){
+ $this->doc .= '"';
+ if (strlen($this->doc) > 250) $this->capture = false;
+ else $this->doc .= DOKU_LF;
+ }
+ }
- function multiplyentity($x, $y){
- if ($this->capture) $this->doc .= $x.'×'.$y;
- }
+ function code($text, $language = null, $file = null){
+ if ($this->capture){
+ $this->doc .= DOKU_LF.$text;
+ if (strlen($this->doc) > 250) $this->capture = false;
+ else $this->doc .= DOKU_LF;
+ }
+ }
- function singlequoteopening(){
- global $lang;
- if ($this->capture) $this->doc .= $lang['singlequoteopening'];
- }
+ function acronym($acronym){
+ if ($this->capture) $this->doc .= $acronym;
+ }
- function singlequoteclosing(){
- global $lang;
- if ($this->capture) $this->doc .= $lang['singlequoteclosing'];
- }
+ function smiley($smiley){
+ if ($this->capture) $this->doc .= $smiley;
+ }
- function apostrophe() {
- global $lang;
- if ($this->capture) $this->doc .= $lang['apostrophe'];
- }
+ function entity($entity){
+ if ($this->capture) $this->doc .= $entity;
+ }
- function doublequoteopening(){
- global $lang;
- if ($this->capture) $this->doc .= $lang['doublequoteopening'];
- }
+ function multiplyentity($x, $y){
+ if ($this->capture) $this->doc .= $x.'×'.$y;
+ }
- function doublequoteclosing(){
- global $lang;
- if ($this->capture) $this->doc .= $lang['doublequoteclosing'];
- }
+ function singlequoteopening(){
+ global $lang;
+ if ($this->capture) $this->doc .= $lang['singlequoteopening'];
+ }
+
+ function singlequoteclosing(){
+ global $lang;
+ if ($this->capture) $this->doc .= $lang['singlequoteclosing'];
+ }
- function camelcaselink($link) {
- $this->internallink($link, $link);
- }
+ function apostrophe() {
+ global $lang;
+ if ($this->capture) $this->doc .= $lang['apostrophe'];
+ }
- function locallink($hash, $name = NULL){}
+ function doublequoteopening(){
+ global $lang;
+ if ($this->capture) $this->doc .= $lang['doublequoteopening'];
+ }
- /**
- * keep track of internal links in $this->meta['relation']['references']
- */
- function internallink($id, $name = NULL){
- global $ID;
+ function doublequoteclosing(){
+ global $lang;
+ if ($this->capture) $this->doc .= $lang['doublequoteclosing'];
+ }
- if(is_array($name)) {
- $this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ function camelcaselink($link) {
+ $this->internallink($link, $link);
}
- $default = $this->_simpleTitle($id);
+ function locallink($hash, $name = null){}
+
+ /**
+ * keep track of internal links in $this->meta['relation']['references']
+ */
+ function internallink($id, $name = null){
+ global $ID;
+
+ if(is_array($name)) {
+ $this->_firstimage($name['src']);
+ if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ }
- // first resolve and clean up the $id
- resolve_pageid(getNS($ID), $id, $exists);
- list($page, $hash) = explode('#', $id, 2);
+ $parts = explode('?', $id, 2);
+ if (count($parts) === 2) {
+ $id = $parts[0];
+ }
- // set metadata
- $this->meta['relation']['references'][$page] = $exists;
- // $data = array('relation' => array('isreferencedby' => array($ID => true)));
- // p_set_metadata($id, $data);
- // add link title to summary
- if ($this->capture){
- $name = $this->_getLinkTitle($name, $default, $id);
- $this->doc .= $name;
+ $default = $this->_simpleTitle($id);
+
+ // first resolve and clean up the $id
+ resolve_pageid(getNS($ID), $id, $exists);
+ list($page, $hash) = explode('#', $id, 2);
+
+ // set metadata
+ $this->meta['relation']['references'][$page] = $exists;
+ // $data = array('relation' => array('isreferencedby' => array($ID => true)));
+ // p_set_metadata($id, $data);
+
+ // add link title to summary
+ if ($this->capture){
+ $name = $this->_getLinkTitle($name, $default, $id);
+ $this->doc .= $name;
+ }
}
- }
- function externallink($url, $name = NULL){
- if(is_array($name)) {
- $this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
- }
-
- if ($this->capture){
- $this->doc .= $this->_getLinkTitle($name, '<' . $url . '>');
- }
- }
-
- function interwikilink($match, $name = NULL, $wikiName, $wikiUri){
- if(is_array($name)) {
- $this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
- }
-
- if ($this->capture){
- list($wikiUri, $hash) = explode('#', $wikiUri, 2);
- $name = $this->_getLinkTitle($name, $wikiUri);
- $this->doc .= $name;
+ function externallink($url, $name = null){
+ if(is_array($name)) {
+ $this->_firstimage($name['src']);
+ if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ }
+
+ if ($this->capture){
+ $this->doc .= $this->_getLinkTitle($name, '<' . $url . '>');
+ }
}
- }
-
- function windowssharelink($url, $name = NULL){
- if(is_array($name)) {
- $this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
- }
-
- if ($this->capture){
- if ($name) $this->doc .= $name;
- else $this->doc .= '<'.$url.'>';
- }
- }
-
- function emaillink($address, $name = NULL){
- if(is_array($name)) {
- $this->_firstimage($name['src']);
- if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
- }
-
- if ($this->capture){
- if ($name) $this->doc .= $name;
- else $this->doc .= '<'.$address.'>';
- }
- }
-
- function internalmedia($src, $title=NULL, $align=NULL, $width=NULL,
- $height=NULL, $cache=NULL, $linking=NULL){
- if ($this->capture && $title) $this->doc .= '['.$title.']';
- $this->_firstimage($src);
- $this->_recordMediaUsage($src);
- }
- function externalmedia($src, $title=NULL, $align=NULL, $width=NULL,
- $height=NULL, $cache=NULL, $linking=NULL){
- if ($this->capture && $title) $this->doc .= '['.$title.']';
- $this->_firstimage($src);
- }
-
- function rss($url,$params) {
- $this->meta['relation']['haspart'][$url] = true;
+ function interwikilink($match, $name = null, $wikiName, $wikiUri){
+ if(is_array($name)) {
+ $this->_firstimage($name['src']);
+ if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ }
+
+ if ($this->capture){
+ list($wikiUri, $hash) = explode('#', $wikiUri, 2);
+ $name = $this->_getLinkTitle($name, $wikiUri);
+ $this->doc .= $name;
+ }
+ }
- $this->meta['date']['valid']['age'] =
- isset($this->meta['date']['valid']['age']) ?
- min($this->meta['date']['valid']['age'],$params['refresh']) :
- $params['refresh'];
- }
+ function windowssharelink($url, $name = null){
+ if(is_array($name)) {
+ $this->_firstimage($name['src']);
+ if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ }
- //----------------------------------------------------------
- // Utils
-
- /**
- * Removes any Namespace from the given name but keeps
- * casing and special chars
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- function _simpleTitle($name){
- global $conf;
+ if ($this->capture){
+ if ($name) $this->doc .= $name;
+ else $this->doc .= '<'.$url.'>';
+ }
+ }
- if(is_array($name)) return '';
-
- if($conf['useslash']){
- $nssep = '[:;/]';
- }else{
- $nssep = '[:;]';
- }
- $name = preg_replace('!.*'.$nssep.'!','',$name);
- //if there is a hash we use the anchor name only
- $name = preg_replace('!.*#!','',$name);
- return $name;
- }
-
- /**
- * Creates a linkid from a headline
- *
- * @param string $title The headline title
- * @param boolean $create Create a new unique ID?
- * @author Andreas Gohr <andi@splitbrain.org>
- */
- function _headerToLink($title, $create=false) {
- if($create){
- return sectionID($title,$this->headers);
- }else{
- $check = false;
- return sectionID($title,$check);
- }
- }
-
- /**
- * Construct a title and handle images in titles
- *
- * @author Harry Fuecks <hfuecks@gmail.com>
- */
- function _getLinkTitle($title, $default, $id=NULL) {
- global $conf;
-
- $isImage = false;
- if (is_array($title)){
- if($title['title']) return '['.$title['title'].']';
- } else if (is_null($title) || trim($title)==''){
- if (useHeading('content') && $id){
- $heading = p_get_first_heading($id,METADATA_DONT_RENDER);
- if ($heading) return $heading;
- }
- return $default;
- } else {
- return $title;
+ function emaillink($address, $name = null){
+ if(is_array($name)) {
+ $this->_firstimage($name['src']);
+ if ($name['type'] == 'internalmedia') $this->_recordMediaUsage($name['src']);
+ }
+
+ if ($this->capture){
+ if ($name) $this->doc .= $name;
+ else $this->doc .= '<'.$address.'>';
+ }
+ }
+
+ function internalmedia($src, $title=null, $align=null, $width=null,
+ $height=null, $cache=null, $linking=null){
+ if ($this->capture && $title) $this->doc .= '['.$title.']';
+ $this->_firstimage($src);
+ $this->_recordMediaUsage($src);
+ }
+
+ function externalmedia($src, $title=null, $align=null, $width=null,
+ $height=null, $cache=null, $linking=null){
+ if ($this->capture && $title) $this->doc .= '['.$title.']';
+ $this->_firstimage($src);
+ }
+
+ function rss($url,$params) {
+ $this->meta['relation']['haspart'][$url] = true;
+
+ $this->meta['date']['valid']['age'] =
+ isset($this->meta['date']['valid']['age']) ?
+ min($this->meta['date']['valid']['age'],$params['refresh']) :
+ $params['refresh'];
}
- }
- function _firstimage($src){
- if($this->firstimage) return;
- global $ID;
+ //----------------------------------------------------------
+ // Utils
+
+ /**
+ * Removes any Namespace from the given name but keeps
+ * casing and special chars
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ function _simpleTitle($name){
+ global $conf;
+
+ if(is_array($name)) return '';
+
+ if($conf['useslash']){
+ $nssep = '[:;/]';
+ }else{
+ $nssep = '[:;]';
+ }
+ $name = preg_replace('!.*'.$nssep.'!','',$name);
+ //if there is a hash we use the anchor name only
+ $name = preg_replace('!.*#!','',$name);
+ return $name;
+ }
- list($src,$hash) = explode('#',$src,2);
- if(!media_isexternal($src)){
- resolve_mediaid(getNS($ID),$src, $exists);
+ /**
+ * Creates a linkid from a headline
+ *
+ * @param string $title The headline title
+ * @param boolean $create Create a new unique ID?
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ function _headerToLink($title, $create=false) {
+ if($create){
+ return sectionID($title,$this->headers);
+ }else{
+ $check = false;
+ return sectionID($title,$check);
+ }
}
- if(preg_match('/.(jpe?g|gif|png)$/i',$src)){
- $this->firstimage = $src;
+
+ /**
+ * Construct a title and handle images in titles
+ *
+ * @author Harry Fuecks <hfuecks@gmail.com>
+ */
+ function _getLinkTitle($title, $default, $id=null) {
+ global $conf;
+
+ $isImage = false;
+ if (is_array($title)){
+ if($title['title']) return '['.$title['title'].']';
+ } else if (is_null($title) || trim($title)==''){
+ if (useHeading('content') && $id){
+ $heading = p_get_first_heading($id,METADATA_DONT_RENDER);
+ if ($heading) return $heading;
+ }
+ return $default;
+ } else {
+ return $title;
+ }
}
- }
- function _recordMediaUsage($src) {
- global $ID;
+ function _firstimage($src){
+ if($this->firstimage) return;
+ global $ID;
+
+ list($src,$hash) = explode('#',$src,2);
+ if(!media_isexternal($src)){
+ resolve_mediaid(getNS($ID),$src, $exists);
+ }
+ if(preg_match('/.(jpe?g|gif|png)$/i',$src)){
+ $this->firstimage = $src;
+ }
+ }
+
+ function _recordMediaUsage($src) {
+ global $ID;
- list ($src, $hash) = explode('#', $src, 2);
- if (media_isexternal($src)) return;
- resolve_mediaid(getNS($ID), $src, $exists);
- $this->meta['relation']['media'][$src] = $exists;
- }
+ list ($src, $hash) = explode('#', $src, 2);
+ if (media_isexternal($src)) return;
+ resolve_mediaid(getNS($ID), $src, $exists);
+ $this->meta['relation']['media'][$src] = $exists;
+ }
}
//Setup VIM: ex: et ts=4 :
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 4af1cd333..3caad834a 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -45,9 +45,9 @@ $PARSER_MODES = array(
//-------------------------------------------------------------------
/**
-* Sets up the Lexer with modes and points it to the Handler
-* For an intro to the Lexer see: wiki:parser
-*/
+ * Sets up the Lexer with modes and points it to the Handler
+ * For an intro to the Lexer see: wiki:parser
+ */
class Doku_Parser {
var $Handler;
@@ -70,9 +70,9 @@ class Doku_Parser {
}
/**
- * PHP preserves order of associative elements
- * Mode sequence is important
- */
+ * PHP preserves order of associative elements
+ * Mode sequence is important
+ */
function addMode($name, & $Mode) {
if ( !isset($this->modes['base']) ) {
$this->addBaseMode(new Doku_Parser_Mode_base());
@@ -134,7 +134,7 @@ class Doku_Parser {
* all modes are registered
*
* @author Harry Fuecks <hfuecks@gmail.com>
-*/
+ */
class Doku_Parser_Mode {
/**
@@ -621,7 +621,7 @@ class Doku_Parser_Mode_acronym extends Doku_Parser_Mode {
var $pattern = '';
function Doku_Parser_Mode_acronym($acronyms) {
- usort($acronyms,array($this,'_compare'));
+ usort($acronyms,array($this,'_compare'));
$this->acronyms = $acronyms;
}
@@ -652,12 +652,12 @@ class Doku_Parser_Mode_acronym extends Doku_Parser_Mode {
$a_len = strlen($a);
$b_len = strlen($b);
if ($a_len > $b_len) {
- return -1;
+ return -1;
} else if ($a_len < $b_len) {
- return 1;
+ return 1;
}
- return 0;
+ return 0;
}
}
diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php
index 7df369478..c697e990c 100644
--- a/inc/parser/renderer.php
+++ b/inc/parser/renderer.php
@@ -74,12 +74,12 @@ class Doku_Renderer extends DokuWiki_Plugin {
*/
function nest($instructions) {
- foreach ( $instructions as $instruction ) {
- // execute the callback against ourself
- if (method_exists($this,$instruction[0])) {
- call_user_func_array(array($this, $instruction[0]), $instruction[1] ? $instruction[1] : array());
+ foreach ( $instructions as $instruction ) {
+ // execute the callback against ourself
+ if (method_exists($this,$instruction[0])) {
+ call_user_func_array(array($this, $instruction[0]), $instruction[1] ? $instruction[1] : array());
+ }
}
- }
}
// dummy closing instruction issued by Doku_Handler_Nest, normally the syntax mode should
@@ -203,42 +203,42 @@ class Doku_Renderer extends DokuWiki_Plugin {
// $link like 'SomePage'
function camelcaselink($link) {}
- function locallink($hash, $name = NULL) {}
+ function locallink($hash, $name = null) {}
// $link like 'wiki:syntax', $title could be an array (media)
- function internallink($link, $title = NULL) {}
+ function internallink($link, $title = null) {}
// $link is full URL with scheme, $title could be an array (media)
- function externallink($link, $title = NULL) {}
+ function externallink($link, $title = null) {}
function rss ($url,$params) {}
// $link is the original link - probably not much use
// $wikiName is an indentifier for the wiki
// $wikiUri is the URL fragment to append to some known URL
- function interwikilink($link, $title = NULL, $wikiName, $wikiUri) {}
+ function interwikilink($link, $title = null, $wikiName, $wikiUri) {}
// Link to file on users OS, $title could be an array (media)
- function filelink($link, $title = NULL) {}
+ function filelink($link, $title = null) {}
// Link to a Windows share, , $title could be an array (media)
- function windowssharelink($link, $title = NULL) {}
+ function windowssharelink($link, $title = null) {}
-// function email($address, $title = NULL) {}
- function emaillink($address, $name = NULL) {}
+// function email($address, $title = null) {}
+ function emaillink($address, $name = null) {}
- function internalmedia ($src, $title=NULL, $align=NULL, $width=NULL,
- $height=NULL, $cache=NULL, $linking=NULL) {}
+ function internalmedia ($src, $title=null, $align=null, $width=null,
+ $height=null, $cache=null, $linking=null) {}
- function externalmedia ($src, $title=NULL, $align=NULL, $width=NULL,
- $height=NULL, $cache=NULL, $linking=NULL) {}
+ function externalmedia ($src, $title=null, $align=null, $width=null,
+ $height=null, $cache=null, $linking=null) {}
function internalmedialink (
- $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
+ $src,$title=null,$align=null,$width=null,$height=null,$cache=null
) {}
function externalmedialink(
- $src,$title=NULL,$align=NULL,$width=NULL,$height=NULL,$cache=NULL
+ $src,$title=null,$align=null,$width=null,$height=null,$cache=null
) {}
function table_open($maxcols = null, $numrows = null, $pos = null){}
@@ -249,11 +249,11 @@ class Doku_Renderer extends DokuWiki_Plugin {
function tablerow_close(){}
- function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){}
+ function tableheader_open($colspan = 1, $align = null, $rowspan = 1){}
function tableheader_close(){}
- function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){}
+ function tablecell_open($colspan = 1, $align = null, $rowspan = 1){}
function tablecell_close(){}
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 84a999e56..e269563fe 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -59,7 +59,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* Finish an edit section range
*
* @param $end int The byte position for the edit end; null for the rest of
- the page
+ * the page
* @author Adrian Lang <lang@cosmocode.de>
*/
public function finishSectionEdit($end = null) {
@@ -116,11 +116,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$alt = array_keys($this->footnotes, "@@FNT$id");
if (count($alt)) {
- foreach ($alt as $ref) {
- // set anchor and backlink for the other footnotes
- $this->doc .= ', <sup><a href="#fnt__'.($ref+1).'" id="fn__'.($ref+1).'" class="fn_bot">';
- $this->doc .= ($ref+1).')</a></sup> '.DOKU_LF;
- }
+ foreach ($alt as $ref) {
+ // set anchor and backlink for the other footnotes
+ $this->doc .= ', <sup><a href="#fnt__'.($ref+1).'" id="fn__'.($ref+1).'" class="fn_bot">';
+ $this->doc .= ($ref+1).')</a></sup> '.DOKU_LF;
+ }
}
// add footnote markup and close this footnote
@@ -367,12 +367,12 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
global $conf;
if($conf['phpok']){
- ob_start();
- eval($text);
- $this->doc .= ob_get_contents();
- ob_end_clean();
+ ob_start();
+ eval($text);
+ $this->doc .= ob_get_contents();
+ ob_end_clean();
} else {
- $this->doc .= p_xhtml_cached_geshi($text, 'php', $wrapper);
+ $this->doc .= p_xhtml_cached_geshi($text, 'php', $wrapper);
}
}
@@ -392,9 +392,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
global $conf;
if($conf['htmlok']){
- $this->doc .= $text;
+ $this->doc .= $text;
} else {
- $this->doc .= p_xhtml_cached_geshi($text, 'html4strict', $wrapper);
+ $this->doc .= p_xhtml_cached_geshi($text, 'html4strict', $wrapper);
}
}
@@ -541,13 +541,13 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
/**
- */
+ */
function camelcaselink($link) {
- $this->internallink($link,$link);
+ $this->internallink($link,$link);
}
- function locallink($hash, $name = NULL){
+ function locallink($hash, $name = null){
global $ID;
$name = $this->_getLinkTitle($name, $hash, $isImage);
$hash = $this->_headerToLink($hash);
@@ -565,7 +565,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function internallink($id, $name = NULL, $search=NULL,$returnonly=false,$linktype='content') {
+ function internallink($id, $name = null, $search=null,$returnonly=false,$linktype='content') {
global $conf;
global $ID;
global $INFO;
@@ -644,7 +644,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
}
- function externallink($url, $name = NULL) {
+ function externallink($url, $name = null) {
global $conf;
$name = $this->_getLinkTitle($name, $url, $isImage);
@@ -687,7 +687,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
/**
*/
- function interwikilink($match, $name = NULL, $wikiName, $wikiUri) {
+ function interwikilink($match, $name = null, $wikiName, $wikiUri) {
global $conf;
$link = array();
@@ -721,7 +721,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
/**
*/
- function windowssharelink($url, $name = NULL) {
+ function windowssharelink($url, $name = null) {
global $conf;
global $lang;
//simple setup
@@ -747,7 +747,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= $this->_formatLink($link);
}
- function emaillink($address, $name = NULL) {
+ function emaillink($address, $name = null) {
global $conf;
//simple setup
$link = array();
@@ -782,8 +782,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= $this->_formatLink($link);
}
- function internalmedia ($src, $title=NULL, $align=NULL, $width=NULL,
- $height=NULL, $cache=NULL, $linking=NULL) {
+ function internalmedia ($src, $title=null, $align=null, $width=null,
+ $height=null, $cache=null, $linking=null) {
global $ID;
list($src,$hash) = explode('#',$src,2);
resolve_mediaid(getNS($ID),$src, $exists);
@@ -818,8 +818,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
else $this->doc .= $this->_formatLink($link);
}
- function externalmedia ($src, $title=NULL, $align=NULL, $width=NULL,
- $height=NULL, $cache=NULL, $linking=NULL) {
+ function externalmedia ($src, $title=null, $align=null, $width=null,
+ $height=null, $cache=null, $linking=null) {
list($src,$hash) = explode('#',$src,2);
$noLink = false;
$render = ($linking == 'linkonly') ? false : true;
@@ -875,7 +875,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$mod = 1;
$start = 0;
$end = $feed->get_item_quantity();
- $end = ($end > $params['max']) ? $params['max'] : $end;;
+ $end = ($end > $params['max']) ? $params['max'] : $end;
}
$this->doc .= '<ul class="rss">';
@@ -959,7 +959,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= DOKU_LF . DOKU_TAB . '</tr>' . DOKU_LF;
}
- function tableheader_open($colspan = 1, $align = NULL, $rowspan = 1){
+ function tableheader_open($colspan = 1, $align = null, $rowspan = 1){
$class = 'class="col' . $this->_counter['cell_counter']++;
if ( !is_null($align) ) {
$class .= ' '.$align.'align';
@@ -980,7 +980,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->doc .= '</th>';
}
- function tablecell_open($colspan = 1, $align = NULL, $rowspan = 1){
+ function tablecell_open($colspan = 1, $align = null, $rowspan = 1){
$class = 'class="col' . $this->_counter['cell_counter']++;
if ( !is_null($align) ) {
$class .= ' '.$align.'align';
@@ -1046,8 +1046,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
- function _media ($src, $title=NULL, $align=NULL, $width=NULL,
- $height=NULL, $cache=NULL, $render = true) {
+ function _media ($src, $title=null, $align=null, $width=null,
+ $height=null, $cache=null, $render = true) {
$ret = '';
@@ -1149,7 +1149,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
*
* @author Harry Fuecks <hfuecks@gmail.com>
*/
- function _getLinkTitle($title, $default, & $isImage, $id=NULL, $linktype='content') {
+ function _getLinkTitle($title, $default, & $isImage, $id=null, $linktype='content') {
global $conf;
$isImage = false;
@@ -1208,8 +1208,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
* @access protected
* @return array
*/
- function _getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render)
- {
+ function _getMediaLinkConf($src, $title, $align, $width, $height, $cache, $render) {
global $conf;
$link = array();
diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php
index 0b4041a77..c825870cd 100644
--- a/inc/plugincontroller.class.php
+++ b/inc/plugincontroller.class.php
@@ -129,6 +129,8 @@ class Doku_Plugin_Controller {
}
protected function _populateMasterList() {
+ global $conf;
+
if ($dh = @opendir(DOKU_PLUGIN)) {
$all_plugins = array();
while (false !== ($plugin = readdir($dh))) {
diff --git a/inc/subscription.php b/inc/subscription.php
index 4248e4b11..ecbc9ef19 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -617,7 +617,7 @@ class Subscription {
* @param string $rev The revision of the page, set to the current revision of the page $id if not set
* @return string
*/
- protected function getMessageID($id, $rev = NULL) {
+ protected function getMessageID($id, $rev = null) {
static $listid = null;
if (is_null($listid)) {
$server = parse_url(DOKU_URL, PHP_URL_HOST);
@@ -694,4 +694,4 @@ class Subscription {
function subscription_addresslist(&$data) {
$sub = new Subscription();
$sub->notifyaddresses($data);
-} \ No newline at end of file
+}