summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_cs/DokuWiki/ruleset.xml7
-rw-r--r--_test/tests/inc/fulltext_backlinks.test.php10
-rwxr-xr-xbin/dwpage.php8
-rwxr-xr-xbin/striplangs.php2
-rwxr-xr-xbin/wantedpages.php4
-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
-rw-r--r--lib/exe/css.php3
-rw-r--r--lib/exe/detail.php4
-rw-r--r--lib/exe/indexer.php26
-rw-r--r--lib/exe/js.php3
-rw-r--r--lib/plugins/acl/lang/cs/lang.php4
-rw-r--r--lib/plugins/acl/lang/de-informal/lang.php5
-rw-r--r--lib/plugins/acl/lang/eo/lang.php5
-rw-r--r--lib/plugins/acl/lang/ko/help.txt2
-rw-r--r--lib/plugins/acl/lang/ne/lang.php5
-rw-r--r--lib/plugins/acl/lang/pt-br/lang.php4
-rw-r--r--lib/plugins/acl/lang/pt/lang.php4
-rw-r--r--lib/plugins/acl/lang/ru/lang.php2
-rw-r--r--lib/plugins/acl/lang/sl/lang.php5
-rw-r--r--lib/plugins/acl/remote.php8
-rw-r--r--lib/plugins/action.php10
-rw-r--r--lib/plugins/authad/lang/cs/settings.php5
-rw-r--r--lib/plugins/authad/lang/de-informal/settings.php5
-rw-r--r--lib/plugins/authad/lang/eo/settings.php5
-rw-r--r--lib/plugins/authad/lang/pt-br/settings.php5
-rw-r--r--lib/plugins/authad/lang/pt/settings.php12
-rw-r--r--lib/plugins/authad/lang/ru/settings.php7
-rw-r--r--lib/plugins/authldap/lang/cs/settings.php5
-rw-r--r--lib/plugins/authldap/lang/de-informal/settings.php4
-rw-r--r--lib/plugins/authldap/lang/de/settings.php6
-rw-r--r--lib/plugins/authldap/lang/eo/settings.php11
-rw-r--r--lib/plugins/authldap/lang/ko/settings.php8
-rw-r--r--lib/plugins/authldap/lang/pt-br/settings.php5
-rw-r--r--lib/plugins/authldap/lang/pt/settings.php18
-rw-r--r--lib/plugins/authldap/lang/ru/settings.php7
-rw-r--r--lib/plugins/authmysql/lang/cs/settings.php5
-rw-r--r--lib/plugins/authmysql/lang/de-informal/settings.php4
-rw-r--r--lib/plugins/authmysql/lang/eo/settings.php5
-rw-r--r--lib/plugins/authmysql/lang/pt-br/settings.php5
-rw-r--r--lib/plugins/authmysql/lang/pt/settings.php23
-rw-r--r--lib/plugins/authmysql/lang/sl/settings.php11
-rw-r--r--lib/plugins/authpgsql/lang/cs/settings.php5
-rw-r--r--lib/plugins/authpgsql/lang/de-informal/settings.php4
-rw-r--r--lib/plugins/authpgsql/lang/eo/settings.php5
-rw-r--r--lib/plugins/authpgsql/lang/pt-br/settings.php5
-rw-r--r--lib/plugins/authpgsql/lang/pt/settings.php22
-rw-r--r--lib/plugins/authpgsql/lang/ru/settings.php8
-rw-r--r--lib/plugins/authpgsql/lang/sl/settings.php8
-rw-r--r--lib/plugins/config/admin.php488
-rw-r--r--lib/plugins/config/lang/en/lang.php6
-rw-r--r--lib/plugins/config/settings/config.class.php1494
-rw-r--r--lib/plugins/config/settings/extra.class.php270
-rw-r--r--lib/plugins/plugin/admin.php4
-rw-r--r--lib/plugins/plugin/classes/ap_info.class.php2
-rw-r--r--lib/plugins/plugin/classes/ap_manage.class.php2
-rw-r--r--lib/plugins/plugin/lang/cs/lang.php5
-rw-r--r--lib/plugins/plugin/lang/de-informal/lang.php5
-rw-r--r--lib/plugins/plugin/lang/eo/lang.php5
-rw-r--r--lib/plugins/plugin/lang/ko/admin_plugin.txt2
-rw-r--r--lib/plugins/plugin/lang/ko/lang.php10
-rw-r--r--lib/plugins/plugin/lang/ne/lang.php5
-rw-r--r--lib/plugins/plugin/lang/pt-br/lang.php5
-rw-r--r--lib/plugins/plugin/lang/pt/lang.php5
-rw-r--r--lib/plugins/plugin/lang/ru/lang.php2
-rw-r--r--lib/plugins/plugin/lang/sl/lang.php5
-rw-r--r--lib/plugins/popularity/lang/cs/lang.php5
-rw-r--r--lib/plugins/popularity/lang/de-informal/lang.php5
-rw-r--r--lib/plugins/popularity/lang/eo/lang.php5
-rw-r--r--lib/plugins/popularity/lang/ko/intro.txt2
-rw-r--r--lib/plugins/popularity/lang/ko/lang.php2
-rw-r--r--lib/plugins/popularity/lang/ne/lang.php5
-rw-r--r--lib/plugins/popularity/lang/pt-br/lang.php5
-rw-r--r--lib/plugins/popularity/lang/pt/lang.php5
-rw-r--r--lib/plugins/popularity/lang/ru/submitted.txt3
-rw-r--r--lib/plugins/popularity/lang/sl/lang.php5
-rw-r--r--lib/plugins/revert/admin.php2
-rw-r--r--lib/plugins/revert/lang/cs/lang.php6
-rw-r--r--lib/plugins/revert/lang/de-informal/lang.php5
-rw-r--r--lib/plugins/revert/lang/eo/lang.php5
-rw-r--r--lib/plugins/revert/lang/ko/lang.php4
-rw-r--r--lib/plugins/revert/lang/ne/lang.php5
-rw-r--r--lib/plugins/revert/lang/pt-br/lang.php5
-rw-r--r--lib/plugins/revert/lang/pt/lang.php5
-rw-r--r--lib/plugins/revert/lang/ru/lang.php2
-rw-r--r--lib/plugins/revert/lang/sl/lang.php5
-rw-r--r--lib/plugins/safefnrecode/action.php2
-rw-r--r--lib/plugins/syntax.php48
-rw-r--r--lib/plugins/usermanager/admin.php290
-rw-r--r--lib/plugins/usermanager/lang/cs/import.txt9
-rw-r--r--lib/plugins/usermanager/lang/cs/lang.php23
-rw-r--r--lib/plugins/usermanager/lang/de-informal/import.txt7
-rw-r--r--lib/plugins/usermanager/lang/de-informal/lang.php21
-rw-r--r--lib/plugins/usermanager/lang/de/import.txt8
-rw-r--r--lib/plugins/usermanager/lang/de/lang.php2
-rw-r--r--lib/plugins/usermanager/lang/eo/import.txt9
-rw-r--r--lib/plugins/usermanager/lang/eo/lang.php21
-rw-r--r--lib/plugins/usermanager/lang/ko/lang.php8
-rw-r--r--lib/plugins/usermanager/lang/ne/lang.php5
-rw-r--r--lib/plugins/usermanager/lang/pt-br/lang.php5
-rw-r--r--lib/plugins/usermanager/lang/pt/import.txt9
-rw-r--r--lib/plugins/usermanager/lang/pt/lang.php17
-rw-r--r--lib/plugins/usermanager/lang/ru/lang.php4
-rw-r--r--lib/plugins/usermanager/lang/sl/lang.php17
-rw-r--r--lib/tpl/dokuwiki/tpl_footer.php3
153 files changed, 3079 insertions, 2557 deletions
diff --git a/_cs/DokuWiki/ruleset.xml b/_cs/DokuWiki/ruleset.xml
index c69ef853a..3ee7fb667 100644
--- a/_cs/DokuWiki/ruleset.xml
+++ b/_cs/DokuWiki/ruleset.xml
@@ -3,7 +3,12 @@
<description>DokuWiki Coding Standard</description>
<!-- ignore 3rd party libraries (that we haven't adopted) -->
- <exclude-pattern>*/adLDAP.php</exclude-pattern>
+ <exclude-pattern>*/inc/blowfish.php</exclude-pattern>
+ <exclude-pattern>*/inc/lessc.inc.php</exclude-pattern>
+ <exclude-pattern>*/inc/phpseclib/*</exclude-pattern>
+ <exclude-pattern>*/lib/plugins/authad/adLDAP/*</exclude-pattern>
+ <exclude-pattern>*/lib/scripts/fileuploader.js</exclude-pattern>
+ <exclude-pattern>*/lib/scripts/jquery/*</exclude-pattern>
<exclude-pattern>*/EmailAddressValidator.php</exclude-pattern>
<exclude-pattern>*/feedcreator.class.php</exclude-pattern>
<exclude-pattern>*/SimplePie.php</exclude-pattern>
diff --git a/_test/tests/inc/fulltext_backlinks.test.php b/_test/tests/inc/fulltext_backlinks.test.php
index 058e13498..b20a16ee1 100644
--- a/_test/tests/inc/fulltext_backlinks.test.php
+++ b/_test/tests/inc/fulltext_backlinks.test.php
@@ -8,7 +8,7 @@ if (!defined('DOKU_INC')) die();
*
* @author Michael Hamann <michael@content-space.de>
*/
-class fultext_backlinks_test extends DokuWikiTest {
+class fulltext_backlinks_test extends DokuWikiTest {
public function test_internallink() {
saveWikiText('test:internallinks', '[[internälLink]] [[..:internal link]]', 'Test initialization');
@@ -74,4 +74,12 @@ class fultext_backlinks_test extends DokuWikiTest {
$this->assertEquals(array(), ft_backlinks('test:internallink'));
$this->assertEquals(array(), ft_backlinks('internal_link'));
}
+
+ function test_parameters() {
+ saveWikiText('test:links', '[[wiki:syntax?do=export_raw]] [[:web:scripts:add_vhost.sh?do=export_raw]]', 'Init tests');
+ idx_addPage('test:links');
+
+ $this->assertEquals(array('test:links'), ft_backlinks('wiki:syntax'));
+ $this->assertEquals(array('test:links'), ft_backlinks('web:scripts:add_vhost.sh'));
+ }
}
diff --git a/bin/dwpage.php b/bin/dwpage.php
index bc9c0f6bb..96f6d3ef9 100755
--- a/bin/dwpage.php
+++ b/bin/dwpage.php
@@ -13,7 +13,7 @@ require_once DOKU_INC.'inc/cliopts.php';
function usage($action) {
switch ( $action ) {
case 'checkout':
- print "Usage: dwpage.php [opts] checkout <wiki:page> [working_file]
+ print "Usage: dwpage.php [opts] checkout <wiki:page> [working_file]
Checks out a file from the repository, using the wiki id and obtaining
a lock for the page.
@@ -30,7 +30,7 @@ function usage($action) {
";
break;
case 'commit':
- print "Usage: dwpage.php [opts] -m \"Msg\" commit <working_file> <wiki:page>
+ print "Usage: dwpage.php [opts] -m \"Msg\" commit <working_file> <wiki:page>
Checks in the working_file into the repository using the specified
wiki id, archiving the previous version.
@@ -46,7 +46,7 @@ function usage($action) {
";
break;
case 'lock':
- print "Usage: dwpage.php [opts] lock <wiki:page>
+ print "Usage: dwpage.php [opts] lock <wiki:page>
Obtains or updates a lock for a wiki page
@@ -59,7 +59,7 @@ function usage($action) {
";
break;
case 'unlock':
- print "Usage: dwpage.php [opts] unlock <wiki:page>
+ print "Usage: dwpage.php [opts] unlock <wiki:page>
Removes a lock for a wiki page.
diff --git a/bin/striplangs.php b/bin/striplangs.php
index 40cef5063..ac95626c9 100755
--- a/bin/striplangs.php
+++ b/bin/striplangs.php
@@ -127,7 +127,7 @@ if ( $OPTS->has('k') or $OPTS->has('keep') ) {
// ! always enforce 'en' lang when using '--keep' (DW relies on it)
if ( !isset($langs['en']) ) {
- $langs[]='en';
+ $langs[]='en';
}
} elseif ( $OPTS->has('e') or $OPTS->has('english') ) {
// '--english' was specified strip everything besides 'en'
diff --git a/bin/wantedpages.php b/bin/wantedpages.php
index 30171fc15..afcb6b271 100755
--- a/bin/wantedpages.php
+++ b/bin/wantedpages.php
@@ -49,7 +49,7 @@ function dw_dir_filter($entry, $basepath) {
#------------------------------------------------------------------------------
function dw_get_pages($dir) {
- static $trunclen = NULL;
+ static $trunclen = null;
if ( !$trunclen ) {
global $conf;
$trunclen = strlen($conf['datadir'].':');
@@ -92,7 +92,7 @@ function dw_internal_links($page) {
$mid = $ins[1][0];
resolve_pageid($cns,$mid,$exists);
if ( !$exists ) {
- list($mid) = explode('#',$mid); //record pages without hashs
+ list($mid) = explode('#',$mid); //record pages without hashs
$links[] = $mid;
}
}
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
+}
diff --git a/lib/exe/css.php b/lib/exe/css.php
index 9e1e22e1a..60e17ae82 100644
--- a/lib/exe/css.php
+++ b/lib/exe/css.php
@@ -465,8 +465,7 @@ function css_pluginstyles($mediatype='screen'){
*
* @author Gabriel Birke <birke@d-scribe.de>
*/
-function css_moveimports($css)
-{
+function css_moveimports($css) {
if(!preg_match_all('/@import\s+(?:url\([^)]+\)|"[^"]+")\s*[^;]*;\s*/', $css, $matches, PREG_OFFSET_CAPTURE)) {
return $css;
}
diff --git a/lib/exe/detail.php b/lib/exe/detail.php
index 7008b126f..7aae08f76 100644
--- a/lib/exe/detail.php
+++ b/lib/exe/detail.php
@@ -11,8 +11,8 @@ $ID = cleanID($INPUT->str('id'));
$INFO = array_merge(pageinfo(),mediainfo());
trigger_event('DETAIL_STARTED', $tmp=array());
-//close session
-session_write_close();
+//close session
+session_write_close();
if($conf['allowdebug'] && $INPUT->has('debug')){
print '<pre>';
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index 57bee8925..3ab117736 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -31,12 +31,12 @@ else header('Content-Type: text/plain');
$tmp = array(); // No event data
$evt = new Doku_Event('INDEXER_TASKS_RUN', $tmp);
if ($evt->advise_before()) {
- runIndexer() or
- runSitemapper() or
- sendDigest() or
- runTrimRecentChanges() or
- runTrimRecentChanges(true) or
- $evt->advise_after();
+ runIndexer() or
+ runSitemapper() or
+ sendDigest() or
+ runTrimRecentChanges() or
+ runTrimRecentChanges(true) or
+ $evt->advise_after();
}
if(!$output) {
@@ -85,13 +85,13 @@ function runTrimRecentChanges($media_changes = false) {
$out_lines = array();
for ($i=0; $i<count($lines); $i++) {
- $log = parseChangelogLine($lines[$i]);
- if ($log === false) continue; // discard junk
- if ($log['date'] < $trim_time) {
- $old_lines[$log['date'].".$i"] = $lines[$i]; // keep old lines for now (append .$i to prevent key collisions)
- } else {
- $out_lines[$log['date'].".$i"] = $lines[$i]; // definitely keep these lines
- }
+ $log = parseChangelogLine($lines[$i]);
+ if ($log === false) continue; // discard junk
+ if ($log['date'] < $trim_time) {
+ $old_lines[$log['date'].".$i"] = $lines[$i]; // keep old lines for now (append .$i to prevent key collisions)
+ } else {
+ $out_lines[$log['date'].".$i"] = $lines[$i]; // definitely keep these lines
+ }
}
if (count($lines)==count($out_lines)) {
diff --git a/lib/exe/js.php b/lib/exe/js.php
index 4b4b598de..76238a81b 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -194,8 +194,7 @@ function js_pluginscripts(){
*
* @author Gabriel Birke <birke@d-scribe.de>
*/
-function js_pluginstrings()
-{
+function js_pluginstrings() {
global $conf;
$pluginstrings = array();
$plugins = plugin_list();
diff --git a/lib/plugins/acl/lang/cs/lang.php b/lib/plugins/acl/lang/cs/lang.php
index a4e59287a..8031612f7 100644
--- a/lib/plugins/acl/lang/cs/lang.php
+++ b/lib/plugins/acl/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 Zbynek Krivka <zbynek.krivka@seznam.cz>
* @author tomas@valenta.cz
diff --git a/lib/plugins/acl/lang/de-informal/lang.php b/lib/plugins/acl/lang/de-informal/lang.php
index 3487f4257..35df13dc0 100644
--- a/lib/plugins/acl/lang/de-informal/lang.php
+++ b/lib/plugins/acl/lang/de-informal/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * German (informal) language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Alexander Fischer <tbanus@os-forge.net>
* @author Juergen Schwarzer <jschwarzer@freenet.de>
* @author Marcel Metz <marcel_metz@gmx.de>
diff --git a/lib/plugins/acl/lang/eo/lang.php b/lib/plugins/acl/lang/eo/lang.php
index de75c2dd7..a5f607341 100644
--- a/lib/plugins/acl/lang/eo/lang.php
+++ b/lib/plugins/acl/lang/eo/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Esperanto language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Felipe Castro <fefcas@uol.com.br>
* @author Felipo Kastro <fefcas@gmail.com>
* @author Felipe Castro <fefcas@gmail.com>
diff --git a/lib/plugins/acl/lang/ko/help.txt b/lib/plugins/acl/lang/ko/help.txt
index 96aa80c10..9baeedbb9 100644
--- a/lib/plugins/acl/lang/ko/help.txt
+++ b/lib/plugins/acl/lang/ko/help.txt
@@ -5,4 +5,4 @@
* 위쪽 입력 양식에서 선택된 사용자와 그룹의 접근 권한을 보거나 바꿀 수 있습니다.
* 아래 테이블에서 현재 설정된 모든 접근 제어 규칙을 볼 수 있으며, 즉시 여러 규칙을 삭제하거나 바꿀 수 있습니다.
-도쿠위키에서 접근 제어가 어떻게 동작되는지 알아보려면 [[doku>ko:acl|ACL 공식 문서]]를 읽어보시기 바랍니다. \ No newline at end of file
+도쿠위키에서 접근 제어가 어떻게 동작되는지 알아보려면 [[doku>ko:acl|ACL 공식 문서]]를 읽어보시기 바랍니다. \ No newline at end of file
diff --git a/lib/plugins/acl/lang/ne/lang.php b/lib/plugins/acl/lang/ne/lang.php
index 6a29a9fa8..5e6196a30 100644
--- a/lib/plugins/acl/lang/ne/lang.php
+++ b/lib/plugins/acl/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 SarojKumar Dhakal <lotusnagarkot@yahoo.com>
* @author Saroj Dhakal<lotusnagarkot@yahoo.com>
diff --git a/lib/plugins/acl/lang/pt-br/lang.php b/lib/plugins/acl/lang/pt-br/lang.php
index c49b430f8..ef0ae6c8b 100644
--- a/lib/plugins/acl/lang/pt-br/lang.php
+++ b/lib/plugins/acl/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>
diff --git a/lib/plugins/acl/lang/pt/lang.php b/lib/plugins/acl/lang/pt/lang.php
index d90bab624..4c2114d67 100644
--- a/lib/plugins/acl/lang/pt/lang.php
+++ b/lib/plugins/acl/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>
diff --git a/lib/plugins/acl/lang/ru/lang.php b/lib/plugins/acl/lang/ru/lang.php
index f042ab724..ff4740676 100644
--- a/lib/plugins/acl/lang/ru/lang.php
+++ b/lib/plugins/acl/lang/ru/lang.php
@@ -28,7 +28,7 @@ $lang['btn_select'] = 'Выбрать';
$lang['p_user_id'] = 'Сейчас пользователь <b class="acluser">%s</b> имеет следующие права на доступ к странице <b class="aclpage">%s</b>: <i>%s</i>.';
$lang['p_user_ns'] = 'Сейчас пользователь <b class="acluser">%s</b> имеет следующие права на доступ к пространству имён <b class="aclns">%s</b>: <i>%s</i>.';
$lang['p_group_id'] = 'Сейчас члены группы <b class="aclgroup">%s</b> имеют следующие права на доступ к странице <b class="aclpage">%s</b>: <i>%s</i>.';
-$lang['p_group_ns'] = 'Сейчас члены группы <b class="aclgroup">%s</b> cимеют следующие права на доступ к пространству имён <b class="aclns">%s</b>: <i>%s</i>.';
+$lang['p_group_ns'] = 'Сейчас члены группы <b class="aclgroup">%s</b> имеют следующие права на доступ к пространству имён <b class="aclns">%s</b>: <i>%s</i>.';
$lang['p_choose_id'] = 'Пожалуйста, <b>введите пользователя или группу</b> в форме выше, чтобы просмотреть или отредактировать права на доступ к странице <b class="aclpage">%s</b>.';
$lang['p_choose_ns'] = 'Пожалуйста, <b>введите пользователя или группу</b> в форме выше, чтобы просмотреть или отредактировать права на доступ к пространству имён <b class="aclns">%s</b>.';
$lang['p_inherited'] = 'Замечание: эти права доступа не были заданы явно, а были унаследованы от других групп или пространств имён более высокого порядка.';
diff --git a/lib/plugins/acl/lang/sl/lang.php b/lib/plugins/acl/lang/sl/lang.php
index 44e45e491..303b18cff 100644
--- a/lib/plugins/acl/lang/sl/lang.php
+++ b/lib/plugins/acl/lang/sl/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Slovenian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Dejan Levec <webphp@gmail.com>
* @author Boštjan Seničar <senicar@gmail.com>
* @author Gregor Skumavc (grega.skumavc@gmail.com)
diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php
index 8f6dfbcd9..6d5201cf6 100644
--- a/lib/plugins/acl/remote.php
+++ b/lib/plugins/acl/remote.php
@@ -16,14 +16,14 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin {
),
);
}
-
+
function addAcl($scope, $user, $level){
- $apa = plugin_load('admin', 'acl');
+ $apa = plugin_load('admin', 'acl');
return $apa->_acl_add($scope, $user, $level);
}
-
+
function delAcl($scope, $user){
- $apa = plugin_load('admin', 'acl');
+ $apa = plugin_load('admin', 'acl');
return $apa->_acl_del($scope, $user);
}
}
diff --git a/lib/plugins/action.php b/lib/plugins/action.php
index a2ad969d7..04b4f07a6 100644
--- a/lib/plugins/action.php
+++ b/lib/plugins/action.php
@@ -14,10 +14,10 @@ if(!defined('DOKU_INC')) die();
*/
class DokuWiki_Action_Plugin extends DokuWiki_Plugin {
- /**
- * Registers a callback function for a given event
- */
- function register(Doku_Event_Handler $controller) {
+ /**
+ * Registers a callback function for a given event
+ */
+ function register(Doku_Event_Handler $controller) {
trigger_error('register() not implemented in '.get_class($this), E_USER_WARNING);
- }
+ }
}
diff --git a/lib/plugins/authad/lang/cs/settings.php b/lib/plugins/authad/lang/cs/settings.php
index 71f83afda..28222d332 100644
--- a/lib/plugins/authad/lang/cs/settings.php
+++ b/lib/plugins/authad/lang/cs/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Czech language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author mkucera66@seznam.cz
*/
$lang['account_suffix'] = 'Přípona vašeho účtu, tj. <code>@moje.domena.org</code>';
diff --git a/lib/plugins/authad/lang/de-informal/settings.php b/lib/plugins/authad/lang/de-informal/settings.php
index a458617b8..782cf7c0f 100644
--- a/lib/plugins/authad/lang/de-informal/settings.php
+++ b/lib/plugins/authad/lang/de-informal/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * German (informal) language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Frank Loizzi <contact@software.bacal.de>
* @author Matthias Schulte <dokuwiki@lupo49.de>
* @author Volker Bödker <volker@boedker.de>
diff --git a/lib/plugins/authad/lang/eo/settings.php b/lib/plugins/authad/lang/eo/settings.php
index 8bd34b439..ee672ecd3 100644
--- a/lib/plugins/authad/lang/eo/settings.php
+++ b/lib/plugins/authad/lang/eo/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Esperanto language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
*/
$lang['account_suffix'] = 'Via konto-aldonaĵo, ekz. <code>@mia.domajno.lando</code>';
$lang['base_dn'] = 'Via baza DN, ekz. <code>DC=mia,DC=domajno,DC=lando</code>';
diff --git a/lib/plugins/authad/lang/pt-br/settings.php b/lib/plugins/authad/lang/pt-br/settings.php
index 56f37b75f..76fb419a6 100644
--- a/lib/plugins/authad/lang/pt-br/settings.php
+++ b/lib/plugins/authad/lang/pt-br/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Brazilian Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Victor Westmann <victor.westmann@gmail.com>
* @author Frederico Guimarães <frederico@teia.bio.br>
*/
diff --git a/lib/plugins/authad/lang/pt/settings.php b/lib/plugins/authad/lang/pt/settings.php
new file mode 100644
index 000000000..45eff5e96
--- /dev/null
+++ b/lib/plugins/authad/lang/pt/settings.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author André Neves <drakferion@gmail.com>
+ */
+$lang['admin_password'] = 'A senha para o utilizador acima.';
+$lang['sso'] = 'Deve ser usado o Single-Sign-On via Kerberos ou NTLM?';
+$lang['use_ssl'] = 'Usar ligação SSL? Se usada, não ative TLS abaixo.';
+$lang['use_tls'] = 'Usar ligação TLS? Se usada, não ative SSL abaixo.';
+$lang['expirywarn'] = 'Número de dias de avanço para avisar o utilizador da expiração da senha. 0 para desativar.';
diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php
index 4c394080e..f849c201a 100644
--- a/lib/plugins/authad/lang/ru/settings.php
+++ b/lib/plugins/authad/lang/ru/settings.php
@@ -1,6 +1,9 @@
<?php
+
/**
- * Russian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
+ * @author Aleksandr Selivanov <alexgearbox@gmail.com>
*/
+$lang['admin_password'] = 'Пароль для указанного пользователя.';
diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php
index 783d2a3ae..b2b5b59dc 100644
--- a/lib/plugins/authldap/lang/cs/settings.php
+++ b/lib/plugins/authldap/lang/cs/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Czech language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author mkucera66@seznam.cz
*/
$lang['server'] = 'Váš server LDAP. Buď jméno hosta (<code>localhost</code>) nebo plně kvalifikovaný popis URL (<code>ldap://server.tld:389</code>)';
diff --git a/lib/plugins/authldap/lang/de-informal/settings.php b/lib/plugins/authldap/lang/de-informal/settings.php
index 15e4d8129..bdac7dd68 100644
--- a/lib/plugins/authldap/lang/de-informal/settings.php
+++ b/lib/plugins/authldap/lang/de-informal/settings.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * German informal language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Matthias Schulte <dokuwiki@lupo49.de>
* @author Volker Bödker <volker@boedker.de>
*/
diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php
index b24c792f9..d788da876 100644
--- a/lib/plugins/authldap/lang/de/settings.php
+++ b/lib/plugins/authldap/lang/de/settings.php
@@ -4,6 +4,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
* @author Matthias Schulte <dokuwiki@lupo49.de>
+ * @author christian studer <cstuder@existenz.ch>
*/
$lang['server'] = 'Adresse zum LDAP-Server. Entweder als Hostname (<code>localhost</code>) oder als FQDN (<code>ldap://server.tld:389</code>).';
$lang['port'] = 'Port des LDAP-Servers, falls kein Port angegeben wurde.';
@@ -14,9 +15,14 @@ $lang['groupfilter'] = 'LDAP-Filter, um die Benutzergruppen zu suchen.
$lang['version'] = 'Zu verwendende Protokollversion von LDAP.';
$lang['starttls'] = 'Verbindung über TLS aufbauen?';
$lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)?';
+$lang['deref'] = 'Wie sollen Aliase aufgelöst werden?';
$lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: <code>cn=admin, dc=my, dc=home</code>.';
$lang['bindpw'] = 'Passwort des angegebenen Benutzers.';
$lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.';
$lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.';
$lang['groupkey'] = 'Gruppieren der Benutzeraccounts anhand eines beliebigen Benutzerattributes z. B. Telefonnummer oder Abteilung, anstelle der Standard-Gruppen).';
$lang['debug'] = 'Debug-Informationen beim Auftreten von Fehlern anzeigen?';
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
diff --git a/lib/plugins/authldap/lang/eo/settings.php b/lib/plugins/authldap/lang/eo/settings.php
index 2863a1125..07b46c84a 100644
--- a/lib/plugins/authldap/lang/eo/settings.php
+++ b/lib/plugins/authldap/lang/eo/settings.php
@@ -1,7 +1,9 @@
<?php
+
/**
- * Esperanto language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Felipe Castro <fefcas@yahoo.com.br>
*/
$lang['server'] = 'Via LDAP-servilo. Aŭ servila nomo (<code>localhost</code>) aŭ plene detala URL (<code>ldap://servilo.lando:389</code>)';
$lang['port'] = 'LDAP-servila pordego, se vi supre ne indikis la plenan URL';
@@ -12,9 +14,14 @@ $lang['groupfilter'] = 'LDAP-filtrilo por serĉi grupojn, ekz. <code>(
$lang['version'] = 'La uzenda protokolversio. Eble necesas indiki <code>3</code>';
$lang['starttls'] = 'Ĉu uzi TLS-konektojn?';
$lang['referrals'] = 'Ĉu sekvi referencojn?';
+$lang['deref'] = 'Kiel dereferencigi kromnomojn?';
$lang['binddn'] = 'DN de opcie bindita uzanto, se anonima bindado ne sufiĉas, ekz. <code>cn=admin, dc=mia, dc=hejmo</code>';
$lang['bindpw'] = 'Pasvorto de tiu uzanto';
$lang['userscope'] = 'Limigi serĉospacon de uzantaj serĉoj';
$lang['groupscope'] = 'Limigi serĉospacon por grupaj serĉoj';
$lang['groupkey'] = 'Grupa membreco de iu uzanta atributo (anstataŭ standardaj AD-grupoj), ekz. grupo de departemento aŭ telefonnumero';
$lang['debug'] = 'Ĉu montri aldonajn erarinformojn?';
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
diff --git a/lib/plugins/authldap/lang/ko/settings.php b/lib/plugins/authldap/lang/ko/settings.php
index 898b8f37a..5c5341b31 100644
--- a/lib/plugins/authldap/lang/ko/settings.php
+++ b/lib/plugins/authldap/lang/ko/settings.php
@@ -21,7 +21,7 @@ $lang['userscope'] = '사용자 찾기에 대한 찾기 범위 제
$lang['groupscope'] = '그룹 찾기에 대한 찾기 범위 제한';
$lang['groupkey'] = '(표준 AD 그룹 대신) 사용자 속성에서 그룹 구성원. 예를 들어 부서나 전화에서 그룹';
$lang['debug'] = '오류에 대한 추가적인 디버그 정보를 보이기';
-$lang['deref_o_0'] = 'LDAP_DEREF_없음(NEVER)';
-$lang['deref_o_1'] = 'LDAP_DEREF_검색(SEARCHING)';
-$lang['deref_o_2'] = 'LDAP_DEREF_발견(FINDING)';
-$lang['deref_o_3'] = 'LDAP_DEREF_항상(ALWAYS)';
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS';
diff --git a/lib/plugins/authldap/lang/pt-br/settings.php b/lib/plugins/authldap/lang/pt-br/settings.php
index d12a9cf36..6ad6b4862 100644
--- a/lib/plugins/authldap/lang/pt-br/settings.php
+++ b/lib/plugins/authldap/lang/pt-br/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Brazilian Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Victor Westmann <victor.westmann@gmail.com>
* @author Frederico Guimarães <frederico@teia.bio.br>
*/
diff --git a/lib/plugins/authldap/lang/pt/settings.php b/lib/plugins/authldap/lang/pt/settings.php
new file mode 100644
index 000000000..a2ccf87ad
--- /dev/null
+++ b/lib/plugins/authldap/lang/pt/settings.php
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author André Neves <drakferion@gmail.com>
+ */
+$lang['server'] = 'O seu servidor de LDAP. Ou hostname (<code>localhost</code>) ou URL qualificado completo (<code>ldap://servidor.tld:389</code>)';
+$lang['port'] = 'Porta de servidor de LDAP se o URL completo não foi fornecido acima';
+$lang['usertree'] = 'Onde encontrar as contas de utilizador. Por exemplo <code>ou=Pessoas, dc=servidor, dc=tld</code>';
+$lang['grouptree'] = 'Onde encontrar os grupos de utilizadores. Por exemplo code>ou=Grupo, dc=servidor, dc=tld</code>';
+$lang['userfilter'] = 'Filtro LDAP para procurar por contas de utilizador. Por exemplo <code>(&amp;(uid=%{user})(objectClass=posixAccount))</code>';
+$lang['groupfilter'] = 'Filtro LDAP para procurar por grupos. Por exemplo <code>(&amp;(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>';
+$lang['version'] = 'A versão do protocolo a utilizar. Pode precisar de alterar isto para <code>3</code>';
+$lang['starttls'] = 'Usar ligações TLS?';
+$lang['referrals'] = 'Referrals devem ser seguidos?';
+$lang['bindpw'] = 'Senha do utilizador acima';
+$lang['debug'] = 'Mostrar informação adicional de debug aquando de erros';
diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php
index 4c394080e..70ad7b6f4 100644
--- a/lib/plugins/authldap/lang/ru/settings.php
+++ b/lib/plugins/authldap/lang/ru/settings.php
@@ -1,6 +1,9 @@
<?php
+
/**
- * Russian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
+ * @author Aleksandr Selivanov <alexgearbox@gmail.com>
*/
+$lang['bindpw'] = 'Пароль для указанного пользователя.';
diff --git a/lib/plugins/authmysql/lang/cs/settings.php b/lib/plugins/authmysql/lang/cs/settings.php
index 7fedefbbb..350c3236b 100644
--- a/lib/plugins/authmysql/lang/cs/settings.php
+++ b/lib/plugins/authmysql/lang/cs/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Czech language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author mkucera66@seznam.cz
*/
$lang['server'] = 'Váš server MySQL';
diff --git a/lib/plugins/authmysql/lang/de-informal/settings.php b/lib/plugins/authmysql/lang/de-informal/settings.php
index 540979cf4..d8d2778b9 100644
--- a/lib/plugins/authmysql/lang/de-informal/settings.php
+++ b/lib/plugins/authmysql/lang/de-informal/settings.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * German informal language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Matthias Schulte <dokuwiki@lupo49.de>
* @author Volker Bödker <volker@boedker.de>
*/
diff --git a/lib/plugins/authmysql/lang/eo/settings.php b/lib/plugins/authmysql/lang/eo/settings.php
index 907c761f8..92e973396 100644
--- a/lib/plugins/authmysql/lang/eo/settings.php
+++ b/lib/plugins/authmysql/lang/eo/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Esperanto language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
*/
$lang['server'] = 'Via MySQL-servilo';
$lang['user'] = 'MySQL uzantonomo';
diff --git a/lib/plugins/authmysql/lang/pt-br/settings.php b/lib/plugins/authmysql/lang/pt-br/settings.php
index 8ac775b54..1181a0b27 100644
--- a/lib/plugins/authmysql/lang/pt-br/settings.php
+++ b/lib/plugins/authmysql/lang/pt-br/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Brazilian Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Victor Westmann <victor.westmann@gmail.com>
* @author Frederico Guimarães <frederico@teia.bio.br>
*/
diff --git a/lib/plugins/authmysql/lang/pt/settings.php b/lib/plugins/authmysql/lang/pt/settings.php
new file mode 100644
index 000000000..0c7f303e7
--- /dev/null
+++ b/lib/plugins/authmysql/lang/pt/settings.php
@@ -0,0 +1,23 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author André Neves <drakferion@gmail.com>
+ */
+$lang['server'] = 'O seu servidor de MySQL';
+$lang['user'] = 'Utilizador MySQL';
+$lang['password'] = 'Senha para o utilizador acima';
+$lang['database'] = 'Base de dados a usar';
+$lang['debug'] = 'Mostrar informação adicional de debug';
+$lang['FilterLogin'] = 'Cláusula SQL para filtrar utilizadores por tipo de login';
+$lang['FilterName'] = 'Cláusula SQL para filtrar utilizadores por nome completo';
+$lang['FilterEmail'] = 'Cláusula SQL para filtrar utilizadores por endereço de email';
+$lang['FilterGroup'] = 'Cláusula SQL para filtrar utilizadores por pertença a grupo';
+$lang['SortOrder'] = 'Cláusula SQL para ordenar utilizadores';
+$lang['UpdateLogin'] = 'Cláusula de atualização para atualizar o nome de login do utilizador';
+$lang['UpdatePass'] = 'Cláusula de atualização para atualizar a senha do utilizador';
+$lang['UpdateEmail'] = 'Cláusula de atualização para atualizar o endereço de email do utilizador';
+$lang['UpdateName'] = 'Cláusula de atualização para atualizar o nome completo do utilizador';
+$lang['debug_o_0'] = 'nenhum';
+$lang['debug_o_1'] = 'só aquando de erros';
diff --git a/lib/plugins/authmysql/lang/sl/settings.php b/lib/plugins/authmysql/lang/sl/settings.php
new file mode 100644
index 000000000..5e82816df
--- /dev/null
+++ b/lib/plugins/authmysql/lang/sl/settings.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Matej Urbančič <mateju@svn.gnome.org>
+ */
+$lang['database'] = 'Podatkovna zbirka za uporabo';
+$lang['debug_o_0'] = 'brez';
+$lang['debug_o_1'] = 'le ob napakah';
+$lang['debug_o_2'] = 'vse poizvedbe SQL';
diff --git a/lib/plugins/authpgsql/lang/cs/settings.php b/lib/plugins/authpgsql/lang/cs/settings.php
index 06abe86f4..aec7eecf1 100644
--- a/lib/plugins/authpgsql/lang/cs/settings.php
+++ b/lib/plugins/authpgsql/lang/cs/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Czech language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author mkucera66@seznam.cz
*/
$lang['server'] = 'Váš server PostgreSQL';
diff --git a/lib/plugins/authpgsql/lang/de-informal/settings.php b/lib/plugins/authpgsql/lang/de-informal/settings.php
index d864d14d4..3e3a0dc4e 100644
--- a/lib/plugins/authpgsql/lang/de-informal/settings.php
+++ b/lib/plugins/authpgsql/lang/de-informal/settings.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * German language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Matthias Schulte <dokuwiki@lupo49.de>
* @author Volker Bödker <volker@boedker.de>
*/
diff --git a/lib/plugins/authpgsql/lang/eo/settings.php b/lib/plugins/authpgsql/lang/eo/settings.php
index dbdfdd41b..2f59c4914 100644
--- a/lib/plugins/authpgsql/lang/eo/settings.php
+++ b/lib/plugins/authpgsql/lang/eo/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Esperanto language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
*/
$lang['server'] = 'Via PostgreSQL-servilo';
$lang['port'] = 'Via PostgreSQL-servila pordego';
diff --git a/lib/plugins/authpgsql/lang/pt-br/settings.php b/lib/plugins/authpgsql/lang/pt-br/settings.php
index 5ffe13465..8d7725392 100644
--- a/lib/plugins/authpgsql/lang/pt-br/settings.php
+++ b/lib/plugins/authpgsql/lang/pt-br/settings.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Brazilian Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Victor Westmann <victor.westmann@gmail.com>
* @author Frederico Guimarães <frederico@teia.bio.br>
*/
diff --git a/lib/plugins/authpgsql/lang/pt/settings.php b/lib/plugins/authpgsql/lang/pt/settings.php
new file mode 100644
index 000000000..b33b81141
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/pt/settings.php
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author André Neves <drakferion@gmail.com>
+ */
+$lang['server'] = 'O seu servidor PostgreSQL';
+$lang['port'] = 'A porta do seu servidor PostgreSQL';
+$lang['user'] = 'Nome de utilizador PostgreSQL';
+$lang['password'] = 'Senha do utilizador acima';
+$lang['database'] = 'Base de dados a usar';
+$lang['debug'] = 'Mostrar informação adicional de debug';
+$lang['FilterLogin'] = 'Cláusula SQL para filtrar utilizadores por nome de login';
+$lang['FilterName'] = 'Cláusula SQL para filtrar utilizadores por nome completo';
+$lang['FilterEmail'] = 'Cláusula SQL para filtrar utilizadores por endereço de email';
+$lang['FilterGroup'] = 'Cláusula SQL para filtrar utilizadores por pertença a grupo';
+$lang['SortOrder'] = 'Cláusula SQL para ordenar utilizadores';
+$lang['UpdateLogin'] = 'Cláusula de atualização para atualizar o nome de login do utilizador';
+$lang['UpdatePass'] = 'Cláusula de atualização para atualizar a senha do utilizador';
+$lang['UpdateEmail'] = 'Cláusula de atualização para atualizar o endereço de email do utilizador';
+$lang['UpdateName'] = 'Cláusula de atualização para atualizar o nome completo do utilizador';
diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php
index 4c394080e..f5d0a77ee 100644
--- a/lib/plugins/authpgsql/lang/ru/settings.php
+++ b/lib/plugins/authpgsql/lang/ru/settings.php
@@ -1,6 +1,10 @@
<?php
+
/**
- * Russian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua)
+ * @author Aleksandr Selivanov <alexgearbox@gmail.com>
*/
+$lang['server'] = 'Ваш PostgreSQL-сервер';
+$lang['password'] = 'Пароль для указанного пользователя.';
diff --git a/lib/plugins/authpgsql/lang/sl/settings.php b/lib/plugins/authpgsql/lang/sl/settings.php
new file mode 100644
index 000000000..4c369abc0
--- /dev/null
+++ b/lib/plugins/authpgsql/lang/sl/settings.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Matej Urbančič <mateju@svn.gnome.org>
+ */
+$lang['database'] = 'Podatkovna zbirka za uporabo';
diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php
index 29529760c..835d27775 100644
--- a/lib/plugins/config/admin.php
+++ b/lib/plugins/config/admin.php
@@ -38,168 +38,168 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
* handle user request
*/
function handle() {
- global $ID, $INPUT;
+ global $ID, $INPUT;
- if (!$this->_restore_session()) return $this->_close_session();
- if ($INPUT->int('save') != 1) return $this->_close_session();
- if (!checkSecurityToken()) return $this->_close_session();
+ if (!$this->_restore_session()) return $this->_close_session();
+ if ($INPUT->int('save') != 1) return $this->_close_session();
+ if (!checkSecurityToken()) return $this->_close_session();
- if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
+ if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
- // don't go any further if the configuration is locked
- if ($this->_config->_locked) return $this->_close_session();
+ // don't go any further if the configuration is locked
+ if ($this->_config->_locked) return $this->_close_session();
- $this->_input = $INPUT->arr('config');
+ $this->_input = $INPUT->arr('config');
- while (list($key) = each($this->_config->setting)) {
- $input = isset($this->_input[$key]) ? $this->_input[$key] : NULL;
- if ($this->_config->setting[$key]->update($input)) {
- $this->_changed = true;
+ while (list($key) = each($this->_config->setting)) {
+ $input = isset($this->_input[$key]) ? $this->_input[$key] : null;
+ if ($this->_config->setting[$key]->update($input)) {
+ $this->_changed = true;
+ }
+ if ($this->_config->setting[$key]->error()) $this->_error = true;
}
- if ($this->_config->setting[$key]->error()) $this->_error = true;
- }
- if ($this->_changed && !$this->_error) {
- $this->_config->save_settings($this->getPluginName());
+ if ($this->_changed && !$this->_error) {
+ $this->_config->save_settings($this->getPluginName());
- // save state & force a page reload to get the new settings to take effect
- $_SESSION['PLUGIN_CONFIG'] = array('state' => 'updated', 'time' => time());
- $this->_close_session();
- send_redirect(wl($ID,array('do'=>'admin','page'=>'config'),true,'&'));
- exit();
- } elseif(!$this->_error) {
- $this->_config->touch_settings(); // just touch to refresh cache
- }
+ // save state & force a page reload to get the new settings to take effect
+ $_SESSION['PLUGIN_CONFIG'] = array('state' => 'updated', 'time' => time());
+ $this->_close_session();
+ send_redirect(wl($ID,array('do'=>'admin','page'=>'config'),true,'&'));
+ exit();
+ } elseif(!$this->_error) {
+ $this->_config->touch_settings(); // just touch to refresh cache
+ }
- $this->_close_session();
+ $this->_close_session();
}
/**
* output appropriate html
*/
function html() {
- $allow_debug = $GLOBALS['conf']['allowdebug']; // avoid global $conf; here.
- global $lang;
- global $ID;
-
- if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
- $this->setupLocale(true);
-
- print $this->locale_xhtml('intro');
-
- ptln('<div id="config__manager">');
-
- if ($this->_config->locked)
- ptln('<div class="info">'.$this->getLang('locked').'</div>');
- elseif ($this->_error)
- ptln('<div class="error">'.$this->getLang('error').'</div>');
- elseif ($this->_changed)
- ptln('<div class="success">'.$this->getLang('updated').'</div>');
-
- // POST to script() instead of wl($ID) so config manager still works if
- // rewrite config is broken. Add $ID as hidden field to remember
- // current ID in most cases.
- ptln('<form action="'.script().'" method="post">');
- ptln('<div class="no"><input type="hidden" name="id" value="'.$ID.'" /></div>');
- formSecurityToken();
- $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki'));
-
- $undefined_settings = array();
- $in_fieldset = false;
- $first_plugin_fieldset = true;
- $first_template_fieldset = true;
- foreach($this->_config->setting as $setting) {
- if (is_a($setting, 'setting_hidden')) {
- // skip hidden (and undefined) settings
- if ($allow_debug && is_a($setting, 'setting_undefined')) {
- $undefined_settings[] = $setting;
- } else {
- continue;
- }
- } else if (is_a($setting, 'setting_fieldset')) {
- // config setting group
- if ($in_fieldset) {
- ptln(' </table>');
- ptln(' </div>');
- ptln(' </fieldset>');
- } else {
- $in_fieldset = true;
- }
- if ($first_plugin_fieldset && substr($setting->_key, 0, 10)=='plugin'.CM_KEYMARKER) {
- $this->_print_h1('plugin_settings', $this->getLang('_header_plugin'));
- $first_plugin_fieldset = false;
- } else if ($first_template_fieldset && substr($setting->_key, 0, 7)=='tpl'.CM_KEYMARKER) {
- $this->_print_h1('template_settings', $this->getLang('_header_template'));
- $first_template_fieldset = false;
- }
- ptln(' <fieldset id="'.$setting->_key.'">');
- ptln(' <legend>'.$setting->prompt($this).'</legend>');
- ptln(' <div class="table">');
- ptln(' <table class="inline">');
- } else {
- // config settings
- list($label,$input) = $setting->html($this, $this->_error);
-
- $class = $setting->is_default() ? ' class="default"' : ($setting->is_protected() ? ' class="protected"' : '');
- $error = $setting->error() ? ' class="value error"' : ' class="value"';
- $icon = $setting->caution() ? '<img src="'.DOKU_PLUGIN_IMAGES.$setting->caution().'.png" alt="'.$setting->caution().'" title="'.$this->getLang($setting->caution()).'" />' : '';
-
- ptln(' <tr'.$class.'>');
- ptln(' <td class="label">');
- ptln(' <span class="outkey">'.$setting->_out_key(true, true).'</span>');
- ptln(' '.$icon.$label);
- ptln(' </td>');
- ptln(' <td'.$error.'>'.$input.'</td>');
- ptln(' </tr>');
+ $allow_debug = $GLOBALS['conf']['allowdebug']; // avoid global $conf; here.
+ global $lang;
+ global $ID;
+
+ if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
+ $this->setupLocale(true);
+
+ print $this->locale_xhtml('intro');
+
+ ptln('<div id="config__manager">');
+
+ if ($this->_config->locked)
+ ptln('<div class="info">'.$this->getLang('locked').'</div>');
+ elseif ($this->_error)
+ ptln('<div class="error">'.$this->getLang('error').'</div>');
+ elseif ($this->_changed)
+ ptln('<div class="success">'.$this->getLang('updated').'</div>');
+
+ // POST to script() instead of wl($ID) so config manager still works if
+ // rewrite config is broken. Add $ID as hidden field to remember
+ // current ID in most cases.
+ ptln('<form action="'.script().'" method="post">');
+ ptln('<div class="no"><input type="hidden" name="id" value="'.$ID.'" /></div>');
+ formSecurityToken();
+ $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki'));
+
+ $undefined_settings = array();
+ $in_fieldset = false;
+ $first_plugin_fieldset = true;
+ $first_template_fieldset = true;
+ foreach($this->_config->setting as $setting) {
+ if (is_a($setting, 'setting_hidden')) {
+ // skip hidden (and undefined) settings
+ if ($allow_debug && is_a($setting, 'setting_undefined')) {
+ $undefined_settings[] = $setting;
+ } else {
+ continue;
+ }
+ } else if (is_a($setting, 'setting_fieldset')) {
+ // config setting group
+ if ($in_fieldset) {
+ ptln(' </table>');
+ ptln(' </div>');
+ ptln(' </fieldset>');
+ } else {
+ $in_fieldset = true;
+ }
+ if ($first_plugin_fieldset && substr($setting->_key, 0, 10)=='plugin'.CM_KEYMARKER) {
+ $this->_print_h1('plugin_settings', $this->getLang('_header_plugin'));
+ $first_plugin_fieldset = false;
+ } else if ($first_template_fieldset && substr($setting->_key, 0, 7)=='tpl'.CM_KEYMARKER) {
+ $this->_print_h1('template_settings', $this->getLang('_header_template'));
+ $first_template_fieldset = false;
+ }
+ ptln(' <fieldset id="'.$setting->_key.'">');
+ ptln(' <legend>'.$setting->prompt($this).'</legend>');
+ ptln(' <div class="table">');
+ ptln(' <table class="inline">');
+ } else {
+ // config settings
+ list($label,$input) = $setting->html($this, $this->_error);
+
+ $class = $setting->is_default() ? ' class="default"' : ($setting->is_protected() ? ' class="protected"' : '');
+ $error = $setting->error() ? ' class="value error"' : ' class="value"';
+ $icon = $setting->caution() ? '<img src="'.DOKU_PLUGIN_IMAGES.$setting->caution().'.png" alt="'.$setting->caution().'" title="'.$this->getLang($setting->caution()).'" />' : '';
+
+ ptln(' <tr'.$class.'>');
+ ptln(' <td class="label">');
+ ptln(' <span class="outkey">'.$setting->_out_key(true, true).'</span>');
+ ptln(' '.$icon.$label);
+ ptln(' </td>');
+ ptln(' <td'.$error.'>'.$input.'</td>');
+ ptln(' </tr>');
+ }
}
- }
- ptln(' </table>');
- ptln(' </div>');
- if ($in_fieldset) {
- ptln(' </fieldset>');
- }
+ ptln(' </table>');
+ ptln(' </div>');
+ if ($in_fieldset) {
+ ptln(' </fieldset>');
+ }
- // show undefined settings list
- if ($allow_debug && !empty($undefined_settings)) {
- function _setting_natural_comparison($a, $b) { return strnatcmp($a->_key, $b->_key); }
- usort($undefined_settings, '_setting_natural_comparison');
- $this->_print_h1('undefined_settings', $this->getLang('_header_undefined'));
- ptln('<fieldset>');
- ptln('<div class="table">');
- ptln('<table class="inline">');
- $undefined_setting_match = array();
- foreach($undefined_settings as $setting) {
- if (preg_match('/^(?:plugin|tpl)'.CM_KEYMARKER.'.*?'.CM_KEYMARKER.'(.*)$/', $setting->_key, $undefined_setting_match)) {
- $undefined_setting_key = $undefined_setting_match[1];
- } else {
- $undefined_setting_key = $setting->_key;
- }
- ptln(' <tr>');
- ptln(' <td class="label"><span title="$meta[\''.$undefined_setting_key.'\']">$'.$this->_config->_name.'[\''.$setting->_out_key().'\']</span></td>');
- ptln(' <td>'.$this->getLang('_msg_'.get_class($setting)).'</td>');
- ptln(' </tr>');
+ // show undefined settings list
+ if ($allow_debug && !empty($undefined_settings)) {
+ function _setting_natural_comparison($a, $b) { return strnatcmp($a->_key, $b->_key); }
+ usort($undefined_settings, '_setting_natural_comparison');
+ $this->_print_h1('undefined_settings', $this->getLang('_header_undefined'));
+ ptln('<fieldset>');
+ ptln('<div class="table">');
+ ptln('<table class="inline">');
+ $undefined_setting_match = array();
+ foreach($undefined_settings as $setting) {
+ if (preg_match('/^(?:plugin|tpl)'.CM_KEYMARKER.'.*?'.CM_KEYMARKER.'(.*)$/', $setting->_key, $undefined_setting_match)) {
+ $undefined_setting_key = $undefined_setting_match[1];
+ } else {
+ $undefined_setting_key = $setting->_key;
+ }
+ ptln(' <tr>');
+ ptln(' <td class="label"><span title="$meta[\''.$undefined_setting_key.'\']">$'.$this->_config->_name.'[\''.$setting->_out_key().'\']</span></td>');
+ ptln(' <td>'.$this->getLang('_msg_'.get_class($setting)).'</td>');
+ ptln(' </tr>');
+ }
+ ptln('</table>');
+ ptln('</div>');
+ ptln('</fieldset>');
}
- ptln('</table>');
- ptln('</div>');
- ptln('</fieldset>');
- }
- // finish up form
- ptln('<p>');
- ptln(' <input type="hidden" name="do" value="admin" />');
- ptln(' <input type="hidden" name="page" value="config" />');
+ // finish up form
+ ptln('<p>');
+ ptln(' <input type="hidden" name="do" value="admin" />');
+ ptln(' <input type="hidden" name="page" value="config" />');
- if (!$this->_config->locked) {
- ptln(' <input type="hidden" name="save" value="1" />');
- ptln(' <input type="submit" name="submit" class="button" value="'.$lang['btn_save'].'" accesskey="s" />');
- ptln(' <input type="reset" class="button" value="'.$lang['btn_reset'].'" />');
- }
+ if (!$this->_config->locked) {
+ ptln(' <input type="hidden" name="save" value="1" />');
+ ptln(' <input type="submit" name="submit" class="button" value="'.$lang['btn_save'].'" accesskey="s" />');
+ ptln(' <input type="reset" class="button" value="'.$lang['btn_reset'].'" />');
+ }
- ptln('</p>');
+ ptln('</p>');
- ptln('</form>');
- ptln('</div>');
+ ptln('</form>');
+ ptln('</div>');
}
/**
@@ -207,28 +207,28 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
*/
function _restore_session() {
- // dokuwiki closes the session before act_dispatch. $_SESSION variables are all set,
- // however they can't be changed without starting the session again
- if (!headers_sent()) {
- session_start();
- $this->_session_started = true;
- }
+ // dokuwiki closes the session before act_dispatch. $_SESSION variables are all set,
+ // however they can't be changed without starting the session again
+ if (!headers_sent()) {
+ session_start();
+ $this->_session_started = true;
+ }
- if (!isset($_SESSION['PLUGIN_CONFIG'])) return true;
+ if (!isset($_SESSION['PLUGIN_CONFIG'])) return true;
- $session = $_SESSION['PLUGIN_CONFIG'];
- unset($_SESSION['PLUGIN_CONFIG']);
+ $session = $_SESSION['PLUGIN_CONFIG'];
+ unset($_SESSION['PLUGIN_CONFIG']);
- // still valid?
- if (time() - $session['time'] > 120) return true;
+ // still valid?
+ if (time() - $session['time'] > 120) return true;
- switch ($session['state']) {
- case 'updated' :
- $this->_changed = true;
- return false;
- }
+ switch ($session['state']) {
+ case 'updated' :
+ $this->_changed = true;
+ return false;
+ }
- return true;
+ return true;
}
function _close_session() {
@@ -237,62 +237,62 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
function setupLocale($prompts=false) {
- parent::setupLocale();
- if (!$prompts || $this->_localised_prompts) return;
+ parent::setupLocale();
+ if (!$prompts || $this->_localised_prompts) return;
- $this->_setup_localised_plugin_prompts();
- $this->_localised_prompts = true;
+ $this->_setup_localised_plugin_prompts();
+ $this->_localised_prompts = true;
}
function _setup_localised_plugin_prompts() {
- global $conf;
-
- $langfile = '/lang/'.$conf['lang'].'/settings.php';
- $enlangfile = '/lang/en/settings.php';
+ global $conf;
+
+ $langfile = '/lang/'.$conf['lang'].'/settings.php';
+ $enlangfile = '/lang/en/settings.php';
+
+ if ($dh = opendir(DOKU_PLUGIN)) {
+ while (false !== ($plugin = readdir($dh))) {
+ if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp' || $plugin == 'config') continue;
+ if (is_file(DOKU_PLUGIN.$plugin)) continue;
+
+ if (@file_exists(DOKU_PLUGIN.$plugin.$enlangfile)){
+ $lang = array();
+ @include(DOKU_PLUGIN.$plugin.$enlangfile);
+ if ($conf['lang'] != 'en') @include(DOKU_PLUGIN.$plugin.$langfile);
+ foreach ($lang as $key => $value){
+ $this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value;
+ }
+ }
+
+ // fill in the plugin name if missing (should exist for plugins with settings)
+ if (!isset($this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'])) {
+ $this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'] =
+ ucwords(str_replace('_', ' ', $plugin));
+ }
+ }
+ closedir($dh);
+ }
- if ($dh = opendir(DOKU_PLUGIN)) {
- while (false !== ($plugin = readdir($dh))) {
- if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp' || $plugin == 'config') continue;
- if (is_file(DOKU_PLUGIN.$plugin)) continue;
+ // the same for the active template
+ $tpl = $conf['template'];
- if (@file_exists(DOKU_PLUGIN.$plugin.$enlangfile)){
+ if (@file_exists(tpl_incdir().$enlangfile)){
$lang = array();
- @include(DOKU_PLUGIN.$plugin.$enlangfile);
- if ($conf['lang'] != 'en') @include(DOKU_PLUGIN.$plugin.$langfile);
+ @include(tpl_incdir().$enlangfile);
+ if ($conf['lang'] != 'en') @include(tpl_incdir().$langfile);
foreach ($lang as $key => $value){
- $this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value;
+ $this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value;
}
- }
-
- // fill in the plugin name if missing (should exist for plugins with settings)
- if (!isset($this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'])) {
- $this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'] =
- ucwords(str_replace('_', ' ', $plugin));
- }
}
- closedir($dh);
- }
-
- // the same for the active template
- $tpl = $conf['template'];
- if (@file_exists(tpl_incdir().$enlangfile)){
- $lang = array();
- @include(tpl_incdir().$enlangfile);
- if ($conf['lang'] != 'en') @include(tpl_incdir().$langfile);
- foreach ($lang as $key => $value){
- $this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value;
+ // fill in the template name if missing (should exist for templates with settings)
+ if (!isset($this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'])) {
+ $this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'] =
+ ucwords(str_replace('_', ' ', $tpl));
}
- }
-
- // fill in the template name if missing (should exist for templates with settings)
- if (!isset($this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'])) {
- $this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'] =
- ucwords(str_replace('_', ' ', $tpl));
- }
- return true;
+ return true;
}
/**
@@ -301,59 +301,59 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
* @author Ben Coburn <btcoburn@silicodon.net>
*/
function getTOC() {
- if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
- $this->setupLocale(true);
-
- $allow_debug = $GLOBALS['conf']['allowdebug']; // avoid global $conf; here.
-
- // gather toc data
- $has_undefined = false;
- $toc = array('conf'=>array(), 'plugin'=>array(), 'template'=>null);
- foreach($this->_config->setting as $setting) {
- if (is_a($setting, 'setting_fieldset')) {
- if (substr($setting->_key, 0, 10)=='plugin'.CM_KEYMARKER) {
- $toc['plugin'][] = $setting;
- } else if (substr($setting->_key, 0, 7)=='tpl'.CM_KEYMARKER) {
- $toc['template'] = $setting;
- } else {
- $toc['conf'][] = $setting;
- }
- } else if (!$has_undefined && is_a($setting, 'setting_undefined')) {
- $has_undefined = true;
+ if (is_null($this->_config)) { $this->_config = new configuration($this->_file); }
+ $this->setupLocale(true);
+
+ $allow_debug = $GLOBALS['conf']['allowdebug']; // avoid global $conf; here.
+
+ // gather toc data
+ $has_undefined = false;
+ $toc = array('conf'=>array(), 'plugin'=>array(), 'template'=>null);
+ foreach($this->_config->setting as $setting) {
+ if (is_a($setting, 'setting_fieldset')) {
+ if (substr($setting->_key, 0, 10)=='plugin'.CM_KEYMARKER) {
+ $toc['plugin'][] = $setting;
+ } else if (substr($setting->_key, 0, 7)=='tpl'.CM_KEYMARKER) {
+ $toc['template'] = $setting;
+ } else {
+ $toc['conf'][] = $setting;
+ }
+ } else if (!$has_undefined && is_a($setting, 'setting_undefined')) {
+ $has_undefined = true;
+ }
}
- }
- // build toc
- $t = array();
+ // build toc
+ $t = array();
- $t[] = html_mktocitem('configuration_manager', $this->getLang('_configuration_manager'), 1);
- $t[] = html_mktocitem('dokuwiki_settings', $this->getLang('_header_dokuwiki'), 1);
- foreach($toc['conf'] as $setting) {
- $name = $setting->prompt($this);
- $t[] = html_mktocitem($setting->_key, $name, 2);
- }
- if (!empty($toc['plugin'])) {
- $t[] = html_mktocitem('plugin_settings', $this->getLang('_header_plugin'), 1);
- }
- foreach($toc['plugin'] as $setting) {
- $name = $setting->prompt($this);
- $t[] = html_mktocitem($setting->_key, $name, 2);
- }
- if (isset($toc['template'])) {
- $t[] = html_mktocitem('template_settings', $this->getLang('_header_template'), 1);
- $setting = $toc['template'];
- $name = $setting->prompt($this);
- $t[] = html_mktocitem($setting->_key, $name, 2);
- }
- if ($has_undefined && $allow_debug) {
- $t[] = html_mktocitem('undefined_settings', $this->getLang('_header_undefined'), 1);
- }
+ $t[] = html_mktocitem('configuration_manager', $this->getLang('_configuration_manager'), 1);
+ $t[] = html_mktocitem('dokuwiki_settings', $this->getLang('_header_dokuwiki'), 1);
+ foreach($toc['conf'] as $setting) {
+ $name = $setting->prompt($this);
+ $t[] = html_mktocitem($setting->_key, $name, 2);
+ }
+ if (!empty($toc['plugin'])) {
+ $t[] = html_mktocitem('plugin_settings', $this->getLang('_header_plugin'), 1);
+ }
+ foreach($toc['plugin'] as $setting) {
+ $name = $setting->prompt($this);
+ $t[] = html_mktocitem($setting->_key, $name, 2);
+ }
+ if (isset($toc['template'])) {
+ $t[] = html_mktocitem('template_settings', $this->getLang('_header_template'), 1);
+ $setting = $toc['template'];
+ $name = $setting->prompt($this);
+ $t[] = html_mktocitem($setting->_key, $name, 2);
+ }
+ if ($has_undefined && $allow_debug) {
+ $t[] = html_mktocitem('undefined_settings', $this->getLang('_header_undefined'), 1);
+ }
- return $t;
+ return $t;
}
function _print_h1($id, $text) {
- ptln('<h1 id="'.$id.'">'.$text.'</h1>');
+ ptln('<h1 id="'.$id.'">'.$text.'</h1>');
}
diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php
index 67d3ce51f..cdef85a85 100644
--- a/lib/plugins/config/lang/en/lang.php
+++ b/lib/plugins/config/lang/en/lang.php
@@ -63,7 +63,7 @@ $lang['baseurl'] = 'Server URL (eg. <code>http://www.yourserver.com</code>).
$lang['cookiedir'] = 'Cookie path. Leave blank for using baseurl.';
$lang['dmode'] = 'Directory creation mode';
$lang['fmode'] = 'File creation mode';
-$lang['allowdebug'] = 'Allow debug <b>disable if not needed!</b>';
+$lang['allowdebug'] = 'Allow debug. <b>Disable if not needed!</b>';
/* Display Settings */
$lang['recent'] = 'Number of entries per page in the recent changes';
@@ -83,7 +83,7 @@ $lang['camelcase'] = 'Use CamelCase for links';
$lang['deaccent'] = 'How to clean pagenames';
$lang['useheading'] = 'Use first heading for pagenames';
$lang['sneaky_index'] = 'By default, DokuWiki will show all namespaces in the sitemap. Enabling this option will hide those where the user doesn\'t have read permissions. This might result in hiding of accessable subnamespaces which may make the index unusable with certain ACL setups.';
-$lang['hidepages'] = 'Hide pages matching this regular expressions from search, the sitemap and other automatic indexes';
+$lang['hidepages'] = 'Hide pages matching this regular expression from search, the sitemap and other automatic indexes';
/* Authentication Settings */
$lang['useacl'] = 'Use access control lists';
@@ -181,7 +181,7 @@ $lang['proxy____port'] = 'Proxy port';
$lang['proxy____user'] = 'Proxy user name';
$lang['proxy____pass'] = 'Proxy password';
$lang['proxy____ssl'] = 'Use SSL to connect to proxy';
-$lang['proxy____except'] = 'Regular expression to match URLs for which the proxy should be skipped for.';
+$lang['proxy____except'] = 'Regular expression to match URLs for which the proxy should be skipped.';
/* Safemode Hack */
$lang['safemodehack'] = 'Enable safemode hack';
diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php
index 6de560128..182a4c65f 100644
--- a/lib/plugins/config/settings/config.class.php
+++ b/lib/plugins/config/settings/config.class.php
@@ -1,9 +1,9 @@
<?php
/**
- * Configuration Class and generic setting classes
+ * Configuration Class and generic setting classes
*
- * @author Chris Smith <chris@jalakai.co.uk>
- * @author Ben Coburn <btcoburn@silicodon.net>
+ * @author Chris Smith <chris@jalakai.co.uk>
+ * @author Ben Coburn <btcoburn@silicodon.net>
*/
@@ -11,500 +11,500 @@ if(!defined('CM_KEYMARKER')) define('CM_KEYMARKER','____');
if (!class_exists('configuration')) {
- class configuration {
-
- var $_name = 'conf'; // name of the config variable found in the files (overridden by $config['varname'])
- var $_format = 'php'; // format of the config file, supported formats - php (overridden by $config['format'])
- var $_heading = ''; // heading string written at top of config file - don't include comment indicators
- var $_loaded = false; // set to true after configuration files are loaded
- var $_metadata = array(); // holds metadata describing the settings
- var $setting = array(); // array of setting objects
- var $locked = false; // configuration is considered locked if it can't be updated
- var $show_disabled_plugins = false;
-
- // configuration filenames
- var $_default_files = array();
- var $_local_files = array(); // updated configuration is written to the first file
- var $_protected_files = array();
-
- var $_plugin_list = null;
-
- /**
- * constructor
- */
- function configuration($datafile) {
- global $conf, $config_cascade;
-
- if (!@file_exists($datafile)) {
- msg('No configuration metadata found at - '.htmlspecialchars($datafile),-1);
- return;
- }
- $meta = array();
- include($datafile);
+ class configuration {
- if (isset($config['varname'])) $this->_name = $config['varname'];
- if (isset($config['format'])) $this->_format = $config['format'];
- if (isset($config['heading'])) $this->_heading = $config['heading'];
+ var $_name = 'conf'; // name of the config variable found in the files (overridden by $config['varname'])
+ var $_format = 'php'; // format of the config file, supported formats - php (overridden by $config['format'])
+ var $_heading = ''; // heading string written at top of config file - don't include comment indicators
+ var $_loaded = false; // set to true after configuration files are loaded
+ var $_metadata = array(); // holds metadata describing the settings
+ var $setting = array(); // array of setting objects
+ var $locked = false; // configuration is considered locked if it can't be updated
+ var $show_disabled_plugins = false;
- $this->_default_files = $config_cascade['main']['default'];
- $this->_local_files = $config_cascade['main']['local'];
- $this->_protected_files = $config_cascade['main']['protected'];
+ // configuration filenames
+ var $_default_files = array();
+ var $_local_files = array(); // updated configuration is written to the first file
+ var $_protected_files = array();
- $this->locked = $this->_is_locked();
- $this->_metadata = array_merge($meta, $this->get_plugintpl_metadata($conf['template']));
- $this->retrieve_settings();
- }
+ var $_plugin_list = null;
- function retrieve_settings() {
- global $conf;
- $no_default_check = array('setting_fieldset', 'setting_undefined', 'setting_no_class');
+ /**
+ * constructor
+ */
+ function configuration($datafile) {
+ global $conf, $config_cascade;
- if (!$this->_loaded) {
- $default = array_merge($this->get_plugintpl_default($conf['template']), $this->_read_config_group($this->_default_files));
- $local = $this->_read_config_group($this->_local_files);
- $protected = $this->_read_config_group($this->_protected_files);
+ if (!@file_exists($datafile)) {
+ msg('No configuration metadata found at - '.htmlspecialchars($datafile),-1);
+ return;
+ }
+ $meta = array();
+ include($datafile);
- $keys = array_merge(array_keys($this->_metadata),array_keys($default), array_keys($local), array_keys($protected));
- $keys = array_unique($keys);
+ if (isset($config['varname'])) $this->_name = $config['varname'];
+ if (isset($config['format'])) $this->_format = $config['format'];
+ if (isset($config['heading'])) $this->_heading = $config['heading'];
- $param = null;
- foreach ($keys as $key) {
- if (isset($this->_metadata[$key])) {
- $class = $this->_metadata[$key][0];
+ $this->_default_files = $config_cascade['main']['default'];
+ $this->_local_files = $config_cascade['main']['local'];
+ $this->_protected_files = $config_cascade['main']['protected'];
- if($class && class_exists('setting_'.$class)){
- $class = 'setting_'.$class;
- } else {
- if($class != '') {
- $this->setting[] = new setting_no_class($key,$param);
+ $this->locked = $this->_is_locked();
+ $this->_metadata = array_merge($meta, $this->get_plugintpl_metadata($conf['template']));
+ $this->retrieve_settings();
+ }
+
+ function retrieve_settings() {
+ global $conf;
+ $no_default_check = array('setting_fieldset', 'setting_undefined', 'setting_no_class');
+
+ if (!$this->_loaded) {
+ $default = array_merge($this->get_plugintpl_default($conf['template']), $this->_read_config_group($this->_default_files));
+ $local = $this->_read_config_group($this->_local_files);
+ $protected = $this->_read_config_group($this->_protected_files);
+
+ $keys = array_merge(array_keys($this->_metadata),array_keys($default), array_keys($local), array_keys($protected));
+ $keys = array_unique($keys);
+
+ $param = null;
+ foreach ($keys as $key) {
+ if (isset($this->_metadata[$key])) {
+ $class = $this->_metadata[$key][0];
+
+ if($class && class_exists('setting_'.$class)){
+ $class = 'setting_'.$class;
+ } else {
+ if($class != '') {
+ $this->setting[] = new setting_no_class($key,$param);
+ }
+ $class = 'setting';
+ }
+
+ $param = $this->_metadata[$key];
+ array_shift($param);
+ } else {
+ $class = 'setting_undefined';
+ $param = null;
+ }
+
+ if (!in_array($class, $no_default_check) && !isset($default[$key])) {
+ $this->setting[] = new setting_no_default($key,$param);
+ }
+
+ $this->setting[$key] = new $class($key,$param);
+ $this->setting[$key]->initialize($default[$key],$local[$key],$protected[$key]);
}
- $class = 'setting';
- }
- $param = $this->_metadata[$key];
- array_shift($param);
- } else {
- $class = 'setting_undefined';
- $param = null;
+ $this->_loaded = true;
}
+ }
- if (!in_array($class, $no_default_check) && !isset($default[$key])) {
- $this->setting[] = new setting_no_default($key,$param);
- }
+ function save_settings($id, $header='', $backup=true) {
+ global $conf;
- $this->setting[$key] = new $class($key,$param);
- $this->setting[$key]->initialize($default[$key],$local[$key],$protected[$key]);
- }
+ if ($this->locked) return false;
- $this->_loaded = true;
- }
- }
-
- function save_settings($id, $header='', $backup=true) {
- global $conf;
+ // write back to the last file in the local config cascade
+ $file = end($this->_local_files);
- if ($this->locked) return false;
+ // backup current file (remove any existing backup)
+ if (@file_exists($file) && $backup) {
+ if (@file_exists($file.'.bak')) @unlink($file.'.bak');
+ if (!io_rename($file, $file.'.bak')) return false;
+ }
- // write back to the last file in the local config cascade
- $file = end($this->_local_files);
+ if (!$fh = @fopen($file, 'wb')) {
+ io_rename($file.'.bak', $file); // problem opening, restore the backup
+ return false;
+ }
- // backup current file (remove any existing backup)
- if (@file_exists($file) && $backup) {
- if (@file_exists($file.'.bak')) @unlink($file.'.bak');
- if (!io_rename($file, $file.'.bak')) return false;
- }
+ if (empty($header)) $header = $this->_heading;
- if (!$fh = @fopen($file, 'wb')) {
- io_rename($file.'.bak', $file); // problem opening, restore the backup
- return false;
- }
+ $out = $this->_out_header($id,$header);
- if (empty($header)) $header = $this->_heading;
+ foreach ($this->setting as $setting) {
+ $out .= $setting->out($this->_name, $this->_format);
+ }
- $out = $this->_out_header($id,$header);
+ $out .= $this->_out_footer();
- foreach ($this->setting as $setting) {
- $out .= $setting->out($this->_name, $this->_format);
- }
+ @fwrite($fh, $out);
+ fclose($fh);
+ if($conf['fperm']) chmod($file, $conf['fperm']);
+ return true;
+ }
- $out .= $this->_out_footer();
+ /**
+ * Update last modified time stamp of the config file
+ */
+ function touch_settings(){
+ if ($this->locked) return false;
+ $file = end($this->_local_files);
+ return @touch($file);
+ }
- @fwrite($fh, $out);
- fclose($fh);
- if($conf['fperm']) chmod($file, $conf['fperm']);
- return true;
- }
+ function _read_config_group($files) {
+ $config = array();
+ foreach ($files as $file) {
+ $config = array_merge($config, $this->_read_config($file));
+ }
- /**
- * Update last modified time stamp of the config file
- */
- function touch_settings(){
- if ($this->locked) return false;
- $file = end($this->_local_files);
- return @touch($file);
- }
+ return $config;
+ }
- function _read_config_group($files) {
- $config = array();
- foreach ($files as $file) {
- $config = array_merge($config, $this->_read_config($file));
- }
+ /**
+ * return an array of config settings
+ */
+ function _read_config($file) {
- return $config;
- }
+ if (!$file) return array();
- /**
- * return an array of config settings
- */
- function _read_config($file) {
+ $config = array();
- if (!$file) return array();
+ if ($this->_format == 'php') {
- $config = array();
+ if(@file_exists($file)){
+ $contents = @php_strip_whitespace($file);
+ }else{
+ $contents = '';
+ }
+ $pattern = '/\$'.$this->_name.'\[[\'"]([^=]+)[\'"]\] ?= ?(.*?);(?=[^;]*(?:\$'.$this->_name.'|$))/s';
+ $matches=array();
+ preg_match_all($pattern,$contents,$matches,PREG_SET_ORDER);
- if ($this->_format == 'php') {
+ for ($i=0; $i<count($matches); $i++) {
+ $value = $matches[$i][2];
- if(@file_exists($file)){
- $contents = @php_strip_whitespace($file);
- }else{
- $contents = '';
- }
- $pattern = '/\$'.$this->_name.'\[[\'"]([^=]+)[\'"]\] ?= ?(.*?);(?=[^;]*(?:\$'.$this->_name.'|$))/s';
- $matches=array();
- preg_match_all($pattern,$contents,$matches,PREG_SET_ORDER);
- for ($i=0; $i<count($matches); $i++) {
- $value = $matches[$i][2];
+ // correct issues with the incoming data
+ // FIXME ... for now merge multi-dimensional array indices using ____
+ $key = preg_replace('/.\]\[./',CM_KEYMARKER,$matches[$i][1]);
- // correct issues with the incoming data
- // FIXME ... for now merge multi-dimensional array indices using ____
- $key = preg_replace('/.\]\[./',CM_KEYMARKER,$matches[$i][1]);
+ // handle arrays
+ if(preg_match('/^array ?\((.*)\)/', $value, $match)){
+ $arr = explode(',', $match[1]);
+ // remove quotes from quoted strings & unescape escaped data
+ $len = count($arr);
+ for($j=0; $j<$len; $j++){
+ $arr[$j] = trim($arr[$j]);
+ $arr[$j] = preg_replace('/^(\'|")(.*)(?<!\\\\)\1$/s','$2',$arr[$j]);
+ $arr[$j] = strtr($arr[$j], array('\\\\'=>'\\','\\\''=>'\'','\\"'=>'"'));
+ }
- // handle arrays
- if(preg_match('/^array ?\((.*)\)/', $value, $match)){
- $arr = explode(',', $match[1]);
+ $value = $arr;
+ }else{
+ // remove quotes from quoted strings & unescape escaped data
+ $value = preg_replace('/^(\'|")(.*)(?<!\\\\)\1$/s','$2',$value);
+ $value = strtr($value, array('\\\\'=>'\\','\\\''=>'\'','\\"'=>'"'));
+ }
- // remove quotes from quoted strings & unescape escaped data
- $len = count($arr);
- for($j=0; $j<$len; $j++){
- $arr[$j] = trim($arr[$j]);
- $arr[$j] = preg_replace('/^(\'|")(.*)(?<!\\\\)\1$/s','$2',$arr[$j]);
- $arr[$j] = strtr($arr[$j], array('\\\\'=>'\\','\\\''=>'\'','\\"'=>'"'));
+ $config[$key] = $value;
+ }
}
- $value = $arr;
- }else{
- // remove quotes from quoted strings & unescape escaped data
- $value = preg_replace('/^(\'|")(.*)(?<!\\\\)\1$/s','$2',$value);
- $value = strtr($value, array('\\\\'=>'\\','\\\''=>'\'','\\"'=>'"'));
- }
-
- $config[$key] = $value;
+ return $config;
}
- }
- return $config;
- }
+ function _out_header($id, $header) {
+ $out = '';
+ if ($this->_format == 'php') {
+ $out .= '<'.'?php'."\n".
+ "/*\n".
+ " * ".$header."\n".
+ " * Auto-generated by ".$id." plugin\n".
+ " * Run for user: ".$_SERVER['REMOTE_USER']."\n".
+ " * Date: ".date('r')."\n".
+ " */\n\n";
+ }
- function _out_header($id, $header) {
- $out = '';
- if ($this->_format == 'php') {
- $out .= '<'.'?php'."\n".
- "/*\n".
- " * ".$header."\n".
- " * Auto-generated by ".$id." plugin\n".
- " * Run for user: ".$_SERVER['REMOTE_USER']."\n".
- " * Date: ".date('r')."\n".
- " */\n\n";
- }
-
- return $out;
- }
+ return $out;
+ }
- function _out_footer() {
- $out = '';
- if ($this->_format == 'php') {
- $out .= "\n// end auto-generated content\n";
- }
+ function _out_footer() {
+ $out = '';
+ if ($this->_format == 'php') {
+ $out .= "\n// end auto-generated content\n";
+ }
- return $out;
- }
+ return $out;
+ }
- // configuration is considered locked if there is no local settings filename
- // or the directory its in is not writable or the file exists and is not writable
- function _is_locked() {
- if (!$this->_local_files) return true;
+ // configuration is considered locked if there is no local settings filename
+ // or the directory its in is not writable or the file exists and is not writable
+ function _is_locked() {
+ if (!$this->_local_files) return true;
- $local = $this->_local_files[0];
+ $local = $this->_local_files[0];
- if (!is_writable(dirname($local))) return true;
- if (@file_exists($local) && !is_writable($local)) return true;
+ if (!is_writable(dirname($local))) return true;
+ if (@file_exists($local) && !is_writable($local)) return true;
- return false;
- }
+ return false;
+ }
- /**
- * not used ... conf's contents are an array!
- * reduce any multidimensional settings to one dimension using CM_KEYMARKER
- */
- function _flatten($conf,$prefix='') {
+ /**
+ * not used ... conf's contents are an array!
+ * reduce any multidimensional settings to one dimension using CM_KEYMARKER
+ */
+ function _flatten($conf,$prefix='') {
- $out = array();
+ $out = array();
- foreach($conf as $key => $value) {
- if (!is_array($value)) {
- $out[$prefix.$key] = $value;
- continue;
- }
+ foreach($conf as $key => $value) {
+ if (!is_array($value)) {
+ $out[$prefix.$key] = $value;
+ continue;
+ }
+
+ $tmp = $this->_flatten($value,$prefix.$key.CM_KEYMARKER);
+ $out = array_merge($out,$tmp);
+ }
- $tmp = $this->_flatten($value,$prefix.$key.CM_KEYMARKER);
- $out = array_merge($out,$tmp);
+ return $out;
}
- return $out;
- }
+ function get_plugin_list() {
+ if (is_null($this->_plugin_list)) {
+ $list = plugin_list('',$this->show_disabled_plugins);
- function get_plugin_list() {
- if (is_null($this->_plugin_list)) {
- $list = plugin_list('',$this->show_disabled_plugins);
+ // remove this plugin from the list
+ $idx = array_search('config',$list);
+ unset($list[$idx]);
- // remove this plugin from the list
- $idx = array_search('config',$list);
- unset($list[$idx]);
+ trigger_event('PLUGIN_CONFIG_PLUGINLIST',$list);
+ $this->_plugin_list = $list;
+ }
- trigger_event('PLUGIN_CONFIG_PLUGINLIST',$list);
- $this->_plugin_list = $list;
- }
+ return $this->_plugin_list;
+ }
- return $this->_plugin_list;
- }
+ /**
+ * load metadata for plugin and template settings
+ */
+ function get_plugintpl_metadata($tpl){
+ $file = '/conf/metadata.php';
+ $class = '/conf/settings.class.php';
+ $metadata = array();
+
+ foreach ($this->get_plugin_list() as $plugin) {
+ $plugin_dir = plugin_directory($plugin);
+ if (@file_exists(DOKU_PLUGIN.$plugin_dir.$file)){
+ $meta = array();
+ @include(DOKU_PLUGIN.$plugin_dir.$file);
+ @include(DOKU_PLUGIN.$plugin_dir.$class);
+ if (!empty($meta)) {
+ $metadata['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'] = array('fieldset');
+ }
+ foreach ($meta as $key => $value){
+ if ($value[0]=='fieldset') { continue; } //plugins only get one fieldset
+ $metadata['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value;
+ }
+ }
+ }
- /**
- * load metadata for plugin and template settings
- */
- function get_plugintpl_metadata($tpl){
- $file = '/conf/metadata.php';
- $class = '/conf/settings.class.php';
- $metadata = array();
-
- foreach ($this->get_plugin_list() as $plugin) {
- $plugin_dir = plugin_directory($plugin);
- if (@file_exists(DOKU_PLUGIN.$plugin_dir.$file)){
- $meta = array();
- @include(DOKU_PLUGIN.$plugin_dir.$file);
- @include(DOKU_PLUGIN.$plugin_dir.$class);
- if (!empty($meta)) {
- $metadata['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'] = array('fieldset');
- }
- foreach ($meta as $key => $value){
- if ($value[0]=='fieldset') { continue; } //plugins only get one fieldset
- $metadata['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value;
- }
- }
- }
-
- // the same for the active template
- if (@file_exists(tpl_incdir().$file)){
- $meta = array();
- @include(tpl_incdir().$file);
- @include(tpl_incdir().$class);
- if (!empty($meta)) {
- $metadata['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'] = array('fieldset');
- }
- foreach ($meta as $key => $value){
- if ($value[0]=='fieldset') { continue; } //template only gets one fieldset
- $metadata['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value;
+ // the same for the active template
+ if (@file_exists(tpl_incdir().$file)){
+ $meta = array();
+ @include(tpl_incdir().$file);
+ @include(tpl_incdir().$class);
+ if (!empty($meta)) {
+ $metadata['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'] = array('fieldset');
+ }
+ foreach ($meta as $key => $value){
+ if ($value[0]=='fieldset') { continue; } //template only gets one fieldset
+ $metadata['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value;
+ }
+ }
+
+ return $metadata;
}
- }
- return $metadata;
- }
+ /**
+ * load default settings for plugins and templates
+ */
+ function get_plugintpl_default($tpl){
+ $file = '/conf/default.php';
+ $default = array();
+
+ foreach ($this->get_plugin_list() as $plugin) {
+ $plugin_dir = plugin_directory($plugin);
+ if (@file_exists(DOKU_PLUGIN.$plugin_dir.$file)){
+ $conf = array();
+ @include(DOKU_PLUGIN.$plugin_dir.$file);
+ foreach ($conf as $key => $value){
+ $default['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value;
+ }
+ }
+ }
- /**
- * load default settings for plugins and templates
- */
- function get_plugintpl_default($tpl){
- $file = '/conf/default.php';
- $default = array();
-
- foreach ($this->get_plugin_list() as $plugin) {
- $plugin_dir = plugin_directory($plugin);
- if (@file_exists(DOKU_PLUGIN.$plugin_dir.$file)){
- $conf = array();
- @include(DOKU_PLUGIN.$plugin_dir.$file);
- foreach ($conf as $key => $value){
- $default['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value;
- }
- }
- }
-
- // the same for the active template
- if (@file_exists(tpl_incdir().$file)){
- $conf = array();
- @include(tpl_incdir().$file);
- foreach ($conf as $key => $value){
- $default['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value;
+ // the same for the active template
+ if (@file_exists(tpl_incdir().$file)){
+ $conf = array();
+ @include(tpl_incdir().$file);
+ foreach ($conf as $key => $value){
+ $default['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value;
+ }
+ }
+
+ return $default;
}
- }
- return $default;
}
-
- }
}
if (!class_exists('setting')) {
- class setting {
+ class setting {
- var $_key = '';
- var $_default = null;
- var $_local = null;
- var $_protected = null;
+ var $_key = '';
+ var $_default = null;
+ var $_local = null;
+ var $_protected = null;
- var $_pattern = '';
- var $_error = false; // only used by those classes which error check
- var $_input = null; // only used by those classes which error check
- var $_caution = null; // used by any setting to provide an alert along with the setting
- // valid alerts, 'warning', 'danger', 'security'
- // images matching the alerts are in the plugin's images directory
+ var $_pattern = '';
+ var $_error = false; // only used by those classes which error check
+ var $_input = null; // only used by those classes which error check
+ var $_caution = null; // used by any setting to provide an alert along with the setting
+ // valid alerts, 'warning', 'danger', 'security'
+ // images matching the alerts are in the plugin's images directory
- static protected $_validCautions = array('warning','danger','security');
+ static protected $_validCautions = array('warning','danger','security');
- function setting($key, $params=null) {
- $this->_key = $key;
+ function setting($key, $params=null) {
+ $this->_key = $key;
- if (is_array($params)) {
- foreach($params as $property => $value) {
- $this->$property = $value;
- }
+ if (is_array($params)) {
+ foreach($params as $property => $value) {
+ $this->$property = $value;
+ }
+ }
}
- }
-
- /**
- * receives current values for the setting $key
- */
- function initialize($default, $local, $protected) {
- if (isset($default)) $this->_default = $default;
- if (isset($local)) $this->_local = $local;
- if (isset($protected)) $this->_protected = $protected;
- }
- /**
- * update changed setting with user provided value $input
- * - if changed value fails error check, save it to $this->_input (to allow echoing later)
- * - if changed value passes error check, set $this->_local to the new value
- *
- * @param mixed $input the new value
- * @return boolean true if changed, false otherwise (incl. on error)
- */
- function update($input) {
- if (is_null($input)) return false;
- if ($this->is_protected()) return false;
-
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- if ($value == $input) return false;
-
- if ($this->_pattern && !preg_match($this->_pattern,$input)) {
- $this->_error = true;
- $this->_input = $input;
- return false;
+ /**
+ * receives current values for the setting $key
+ */
+ function initialize($default, $local, $protected) {
+ if (isset($default)) $this->_default = $default;
+ if (isset($local)) $this->_local = $local;
+ if (isset($protected)) $this->_protected = $protected;
}
- $this->_local = $input;
- return true;
- }
+ /**
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
+ *
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (incl. on error)
+ */
+ function update($input) {
+ if (is_null($input)) return false;
+ if ($this->is_protected()) return false;
- /**
- * @return array(string $label_html, string $input_html)
- */
- function html(&$plugin, $echo=false) {
- $value = '';
- $disable = '';
-
- if ($this->is_protected()) {
- $value = $this->_protected;
- $disable = 'disabled="disabled"';
- } else {
- if ($echo && $this->_error) {
- $value = $this->_input;
- } else {
$value = is_null($this->_local) ? $this->_default : $this->_local;
- }
- }
+ if ($value == $input) return false;
- $key = htmlspecialchars($this->_key);
- $value = formText($value);
+ if ($this->_pattern && !preg_match($this->_pattern,$input)) {
+ $this->_error = true;
+ $this->_input = $input;
+ return false;
+ }
- $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
- $input = '<textarea rows="3" cols="40" id="config___'.$key.'" name="config['.$key.']" class="edit" '.$disable.'>'.$value.'</textarea>';
- return array($label,$input);
- }
+ $this->_local = $input;
+ return true;
+ }
- /**
- * generate string to save setting value to file according to $fmt
- */
- function out($var, $fmt='php') {
+ /**
+ * @return array(string $label_html, string $input_html)
+ */
+ function html(&$plugin, $echo=false) {
+ $value = '';
+ $disable = '';
- if ($this->is_protected()) return '';
- if (is_null($this->_local) || ($this->_default == $this->_local)) return '';
+ if ($this->is_protected()) {
+ $value = $this->_protected;
+ $disable = 'disabled="disabled"';
+ } else {
+ if ($echo && $this->_error) {
+ $value = $this->_input;
+ } else {
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ }
+ }
- $out = '';
+ $key = htmlspecialchars($this->_key);
+ $value = formText($value);
- if ($fmt=='php') {
- $tr = array("\\" => '\\\\', "'" => '\\\'');
+ $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
+ $input = '<textarea rows="3" cols="40" id="config___'.$key.'" name="config['.$key.']" class="edit" '.$disable.'>'.$value.'</textarea>';
+ return array($label,$input);
+ }
- $out = '$'.$var."['".$this->_out_key()."'] = '".strtr( cleanText($this->_local), $tr)."';\n";
- }
+ /**
+ * generate string to save setting value to file according to $fmt
+ */
+ function out($var, $fmt='php') {
- return $out;
- }
+ if ($this->is_protected()) return '';
+ if (is_null($this->_local) || ($this->_default == $this->_local)) return '';
- function prompt(&$plugin) {
- $prompt = $plugin->getLang($this->_key);
- if (!$prompt) $prompt = htmlspecialchars(str_replace(array('____','_'),' ',$this->_key));
- return $prompt;
- }
+ $out = '';
- function is_protected() { return !is_null($this->_protected); }
- function is_default() { return !$this->is_protected() && is_null($this->_local); }
- function error() { return $this->_error; }
+ if ($fmt=='php') {
+ $tr = array("\\" => '\\\\', "'" => '\\\'');
- function caution() {
- if (!empty($this->_caution)) {
- if (!in_array($this->_caution, setting::$_validCautions)) {
- trigger_error('Invalid caution string ('.$this->_caution.') in metadata for setting "'.$this->_key.'"', E_USER_WARNING);
- return false;
+ $out = '$'.$var."['".$this->_out_key()."'] = '".strtr( cleanText($this->_local), $tr)."';\n";
}
- return $this->_caution;
+
+ return $out;
}
- // compatibility with previous cautionList
- // TODO: check if any plugins use; remove
- if (!empty($this->_cautionList[$this->_key])) {
- $this->_caution = $this->_cautionList[$this->_key];
- unset($this->_cautionList);
- return $this->caution();
+ function prompt(&$plugin) {
+ $prompt = $plugin->getLang($this->_key);
+ if (!$prompt) $prompt = htmlspecialchars(str_replace(array('____','_'),' ',$this->_key));
+ return $prompt;
}
- return false;
- }
- function _out_key($pretty=false,$url=false) {
- if($pretty){
- $out = str_replace(CM_KEYMARKER,"»",$this->_key);
- if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc.
- if ($out == 'start') //one exception
- return '<a href="http://www.dokuwiki.org/config:startpage">'.$out.'</a>';
- else
- return '<a href="http://www.dokuwiki.org/config:'.$out.'">'.$out.'</a>';
+ function is_protected() { return !is_null($this->_protected); }
+ function is_default() { return !$this->is_protected() && is_null($this->_local); }
+ function error() { return $this->_error; }
+
+ function caution() {
+ if (!empty($this->_caution)) {
+ if (!in_array($this->_caution, setting::$_validCautions)) {
+ trigger_error('Invalid caution string ('.$this->_caution.') in metadata for setting "'.$this->_key.'"', E_USER_WARNING);
+ return false;
+ }
+ return $this->_caution;
+ }
+ // compatibility with previous cautionList
+ // TODO: check if any plugins use; remove
+ if (!empty($this->_cautionList[$this->_key])) {
+ $this->_caution = $this->_cautionList[$this->_key];
+ unset($this->_cautionList);
+
+ return $this->caution();
+ }
+ return false;
+ }
+
+ function _out_key($pretty=false,$url=false) {
+ if($pretty){
+ $out = str_replace(CM_KEYMARKER,"»",$this->_key);
+ if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc.
+ if ($out == 'start') //one exception
+ return '<a href="http://www.dokuwiki.org/config:startpage">'.$out.'</a>';
+ else
+ return '<a href="http://www.dokuwiki.org/config:'.$out.'">'.$out.'</a>';
+ }
+ return $out;
+ }else{
+ return str_replace(CM_KEYMARKER,"']['",$this->_key);
}
- return $out;
- }else{
- return str_replace(CM_KEYMARKER,"']['",$this->_key);
}
}
- }
}
@@ -612,178 +612,178 @@ if (!class_exists('setting_array')) {
}
if (!class_exists('setting_string')) {
- class setting_string extends setting {
- function html(&$plugin, $echo=false) {
- $value = '';
- $disable = '';
-
- if ($this->is_protected()) {
- $value = $this->_protected;
- $disable = 'disabled="disabled"';
- } else {
- if ($echo && $this->_error) {
- $value = $this->_input;
- } else {
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- }
- }
+ class setting_string extends setting {
+ function html(&$plugin, $echo=false) {
+ $value = '';
+ $disable = '';
+
+ if ($this->is_protected()) {
+ $value = $this->_protected;
+ $disable = 'disabled="disabled"';
+ } else {
+ if ($echo && $this->_error) {
+ $value = $this->_input;
+ } else {
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ }
+ }
- $key = htmlspecialchars($this->_key);
- $value = htmlspecialchars($value);
+ $key = htmlspecialchars($this->_key);
+ $value = htmlspecialchars($value);
- $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
- $input = '<input id="config___'.$key.'" name="config['.$key.']" type="text" class="edit" value="'.$value.'" '.$disable.'/>';
- return array($label,$input);
+ $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
+ $input = '<input id="config___'.$key.'" name="config['.$key.']" type="text" class="edit" value="'.$value.'" '.$disable.'/>';
+ return array($label,$input);
+ }
}
- }
}
if (!class_exists('setting_password')) {
- class setting_password extends setting_string {
+ class setting_password extends setting_string {
- var $_code = 'plain'; // mechanism to be used to obscure passwords
+ var $_code = 'plain'; // mechanism to be used to obscure passwords
- function update($input) {
- if ($this->is_protected()) return false;
- if (!$input) return false;
+ function update($input) {
+ if ($this->is_protected()) return false;
+ if (!$input) return false;
- if ($this->_pattern && !preg_match($this->_pattern,$input)) {
- $this->_error = true;
- $this->_input = $input;
- return false;
- }
+ if ($this->_pattern && !preg_match($this->_pattern,$input)) {
+ $this->_error = true;
+ $this->_input = $input;
+ return false;
+ }
- $this->_local = conf_encodeString($input,$this->_code);
- return true;
- }
+ $this->_local = conf_encodeString($input,$this->_code);
+ return true;
+ }
- function html(&$plugin, $echo=false) {
+ function html(&$plugin, $echo=false) {
- $value = '';
- $disable = $this->is_protected() ? 'disabled="disabled"' : '';
+ $value = '';
+ $disable = $this->is_protected() ? 'disabled="disabled"' : '';
- $key = htmlspecialchars($this->_key);
+ $key = htmlspecialchars($this->_key);
- $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
- $input = '<input id="config___'.$key.'" name="config['.$key.']" autocomplete="off" type="password" class="edit" value="" '.$disable.' />';
- return array($label,$input);
+ $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
+ $input = '<input id="config___'.$key.'" name="config['.$key.']" autocomplete="off" type="password" class="edit" value="" '.$disable.' />';
+ return array($label,$input);
+ }
}
- }
}
if (!class_exists('setting_email')) {
- class setting_email extends setting_string {
- var $_multiple = false;
- var $_placeholders = false;
-
- /**
- * update setting with user provided value $input
- * if value fails error check, save it
- *
- * @return boolean true if changed, false otherwise (incl. on error)
- */
- function update($input) {
- if (is_null($input)) return false;
- if ($this->is_protected()) return false;
-
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- if ($value == $input) return false;
- if($input === ''){
- $this->_local = $input;
- return true;
- }
- $mail = $input;
+ class setting_email extends setting_string {
+ var $_multiple = false;
+ var $_placeholders = false;
- if($this->_placeholders){
- // replace variables with pseudo values
- $mail = str_replace('@USER@','joe',$mail);
- $mail = str_replace('@NAME@','Joe Schmoe',$mail);
- $mail = str_replace('@MAIL@','joe@example.com',$mail);
- }
+ /**
+ * update setting with user provided value $input
+ * if value fails error check, save it
+ *
+ * @return boolean true if changed, false otherwise (incl. on error)
+ */
+ function update($input) {
+ if (is_null($input)) return false;
+ if ($this->is_protected()) return false;
- // multiple mail addresses?
- if ($this->_multiple) {
- $mails = array_filter(array_map('trim', explode(',', $mail)));
- } else {
- $mails = array($mail);
- }
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ if ($value == $input) return false;
+ if($input === ''){
+ $this->_local = $input;
+ return true;
+ }
+ $mail = $input;
- // check them all
- foreach ($mails as $mail) {
- // only check the address part
- if(preg_match('#(.*?)<(.*?)>#', $mail, $matches)){
- $addr = $matches[2];
- }else{
- $addr = $mail;
+ if($this->_placeholders){
+ // replace variables with pseudo values
+ $mail = str_replace('@USER@','joe',$mail);
+ $mail = str_replace('@NAME@','Joe Schmoe',$mail);
+ $mail = str_replace('@MAIL@','joe@example.com',$mail);
}
- if (!mail_isvalid($addr)) {
- $this->_error = true;
- $this->_input = $input;
- return false;
+ // multiple mail addresses?
+ if ($this->_multiple) {
+ $mails = array_filter(array_map('trim', explode(',', $mail)));
+ } else {
+ $mails = array($mail);
}
- }
- $this->_local = $input;
- return true;
+ // check them all
+ foreach ($mails as $mail) {
+ // only check the address part
+ if(preg_match('#(.*?)<(.*?)>#', $mail, $matches)){
+ $addr = $matches[2];
+ }else{
+ $addr = $mail;
+ }
+
+ if (!mail_isvalid($addr)) {
+ $this->_error = true;
+ $this->_input = $input;
+ return false;
+ }
+ }
+
+ $this->_local = $input;
+ return true;
+ }
}
- }
}
/**
* @deprecated 2013-02-16
*/
if (!class_exists('setting_richemail')) {
- class setting_richemail extends setting_email {
- function update($input) {
- $this->_placeholders = true;
- return parent::update($input);
- }
- }
+ class setting_richemail extends setting_email {
+ function update($input) {
+ $this->_placeholders = true;
+ return parent::update($input);
+ }
+ }
}
if (!class_exists('setting_numeric')) {
- class setting_numeric extends setting_string {
- // This allows for many PHP syntax errors...
- // var $_pattern = '/^[-+\/*0-9 ]*$/';
- // much more restrictive, but should eliminate syntax errors.
- var $_pattern = '/^[-+]? *[0-9]+ *(?:[-+*] *[0-9]+ *)*$/';
- var $_min = null;
- var $_max = null;
-
- function update($input) {
- $local = $this->_local;
- $valid = parent::update($input);
- if ($valid && !(is_null($this->_min) && is_null($this->_max))) {
- $numeric_local = (int) eval('return '.$this->_local.';');
- if ((!is_null($this->_min) && $numeric_local < $this->_min) ||
- (!is_null($this->_max) && $numeric_local > $this->_max)) {
- $this->_error = true;
- $this->_input = $input;
- $this->_local = $local;
- $valid = false;
+ class setting_numeric extends setting_string {
+ // This allows for many PHP syntax errors...
+ // var $_pattern = '/^[-+\/*0-9 ]*$/';
+ // much more restrictive, but should eliminate syntax errors.
+ var $_pattern = '/^[-+]? *[0-9]+ *(?:[-+*] *[0-9]+ *)*$/';
+ var $_min = null;
+ var $_max = null;
+
+ function update($input) {
+ $local = $this->_local;
+ $valid = parent::update($input);
+ if ($valid && !(is_null($this->_min) && is_null($this->_max))) {
+ $numeric_local = (int) eval('return '.$this->_local.';');
+ if ((!is_null($this->_min) && $numeric_local < $this->_min) ||
+ (!is_null($this->_max) && $numeric_local > $this->_max)) {
+ $this->_error = true;
+ $this->_input = $input;
+ $this->_local = $local;
+ $valid = false;
+ }
}
+ return $valid;
}
- return $valid;
- }
- function out($var, $fmt='php') {
+ function out($var, $fmt='php') {
- if ($this->is_protected()) return '';
- if (is_null($this->_local) || ($this->_default == $this->_local)) return '';
+ if ($this->is_protected()) return '';
+ if (is_null($this->_local) || ($this->_default == $this->_local)) return '';
- $out = '';
+ $out = '';
- if ($fmt=='php') {
- $local = $this->_local === '' ? "''" : $this->_local;
- $out .= '$'.$var."['".$this->_out_key()."'] = ".$local.";\n";
- }
+ if ($fmt=='php') {
+ $local = $this->_local === '' ? "''" : $this->_local;
+ $out .= '$'.$var."['".$this->_out_key()."'] = ".$local.";\n";
+ }
- return $out;
+ return $out;
+ }
}
- }
}
if (!class_exists('setting_numericopt')) {
@@ -794,320 +794,320 @@ if (!class_exists('setting_numericopt')) {
}
if (!class_exists('setting_onoff')) {
- class setting_onoff extends setting_numeric {
+ class setting_onoff extends setting_numeric {
- function html(&$plugin) {
- $value = '';
- $disable = '';
+ function html(&$plugin) {
+ $value = '';
+ $disable = '';
- if ($this->is_protected()) {
- $value = $this->_protected;
- $disable = ' disabled="disabled"';
- } else {
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- }
+ if ($this->is_protected()) {
+ $value = $this->_protected;
+ $disable = ' disabled="disabled"';
+ } else {
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ }
- $key = htmlspecialchars($this->_key);
- $checked = ($value) ? ' checked="checked"' : '';
+ $key = htmlspecialchars($this->_key);
+ $checked = ($value) ? ' checked="checked"' : '';
- $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
- $input = '<div class="input"><input id="config___'.$key.'" name="config['.$key.']" type="checkbox" class="checkbox" value="1"'.$checked.$disable.'/></div>';
- return array($label,$input);
- }
+ $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
+ $input = '<div class="input"><input id="config___'.$key.'" name="config['.$key.']" type="checkbox" class="checkbox" value="1"'.$checked.$disable.'/></div>';
+ return array($label,$input);
+ }
- function update($input) {
- if ($this->is_protected()) return false;
+ function update($input) {
+ if ($this->is_protected()) return false;
- $input = ($input) ? 1 : 0;
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- if ($value == $input) return false;
+ $input = ($input) ? 1 : 0;
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ if ($value == $input) return false;
- $this->_local = $input;
- return true;
+ $this->_local = $input;
+ return true;
+ }
}
- }
}
if (!class_exists('setting_multichoice')) {
- class setting_multichoice extends setting_string {
- var $_choices = array();
-
- function html(&$plugin) {
- $value = '';
- $disable = '';
- $nochoice = '';
-
- if ($this->is_protected()) {
- $value = $this->_protected;
- $disable = ' disabled="disabled"';
- } else {
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- }
+ class setting_multichoice extends setting_string {
+ var $_choices = array();
- // ensure current value is included
- if (!in_array($value, $this->_choices)) {
- $this->_choices[] = $value;
- }
- // disable if no other choices
- if (!$this->is_protected() && count($this->_choices) <= 1) {
- $disable = ' disabled="disabled"';
- $nochoice = $plugin->getLang('nochoice');
- }
+ function html(&$plugin) {
+ $value = '';
+ $disable = '';
+ $nochoice = '';
- $key = htmlspecialchars($this->_key);
+ if ($this->is_protected()) {
+ $value = $this->_protected;
+ $disable = ' disabled="disabled"';
+ } else {
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ }
- $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
+ // ensure current value is included
+ if (!in_array($value, $this->_choices)) {
+ $this->_choices[] = $value;
+ }
+ // disable if no other choices
+ if (!$this->is_protected() && count($this->_choices) <= 1) {
+ $disable = ' disabled="disabled"';
+ $nochoice = $plugin->getLang('nochoice');
+ }
- $input = "<div class=\"input\">\n";
- $input .= '<select class="edit" id="config___'.$key.'" name="config['.$key.']"'.$disable.'>'."\n";
- foreach ($this->_choices as $choice) {
- $selected = ($value == $choice) ? ' selected="selected"' : '';
- $option = $plugin->getLang($this->_key.'_o_'.$choice);
- if (!$option && isset($this->lang[$this->_key.'_o_'.$choice])) $option = $this->lang[$this->_key.'_o_'.$choice];
- if (!$option) $option = $choice;
+ $key = htmlspecialchars($this->_key);
- $choice = htmlspecialchars($choice);
- $option = htmlspecialchars($option);
- $input .= ' <option value="'.$choice.'"'.$selected.' >'.$option.'</option>'."\n";
- }
- $input .= "</select> $nochoice \n";
- $input .= "</div>\n";
+ $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
- return array($label,$input);
- }
+ $input = "<div class=\"input\">\n";
+ $input .= '<select class="edit" id="config___'.$key.'" name="config['.$key.']"'.$disable.'>'."\n";
+ foreach ($this->_choices as $choice) {
+ $selected = ($value == $choice) ? ' selected="selected"' : '';
+ $option = $plugin->getLang($this->_key.'_o_'.$choice);
+ if (!$option && isset($this->lang[$this->_key.'_o_'.$choice])) $option = $this->lang[$this->_key.'_o_'.$choice];
+ if (!$option) $option = $choice;
+
+ $choice = htmlspecialchars($choice);
+ $option = htmlspecialchars($option);
+ $input .= ' <option value="'.$choice.'"'.$selected.' >'.$option.'</option>'."\n";
+ }
+ $input .= "</select> $nochoice \n";
+ $input .= "</div>\n";
- function update($input) {
- if (is_null($input)) return false;
- if ($this->is_protected()) return false;
+ return array($label,$input);
+ }
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- if ($value == $input) return false;
+ function update($input) {
+ if (is_null($input)) return false;
+ if ($this->is_protected()) return false;
+
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ if ($value == $input) return false;
- if (!in_array($input, $this->_choices)) return false;
+ if (!in_array($input, $this->_choices)) return false;
- $this->_local = $input;
- return true;
+ $this->_local = $input;
+ return true;
+ }
}
- }
}
if (!class_exists('setting_dirchoice')) {
- class setting_dirchoice extends setting_multichoice {
+ class setting_dirchoice extends setting_multichoice {
- var $_dir = '';
+ var $_dir = '';
- function initialize($default,$local,$protected) {
+ function initialize($default,$local,$protected) {
- // populate $this->_choices with a list of directories
- $list = array();
+ // populate $this->_choices with a list of directories
+ $list = array();
- if ($dh = @opendir($this->_dir)) {
- while (false !== ($entry = readdir($dh))) {
- if ($entry == '.' || $entry == '..') continue;
- if ($this->_pattern && !preg_match($this->_pattern,$entry)) continue;
+ if ($dh = @opendir($this->_dir)) {
+ while (false !== ($entry = readdir($dh))) {
+ if ($entry == '.' || $entry == '..') continue;
+ if ($this->_pattern && !preg_match($this->_pattern,$entry)) continue;
- $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $this->_dir.$entry;
- if (is_dir($file)) $list[] = $entry;
- }
- closedir($dh);
- }
- sort($list);
- $this->_choices = $list;
+ $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $this->_dir.$entry;
+ if (is_dir($file)) $list[] = $entry;
+ }
+ closedir($dh);
+ }
+ sort($list);
+ $this->_choices = $list;
- parent::initialize($default,$local,$protected);
+ parent::initialize($default,$local,$protected);
+ }
}
- }
}
if (!class_exists('setting_hidden')) {
- class setting_hidden extends setting {
- // Used to explicitly ignore a setting in the configuration manager.
- }
+ class setting_hidden extends setting {
+ // Used to explicitly ignore a setting in the configuration manager.
+ }
}
if (!class_exists('setting_fieldset')) {
- class setting_fieldset extends setting {
- // A do-nothing class used to detect the 'fieldset' type.
- // Used to start a new settings "display-group".
- }
+ class setting_fieldset extends setting {
+ // A do-nothing class used to detect the 'fieldset' type.
+ // Used to start a new settings "display-group".
+ }
}
if (!class_exists('setting_undefined')) {
- class setting_undefined extends setting_hidden {
- // A do-nothing class used to detect settings with no metadata entry.
- // Used internaly to hide undefined settings, and generate the undefined settings list.
- }
+ class setting_undefined extends setting_hidden {
+ // A do-nothing class used to detect settings with no metadata entry.
+ // Used internaly to hide undefined settings, and generate the undefined settings list.
+ }
}
if (!class_exists('setting_no_class')) {
- class setting_no_class extends setting_undefined {
- // A do-nothing class used to detect settings with a missing setting class.
- // Used internaly to hide undefined settings, and generate the undefined settings list.
- }
+ class setting_no_class extends setting_undefined {
+ // A do-nothing class used to detect settings with a missing setting class.
+ // Used internaly to hide undefined settings, and generate the undefined settings list.
+ }
}
if (!class_exists('setting_no_default')) {
- class setting_no_default extends setting_undefined {
- // A do-nothing class used to detect settings with no default value.
- // Used internaly to hide undefined settings, and generate the undefined settings list.
- }
+ class setting_no_default extends setting_undefined {
+ // A do-nothing class used to detect settings with no default value.
+ // Used internaly to hide undefined settings, and generate the undefined settings list.
+ }
}
if (!class_exists('setting_multicheckbox')) {
- class setting_multicheckbox extends setting_string {
+ class setting_multicheckbox extends setting_string {
+
+ var $_choices = array();
+ var $_combine = array();
- var $_choices = array();
- var $_combine = array();
+ function update($input) {
+ if ($this->is_protected()) return false;
- function update($input) {
- if ($this->is_protected()) return false;
+ // split any combined values + convert from array to comma separated string
+ $input = ($input) ? $input : array();
+ $input = $this->_array2str($input);
- // split any combined values + convert from array to comma separated string
- $input = ($input) ? $input : array();
- $input = $this->_array2str($input);
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ if ($value == $input) return false;
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- if ($value == $input) return false;
+ if ($this->_pattern && !preg_match($this->_pattern,$input)) {
+ $this->_error = true;
+ $this->_input = $input;
+ return false;
+ }
- if ($this->_pattern && !preg_match($this->_pattern,$input)) {
- $this->_error = true;
- $this->_input = $input;
- return false;
+ $this->_local = $input;
+ return true;
}
- $this->_local = $input;
- return true;
- }
+ function html(&$plugin, $echo=false) {
- function html(&$plugin, $echo=false) {
+ $value = '';
+ $disable = '';
- $value = '';
- $disable = '';
+ if ($this->is_protected()) {
+ $value = $this->_protected;
+ $disable = 'disabled="disabled"';
+ } else {
+ if ($echo && $this->_error) {
+ $value = $this->_input;
+ } else {
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ }
+ }
- if ($this->is_protected()) {
- $value = $this->_protected;
- $disable = 'disabled="disabled"';
- } else {
- if ($echo && $this->_error) {
- $value = $this->_input;
- } else {
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- }
- }
+ $key = htmlspecialchars($this->_key);
- $key = htmlspecialchars($this->_key);
+ // convert from comma separated list into array + combine complimentary actions
+ $value = $this->_str2array($value);
+ $default = $this->_str2array($this->_default);
- // convert from comma separated list into array + combine complimentary actions
- $value = $this->_str2array($value);
- $default = $this->_str2array($this->_default);
+ $input = '';
+ foreach ($this->_choices as $choice) {
+ $idx = array_search($choice, $value);
+ $idx_default = array_search($choice,$default);
- $input = '';
- foreach ($this->_choices as $choice) {
- $idx = array_search($choice, $value);
- $idx_default = array_search($choice,$default);
+ $checked = ($idx !== false) ? 'checked="checked"' : '';
- $checked = ($idx !== false) ? 'checked="checked"' : '';
+ // ideally this would be handled using a second class of "default", however IE6 does not
+ // correctly support CSS selectors referencing multiple class names on the same element
+ // (e.g. .default.selection).
+ $class = (($idx !== false) == (false !== $idx_default)) ? " selectiondefault" : "";
- // ideally this would be handled using a second class of "default", however IE6 does not
- // correctly support CSS selectors referencing multiple class names on the same element
- // (e.g. .default.selection).
- $class = (($idx !== false) == (false !== $idx_default)) ? " selectiondefault" : "";
+ $prompt = ($plugin->getLang($this->_key.'_'.$choice) ?
+ $plugin->getLang($this->_key.'_'.$choice) : htmlspecialchars($choice));
- $prompt = ($plugin->getLang($this->_key.'_'.$choice) ?
- $plugin->getLang($this->_key.'_'.$choice) : htmlspecialchars($choice));
+ $input .= '<div class="selection'.$class.'">'."\n";
+ $input .= '<label for="config___'.$key.'_'.$choice.'">'.$prompt."</label>\n";
+ $input .= '<input id="config___'.$key.'_'.$choice.'" name="config['.$key.'][]" type="checkbox" class="checkbox" value="'.$choice.'" '.$disable.' '.$checked."/>\n";
+ $input .= "</div>\n";
- $input .= '<div class="selection'.$class.'">'."\n";
- $input .= '<label for="config___'.$key.'_'.$choice.'">'.$prompt."</label>\n";
- $input .= '<input id="config___'.$key.'_'.$choice.'" name="config['.$key.'][]" type="checkbox" class="checkbox" value="'.$choice.'" '.$disable.' '.$checked."/>\n";
- $input .= "</div>\n";
+ // remove this action from the disabledactions array
+ if ($idx !== false) unset($value[$idx]);
+ if ($idx_default !== false) unset($default[$idx_default]);
+ }
- // remove this action from the disabledactions array
- if ($idx !== false) unset($value[$idx]);
- if ($idx_default !== false) unset($default[$idx_default]);
- }
+ // handle any remaining values
+ $other = join(',',$value);
- // handle any remaining values
- $other = join(',',$value);
+ $class = (count($default == count($value)) && (count($value) == count(array_intersect($value,$default)))) ?
+ " selectiondefault" : "";
- $class = (count($default == count($value)) && (count($value) == count(array_intersect($value,$default)))) ?
- " selectiondefault" : "";
+ $input .= '<div class="other'.$class.'">'."\n";
+ $input .= '<label for="config___'.$key.'_other">'.$plugin->getLang($key.'_other')."</label>\n";
+ $input .= '<input id="config___'.$key.'_other" name="config['.$key.'][other]" type="text" class="edit" value="'.htmlspecialchars($other).'" '.$disable." />\n";
+ $input .= "</div>\n";
- $input .= '<div class="other'.$class.'">'."\n";
- $input .= '<label for="config___'.$key.'_other">'.$plugin->getLang($key.'_other')."</label>\n";
- $input .= '<input id="config___'.$key.'_other" name="config['.$key.'][other]" type="text" class="edit" value="'.htmlspecialchars($other).'" '.$disable." />\n";
- $input .= "</div>\n";
+ $label = '<label>'.$this->prompt($plugin).'</label>';
+ return array($label,$input);
+ }
- $label = '<label>'.$this->prompt($plugin).'</label>';
- return array($label,$input);
- }
+ /**
+ * convert comma separated list to an array and combine any complimentary values
+ */
+ function _str2array($str) {
+ $array = explode(',',$str);
+
+ if (!empty($this->_combine)) {
+ foreach ($this->_combine as $key => $combinators) {
+ $idx = array();
+ foreach ($combinators as $val) {
+ if (($idx[] = array_search($val, $array)) === false) break;
+ }
+
+ if (count($idx) && $idx[count($idx)-1] !== false) {
+ foreach ($idx as $i) unset($array[$i]);
+ $array[] = $key;
+ }
+ }
+ }
- /**
- * convert comma separated list to an array and combine any complimentary values
- */
- function _str2array($str) {
- $array = explode(',',$str);
-
- if (!empty($this->_combine)) {
- foreach ($this->_combine as $key => $combinators) {
- $idx = array();
- foreach ($combinators as $val) {
- if (($idx[] = array_search($val, $array)) === false) break;
- }
-
- if (count($idx) && $idx[count($idx)-1] !== false) {
- foreach ($idx as $i) unset($array[$i]);
- $array[] = $key;
- }
+ return $array;
}
- }
- return $array;
- }
+ /**
+ * convert array of values + other back to a comma separated list, incl. splitting any combined values
+ */
+ function _array2str($input) {
- /**
- * convert array of values + other back to a comma separated list, incl. splitting any combined values
- */
- function _array2str($input) {
+ // handle other
+ $other = trim($input['other']);
+ $other = !empty($other) ? explode(',',str_replace(' ','',$input['other'])) : array();
+ unset($input['other']);
- // handle other
- $other = trim($input['other']);
- $other = !empty($other) ? explode(',',str_replace(' ','',$input['other'])) : array();
- unset($input['other']);
+ $array = array_unique(array_merge($input, $other));
- $array = array_unique(array_merge($input, $other));
+ // deconstruct any combinations
+ if (!empty($this->_combine)) {
+ foreach ($this->_combine as $key => $combinators) {
- // deconstruct any combinations
- if (!empty($this->_combine)) {
- foreach ($this->_combine as $key => $combinators) {
+ $idx = array_search($key,$array);
+ if ($idx !== false) {
+ unset($array[$idx]);
+ $array = array_merge($array, $combinators);
+ }
+ }
+ }
- $idx = array_search($key,$array);
- if ($idx !== false) {
- unset($array[$idx]);
- $array = array_merge($array, $combinators);
- }
+ return join(',',array_unique($array));
}
- }
-
- return join(',',array_unique($array));
}
- }
}
if (!class_exists('setting_regex')){
- class setting_regex extends setting_string {
+ class setting_regex extends setting_string {
var $_delimiter = '/'; // regex delimiter to be used in testing input
var $_pregflags = 'ui'; // regex pattern modifiers to be used in testing input
/**
- * update changed setting with user provided value $input
- * - if changed value fails error check, save it to $this->_input (to allow echoing later)
- * - if changed value passes error check, set $this->_local to the new value
+ * update changed setting with user provided value $input
+ * - if changed value fails error check, save it to $this->_input (to allow echoing later)
+ * - if changed value passes error check, set $this->_local to the new value
*
- * @param mixed $input the new value
- * @return boolean true if changed, false otherwise (incl. on error)
+ * @param mixed $input the new value
+ * @return boolean true if changed, false otherwise (incl. on error)
*/
function update($input) {
diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php
index e4b97eb01..d0f99fa8f 100644
--- a/lib/plugins/config/settings/extra.class.php
+++ b/lib/plugins/config/settings/extra.class.php
@@ -6,204 +6,204 @@
*/
if (!class_exists('setting_sepchar')) {
- class setting_sepchar extends setting_multichoice {
+ class setting_sepchar extends setting_multichoice {
- function setting_sepchar($key,$param=NULL) {
- $str = '_-.';
- for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i};
+ function setting_sepchar($key,$param=null) {
+ $str = '_-.';
+ for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i};
- // call foundation class constructor
- $this->setting($key,$param);
+ // call foundation class constructor
+ $this->setting($key,$param);
+ }
}
- }
}
if (!class_exists('setting_savedir')) {
- class setting_savedir extends setting_string {
+ class setting_savedir extends setting_string {
- function update($input) {
- if ($this->is_protected()) return false;
+ function update($input) {
+ if ($this->is_protected()) return false;
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- if ($value == $input) return false;
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ if ($value == $input) return false;
- if (!init_path($input)) {
- $this->_error = true;
- $this->_input = $input;
- return false;
- }
+ if (!init_path($input)) {
+ $this->_error = true;
+ $this->_input = $input;
+ return false;
+ }
- $this->_local = $input;
- return true;
+ $this->_local = $input;
+ return true;
+ }
}
- }
}
if (!class_exists('setting_authtype')) {
- class setting_authtype extends setting_multichoice {
+ class setting_authtype extends setting_multichoice {
- function initialize($default,$local,$protected) {
- global $plugin_controller;
+ function initialize($default,$local,$protected) {
+ global $plugin_controller;
- // retrieve auth types provided by plugins
- foreach ($plugin_controller->getList('auth') as $plugin) {
- $this->_choices[] = $plugin;
- }
-
- parent::initialize($default,$local,$protected);
- }
-
- function update($input) {
- global $plugin_controller;
-
- // is an update possible/requested?
- $local = $this->_local; // save this, parent::update() may change it
- if (!parent::update($input)) return false; // nothing changed or an error caught by parent
- $this->_local = $local; // restore original, more error checking to come
-
- // attempt to load the plugin
- $auth_plugin = $plugin_controller->load('auth', $input);
-
- // @TODO: throw an error in plugin controller instead of returning null
- if (is_null($auth_plugin)) {
- $this->_error = true;
- msg('Cannot load Auth Plugin "' . $input . '"', -1);
- return false;
- }
+ // retrieve auth types provided by plugins
+ foreach ($plugin_controller->getList('auth') as $plugin) {
+ $this->_choices[] = $plugin;
+ }
- // verify proper instantiation (is this really a plugin?) @TODO use instanceof? implement interface?
- if (is_object($auth_plugin) && !method_exists($auth_plugin, 'getPluginName')) {
- $this->_error = true;
- msg('Cannot create Auth Plugin "' . $input . '"', -1);
- return false;
+ parent::initialize($default,$local,$protected);
}
- // did we change the auth type? logout
- global $conf;
- if($conf['authtype'] != $input) {
- msg('Authentication system changed. Please re-login.');
- auth_logoff();
+ function update($input) {
+ global $plugin_controller;
+
+ // is an update possible/requested?
+ $local = $this->_local; // save this, parent::update() may change it
+ if (!parent::update($input)) return false; // nothing changed or an error caught by parent
+ $this->_local = $local; // restore original, more error checking to come
+
+ // attempt to load the plugin
+ $auth_plugin = $plugin_controller->load('auth', $input);
+
+ // @TODO: throw an error in plugin controller instead of returning null
+ if (is_null($auth_plugin)) {
+ $this->_error = true;
+ msg('Cannot load Auth Plugin "' . $input . '"', -1);
+ return false;
+ }
+
+ // verify proper instantiation (is this really a plugin?) @TODO use instanceof? implement interface?
+ if (is_object($auth_plugin) && !method_exists($auth_plugin, 'getPluginName')) {
+ $this->_error = true;
+ msg('Cannot create Auth Plugin "' . $input . '"', -1);
+ return false;
+ }
+
+ // did we change the auth type? logout
+ global $conf;
+ if($conf['authtype'] != $input) {
+ msg('Authentication system changed. Please re-login.');
+ auth_logoff();
+ }
+
+ $this->_local = $input;
+ return true;
}
-
- $this->_local = $input;
- return true;
}
- }
}
if (!class_exists('setting_im_convert')) {
- class setting_im_convert extends setting_string {
+ class setting_im_convert extends setting_string {
- function update($input) {
- if ($this->is_protected()) return false;
+ function update($input) {
+ if ($this->is_protected()) return false;
- $input = trim($input);
+ $input = trim($input);
- $value = is_null($this->_local) ? $this->_default : $this->_local;
- if ($value == $input) return false;
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ if ($value == $input) return false;
- if ($input && !@file_exists($input)) {
- $this->_error = true;
- $this->_input = $input;
- return false;
- }
+ if ($input && !@file_exists($input)) {
+ $this->_error = true;
+ $this->_input = $input;
+ return false;
+ }
- $this->_local = $input;
- return true;
+ $this->_local = $input;
+ return true;
+ }
}
- }
}
if (!class_exists('setting_disableactions')) {
- class setting_disableactions extends setting_multicheckbox {
+ class setting_disableactions extends setting_multicheckbox {
- function html(&$plugin, $echo=false) {
- global $lang;
+ function html(&$plugin, $echo=false) {
+ global $lang;
- // make some language adjustments (there must be a better way)
- // transfer some DokuWiki language strings to the plugin
- if (!$plugin->localised) $this->setupLocale();
- $plugin->lang[$this->_key.'_revisions'] = $lang['btn_revs'];
+ // make some language adjustments (there must be a better way)
+ // transfer some DokuWiki language strings to the plugin
+ if (!$plugin->localised) $this->setupLocale();
+ $plugin->lang[$this->_key.'_revisions'] = $lang['btn_revs'];
- foreach ($this->_choices as $choice)
- if (isset($lang['btn_'.$choice])) $plugin->lang[$this->_key.'_'.$choice] = $lang['btn_'.$choice];
+ foreach ($this->_choices as $choice)
+ if (isset($lang['btn_'.$choice])) $plugin->lang[$this->_key.'_'.$choice] = $lang['btn_'.$choice];
- return parent::html($plugin, $echo);
+ return parent::html($plugin, $echo);
+ }
}
- }
}
if (!class_exists('setting_compression')) {
- class setting_compression extends setting_multichoice {
+ class setting_compression extends setting_multichoice {
- var $_choices = array('0'); // 0 = no compression, always supported
+ var $_choices = array('0'); // 0 = no compression, always supported
- function initialize($default,$local,$protected) {
+ function initialize($default,$local,$protected) {
- // populate _choices with the compression methods supported by this php installation
- if (function_exists('gzopen')) $this->_choices[] = 'gz';
- if (function_exists('bzopen')) $this->_choices[] = 'bz2';
+ // populate _choices with the compression methods supported by this php installation
+ if (function_exists('gzopen')) $this->_choices[] = 'gz';
+ if (function_exists('bzopen')) $this->_choices[] = 'bz2';
- parent::initialize($default,$local,$protected);
+ parent::initialize($default,$local,$protected);
+ }
}
- }
}
if (!class_exists('setting_license')) {
- class setting_license extends setting_multichoice {
+ class setting_license extends setting_multichoice {
- var $_choices = array(''); // none choosen
+ var $_choices = array(''); // none choosen
- function initialize($default,$local,$protected) {
- global $license;
+ function initialize($default,$local,$protected) {
+ global $license;
- foreach($license as $key => $data){
- $this->_choices[] = $key;
- $this->lang[$this->_key.'_o_'.$key] = $data['name'];
- }
+ foreach($license as $key => $data){
+ $this->_choices[] = $key;
+ $this->lang[$this->_key.'_o_'.$key] = $data['name'];
+ }
- parent::initialize($default,$local,$protected);
+ parent::initialize($default,$local,$protected);
+ }
}
- }
}
if (!class_exists('setting_renderer')) {
- class setting_renderer extends setting_multichoice {
- var $_prompts = array();
+ class setting_renderer extends setting_multichoice {
+ var $_prompts = array();
- function initialize($default,$local,$protected) {
- $format = $this->_format;
+ function initialize($default,$local,$protected) {
+ $format = $this->_format;
- foreach (plugin_list('renderer') as $plugin) {
- $renderer =& plugin_load('renderer',$plugin);
- if (method_exists($renderer,'canRender') && $renderer->canRender($format)) {
- $this->_choices[] = $plugin;
+ foreach (plugin_list('renderer') as $plugin) {
+ $renderer =& plugin_load('renderer',$plugin);
+ if (method_exists($renderer,'canRender') && $renderer->canRender($format)) {
+ $this->_choices[] = $plugin;
- $info = $renderer->getInfo();
- $this->_prompts[$plugin] = $info['name'];
- }
- }
-
- parent::initialize($default,$local,$protected);
- }
+ $info = $renderer->getInfo();
+ $this->_prompts[$plugin] = $info['name'];
+ }
+ }
- function html(&$plugin, $echo=false) {
-
- // make some language adjustments (there must be a better way)
- // transfer some plugin names to the config plugin
- if (!$plugin->localised) $this->setupLocale();
+ parent::initialize($default,$local,$protected);
+ }
- foreach ($this->_choices as $choice) {
- if (!isset($plugin->lang[$this->_key.'_o_'.$choice])) {
- if (!isset($this->_prompts[$choice])) {
- $plugin->lang[$this->_key.'_o_'.$choice] = sprintf($plugin->lang['renderer__core'],$choice);
- } else {
- $plugin->lang[$this->_key.'_o_'.$choice] = sprintf($plugin->lang['renderer__plugin'],$this->_prompts[$choice]);
- }
+ function html(&$plugin, $echo=false) {
+
+ // make some language adjustments (there must be a better way)
+ // transfer some plugin names to the config plugin
+ if (!$plugin->localised) $this->setupLocale();
+
+ foreach ($this->_choices as $choice) {
+ if (!isset($plugin->lang[$this->_key.'_o_'.$choice])) {
+ if (!isset($this->_prompts[$choice])) {
+ $plugin->lang[$this->_key.'_o_'.$choice] = sprintf($plugin->lang['renderer__core'],$choice);
+ } else {
+ $plugin->lang[$this->_key.'_o_'.$choice] = sprintf($plugin->lang['renderer__plugin'],$this->_prompts[$choice]);
+ }
+ }
+ }
+ return parent::html($plugin, $echo);
}
- }
- return parent::html($plugin, $echo);
}
- }
}
diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php
index de4de6aef..72c58620d 100644
--- a/lib/plugins/plugin/admin.php
+++ b/lib/plugins/plugin/admin.php
@@ -37,7 +37,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
/**
* @var ap_manage
*/
- var $handler = NULL;
+ var $handler = null;
var $functions = array('delete','update',/*'settings',*/'info'); // require a plugin name
var $commands = array('manage','download','enable'); // don't require a plugin name
@@ -109,7 +109,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin {
$this->setupLocale();
$this->_get_plugin_list();
- if ($this->handler === NULL) $this->handler = new ap_manage($this, $this->plugin);
+ if ($this->handler === null) $this->handler = new ap_manage($this, $this->plugin);
ptln('<div id="plugin__manager">');
$this->handler->html();
diff --git a/lib/plugins/plugin/classes/ap_info.class.php b/lib/plugins/plugin/classes/ap_info.class.php
index 44926c035..dfeb52b9d 100644
--- a/lib/plugins/plugin/classes/ap_info.class.php
+++ b/lib/plugins/plugin/classes/ap_info.class.php
@@ -15,7 +15,7 @@ class ap_info extends ap_manage {
foreach ($component_list as $component) {
- if (($obj = &plugin_load($component['type'],$component['name'],false,true)) === NULL) continue;
+ if (($obj = &plugin_load($component['type'],$component['name'],false,true)) === null) continue;
$compname = explode('_',$component['name']);
if($compname[1]){
diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php
index 3ec740dae..48be63050 100644
--- a/lib/plugins/plugin/classes/ap_manage.class.php
+++ b/lib/plugins/plugin/classes/ap_manage.class.php
@@ -2,7 +2,7 @@
class ap_manage {
- var $manager = NULL;
+ var $manager = null;
var $lang = array();
var $plugin = '';
var $downloaded = array();
diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php
index 98fae12c7..a92f8b1c2 100644
--- a/lib/plugins/plugin/lang/cs/lang.php
+++ b/lib/plugins/plugin/lang/cs/lang.php
@@ -1,8 +1,8 @@
<?php
+
/**
- * Czech language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Tomas Valenta <t.valenta@sh.cvut.cz>
* @author Zbynek Krivka <zbynek.krivka@seznam.cz>
* @author Bohumir Zamecnik <bohumir@zamecnik.org>
@@ -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['menu'] = 'Správa pluginů';
$lang['download'] = 'Stáhnout a instalovat plugin';
diff --git a/lib/plugins/plugin/lang/de-informal/lang.php b/lib/plugins/plugin/lang/de-informal/lang.php
index 5d1649434..8f1cea5e5 100644
--- a/lib/plugins/plugin/lang/de-informal/lang.php
+++ b/lib/plugins/plugin/lang/de-informal/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * German (informal) language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Alexander Fischer <tbanus@os-forge.net>
* @author Juergen Schwarzer <jschwarzer@freenet.de>
* @author Marcel Metz <marcel_metz@gmx.de>
diff --git a/lib/plugins/plugin/lang/eo/lang.php b/lib/plugins/plugin/lang/eo/lang.php
index 67553454c..624246a21 100644
--- a/lib/plugins/plugin/lang/eo/lang.php
+++ b/lib/plugins/plugin/lang/eo/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Esperantolanguage file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Felipe Castro <fefcas@uol.com.br>
* @author Felipe Castro <fefcas@gmail.com>
* @author Felipe Castro <fefcas (cxe) gmail (punkto) com>
diff --git a/lib/plugins/plugin/lang/ko/admin_plugin.txt b/lib/plugins/plugin/lang/ko/admin_plugin.txt
index 7315025b5..9390712dd 100644
--- a/lib/plugins/plugin/lang/ko/admin_plugin.txt
+++ b/lib/plugins/plugin/lang/ko/admin_plugin.txt
@@ -1,3 +1,3 @@
====== 플러그인 관리 ======
-이 페이지에서 도쿠위키 [[doku>ko:plugins|플러그인]]에 관련된 모든 관리 작업을 합니다. 플러그인을 다운로드하거나 설치하기 위해서는 웹 서버가 플러그인 디렉터리에 대해 쓰기 권한을 가지고 있어야 합니다. \ No newline at end of file
+이 페이지에서 도쿠위키 [[doku>ko:plugins|플러그인]]에 관련된 모든 관리를 할 수 있습니다. 플러그인을 다운로드하고 설치하기 위해서는 웹 서버가 플러그인 폴더에 대해 쓰기 권한이 있어야 합니다. \ No newline at end of file
diff --git a/lib/plugins/plugin/lang/ko/lang.php b/lib/plugins/plugin/lang/ko/lang.php
index 9cecaa278..6ef9cd69a 100644
--- a/lib/plugins/plugin/lang/ko/lang.php
+++ b/lib/plugins/plugin/lang/ko/lang.php
@@ -11,8 +11,8 @@
* @author Myeongjin <aranet100@gmail.com>
*/
$lang['menu'] = '플러그인 관리';
-$lang['download'] = '새 플러그인 다운로드 및 설치';
-$lang['manage'] = '이미 설치한 플러그인';
+$lang['download'] = '새 플러그인을 다운로드하고 설치';
+$lang['manage'] = '설치된 플러그인';
$lang['btn_info'] = '정보';
$lang['btn_update'] = '업데이트';
$lang['btn_delete'] = '삭제';
@@ -21,7 +21,7 @@ $lang['btn_download'] = '다운로드';
$lang['btn_enable'] = '저장';
$lang['url'] = 'URL';
$lang['installed'] = '설치됨:';
-$lang['lastupdate'] = '가장 나중에 업데이트됨:';
+$lang['lastupdate'] = '마지막으로 업데이트됨:';
$lang['source'] = '원본:';
$lang['unknown'] = '알 수 없음';
$lang['updating'] = '업데이트 중 ...';
@@ -41,13 +41,13 @@ $lang['name'] = '이름:';
$lang['date'] = '날짜:';
$lang['type'] = '종류:';
$lang['desc'] = '설명:';
-$lang['author'] = '만든이:';
+$lang['author'] = '저자:';
$lang['www'] = '웹:';
$lang['error'] = '알 수 없는 문제가 발생했습니다.';
$lang['error_download'] = '플러그인 파일을 다운로드 할 수 없습니다: %s';
$lang['error_badurl'] = '잘못된 URL 같습니다 - URL에서 파일 이름을 알 수 없습니다';
$lang['error_dircreate'] = '다운로드를 받기 위한 임시 디렉터리를 만들 수 없습니다';
-$lang['error_decompress'] = '플러그인 관리자가 다운로드 받은 파일을 압축을 풀 수 없습니다. 잘못 다운로드 받았을 수도 있으니 다시 한번 시도하거나 압축 포맷을 알 수 없는 경우에는 다운로드한 후 수동으로 직접 설치하세요.';
+$lang['error_decompress'] = '플러그인 관리자가 다운로드 받은 파일을 압축을 풀 수 없습니다. 잘못 다운로드 받았을 수도 있으니 다시 한 번 시도하거나 압축 포맷을 알 수 없는 경우에는 다운로드한 후 수동으로 직접 설치하세요.';
$lang['error_copy'] = '플러그인을 설치하는 동안 파일 복사하는 데 오류가 발생했습니다. <em>%s</em>: 디스크가 꽉 찼거나 파일 접근 권한이 잘못된 경우입니다. 플러그인 설치가 부분적으로만 이루어졌을 것입니다. 설치가 불완전합니다.';
$lang['error_delete'] = '<em>%s</em> 플러그인을 삭제하는 동안 오류가 발생했습니다. 대부분의 경우 불완전한 파일이거나 디렉터리 접근 권한이 잘못된 경우입니다';
$lang['enabled'] = '%s 플러그인을 활성화했습니다.';
diff --git a/lib/plugins/plugin/lang/ne/lang.php b/lib/plugins/plugin/lang/ne/lang.php
index 27c4f3b60..94e7b8089 100644
--- a/lib/plugins/plugin/lang/ne/lang.php
+++ b/lib/plugins/plugin/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 SarojKumar Dhakal <lotusnagarkot@yahoo.com>
* @author Saroj Dhakal<lotusnagarkot@yahoo.com>
diff --git a/lib/plugins/plugin/lang/pt-br/lang.php b/lib/plugins/plugin/lang/pt-br/lang.php
index 437b6ca57..c025188f3 100644
--- a/lib/plugins/plugin/lang/pt-br/lang.php
+++ b/lib/plugins/plugin/lang/pt-br/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Frederico Gonçalves Guimarães <frederico@teia.bio.br>
* @author Felipe Castro <fefcas@gmail.com>
* @author Lucien Raven <lucienraven@yahoo.com.br>
diff --git a/lib/plugins/plugin/lang/pt/lang.php b/lib/plugins/plugin/lang/pt/lang.php
index dccd4f738..aa6b2e2ec 100644
--- a/lib/plugins/plugin/lang/pt/lang.php
+++ b/lib/plugins/plugin/lang/pt/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Portugueselanguage file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com>
* @author Enrico Nicoletto <liverig@gmail.com>
* @author Fil <fil@meteopt.com>
diff --git a/lib/plugins/plugin/lang/ru/lang.php b/lib/plugins/plugin/lang/ru/lang.php
index 47e46c9c7..6af100bd3 100644
--- a/lib/plugins/plugin/lang/ru/lang.php
+++ b/lib/plugins/plugin/lang/ru/lang.php
@@ -51,7 +51,7 @@ $lang['date'] = 'Дата:';
$lang['type'] = 'Тип:';
$lang['desc'] = 'Описание:';
$lang['author'] = 'Автор:';
-$lang['www'] = 'Странца:';
+$lang['www'] = 'Страница:';
$lang['error'] = 'Произошла неизвестная ошибка.';
$lang['error_download'] = 'Не могу скачать файл плагина: %s';
$lang['error_badurl'] = 'Возможно неправильный адрес — не могу определить имя файла из адреса';
diff --git a/lib/plugins/plugin/lang/sl/lang.php b/lib/plugins/plugin/lang/sl/lang.php
index 3e5f8c8af..e205c57f5 100644
--- a/lib/plugins/plugin/lang/sl/lang.php
+++ b/lib/plugins/plugin/lang/sl/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Slovenian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Dejan Levec <webphp@gmail.com>
* @author Boštjan Seničar <senicar@gmail.com>
* @author Gregor Skumavc (grega.skumavc@gmail.com)
diff --git a/lib/plugins/popularity/lang/cs/lang.php b/lib/plugins/popularity/lang/cs/lang.php
index ee090a131..4ab5916db 100644
--- a/lib/plugins/popularity/lang/cs/lang.php
+++ b/lib/plugins/popularity/lang/cs/lang.php
@@ -1,7 +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.cz
* @author Marek Sacha <sachamar@fel.cvut.cz>
diff --git a/lib/plugins/popularity/lang/de-informal/lang.php b/lib/plugins/popularity/lang/de-informal/lang.php
index 0abf90b0b..69efa7470 100644
--- a/lib/plugins/popularity/lang/de-informal/lang.php
+++ b/lib/plugins/popularity/lang/de-informal/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * German (informal) language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Alexander Fischer <tbanus@os-forge.net>
* @author Juergen Schwarzer <jschwarzer@freenet.de>
* @author Marcel Metz <marcel_metz@gmx.de>
diff --git a/lib/plugins/popularity/lang/eo/lang.php b/lib/plugins/popularity/lang/eo/lang.php
index c2bca23b1..5e67e5bdb 100644
--- a/lib/plugins/popularity/lang/eo/lang.php
+++ b/lib/plugins/popularity/lang/eo/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Esperanto language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Felipo Kastro <fefcas@gmail.com>
* @author Felipe Castro <fefcas@gmail.com>
* @author Robert Bogenschneider <robog@gmx.de>
diff --git a/lib/plugins/popularity/lang/ko/intro.txt b/lib/plugins/popularity/lang/ko/intro.txt
index 16475ce95..bc9bb9dd0 100644
--- a/lib/plugins/popularity/lang/ko/intro.txt
+++ b/lib/plugins/popularity/lang/ko/intro.txt
@@ -1,6 +1,6 @@
====== 인기도 조사 ======
-설치된 위키의 익명 정보를 도쿠위키 개발자에게 보냅니다. 이 [[doku>ko:popularity|도구]]는 도쿠위키가 실제 사용자에게 어떻게 사용되는지 도쿠위키 개발자에게 알려줌으로써 이 후 개발 시 참고가 됩니다.
+설치된 위키의 익명 정보를 도쿠위키 개발자에게 보냅니다. 이 [[doku>ko:popularity|도구]]는 도쿠위키가 실제 사용자에게 어떻게 사용되는지 도쿠위키 개발자에게 알려줌으로써 이 후 개발 시 참고가 됩니다.
설치된 위키가 커짐에 따라서 이 과정을 반복할 필요가 있습니다. 반복된 데이터는 익명 ID로 구별되어집니다.
diff --git a/lib/plugins/popularity/lang/ko/lang.php b/lib/plugins/popularity/lang/ko/lang.php
index e9bcc7dcc..f52e0007a 100644
--- a/lib/plugins/popularity/lang/ko/lang.php
+++ b/lib/plugins/popularity/lang/ko/lang.php
@@ -12,7 +12,7 @@
*/
$lang['name'] = '인기도 조사 (불러오는 데 시간이 걸릴 수 있습니다)';
$lang['submit'] = '자료 보내기';
-$lang['autosubmit'] = '자료를 자동으로 매달 한번씩 보내기';
+$lang['autosubmit'] = '자료를 자동으로 한 달에 한 번씩 보내기';
$lang['submissionFailed'] = '다음과 같은 이유로 자료 보내기에 실패했습니다:';
$lang['submitDirectly'] = '아래의 양식에 맞춰 수동으로 작성된 자료를 보낼 수 있습니다.';
$lang['autosubmitError'] = '다음과 같은 이유로 자동 자료 보내기에 실패했습니다:';
diff --git a/lib/plugins/popularity/lang/ne/lang.php b/lib/plugins/popularity/lang/ne/lang.php
index d6aa56eb7..c0d925a46 100644
--- a/lib/plugins/popularity/lang/ne/lang.php
+++ b/lib/plugins/popularity/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 SarojKumar Dhakal <lotusnagarkot@yahoo.com>
* @author Saroj Dhakal<lotusnagarkot@yahoo.com>
diff --git a/lib/plugins/popularity/lang/pt-br/lang.php b/lib/plugins/popularity/lang/pt-br/lang.php
index c2ec36145..280f072b8 100644
--- a/lib/plugins/popularity/lang/pt-br/lang.php
+++ b/lib/plugins/popularity/lang/pt-br/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Frederico Gonçalves Guimarães <frederico@teia.bio.br>
* @author Lucien Raven <lucienraven@yahoo.com.br>
* @author Enrico Nicoletto <liverig@gmail.com>
diff --git a/lib/plugins/popularity/lang/pt/lang.php b/lib/plugins/popularity/lang/pt/lang.php
index ac27dc8c0..e30b9d62b 100644
--- a/lib/plugins/popularity/lang/pt/lang.php
+++ b/lib/plugins/popularity/lang/pt/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Enrico Nicoletto <liverig@gmail.com>
* @author Fil <fil@meteopt.com>
* @author André Neves <drakferion@gmail.com>
diff --git a/lib/plugins/popularity/lang/ru/submitted.txt b/lib/plugins/popularity/lang/ru/submitted.txt
index a239943a4..845410171 100644
--- a/lib/plugins/popularity/lang/ru/submitted.txt
+++ b/lib/plugins/popularity/lang/ru/submitted.txt
@@ -1,2 +1,3 @@
-====== Общественная обратная связь ======
+====== Сбор информации о популярности ======
+
Данные были успешно отправлены. \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/sl/lang.php b/lib/plugins/popularity/lang/sl/lang.php
index 5c92dd7c4..abde6555b 100644
--- a/lib/plugins/popularity/lang/sl/lang.php
+++ b/lib/plugins/popularity/lang/sl/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Slovenian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Matej Urbančič (mateju@svn.gnome.org)
*/
$lang['name'] = 'Poročilo o uporabi (nalaganje strani je lahko dolgotrajno)';
diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php
index beff10ced..b65472e4c 100644
--- a/lib/plugins/revert/admin.php
+++ b/lib/plugins/revert/admin.php
@@ -157,7 +157,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin {
echo "<img $att />";
echo '</a> ';
- echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?NULL:$recent['id']);
+ echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?null:$recent['id']);
echo ' – '.htmlspecialchars($recent['sum']);
echo ' <span class="user">';
diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php
index eef3295ba..d918e2e69 100644
--- a/lib/plugins/revert/lang/cs/lang.php
+++ b/lib/plugins/revert/lang/cs/lang.php
@@ -1,9 +1,8 @@
<?php
+
/**
- * Czech language file
- *
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
+ *
* @author Bohumir Zamecnik <bohumir@zamecnik.org>
* @author Zbynek Krivka <zbynek.krivka@seznam.cz>
* @author tomas@valenta.cz
@@ -14,6 +13,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['menu'] = 'Obnova zaspamovaných stránek';
$lang['filter'] = 'Hledat zaspamované stránky';
diff --git a/lib/plugins/revert/lang/de-informal/lang.php b/lib/plugins/revert/lang/de-informal/lang.php
index 7ca141e3c..93a932945 100644
--- a/lib/plugins/revert/lang/de-informal/lang.php
+++ b/lib/plugins/revert/lang/de-informal/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * German (informal) language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Alexander Fischer <tbanus@os-forge.net>
* @author Juergen Schwarzer <jschwarzer@freenet.de>
* @author Marcel Metz <marcel_metz@gmx.de>
diff --git a/lib/plugins/revert/lang/eo/lang.php b/lib/plugins/revert/lang/eo/lang.php
index 05eec26a8..2d0b0f267 100644
--- a/lib/plugins/revert/lang/eo/lang.php
+++ b/lib/plugins/revert/lang/eo/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Esperantolanguage file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Felipe Castro <fefcas@uol.com.br>
* @author Felipe Castro <fefcas@gmail.com>
* @author Felipe Castro <fefcas (cxe) gmail (punkto) com>
diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php
index de304da5b..e63706960 100644
--- a/lib/plugins/revert/lang/ko/lang.php
+++ b/lib/plugins/revert/lang/ko/lang.php
@@ -14,8 +14,8 @@ $lang['menu'] = '되돌리기 관리자';
$lang['filter'] = '스팸 문서 찾기';
$lang['revert'] = '선택한 문서 되돌리기';
$lang['reverted'] = '%s 판을 %s 판으로 되돌림';
-$lang['removed'] = '%s 삭제함';
+$lang['removed'] = '%s 제거됨';
$lang['revstart'] = '되돌리기 작업을 시작합니다. 오랜 시간이 걸릴 수 있습니다. 완료되기 전에 스크립트 시간 초과가 발생한다면 더 작은 작업으로 나누어서 되돌리시기 바랍니다.';
$lang['revstop'] = '되돌리기 작업이 성공적으로 끝났습니다.';
$lang['note1'] = '참고: 대소문자를 구별해 찾습니다';
-$lang['note2'] = '참고: 이 문서는 <i>%s</i> 스팸 단어를 포함하지 않은 최근 이전 판으로 되돌립니다. ';
+$lang['note2'] = '참고: 문서는 <i>%s</i> 스팸 단어를 포함하지 않은 최신 판으로 되돌립니다. ';
diff --git a/lib/plugins/revert/lang/ne/lang.php b/lib/plugins/revert/lang/ne/lang.php
index 4fd337532..8bd7c3327 100644
--- a/lib/plugins/revert/lang/ne/lang.php
+++ b/lib/plugins/revert/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 SarojKumar Dhakal <lotusnagarkot@yahoo.com>
* @author Saroj Dhakal<lotusnagarkot@yahoo.com>
diff --git a/lib/plugins/revert/lang/pt-br/lang.php b/lib/plugins/revert/lang/pt-br/lang.php
index b74e0408f..103970484 100644
--- a/lib/plugins/revert/lang/pt-br/lang.php
+++ b/lib/plugins/revert/lang/pt-br/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Frederico Gonçalves Guimarães <frederico@teia.bio.br>
* @author Felipe Castro <fefcas@gmail.com>
* @author Lucien Raven <lucienraven@yahoo.com.br>
diff --git a/lib/plugins/revert/lang/pt/lang.php b/lib/plugins/revert/lang/pt/lang.php
index 3b2850f41..f87f77db7 100644
--- a/lib/plugins/revert/lang/pt/lang.php
+++ b/lib/plugins/revert/lang/pt/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com>
* @author Enrico Nicoletto <liverig@gmail.com>
* @author Fil <fil@meteopt.com>
diff --git a/lib/plugins/revert/lang/ru/lang.php b/lib/plugins/revert/lang/ru/lang.php
index defd86de0..73d69b33e 100644
--- a/lib/plugins/revert/lang/ru/lang.php
+++ b/lib/plugins/revert/lang/ru/lang.php
@@ -22,7 +22,7 @@
$lang['menu'] = 'Менеджер откаток';
$lang['filter'] = 'Поиск спам-страниц';
$lang['revert'] = 'Откатить изменения для выбранных страниц';
-$lang['reverted'] = '%s откачена к версии %s';
+$lang['reverted'] = '%s возвращена к версии %s';
$lang['removed'] = '%s удалена';
$lang['revstart'] = 'Начат процесс откатки. Он может занять много времени. Если скрипт не успевает завершить работу и выдаёт ошибку, необходимо произвести откатку более маленькими частями.';
$lang['revstop'] = 'Процесс откатки успешно завершён.';
diff --git a/lib/plugins/revert/lang/sl/lang.php b/lib/plugins/revert/lang/sl/lang.php
index 92b0427ce..df778fd26 100644
--- a/lib/plugins/revert/lang/sl/lang.php
+++ b/lib/plugins/revert/lang/sl/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Slovenian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Matej Urbančič (mateju@svn.gnome.org)
*/
$lang['menu'] = 'Povrnitev okvarjene vsebine';
diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php
index aae11c437..9127f8df2 100644
--- a/lib/plugins/safefnrecode/action.php
+++ b/lib/plugins/safefnrecode/action.php
@@ -15,7 +15,7 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin {
public function register(Doku_Event_Handler $controller) {
- $controller->register_hook('INDEXER_TASKS_RUN', 'BEFORE', $this, 'handle_indexer_tasks_run');
+ $controller->register_hook('INDEXER_TASKS_RUN', 'BEFORE', $this, 'handle_indexer_tasks_run');
}
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index b7839b2b2..6aa403b61 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -137,7 +137,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
$idx = array_search(substr(get_class($this), 7), (array) $this->allowedModes);
if ($idx !== false) {
- unset($this->allowedModes[$idx]);
+ unset($this->allowedModes[$idx]);
}
$this->allowedModesSetup = true;
}
@@ -169,9 +169,9 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
* @return string string in appropriate language or english if not available
*/
function getLang($id) {
- if (!$this->localised) $this->setupLocale();
+ if (!$this->localised) $this->setupLocale();
- return (isset($this->lang[$id]) ? $this->lang[$id] : '');
+ return (isset($this->lang[$id]) ? $this->lang[$id] : '');
}
/**
@@ -184,7 +184,7 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
* @return string parsed contents of the wiki page in xhtml format
*/
function locale_xhtml($id) {
- return p_cached_output($this->localFN($id));
+ return p_cached_output($this->localFN($id));
}
/**
@@ -193,17 +193,17 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
* plugin equivalent of localFN()
*/
function localFN($id) {
- global $conf;
- $plugin = $this->getPluginName();
- $file = DOKU_CONF.'/plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt';
- if (!@file_exists($file)){
- $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt';
- if(!@file_exists($file)){
- //fall back to english
- $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt';
+ global $conf;
+ $plugin = $this->getPluginName();
+ $file = DOKU_CONF.'/plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt';
+ if (!@file_exists($file)){
+ $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt';
+ if(!@file_exists($file)){
+ //fall back to english
+ $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt';
+ }
}
- }
- return $file;
+ return $file;
}
/**
@@ -214,16 +214,16 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
function setupLocale() {
if ($this->localised) return;
- global $conf; // definitely don't invoke "global $lang"
- $path = DOKU_PLUGIN.$this->getPluginName().'/lang/';
-
- $lang = array();
- // don't include once, in case several plugin components require the same language file
- @include($path.'en/lang.php');
- if ($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php');
-
- $this->lang = $lang;
- $this->localised = true;
+ global $conf; // definitely don't invoke "global $lang"
+ $path = DOKU_PLUGIN.$this->getPluginName().'/lang/';
+
+ $lang = array();
+ // don't include once, in case several plugin components require the same language file
+ @include($path.'en/lang.php');
+ if ($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php');
+
+ $this->lang = $lang;
+ $this->localised = true;
}
// configuration methods
diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php
index 762daa6b9..3dba5a86e 100644
--- a/lib/plugins/usermanager/admin.php
+++ b/lib/plugins/usermanager/admin.php
@@ -41,13 +41,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->setupLocale();
if (!isset($auth)) {
- $this->disabled = $this->lang['noauth'];
+ $this->disabled = $this->lang['noauth'];
} else if (!$auth->canDo('getUsers')) {
- $this->disabled = $this->lang['nosupport'];
+ $this->disabled = $this->lang['nosupport'];
} else {
- // we're good to go
- $this->_auth = & $auth;
+ // we're good to go
+ $this->_auth = & $auth;
}
@@ -58,8 +58,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
}
/**
- * return prompt for admin menu
- */
+ * return prompt for admin menu
+ */
function getMenuText($language) {
if (!is_null($this->_auth))
@@ -95,31 +95,31 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
}
if ($cmd != "search") {
- $this->_start = $INPUT->int('start', 0);
- $this->_filter = $this->_retrieveFilter();
+ $this->_start = $INPUT->int('start', 0);
+ $this->_filter = $this->_retrieveFilter();
}
switch($cmd){
- case "add" : $this->_addUser(); break;
- case "delete" : $this->_deleteUser(); break;
- case "modify" : $this->_modifyUser(); break;
- case "edit" : $this->_editUser($param); break;
- case "search" : $this->_setFilter($param);
- $this->_start = 0;
- break;
- case "export" : $this->_export(); break;
- case "import" : $this->_import(); break;
- case "importfails" : $this->_downloadImportFailures(); break;
+ case "add" : $this->_addUser(); break;
+ case "delete" : $this->_deleteUser(); break;
+ case "modify" : $this->_modifyUser(); break;
+ case "edit" : $this->_editUser($param); break;
+ case "search" : $this->_setFilter($param);
+ $this->_start = 0;
+ break;
+ case "export" : $this->_export(); break;
+ case "import" : $this->_import(); break;
+ case "importfails" : $this->_downloadImportFailures(); break;
}
$this->_user_total = $this->_auth->canDo('getUserCount') ? $this->_auth->getUserCount($this->_filter) : -1;
// page handling
switch($cmd){
- case 'start' : $this->_start = 0; break;
- case 'prev' : $this->_start -= $this->_pagesize; break;
- case 'next' : $this->_start += $this->_pagesize; break;
- case 'last' : $this->_start = $this->_user_total; break;
+ case 'start' : $this->_start = 0; break;
+ case 'prev' : $this->_start -= $this->_pagesize; break;
+ case 'next' : $this->_start += $this->_pagesize; break;
+ case 'last' : $this->_start = $this->_user_total; break;
}
$this->_validatePagination();
}
@@ -151,9 +151,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
ptln("<div class=\"level2\">");
if ($this->_user_total > 0) {
- ptln("<p>".sprintf($this->lang['summary'],$this->_start+1,$this->_last,$this->_user_total,$this->_auth->getUserCount())."</p>");
+ ptln("<p>".sprintf($this->lang['summary'],$this->_start+1,$this->_last,$this->_user_total,$this->_auth->getUserCount())."</p>");
} else {
- ptln("<p>".sprintf($this->lang['nonefound'],$this->_auth->getUserCount())."</p>");
+ ptln("<p>".sprintf($this->lang['nonefound'],$this->_auth->getUserCount())."</p>");
}
ptln("<form action=\"".wl($ID)."\" method=\"post\">");
formSecurityToken();
@@ -174,25 +174,25 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
ptln(" </thead>");
if ($this->_user_total) {
- ptln(" <tbody>");
- foreach ($user_list as $user => $userinfo) {
- extract($userinfo);
- $groups = join(', ',$grps);
- ptln(" <tr class=\"user_info\">");
- ptln(" <td class=\"centeralign\"><input type=\"checkbox\" name=\"delete[".$user."]\" ".$delete_disable." /></td>");
- if ($editable) {
- ptln(" <td><a href=\"".wl($ID,array('fn[edit]['.hsc($user).']' => 1,
- 'do' => 'admin',
- 'page' => 'usermanager',
- 'sectok' => getSecurityToken())).
- "\" title=\"".$this->lang['edit_prompt']."\">".hsc($user)."</a></td>");
- } else {
- ptln(" <td>".hsc($user)."</td>");
+ ptln(" <tbody>");
+ foreach ($user_list as $user => $userinfo) {
+ extract($userinfo);
+ $groups = join(', ',$grps);
+ ptln(" <tr class=\"user_info\">");
+ ptln(" <td class=\"centeralign\"><input type=\"checkbox\" name=\"delete[".$user."]\" ".$delete_disable." /></td>");
+ if ($editable) {
+ ptln(" <td><a href=\"".wl($ID,array('fn[edit]['.hsc($user).']' => 1,
+ 'do' => 'admin',
+ 'page' => 'usermanager',
+ 'sectok' => getSecurityToken())).
+ "\" title=\"".$this->lang['edit_prompt']."\">".hsc($user)."</a></td>");
+ } else {
+ ptln(" <td>".hsc($user)."</td>");
+ }
+ ptln(" <td>".hsc($name)."</td><td>".hsc($mail)."</td><td>".hsc($groups)."</td>");
+ ptln(" </tr>");
}
- ptln(" <td>".hsc($name)."</td><td>".hsc($mail)."</td><td>".hsc($groups)."</td>");
- ptln(" </tr>");
- }
- ptln(" </tbody>");
+ ptln(" </tbody>");
}
ptln(" <tbody>");
@@ -226,29 +226,29 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$style = $this->_edit_user ? " class=\"edit_user\"" : "";
if ($this->_auth->canDo('addUser')) {
- ptln("<div".$style.">");
- print $this->locale_xhtml('add');
- ptln(" <div class=\"level2\">");
+ ptln("<div".$style.">");
+ print $this->locale_xhtml('add');
+ ptln(" <div class=\"level2\">");
- $this->_htmlUserForm('add',null,array(),4);
+ $this->_htmlUserForm('add',null,array(),4);
- ptln(" </div>");
- ptln("</div>");
+ ptln(" </div>");
+ ptln("</div>");
}
if($this->_edit_user && $this->_auth->canDo('UserMod')){
- ptln("<div".$style." id=\"scroll__here\">");
- print $this->locale_xhtml('edit');
- ptln(" <div class=\"level2\">");
+ ptln("<div".$style." id=\"scroll__here\">");
+ print $this->locale_xhtml('edit');
+ ptln(" <div class=\"level2\">");
- $this->_htmlUserForm('modify',$this->_edit_user,$this->_edit_userdata,4);
+ $this->_htmlUserForm('modify',$this->_edit_user,$this->_edit_userdata,4);
- ptln(" </div>");
- ptln("</div>");
+ ptln(" </div>");
+ ptln("</div>");
}
if ($this->_auth->canDo('addUser')) {
- $this->_htmlImportForm();
+ $this->_htmlImportForm();
}
ptln("</div>");
}
@@ -265,10 +265,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$notes = array();
if ($user) {
- extract($userdata);
- if (!empty($grps)) $groups = join(',',$grps);
+ extract($userdata);
+ if (!empty($grps)) $groups = join(',',$grps);
} else {
- $notes[] = sprintf($this->lang['note_group'],$conf['defaultgroup']);
+ $notes[] = sprintf($this->lang['note_group'],$conf['defaultgroup']);
}
ptln("<form action=\"".wl($ID)."\" method=\"post\">",$indent);
@@ -287,14 +287,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"),$indent+6);
if ($this->_auth->canDo("modPass")) {
- if ($cmd == 'add') {
- $notes[] = $this->lang['note_pass'];
- }
- if ($user) {
- $notes[] = $this->lang['note_notify'];
- }
+ if ($cmd == 'add') {
+ $notes[] = $this->lang['note_pass'];
+ }
+ if ($user) {
+ $notes[] = $this->lang['note_notify'];
+ }
- ptln("<tr><td><label for=\"".$cmd."_usernotify\" >".$this->lang["user_notify"].": </label></td><td><input type=\"checkbox\" id=\"".$cmd."_usernotify\" name=\"usernotify\" value=\"1\" /></td></tr>", $indent);
+ ptln("<tr><td><label for=\"".$cmd."_usernotify\" >".$this->lang["user_notify"].": </label></td><td><input type=\"checkbox\" id=\"".$cmd."_usernotify\" name=\"usernotify\" value=\"1\" /></td></tr>", $indent);
}
ptln(" </tbody>",$indent);
@@ -317,11 +317,11 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
ptln(" </table>",$indent);
if ($notes) {
- ptln(" <ul class=\"notes\">");
- foreach ($notes as $note) {
- ptln(" <li><span class=\"li\">".$note."</span></li>",$indent);
- }
- ptln(" </ul>");
+ ptln(" <ul class=\"notes\">");
+ foreach ($notes as $note) {
+ ptln(" <li><span class=\"li\">".$note."</span></li>",$indent);
+ }
+ ptln(" </ul>");
}
ptln(" </div>",$indent);
ptln("</form>",$indent);
@@ -366,7 +366,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
ptln("<input type=\"hidden\" name=\"start\" value=\"".$this->_start."\" />",$indent);
foreach ($this->_filter as $key => $filter) {
- ptln("<input type=\"hidden\" name=\"filter[".$key."]\" value=\"".hsc($filter)."\" />",$indent);
+ ptln("<input type=\"hidden\" name=\"filter[".$key."]\" value=\"".hsc($filter)."\" />",$indent);
}
}
@@ -432,52 +432,52 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
if (empty($user)) return false;
if ($this->_auth->canDo('modPass')){
- if (empty($pass)){
- if($INPUT->has('usernotify')){
- $pass = auth_pwgen($user);
- } else {
- msg($this->lang['add_fail'], -1);
- return false;
+ if (empty($pass)){
+ if($INPUT->has('usernotify')){
+ $pass = auth_pwgen($user);
+ } else {
+ msg($this->lang['add_fail'], -1);
+ return false;
+ }
}
- }
} else {
- if (!empty($pass)){
- msg($this->lang['add_fail'], -1);
- return false;
- }
+ if (!empty($pass)){
+ msg($this->lang['add_fail'], -1);
+ return false;
+ }
}
if ($this->_auth->canDo('modName')){
- if (empty($name)){
- msg($this->lang['add_fail'], -1);
- return false;
- }
+ if (empty($name)){
+ msg($this->lang['add_fail'], -1);
+ return false;
+ }
} else {
- if (!empty($name)){
- return false;
- }
+ if (!empty($name)){
+ return false;
+ }
}
if ($this->_auth->canDo('modMail')){
- if (empty($mail)){
- msg($this->lang['add_fail'], -1);
- return false;
- }
+ if (empty($mail)){
+ msg($this->lang['add_fail'], -1);
+ return false;
+ }
} else {
- if (!empty($mail)){
- return false;
- }
+ if (!empty($mail)){
+ return false;
+ }
}
if ($ok = $this->_auth->triggerUserMod('create', array($user,$pass,$name,$mail,$grps))) {
- msg($this->lang['add_ok'], 1);
+ msg($this->lang['add_ok'], 1);
- if ($INPUT->has('usernotify') && $pass) {
- $this->_notifyUser($user,$pass);
- }
+ if ($INPUT->has('usernotify') && $pass) {
+ $this->_notifyUser($user,$pass);
+ }
} else {
- msg($this->lang['add_fail'], -1);
+ msg($this->lang['add_fail'], -1);
}
return $ok;
@@ -503,12 +503,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$count = $this->_auth->triggerUserMod('delete', array($selected));
if ($count == count($selected)) {
- $text = str_replace('%d', $count, $this->lang['delete_ok']);
- msg("$text.", 1);
+ $text = str_replace('%d', $count, $this->lang['delete_ok']);
+ msg("$text.", 1);
} else {
- $part1 = str_replace('%d', $count, $this->lang['delete_ok']);
- $part2 = str_replace('%d', (count($selected)-$count), $this->lang['delete_fail']);
- msg("$part1, $part2",-1);
+ $part1 = str_replace('%d', $count, $this->lang['delete_ok']);
+ $part2 = str_replace('%d', (count($selected)-$count), $this->lang['delete_fail']);
+ msg("$part1, $part2",-1);
}
// invalidate all sessions
@@ -529,8 +529,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
// no user found?
if (!$userdata) {
- msg($this->lang['edit_usermissing'],-1);
- return false;
+ msg($this->lang['edit_usermissing'],-1);
+ return false;
}
$this->_edit_user = $user;
@@ -559,18 +559,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$changes = array();
if ($newuser != $olduser) {
- if (!$this->_auth->canDo('modLogin')) { // sanity check, shouldn't be possible
- msg($this->lang['update_fail'],-1);
- return false;
- }
+ if (!$this->_auth->canDo('modLogin')) { // sanity check, shouldn't be possible
+ msg($this->lang['update_fail'],-1);
+ return false;
+ }
- // check if $newuser already exists
- if ($this->_auth->getUserData($newuser)) {
- msg(sprintf($this->lang['update_exists'],$newuser),-1);
- $re_edit = true;
- } else {
- $changes['user'] = $newuser;
- }
+ // check if $newuser already exists
+ if ($this->_auth->getUserData($newuser)) {
+ msg(sprintf($this->lang['update_exists'],$newuser),-1);
+ $re_edit = true;
+ } else {
+ $changes['user'] = $newuser;
+ }
}
// generate password if left empty and notification is on
@@ -588,18 +588,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$changes['grps'] = $newgrps;
if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) {
- msg($this->lang['update_ok'],1);
+ msg($this->lang['update_ok'],1);
- if ($INPUT->has('usernotify') && $newpass) {
- $notify = empty($changes['user']) ? $olduser : $newuser;
- $this->_notifyUser($notify,$newpass);
- }
+ if ($INPUT->has('usernotify') && $newpass) {
+ $notify = empty($changes['user']) ? $olduser : $newuser;
+ $this->_notifyUser($notify,$newpass);
+ }
- // invalidate all sessions
- io_saveFile($conf['cachedir'].'/sessionpurge',time());
+ // invalidate all sessions
+ io_saveFile($conf['cachedir'].'/sessionpurge',time());
} else {
- msg($this->lang['update_fail'],-1);
+ msg($this->lang['update_fail'],-1);
}
if (!empty($re_edit)) {
@@ -615,13 +615,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
function _notifyUser($user, $password, $status_alert=true) {
if ($sent = auth_sendPassword($user,$password)) {
- if ($status_alert) {
- msg($this->lang['notify_ok'], 1);
- }
+ if ($status_alert) {
+ msg($this->lang['notify_ok'], 1);
+ }
} else {
- if ($status_alert) {
- msg($this->lang['notify_fail'], -1);
- }
+ if ($status_alert) {
+ msg($this->lang['notify_fail'], -1);
+ }
}
return $sent;
@@ -656,12 +656,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$this->_filter = array();
if ($op == 'new') {
- list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser(false);
+ list($user,$pass,$name,$mail,$grps) = $this->_retrieveUser(false);
- if (!empty($user)) $this->_filter['user'] = $user;
- if (!empty($name)) $this->_filter['name'] = $name;
- if (!empty($mail)) $this->_filter['mail'] = $mail;
- if (!empty($grps)) $this->_filter['grps'] = join('|',$grps);
+ if (!empty($user)) $this->_filter['user'] = $user;
+ if (!empty($name)) $this->_filter['name'] = $name;
+ if (!empty($mail)) $this->_filter['mail'] = $mail;
+ if (!empty($grps)) $this->_filter['grps'] = join('|',$grps);
}
}
@@ -684,7 +684,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
function _validatePagination() {
if ($this->_start >= $this->_user_total) {
- $this->_start = $this->_user_total - $this->_pagesize;
+ $this->_start = $this->_user_total - $this->_pagesize;
}
if ($this->_start < 0) $this->_start = 0;
@@ -701,10 +701,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
$buttons['start'] = $buttons['prev'] = ($this->_start == 0) ? $disabled : '';
if ($this->_user_total == -1) {
- $buttons['last'] = $disabled;
- $buttons['next'] = '';
+ $buttons['last'] = $disabled;
+ $buttons['next'] = '';
} else {
- $buttons['last'] = $buttons['next'] = (($this->_start + $this->_pagesize) >= $this->_user_total) ? $disabled : '';
+ $buttons['last'] = $buttons['next'] = (($this->_start + $this->_pagesize) >= $this->_user_total) ? $disabled : '';
}
return $buttons;
@@ -803,9 +803,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin {
// save import failures into the session
if (!headers_sent()) {
- session_start();
- $_SESSION['import_failures'] = $this->_import_failures;
- session_write_close();
+ session_start();
+ $_SESSION['import_failures'] = $this->_import_failures;
+ session_write_close();
}
}
diff --git a/lib/plugins/usermanager/lang/cs/import.txt b/lib/plugins/usermanager/lang/cs/import.txt
new file mode 100644
index 000000000..c264ae185
--- /dev/null
+++ b/lib/plugins/usermanager/lang/cs/import.txt
@@ -0,0 +1,9 @@
+===== Hromadný import uživatelů =====
+
+Vyžaduje CSV soubor s uživateli obsahující alespoň 4 sloupce.
+Sloupce obsahují (v daném pořadí): user-id, celé jméno, emailovou adresu, seznam skupin.
+Položky CSV musí být odděleny čárkou (,) a řetězce umístěny v uvozovkách (""). Zpětné lomítko (\) lze použít pro escapování.
+Pro získání příkladu takového souboru využijte funkci "Exportovat uživatele" výše.
+Záznamy s duplicitním user-id budou ignorovány.
+
+Hesla budou vygenerována a zaslána e-mailem všem úspěšně importovaným uživatelům. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php
index 9fc3a5e75..b2c736e09 100644
--- a/lib/plugins/usermanager/lang/cs/lang.php
+++ b/lib/plugins/usermanager/lang/cs/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Czech language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Tomas Valenta <t.valenta@sh.cvut.cz>
* @author Zbynek Krivka <zbynek.krivka@seznam.cz>
* @author Bohumir Zamecnik <bohumir@zamecnik.org>
@@ -13,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['menu'] = 'Správa uživatelů';
$lang['noauth'] = '(autentizace uživatelů není k dispozici)';
@@ -35,6 +37,11 @@ $lang['search'] = 'Hledání';
$lang['search_prompt'] = 'Prohledat';
$lang['clear'] = 'Zrušit vyhledávací filtr';
$lang['filter'] = 'Filtr';
+$lang['export_all'] = 'Exportovat všechny uživatele (CSV)';
+$lang['export_filtered'] = 'Exportovat filtrovaný seznam uživatelů (CSV)';
+$lang['import'] = 'Importovat nové uživatele';
+$lang['line'] = 'Řádek č.';
+$lang['error'] = 'Chybová zpráva';
$lang['summary'] = 'Zobrazuji uživatele %1$d-%2$d z %3$d nalezených. Celkem %4$d uživatelů.';
$lang['nonefound'] = 'Žadný uživatel nenalezen. Celkem %d uživatelů.';
$lang['delete_ok'] = '%d uživatelů smazáno';
@@ -50,8 +57,18 @@ $lang['edit_usermissing'] = 'Vybraný uživatel nebyl nalezen, zadané uži
$lang['user_notify'] = 'Upozornit uživatele';
$lang['note_notify'] = 'Maily s upozorněním se budou posílat pouze, když uživatel dostává nové heslo.';
$lang['note_group'] = 'Noví uživatelé budou přidáváni do této výchozí skupiny (%s), pokud pro ně není uvedena žádná skupina.';
-$lang['note_pass'] = 'Heslo bude automaticky vygenerováno pokud je pole ponecháno prázdné a je zapnutá notifikace uživatele.';
+$lang['note_pass'] = 'Heslo bude automaticky vygenerováno, pokud je pole ponecháno prázdné a je zapnuto upozornění uživatele.';
$lang['add_ok'] = 'Uživatel úspěšně vytvořen';
$lang['add_fail'] = 'Vytvoření uživatele selhalo';
$lang['notify_ok'] = 'Odeslán mail s upozorněním';
$lang['notify_fail'] = 'Mail s upozorněním nebylo možno odeslat';
+$lang['import_success_count'] = 'Import uživatelů: nalezeno %s uživatelů, %d úspěšně importováno.';
+$lang['import_failure_count'] = 'Import uživatelů: %d selhalo. Seznam chybných je níže.';
+$lang['import_error_fields'] = 'Nedostatek položek, nalezena/y %d, požadovány 4.';
+$lang['import_error_baduserid'] = 'Chybí User-id';
+$lang['import_error_badname'] = 'Špatné jméno';
+$lang['import_error_badmail'] = 'Špatná emailová adresa';
+$lang['import_error_upload'] = 'Import selhal. CSV soubor nemohl být nahrán nebo je prázdný.';
+$lang['import_error_readfail'] = 'Import selhal. Nelze číst nahraný soubor.';
+$lang['import_error_create'] = 'Nelze vytvořit uživatele';
+$lang['import_notify_fail'] = 'Importovanému uživateli %s s emailem %s nemohlo být zasláno upozornění.';
diff --git a/lib/plugins/usermanager/lang/de-informal/import.txt b/lib/plugins/usermanager/lang/de-informal/import.txt
new file mode 100644
index 000000000..6fd6b8d8c
--- /dev/null
+++ b/lib/plugins/usermanager/lang/de-informal/import.txt
@@ -0,0 +1,7 @@
+===== Massenimport von Benutzern =====
+
+Dieser Import benötigt eine CSV-Datei mit mindestens vier Spalten. Diese Spalten müssen die folgenden Daten (in dieser Reihenfolge) enthalten: Benutzername, Name, E-Mailadresse und Gruppenzugehörigkeit.
+Die CSV-Felder müssen durch ein Komma (,) getrennt sein. Die Zeichenfolgen müssen von Anführungszeichen ("") umgeben sein. Ein Backslash (\) kann zum Maskieren benutzt werden.
+Für eine Beispieldatei kannst Du die "Benutzer exportieren"-Funktion oben benutzen. Doppelte Benutzername werden ignoriert.
+
+Ein Passwort wird generiert und den einzelnen, erfolgreich importierten Benutzern zugemailt. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/de-informal/lang.php b/lib/plugins/usermanager/lang/de-informal/lang.php
index 791cfa74f..bea4159d0 100644
--- a/lib/plugins/usermanager/lang/de-informal/lang.php
+++ b/lib/plugins/usermanager/lang/de-informal/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * German (informal) language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Alexander Fischer <tbanus@os-forge.net>
* @author Juergen Schwarzer <jschwarzer@freenet.de>
* @author Marcel Metz <marcel_metz@gmx.de>
@@ -10,6 +11,7 @@
* @author Pierre Corell <info@joomla-praxis.de>
* @author Frank Loizzi <contact@software.bacal.de>
* @author Volker Bödker <volker@boedker.de>
+ * @author Dennis Plöger <develop@dieploegers.de>
*/
$lang['menu'] = 'Benutzerverwaltung';
$lang['noauth'] = '(Benutzeranmeldung ist nicht verfügbar)';
@@ -32,6 +34,11 @@ $lang['search'] = 'Suchen';
$lang['search_prompt'] = 'Suche ausführen';
$lang['clear'] = 'Suchfilter zurücksetzen';
$lang['filter'] = 'Filter';
+$lang['export_all'] = 'Alle Benutzer exportieren (CSV)';
+$lang['export_filtered'] = 'Gefilterte Benutzerliste exportieren (CSV)';
+$lang['import'] = 'Neue Benutzer importieren';
+$lang['line'] = 'Zeile Nr.';
+$lang['error'] = 'Fehlermeldung';
$lang['summary'] = 'Zeige Benutzer %1$d-%2$d von %3$d gefundenen. %4$d Benutzer insgesamt.';
$lang['nonefound'] = 'Keinen Benutzer gefunden. Insgesamt %d Benutzer.';
$lang['delete_ok'] = '%d Benutzer wurden gelöscht';
@@ -52,3 +59,13 @@ $lang['add_ok'] = 'Benutzer erfolgreich hinzugefügt';
$lang['add_fail'] = 'Hinzufügen des Benutzers fehlgeschlagen';
$lang['notify_ok'] = 'Benachrichtigungsmail wurde versendet';
$lang['notify_fail'] = 'Benachrichtigungsemail konnte nicht gesendet werden';
+$lang['import_success_count'] = 'Benutzerimport: %d Benutzer gefunden, %d erfolgreich importiert.';
+$lang['import_failure_count'] = 'Benutzerimport: %d Benutzerimporte fehlgeschalten. Alle Fehler werden unten angezeigt.';
+$lang['import_error_fields'] = 'Falsche Anzahl Felder. Gefunden: %d. Benötigt: 4.';
+$lang['import_error_baduserid'] = 'Benutzername fehlt';
+$lang['import_error_badname'] = 'Ungültiger Name';
+$lang['import_error_badmail'] = 'Ungültige E-Mailadresse';
+$lang['import_error_upload'] = 'Import fehlgeschlagen. Die CSV-Datei konnte nicht hochgeladen werden oder ist leer.';
+$lang['import_error_readfail'] = 'Import fehlgeschlagen. Konnte die hochgeladene Datei nicht lesen.';
+$lang['import_error_create'] = 'Konnte den Benutzer nicht erzeugen';
+$lang['import_notify_fail'] = 'Benachrichtigung konnte an Benutzer %s (%s) nicht geschickt werden.';
diff --git a/lib/plugins/usermanager/lang/de/import.txt b/lib/plugins/usermanager/lang/de/import.txt
new file mode 100644
index 000000000..bf0d2922e
--- /dev/null
+++ b/lib/plugins/usermanager/lang/de/import.txt
@@ -0,0 +1,8 @@
+===== Benutzer-Massenimport =====
+
+Um mehrere Benutzer gleichzeitig zu importieren, wird eine CSV-Datei mit den folgenden vier Spalten benötigt (In dieser Reihenfolge): Benutzer-ID, Voller Name, E-Mail-Adresse und Gruppen.
+Die CSV-Felder sind Kommata-separiert (,) und mit Anführungszeichen eingefasst ("). Mit Backslashes (\) können Sonderzeichen maskiert werden.
+Ein Beispiel für eine gültige Datei kann mit der Benutzer-Export-Funktion oben generiert werden.
+Doppelte Benutzer-IDs werden ignoriert.
+
+Für jeden importierten Benutzer wird ein Passwort generiert und dem Benutzer per Mail zugestellt. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/de/lang.php b/lib/plugins/usermanager/lang/de/lang.php
index 68cdf359f..21be74f71 100644
--- a/lib/plugins/usermanager/lang/de/lang.php
+++ b/lib/plugins/usermanager/lang/de/lang.php
@@ -19,6 +19,7 @@
* @author Pierre Corell <info@joomla-praxis.de>
* @author Matthias Schulte <dokuwiki@lupo49.de>
* @author Sven <Svenluecke48@gmx.d>
+ * @author christian studer <cstuder@existenz.ch>
*/
$lang['menu'] = 'Benutzerverwaltung';
$lang['noauth'] = '(Authentifizierungssystem nicht verfügbar)';
@@ -75,3 +76,4 @@ $lang['import_error_badmail'] = 'Ungültige E-Mail';
$lang['import_error_upload'] = 'Import fehlgeschlagen. Die CSV-Datei konnte nicht hochgeladen werden, oder ist leer.';
$lang['import_error_readfail'] = 'Import fehlgeschlagen. Die hochgeladene Datei konnte nicht gelesen werden.';
$lang['import_error_create'] = 'User konnte nicht angelegt werden';
+$lang['import_notify_fail'] = 'Notifikation konnte nicht an den importierten Benutzer %s (E-Mail: %s) gesendet werden.';
diff --git a/lib/plugins/usermanager/lang/eo/import.txt b/lib/plugins/usermanager/lang/eo/import.txt
new file mode 100644
index 000000000..61c2c74de
--- /dev/null
+++ b/lib/plugins/usermanager/lang/eo/import.txt
@@ -0,0 +1,9 @@
+===== Amasa importo de uzantoj =====
+
+Tio ĉi postulas CSV-dosiero de uzantoj kun minimume kvar kolumnoj.
+La kolumnoj devas enhavi, laŭorde: uzant-id, kompleta nomo, retadreso kaj grupoj.
+La CSV-kampoj devos esti apartitaj per komoj (,) kaj ĉenoj devas esti limigitaj per citiloj (""). Retroklino (\) povas esti uzata por eskapo.
+Por ekzemplo de taŭga dosiero, provu la funkcion "Eksporti uzantojn" supre.
+Duobligitaj uzant-id estos preteratentataj.
+
+Pasvorto estos generata kaj retsendata al ĉiu sukecse importita uzanto. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/eo/lang.php b/lib/plugins/usermanager/lang/eo/lang.php
index 75782fe23..4c4174339 100644
--- a/lib/plugins/usermanager/lang/eo/lang.php
+++ b/lib/plugins/usermanager/lang/eo/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Esperantolanguage file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Felipe Castro <fefcas@uol.com.br>
* @author Felipe Castro <fefcas@gmail.com>
* @author Felipe Castro <fefcas (cxe) gmail (punkto) com>
@@ -10,6 +11,7 @@
* @author Erik Pedersen <erik pedersen@shaw.ca>
* @author Erik Pedersen <erik.pedersen@shaw.ca>
* @author Robert Bogenschneider <bogi@uea.org>
+ * @author Felipe Castro <fefcas@yahoo.com.br>
*/
$lang['menu'] = 'Administrado de uzantoj';
$lang['noauth'] = '(identiĝo de uzantoj ne disponeblas)';
@@ -32,6 +34,11 @@ $lang['search'] = 'Serĉi';
$lang['search_prompt'] = 'Fari serĉon';
$lang['clear'] = 'Refari serĉan filtron';
$lang['filter'] = 'Filtro';
+$lang['export_all'] = 'Eksporti ĉiujn uzantojn (CSV)';
+$lang['export_filtered'] = 'Eksporti filtritan uzant-liston (CSV)';
+$lang['import'] = 'Importi novajn uzantojn';
+$lang['line'] = 'Lini-num.';
+$lang['error'] = 'Erar-mesaĝo';
$lang['summary'] = 'Montriĝas uzantoj %1$d-%2$d el %3$d trovitaj. %4$d uzantoj entute.';
$lang['nonefound'] = 'Neniuj uzantoj troviĝas. %d uzantoj entute.';
$lang['delete_ok'] = '%d uzantoj forigiĝis';
@@ -52,3 +59,13 @@ $lang['add_ok'] = 'La uzanto sukcese aldoniĝis';
$lang['add_fail'] = 'Ne eblis aldoni uzanton';
$lang['notify_ok'] = 'Avizanta mesaĝo sendiĝis';
$lang['notify_fail'] = 'La avizanta mesaĝo ne povis esti sendita';
+$lang['import_success_count'] = 'Uzant-importo: %d uzantoj trovataj, %d sukcese importitaj.';
+$lang['import_failure_count'] = 'Uzant-importo: %d fiaskis. Fiaskoj estas sube listitaj.';
+$lang['import_error_fields'] = 'Nesufiĉe da kampoj, ni trovis %d, necesas 4.';
+$lang['import_error_baduserid'] = 'Mankas uzant-id';
+$lang['import_error_badname'] = 'Malĝusta nomo';
+$lang['import_error_badmail'] = 'Malĝusta retadreso';
+$lang['import_error_upload'] = 'Importo fiaskis. La csv-dosiero ne povis esti alŝutata aŭ ĝi estas malplena.';
+$lang['import_error_readfail'] = 'Importo fiaskis. Ne eblas legi alŝutitan dosieron.';
+$lang['import_error_create'] = 'Ne eblas krei la uzanton';
+$lang['import_notify_fail'] = 'Averta mesaĝo ne povis esti sendata al la importita uzanto %s, kun retdreso %s.';
diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php
index a0db839e0..f2116f688 100644
--- a/lib/plugins/usermanager/lang/ko/lang.php
+++ b/lib/plugins/usermanager/lang/ko/lang.php
@@ -13,10 +13,10 @@
$lang['menu'] = '사용자 관리자';
$lang['noauth'] = '(사용자 인증이 불가능합니다)';
$lang['nosupport'] = '(사용자 관리가 지원되지 않습니다)';
-$lang['badauth'] = '인증 메카니즘이 잘못되었습니다';
+$lang['badauth'] = '인증 메커니즘이 잘못되었습니다';
$lang['user_id'] = '사용자';
$lang['user_pass'] = '비밀번호';
-$lang['user_name'] = '실제 이름';
+$lang['user_name'] = '실명';
$lang['user_mail'] = '이메일 ';
$lang['user_groups'] = '그룹';
$lang['field'] = '항목';
@@ -39,7 +39,7 @@ $lang['error'] = '오류 메시지';
$lang['summary'] = '찾은 사용자 %3$d 중 %1$d-%2$d을(를) 봅니다. 전체 사용자는 %4$d명입니다.';
$lang['nonefound'] = '찾은 사용자가 없습니다. 전체 사용자는 %d명입니다.';
$lang['delete_ok'] = '사용자 %d명이 삭제되었습니다';
-$lang['delete_fail'] = '사용자 %d명의 삭제가 실패했습니다.';
+$lang['delete_fail'] = '사용자 %d명을 삭제하는 데 실패했습니다.';
$lang['update_ok'] = '사용자 정보를 성공적으로 바꾸었습니다';
$lang['update_fail'] = '사용자 정보를 바꾸는 데 실패했습니다';
$lang['update_exists'] = '사용자 이름을 바꾸는 데 실패했습니다. 사용자 이름(%s)이 이미 존재합니다. (다른 항목의 바뀜은 적용됩니다.)';
@@ -58,7 +58,7 @@ $lang['notify_ok'] = '알림 이메일을 성공적으로 보냈습
$lang['notify_fail'] = '알림 이메일을 보낼 수 없습니다';
$lang['import_success_count'] = '사용자 가져오기: 사용자 %d명을 찾았고, %d명을 성공적으로 가져왔습니다.';
$lang['import_failure_count'] = '사용자 가져오기: %d명을 가져오지 못했습니다. 실패는 아래에 나타나 있습니다.';
-$lang['import_error_fields'] = '충분하지 않은 필드, %d개 찾았고, 4개가 필요합니다.';
+$lang['import_error_fields'] = '충분하지 않은 필드로, %d개를 찾았고, 4개가 필요합니다.';
$lang['import_error_baduserid'] = '사용자 id 없음';
$lang['import_error_badname'] = '잘못된 이름';
$lang['import_error_badmail'] = '잘못된 이메일 주소';
diff --git a/lib/plugins/usermanager/lang/ne/lang.php b/lib/plugins/usermanager/lang/ne/lang.php
index f68ed2074..9a44d19ce 100644
--- a/lib/plugins/usermanager/lang/ne/lang.php
+++ b/lib/plugins/usermanager/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 SarojKumar Dhakal <lotusnagarkot@yahoo.com>
* @author Saroj Dhakal<lotusnagarkot@yahoo.com>
diff --git a/lib/plugins/usermanager/lang/pt-br/lang.php b/lib/plugins/usermanager/lang/pt-br/lang.php
index 637be8860..8beae392f 100644
--- a/lib/plugins/usermanager/lang/pt-br/lang.php
+++ b/lib/plugins/usermanager/lang/pt-br/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Portuguese language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Frederico Gonçalves Guimarães <frederico@teia.bio.br>
* @author Felipe Castro <fefcas@gmail.com>
* @author Lucien Raven <lucienraven@yahoo.com.br>
diff --git a/lib/plugins/usermanager/lang/pt/import.txt b/lib/plugins/usermanager/lang/pt/import.txt
new file mode 100644
index 000000000..3a604030c
--- /dev/null
+++ b/lib/plugins/usermanager/lang/pt/import.txt
@@ -0,0 +1,9 @@
+===== Importação de Utilizadores em Massa =====
+
+Requer um ficheiro CSV de utilizadores com pelo menos quatro colunas.
+As colunas têm de conter, em ordem: id de utilizador, nome completo, endereço de email e grupos.
+Os campos CSV devem ser separados por vírgulas (,) e as strings delimitadas por aspas (""). A contra-barra (\) pode ser usada para escapar.
+Para um exemplo de um ficheiro adequado, tente a função "Exportar Utilizadores" acima.
+Ids de utilizador duplicados serão ignorados.
+
+Uma senha será gerada e enviada por email a cada utilizador importado com sucesso. \ No newline at end of file
diff --git a/lib/plugins/usermanager/lang/pt/lang.php b/lib/plugins/usermanager/lang/pt/lang.php
index 6d0d85e38..b59649aa1 100644
--- a/lib/plugins/usermanager/lang/pt/lang.php
+++ b/lib/plugins/usermanager/lang/pt/lang.php
@@ -1,7 +1,8 @@
<?php
+
/**
- * Portugueselanguage file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com>
* @author Enrico Nicoletto <liverig@gmail.com>
* @author Fil <fil@meteopt.com>
@@ -29,6 +30,10 @@ $lang['search'] = 'Pesquisar';
$lang['search_prompt'] = 'Pesquisar';
$lang['clear'] = 'Limpar Filtro de Pesquisa';
$lang['filter'] = 'Filtro';
+$lang['export_all'] = 'Exportar Todos os Utilizadores (CSV)';
+$lang['export_filtered'] = 'Exportar a lista de utilizadores filtrada (CSV)';
+$lang['import'] = 'Importar Novos Utilizadores';
+$lang['error'] = 'Mensagem de erro';
$lang['summary'] = 'Apresentar utilizadores %1$d-%2$d de %3$d encontrados. %4$d inscritos.';
$lang['nonefound'] = 'Nenhum utilizador encontrado. %d inscritos.';
$lang['delete_ok'] = '%d utilizadores removidos';
@@ -49,3 +54,11 @@ $lang['add_ok'] = 'Utilizador adicionado.';
$lang['add_fail'] = 'Utilizador não adicionado.';
$lang['notify_ok'] = 'Mensagem de notificação enviada.';
$lang['notify_fail'] = 'Não foi possível enviar mensagem de notificação';
+$lang['import_success_count'] = 'Importar Utilizadores: %d utiliyadores encontrados, %d importados com sucesso.';
+$lang['import_failure_count'] = 'Importar Utilizadores: %d falharam. As falhas estão listadas abaixo.';
+$lang['import_error_fields'] = 'Campos insuficientes, encontrados %d mas requeridos 4.';
+$lang['import_error_baduserid'] = 'Falta id de utilizador';
+$lang['import_error_upload'] = 'Falhou a importação. O ficheiro csv não pôde ser importado ou está vazio.';
+$lang['import_error_readfail'] = 'Falhou a importação. Não foi possível ler o ficheiro submetido.';
+$lang['import_error_create'] = 'Não foi possível criar o utilizador.';
+$lang['import_notify_fail'] = 'A mensagem de notificação não pôde ser enviada para o utilizador importado, %s com email %s.';
diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php
index f2029e58b..3102ac32a 100644
--- a/lib/plugins/usermanager/lang/ru/lang.php
+++ b/lib/plugins/usermanager/lang/ru/lang.php
@@ -44,9 +44,9 @@ $lang['filter'] = 'Фильтр';
$lang['export_all'] = 'Экспорт всех пользователей (CSV)';
$lang['export_filtered'] = 'Экспорт пользователей с фильтрацией списка (CSV)';
$lang['import'] = 'Импорт новых пользователей';
-$lang['line'] = 'Строка №.';
+$lang['line'] = 'Строка №';
$lang['error'] = 'Ошибка';
-$lang['summary'] = 'Показаны пользователи %1$d-%2$d из %3$d найденных. Всего пользователей: %4$d.';
+$lang['summary'] = 'Показаны пользователи %1$d–%2$d из %3$d найденных. Всего пользователей: %4$d.';
$lang['nonefound'] = 'Не найдено ни одного пользователя. Всего пользователей: %d.';
$lang['delete_ok'] = 'Удалено пользователей: %d';
$lang['delete_fail'] = 'Не удалось удалить %d.';
diff --git a/lib/plugins/usermanager/lang/sl/lang.php b/lib/plugins/usermanager/lang/sl/lang.php
index 96acfd0af..dc2de375e 100644
--- a/lib/plugins/usermanager/lang/sl/lang.php
+++ b/lib/plugins/usermanager/lang/sl/lang.php
@@ -1,11 +1,13 @@
<?php
+
/**
- * Slovenian language file
- *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
* @author Dejan Levec <webphp@gmail.com>
* @author Boštjan Seničar <senicar@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['menu'] = 'Upravljanje uporabnikov';
$lang['noauth'] = '(overjanje istovetnosti uporabnikov ni na voljo)';
@@ -28,6 +30,9 @@ $lang['search'] = 'Iskanje';
$lang['search_prompt'] = 'Poišči';
$lang['clear'] = 'Počisti filter iskanja';
$lang['filter'] = 'Filter';
+$lang['import'] = 'Uvozi nove uporabnike';
+$lang['line'] = 'Številka vrstice';
+$lang['error'] = 'Sporočilo napake';
$lang['summary'] = 'Izpisani so uporabniki %1$d-%2$d od skupno %3$d. Vseh uporabnikov je %4$d.';
$lang['nonefound'] = 'Ni najdenih uporabnikov. Vseh uporabnikov je %d.';
$lang['delete_ok'] = '%d uporabnikov je izbrisanih';
@@ -48,3 +53,11 @@ $lang['add_ok'] = 'Uporabnik je uspešno dodan';
$lang['add_fail'] = 'Dodajanje uporabnika je spodletelo';
$lang['notify_ok'] = 'Obvestilno sporočilo je poslano.';
$lang['notify_fail'] = 'Obvestilnega sporočila ni mogoče poslati.';
+$lang['import_error_fields'] = 'Neustrezno število polj; najdenih je %d, zahtevana pa so 4.';
+$lang['import_error_baduserid'] = 'Manjka ID uporabnika';
+$lang['import_error_badname'] = 'Napačno navedeno ime';
+$lang['import_error_badmail'] = 'Napačno naveden elektronski naslov';
+$lang['import_error_upload'] = 'Uvoz je spodletel. Datoteke CSV ni mogoče naložiti ali pa je prazna.';
+$lang['import_error_readfail'] = 'Uvoz je spodletel. Ni mogoče prebrati vsebine datoteke.';
+$lang['import_error_create'] = 'Ni mogoče ustvariti računa uporabnika';
+$lang['import_notify_fail'] = 'Obvestilnega sporočila za uvoženega uporabnika %s z elektronskim naslovom %s ni mogoče poslati.';
diff --git a/lib/tpl/dokuwiki/tpl_footer.php b/lib/tpl/dokuwiki/tpl_footer.php
index b7dc9c631..00417de9c 100644
--- a/lib/tpl/dokuwiki/tpl_footer.php
+++ b/lib/tpl/dokuwiki/tpl_footer.php
@@ -29,4 +29,5 @@ if (!defined('DOKU_INC')) die();
</div>
</div></div><!-- /footer -->
-<?php tpl_includeFile('footer.html') ?>
+<?php
+tpl_includeFile('footer.html');