summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlap-in <klapinklapin@gmail.com>2013-01-26 21:03:14 +0100
committerKlap-in <klapinklapin@gmail.com>2013-01-26 21:03:14 +0100
commit3a2c510523e4ea91ab270c3075349f319e4bc95e (patch)
tree7fe2d24e5f4450cf78e9291e8a2899665274c636
parent5fd9b829e7d9947de0eeead685e0a0cf707eff88 (diff)
parent1a40fc9935bd06a440a844e081e4bfce5fce2932 (diff)
downloadrpg-3a2c510523e4ea91ab270c3075349f319e4bc95e.tar.gz
rpg-3a2c510523e4ea91ab270c3075349f319e4bc95e.tar.bz2
Merge remote-tracking branch 'upstream/master'
-rw-r--r--README2
-rw-r--r--_test/phpunit.xml4
-rw-r--r--_test/tests/inc/auth_password.test.php6
-rw-r--r--_test/tests/inc/indexer_rename.test.php83
-rw-r--r--_test/tests/inc/search/search.test.php19
-rw-r--r--_test/tests/inc/subscription.test.php246
-rw-r--r--_test/tests/inc/subscription_set.test.php20
-rw-r--r--feed.php14
-rw-r--r--inc/PassHash.class.php68
-rw-r--r--inc/RemoteAPICore.php8
-rw-r--r--inc/Tar.class.php44
-rw-r--r--inc/actions.php22
-rw-r--r--inc/auth.php14
-rw-r--r--inc/changelog.php1
-rw-r--r--inc/common.php85
-rw-r--r--inc/html.php3
-rw-r--r--inc/indexer.php123
-rw-r--r--inc/lang/ar/subscr_single.txt2
-rw-r--r--inc/lang/bg/subscr_single.txt2
-rw-r--r--inc/lang/ca/lang.php129
-rw-r--r--inc/lang/ca/mailwrap.html13
-rw-r--r--inc/lang/ca/resetpwd.txt3
-rw-r--r--inc/lang/ca/subscr_digest.txt21
-rw-r--r--inc/lang/ca/subscr_form.txt3
-rw-r--r--inc/lang/ca/subscr_list.txt21
-rw-r--r--inc/lang/da/subscr_single.txt2
-rw-r--r--inc/lang/de-informal/subscr_single.txt2
-rw-r--r--inc/lang/de/subscr_single.txt2
-rw-r--r--inc/lang/en/subscr_single.txt2
-rw-r--r--inc/lang/eo/subscr_single.txt2
-rw-r--r--inc/lang/he/subscr_single.txt2
-rw-r--r--inc/lang/ia/subscr_single.txt2
-rw-r--r--inc/lang/it/subscr_single.txt2
-rw-r--r--inc/lang/ko/subscr_single.txt2
-rw-r--r--inc/lang/la/subscr_digest.txt2
-rw-r--r--inc/lang/la/subscr_single.txt2
-rw-r--r--inc/lang/no/subscr_digest.txt2
-rw-r--r--inc/lang/no/subscr_list.txt2
-rw-r--r--inc/lang/no/subscr_single.txt2
-rw-r--r--inc/lang/pt/subscr_single.txt2
-rw-r--r--inc/lang/sq/subscr_single.txt2
-rw-r--r--inc/lang/tr/lang.php55
-rw-r--r--inc/lang/tr/resetpwd.txt3
-rw-r--r--inc/lang/zh-tw/adminplugins.txt2
-rw-r--r--inc/lang/zh-tw/backlinks.txt2
-rw-r--r--inc/lang/zh-tw/diff.txt2
-rw-r--r--inc/lang/zh-tw/edit.txt2
-rw-r--r--inc/lang/zh-tw/editrev.txt2
-rw-r--r--inc/lang/zh-tw/index.txt2
-rw-r--r--inc/lang/zh-tw/install.html6
-rw-r--r--inc/lang/zh-tw/lang.php101
-rw-r--r--inc/lang/zh-tw/locked.txt2
-rw-r--r--inc/lang/zh-tw/login.txt3
-rw-r--r--inc/lang/zh-tw/mailtext.txt2
-rw-r--r--inc/lang/zh-tw/norev.txt2
-rw-r--r--inc/lang/zh-tw/preview.txt2
-rw-r--r--inc/lang/zh-tw/pwconfirm.txt8
-rw-r--r--inc/lang/zh-tw/read.txt2
-rw-r--r--inc/lang/zh-tw/register.txt3
-rw-r--r--inc/lang/zh-tw/registermail.txt4
-rw-r--r--inc/lang/zh-tw/resendpwd.txt2
-rw-r--r--inc/lang/zh-tw/revisions.txt2
-rw-r--r--inc/lang/zh-tw/stopwords.txt10
-rw-r--r--inc/lang/zh-tw/subscr_digest.txt6
-rw-r--r--inc/lang/zh-tw/subscr_form.txt2
-rw-r--r--inc/lang/zh-tw/subscr_list.txt6
-rw-r--r--inc/lang/zh-tw/subscr_single.txt6
-rw-r--r--inc/lang/zh-tw/updateprofile.txt2
-rw-r--r--inc/lang/zh-tw/uploadmail.txt4
-rw-r--r--inc/load.php1
-rw-r--r--inc/media.php23
-rw-r--r--inc/parser/xhtml.php1
-rw-r--r--inc/plugin.php4
-rw-r--r--inc/search.php11
-rw-r--r--inc/subscription.php993
-rw-r--r--lib/exe/indexer.php93
-rw-r--r--lib/images/interwiki/dokubug.gifbin166 -> 194 bytes
-rw-r--r--lib/images/interwiki/paypal.gifbin138 -> 139 bytes
-rw-r--r--lib/images/interwiki/skype.gifbin157 -> 142 bytes
-rw-r--r--lib/plugins/acl/lang/ca/lang.php1
-rw-r--r--lib/plugins/acl/lang/tr/lang.php1
-rw-r--r--lib/plugins/acl/lang/zh-tw/help.txt8
-rw-r--r--lib/plugins/acl/lang/zh-tw/lang.php21
-rw-r--r--lib/plugins/config/lang/ca/lang.php96
-rw-r--r--lib/plugins/config/lang/tr/lang.php47
-rw-r--r--lib/plugins/config/lang/zh-tw/intro.txt6
-rw-r--r--lib/plugins/config/lang/zh-tw/lang.php56
-rw-r--r--lib/plugins/config/settings/config.metadata.php2
-rw-r--r--lib/plugins/plugin/lang/ca/lang.php2
-rw-r--r--lib/plugins/plugin/lang/tr/lang.php1
-rw-r--r--lib/plugins/plugin/lang/zh-tw/admin_plugin.txt4
-rw-r--r--lib/plugins/plugin/lang/zh-tw/lang.php55
-rw-r--r--lib/plugins/popularity/lang/ca/lang.php1
-rw-r--r--lib/plugins/popularity/lang/tr/lang.php2
-rw-r--r--lib/plugins/popularity/lang/zh-tw/intro.txt9
-rw-r--r--lib/plugins/popularity/lang/zh-tw/lang.php9
-rw-r--r--lib/plugins/popularity/lang/zh-tw/submitted.txt2
-rw-r--r--lib/plugins/revert/lang/ca/lang.php1
-rw-r--r--lib/plugins/revert/lang/tr/lang.php1
-rw-r--r--lib/plugins/revert/lang/zh-tw/intro.txt2
-rw-r--r--lib/plugins/revert/lang/zh-tw/lang.php5
-rw-r--r--lib/plugins/usermanager/lang/ca/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/tr/lang.php1
-rw-r--r--lib/plugins/usermanager/lang/zh-tw/lang.php17
-rw-r--r--lib/scripts/fileuploaderextended.js2
-rw-r--r--lib/scripts/toolbar.js2
-rw-r--r--lib/tpl/dokuwiki/css/pagetools.css1
107 files changed, 1799 insertions, 916 deletions
diff --git a/README b/README
index 0490040f2..3b7cb8a9c 100644
--- a/README
+++ b/README
@@ -4,7 +4,7 @@ at http://www.dokuwiki.org/
For Installation Instructions see
http://www.dokuwiki.org/install
-DokuWiki - 2004-2012 (c) Andreas Gohr <andi@splitbrain.org>
+DokuWiki - 2004-2013 (c) Andreas Gohr <andi@splitbrain.org>
and the DokuWiki Community
See COPYING and file headers for license info
diff --git a/_test/phpunit.xml b/_test/phpunit.xml
index 13676f207..fc7dd8be0 100644
--- a/_test/phpunit.xml
+++ b/_test/phpunit.xml
@@ -10,6 +10,9 @@
<testsuite name="Plugin Tests">
<directory suffix=".test.php">../lib/plugins/*/_test</directory>
</testsuite>
+ <testsuite name="Template Tests">
+ <directory suffix=".test.php">../lib/tpl/*/_test</directory>
+ </testsuite>
</testsuites>
<filter>
@@ -19,6 +22,7 @@
<directory suffix=".php">../_cs/</directory>
<directory suffix=".php">../_test/</directory>
<directory suffix=".php">../lib/plugins/*/_test/</directory>
+ <directory suffix=".php">../lib/tpl/*/_test/</directory>
</exclude>
</whitelist>
</filter>
diff --git a/_test/tests/inc/auth_password.test.php b/_test/tests/inc/auth_password.test.php
index 426353291..27e03be60 100644
--- a/_test/tests/inc/auth_password.test.php
+++ b/_test/tests/inc/auth_password.test.php
@@ -16,6 +16,7 @@ class auth_password_test extends PHPUnit_Framework_TestCase {
'kmd5' => 'a579299436d7969791189acadd86fcb716',
'djangomd5' => 'md5$abcde$d0fdddeda8cd92725d2b54148ac09158',
'djangosha1' => 'sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678',
+ 'sha512' => '$6$abcdefgh12345678$J9.zOcgx0lotwZdcz0uulA3IVQMinZvFZVjA5vapRLVAAqtay23XD4xeeUxQ3B4JvDWYFBIxVWW1tOYlHX13k1'
);
@@ -61,6 +62,11 @@ class auth_password_test extends PHPUnit_Framework_TestCase {
$this->assertTrue(auth_verifyPassword('test12345','$H$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0'));
}
+ function test_veryPassword_mediawiki(){
+ $this->assertTrue(auth_verifyPassword('password', ':B:838c83e1:e4ab7024509eef084cdabd03d8b2972c'));
+ }
+
+
/**
* pmd5 checking should throw an exception when a hash with a too high
* iteration count is passed
diff --git a/_test/tests/inc/indexer_rename.test.php b/_test/tests/inc/indexer_rename.test.php
new file mode 100644
index 000000000..d8c456f8e
--- /dev/null
+++ b/_test/tests/inc/indexer_rename.test.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Test cases for the Doku_Indexer::renamePage and Doku_Indexer::renameMetaValue methods
+ */
+class indexer_rename_test extends DokuWikiTest {
+ /** @var Doku_Indexer $indexer */
+ private $indexer;
+
+ private $old_id = 'old_testid';
+
+ function setUp() {
+ parent::setUp();
+ $this->indexer = idx_get_indexer();
+ $this->indexer->clear();
+
+ saveWikiText($this->old_id, 'Old test content', 'Created old test page for indexer rename test');
+ idx_addPage($this->old_id);
+ }
+
+ function test_rename_to_new_page() {
+ $newid = 'new_id_1';
+
+ $oldpid = $this->indexer->getPID($this->old_id);
+
+ $this->assertTrue($this->indexer->renamePage($this->old_id, $newid), 'Renaming the page to a new id failed');
+ io_rename(wikiFN($this->old_id), wikiFN($newid));
+
+ $this->assertNotEquals($this->indexer->getPID($this->old_id), $oldpid, 'PID for the old page unchanged after rename.');
+ $this->assertEquals($this->indexer->getPID($newid), $oldpid, 'New page has not the old pid.');
+ $query = array('old');
+ $this->assertEquals(array('old' => array($newid => 1)), $this->indexer->lookup($query), '"Old" doesn\'t find the new page');
+ }
+
+ function test_rename_to_existing_page() {
+ $newid = 'existing_page';
+ saveWikiText($newid, 'Existing content', 'Created page for move_to_existing_page');
+ idx_addPage($newid);
+
+ $oldpid = $this->indexer->getPID($this->old_id);
+ $existingpid = $this->indexer->getPID($newid);
+
+ $this->assertTrue($this->indexer->renamePage($this->old_id, $newid), 'Renaming the page to an existing id failed');
+
+ $this->assertNotEquals($this->indexer->getPID($this->old_id), $oldpid, 'PID for old page unchanged after rename.');
+ $this->assertNotEquals($this->indexer->getPID($this->old_id), $existingpid, 'PID for old page is now PID of the existing page.');
+ $this->assertEquals($this->indexer->getPID($newid), $oldpid, 'New page has not the old pid.');
+ $query = array('existing');
+ $this->assertEquals(array('existing' => array()), $this->indexer->lookup($query), 'Existing page hasn\'t been deleted from the index.');
+ $query = array('old');
+ $this->assertEquals(array('old' => array($newid => 1)), $this->indexer->lookup($query), '"Old" doesn\'t find the new page');
+ }
+
+ function test_meta_rename_to_new_value() {
+ $this->indexer->addMetaKeys($this->old_id, array('mkey' => 'old_value'));
+
+ $this->assertTrue($this->indexer->renameMetaValue('mkey', 'old_value', 'new_value'), 'Meta value rename to new value failed.');
+ $query = 'old_value';
+ $this->assertEquals(array(), $this->indexer->lookupKey('mkey', $query), 'Page can still be found under old value.');
+ $query = 'new_value';
+ $this->assertEquals(array($this->old_id), $this->indexer->lookupKey('mkey', $query), 'Page can\'t be found under new value.');
+ }
+
+ function test_meta_rename_to_existing_value() {
+ $this->indexer->addMetaKeys($this->old_id, array('mkey' => array('old_value', 'new_value')));
+
+ saveWikiText('newvalue', 'Test page', '');
+ idx_addPage('newvalue');
+ $this->indexer->addMetaKeys('newvalue', array('mkey' => array('new_value')));
+
+ saveWikiText('oldvalue', 'Test page', '');
+ idx_addPage('oldvalue');
+ $this->indexer->addMetaKeys('oldvalue', array('mkey' => array('old_value')));
+
+ $this->assertTrue($this->indexer->renameMetaValue('mkey', 'old_value', 'new_value'), 'Meta value rename to existing value failed');
+ $query = 'old_value';
+ $this->assertEquals(array(), $this->indexer->lookupKey('mkey', $query), 'Page can still be found under old value.');
+ $query = 'new_value';
+ $result = $this->indexer->lookupKey('mkey', $query);
+ $this->assertContains($this->old_id, $result, 'Page with both values can\'t be found anymore');
+ $this->assertContains('newvalue', $result, 'Page with new value can\'t be found anymore');
+ $this->assertContains('oldvalue', $result, 'Page with only the old value can\'t be found anymore');
+ }
+}
diff --git a/_test/tests/inc/search/search.test.php b/_test/tests/inc/search/search.test.php
index 33cc80e74..9c854a661 100644
--- a/_test/tests/inc/search/search.test.php
+++ b/_test/tests/inc/search/search.test.php
@@ -1,6 +1,7 @@
<?php
class search_test extends DokuWikiTest {
+
function strip_index_data($entry) {
$n_entry = array();
foreach(array('id', 'type', 'level', 'open') as $k) {
@@ -9,6 +10,24 @@ class search_test extends DokuWikiTest {
return $n_entry;
}
+ function test_search_allpages(){
+ $data = array();
+
+ //depth is 0 hence we should recurse endlesly
+ search($data, dirname(__FILE__) . '/data', 'search_allpages', array('depth' => 0), 'ns1');
+ $this->assertEquals(3, count($data));
+
+ //depth is 1 and we start too deep to expect results
+ $data = array();
+ search($data, dirname(__FILE__) . '/data', 'search_allpages', array('depth' => 1), 'ns1/ns3');
+ $this->assertEquals(0, count($data));
+
+ //depth is 1 so I should get only pages from ns1
+ $data = array();
+ search($data, dirname(__FILE__) . '/data', 'search_allpages', array('depth' => 1), 'ns1');
+ $this->assertEquals(2, count($data));
+ }
+
function test_search_index(){
$data = array();
search($data, dirname(__FILE__) . '/data', 'search_index',
diff --git a/_test/tests/inc/subscription.test.php b/_test/tests/inc/subscription.test.php
new file mode 100644
index 000000000..333400576
--- /dev/null
+++ b/_test/tests/inc/subscription.test.php
@@ -0,0 +1,246 @@
+<?php
+
+class subscription_test extends DokuWikiTest {
+
+ function test_regexp() {
+ // data to test against
+ $data = array(
+ "casper every\n",
+ "Andreas digest 1344689733",
+ "Cold%20Fusion every",
+ "zioth list 1344691369\n",
+ "nlights digest",
+ "rikblok\tdigest \t 1344716803",
+ );
+
+ // user, style, data, expected number of results
+ $tests = array(
+ array('Cold Fusion', null, null, 1),
+ array('casper', null, null, 1),
+ array('nope', null, null, 0),
+ array('lights', null, null, 0),
+ array(array('Cold Fusion', 'casper', 'nope'), null, null, 2),
+ array(null, 'list', null, 1),
+ array(null, 'every', null, 2),
+ array(null, 'digest', null, 3),
+ array(null, array('list', 'every'), null, 3),
+ array('casper', 'digest', null, 0),
+ array('casper', array('digest', 'every'), null, 1),
+ array('zioth', 'list', '1344691369', 1),
+ array('zioth', null, '1344691369', 1),
+ array('zioth', 'digest', '1344691369', 0),
+ );
+
+ $sub = new MockupSubscription();
+
+ $row = 0;
+ foreach($tests as $test) {
+ $re = $sub->buildregex($test[0], $test[1], $test[2]);
+ $this->assertFalse(empty($re), "test line $row");
+ $result = preg_grep($re, $data);
+ $this->assertEquals($test[3], count($result), "test line $row. $re got\n".print_r($result, true));
+
+ $row++;
+ }
+ }
+
+ function test_addremove() {
+ $sub = new MockupSubscription();
+
+ // no subscriptions
+ $this->assertArrayNotHasKey(
+ 'wiki:dokuwiki',
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+
+ // add page subscription
+ $sub->add('wiki:dokuwiki', 'testuser', 'every');
+
+ // one subscription
+ $this->assertArrayHasKey(
+ 'wiki:dokuwiki',
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+
+ // remove page subscription
+ $sub->remove('wiki:dokuwiki', 'testuser');
+
+ // no subscription
+ $this->assertArrayNotHasKey(
+ 'wiki:dokuwiki',
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+
+ // add namespace subscription
+ $sub->add('wiki:', 'testuser', 'every');
+
+ // one subscription
+ $this->assertArrayHasKey(
+ 'wiki:',
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+
+ // remove (non existing) page subscription
+ $sub->remove('wiki:dokuwiki', 'testuser');
+
+ // still one subscription
+ $this->assertArrayHasKey(
+ 'wiki:',
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+
+ // change namespace subscription
+ $sub->add('wiki:', 'testuser', 'digest', '1234567');
+
+ // still one subscription
+ $this->assertArrayHasKey(
+ 'wiki:',
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+
+ // check contents
+ $this->assertEquals(
+ array('wiki:' => array('testuser' => array('digest', '1234567'))),
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+
+ // change subscription data
+ $sub->add('wiki:', 'testuser', 'digest', '7654321');
+
+ // still one subscription
+ $this->assertArrayHasKey(
+ 'wiki:',
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+
+ // check contents
+ $this->assertEquals(
+ array('wiki:' => array('testuser' => array('digest', '7654321'))),
+ $sub->subscribers('wiki:dokuwiki', null, array('every', 'list', 'digest'))
+ );
+ }
+
+ function test_bulkdigest() {
+ $sub = new MockupSubscription();
+
+ // let's start with nothing
+ $this->assertEquals(0, $sub->send_bulk('sub1:test'));
+
+ // create a subscription
+ $sub->add('sub1:', 'testuser', 'digest', '978328800'); // last mod 2001-01-01
+
+ // now create change
+ $_SERVER['REMOTE_USER'] = 'someguy';
+ saveWikiText('sub1:test', 'foo bar', 'a subscription change', false);
+
+ // should trigger a mail
+ $this->assertEquals(1, $sub->send_bulk('sub1:test'));
+ $this->assertEquals(array('arthur@example.com'), $sub->mails);
+
+ $sub->reset();
+
+ // now create more changes
+ $_SERVER['REMOTE_USER'] = 'someguy';
+ saveWikiText('sub1:sub2:test', 'foo bar', 'a subscription change', false);
+ saveWikiText('sub1:another_test', 'foo bar', 'a subscription change', false);
+
+ // should not trigger a mail, because the subscription time has not been reached, yet
+ $this->assertEquals(0, $sub->send_bulk('sub1:test'));
+ $this->assertEquals(array(), $sub->mails);
+
+ // reset the subscription time
+ $sub->add('sub1:', 'testuser', 'digest', '978328800'); // last mod 2001-01-01
+
+ // we now should get mails for three changes
+ $this->assertEquals(3, $sub->send_bulk('sub1:test'));
+ $this->assertEquals(array('arthur@example.com', 'arthur@example.com', 'arthur@example.com'), $sub->mails);
+ }
+
+ function test_bulklist() {
+ $sub = new MockupSubscription();
+
+ // let's start with nothing
+ $this->assertEquals(0, $sub->send_bulk('sub1:test'));
+
+ // create a subscription
+ $sub->add('sub1:', 'testuser', 'list', '978328800'); // last mod 2001-01-01
+
+ // now create change
+ $_SERVER['REMOTE_USER'] = 'someguy';
+ saveWikiText('sub1:test', 'foo bar', 'a subscription change', false);
+
+ // should trigger a mail
+ $this->assertEquals(1, $sub->send_bulk('sub1:test'));
+ $this->assertEquals(array('arthur@example.com'), $sub->mails);
+
+ $sub->reset();
+
+ // now create more changes
+ $_SERVER['REMOTE_USER'] = 'someguy';
+ saveWikiText('sub1:sub2:test', 'foo bar', 'a subscription change', false);
+ saveWikiText('sub1:another_test', 'foo bar', 'a subscription change', false);
+
+ // should not trigger a mail, because the subscription time has not been reached, yet
+ $this->assertEquals(0, $sub->send_bulk('sub1:test'));
+ $this->assertEquals(array(), $sub->mails);
+
+ // reset the subscription time
+ $sub->add('sub1:', 'testuser', 'list', '978328800'); // last mod 2001-01-01
+
+ // we now should get a single mail for all three changes
+ $this->assertEquals(1, $sub->send_bulk('sub1:test'));
+ $this->assertEquals(array('arthur@example.com'), $sub->mails);
+ }
+
+ /**
+ * Tests, if overwriting subscriptions works even when subscriptions for the same
+ * user exist for two nested namespaces, this is a test for the bug described in FS#2580
+ */
+ function test_overwrite() {
+ $sub = new MockupSubscription();
+
+ $sub->add(':', 'admin', 'digest', '123456789');
+ $sub->add(':wiki:', 'admin', 'digest', '123456789');
+ $sub->add(':', 'admin', 'digest', '1234');
+ $sub->add(':wiki:', 'admin', 'digest', '1234');
+
+ $subscriptions = $sub->subscribers(':wiki:', 'admin');
+
+ $this->assertCount(1, $subscriptions[':'], 'More than one subscription saved for the root namespace even though the old one should have been overwritten.');
+ $this->assertCount(1, $subscriptions[':wiki:'], 'More than one subscription saved for the wiki namespace even though the old one should have been overwritten.');
+ $this->assertCount(2, $subscriptions, 'Didn\'t find the expected two subscriptions');
+ }
+}
+
+/**
+ * makes protected methods visible for testing
+ */
+class MockupSubscription extends Subscription {
+ public $mails; // we keep sent mails here
+
+ public function __construct() {
+ $this->reset();
+ }
+
+ /**
+ * resets the mail array
+ */
+ public function reset() {
+ $this->mails = array();
+ }
+
+ public function isenabled() {
+ return true;
+ }
+
+ public function buildregex($user = null, $style = null, $data = null) {
+ return parent::buildregex($user, $style, $data);
+ }
+
+ protected function send($subscriber_mail, $subject, $id, $template, $trep, $hrep = null) {
+ $this->mails[] = $subscriber_mail;
+ return true;
+ }
+}
+
+//Setup VIM: ex: et ts=4 :
diff --git a/_test/tests/inc/subscription_set.test.php b/_test/tests/inc/subscription_set.test.php
deleted file mode 100644
index 5c0a6c816..000000000
--- a/_test/tests/inc/subscription_set.test.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-/**
- * Tests the subscription set function
- */
-class subscription_set_test extends DokuWikiTest {
- /**
- * Tests, if overwriting subscriptions works even when subscriptions for the same
- * user exist for two nested namespaces, this is a test for the bug described in FS#2580
- */
- function test_overwrite() {
- subscription_set('admin', ':', 'digest', '123456789');
- subscription_set('admin', ':wiki:', 'digest', '123456789');
- subscription_set('admin', ':', 'digest', '1234', true);
- subscription_set('admin', ':wiki:', 'digest', '1234', true);
- $subscriptions = subscription_find(':wiki:', array('user' => 'admin'));
- $this->assertCount(1, $subscriptions[':'], 'More than one subscription saved for the root namespace even though the old one should have been overwritten.');
- $this->assertCount(1, $subscriptions[':wiki:'], 'More than one subscription saved for the wiki namespace even though the old one should have been overwritten.');
- $this->assertCount(2, $subscriptions, 'Didn\'t find the expected two subscriptions');
- }
-}
diff --git a/feed.php b/feed.php
index 9e5c5c6b5..7803982b8 100644
--- a/feed.php
+++ b/feed.php
@@ -209,12 +209,14 @@ function rss_buildItems(&$rss, &$data, $opt) {
// add date
if($ditem['date']) {
$date = $ditem['date'];
+ } elseif ($ditem['media']) {
+ $date = @filemtime(mediaFN($id));
+ } elseif (@file_exists(wikiFN($id))) {
+ $date = @filemtime(wikiFN($id));
} elseif($meta['date']['modified']) {
$date = $meta['date']['modified'];
- } else if ($ditem['media']) {
- $date = @filemtime(mediaFN($id));
} else {
- $date = @filemtime(wikiFN($id));
+ $date = 0;
}
if($date) $item->date = date('r', $date);
@@ -350,7 +352,11 @@ function rss_buildItems(&$rss, &$data, $opt) {
$content = '';
}
} else {
- $content = p_wiki_xhtml($id, $date, false);
+ if (@filemtime(wikiFN($id)) === $date) {
+ $content = p_wiki_xhtml($id, '', false);
+ } else {
+ $content = p_wiki_xhtml($id, $date, false);
+ }
// no TOC in feeds
$content = preg_replace('/(<!-- TOC START -->).*(<!-- TOC END -->)/s', '', $content);
diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php
index 13be479cc..080fb4778 100644
--- a/inc/PassHash.class.php
+++ b/inc/PassHash.class.php
@@ -4,7 +4,7 @@
*
* This class implements various mechanisms used to hash passwords
*
- * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Andreas Gohr <andi@splitbrain.org>
* @license LGPL2
*/
class PassHash {
@@ -58,6 +58,12 @@ class PassHash {
} elseif(substr($hash, 0, 6) == '{SMD5}') {
$method = 'lsmd5';
$salt = substr(base64_decode(substr($hash, 6)), 16);
+ } elseif(preg_match('/^:B:(.+?):.{32}$/', $hash, $m)) {
+ $method = 'mediawiki';
+ $salt = $m[1];
+ } elseif(preg_match('/^\$6\$(.+?)\$/', $hash, $m)) {
+ $method = 'sha512';
+ $salt = $m[1];
} elseif($len == 32) {
$method = 'md5';
} elseif($len == 40) {
@@ -101,14 +107,18 @@ class PassHash {
* Initialize the passed variable with a salt if needed.
*
* If $salt is not null, the value is kept, but the lenght restriction is
- * applied.
+ * applied (unless, $cut is false).
*
* @param string &$salt The salt, pass null if you want one generated
- * @param int $len The length of the salt
+ * @param int $len The length of the salt
+ * @param bool $cut Apply length restriction to existing salt?
*/
- public function init_salt(&$salt, $len = 32) {
- if(is_null($salt)) $salt = $this->gen_salt($len);
- if(strlen($salt) > $len) $salt = substr($salt, 0, $len);
+ public function init_salt(&$salt, $len = 32, $cut = true) {
+ if(is_null($salt)) {
+ $salt = $this->gen_salt($len);
+ $cut = true; // for new hashes we alway apply length restriction
+ }
+ if(strlen($salt) > $len && $cut) $salt = substr($salt, 0, $len);
}
// Password hashing methods follow below
@@ -263,7 +273,7 @@ class PassHash {
*
* This method was used by old MySQL systems
*
- * @link http://www.php.net/mysql
+ * @link http://www.php.net/mysql
* @author <soren at byu dot edu>
* @param string $clear The clear text to hash
* @return string Hashed password
@@ -327,9 +337,9 @@ class PassHash {
* an exception.
*
* @link http://www.openwall.com/phpass/
- * @param string $clear The clear text to hash
- * @param string $salt The salt to use, null for random
- * @param string $magic The hash identifier (P or H)
+ * @param string $clear The clear text to hash
+ * @param string $salt The salt to use, null for random
+ * @param string $magic The hash identifier (P or H)
* @param int $compute The iteration count for new passwords
* @throws Exception
* @return string Hashed password
@@ -430,8 +440,8 @@ class PassHash {
* will break. When no salt is given, the iteration count can be set
* through the $compute variable.
*
- * @param string $clear The clear text to hash
- * @param string $salt The salt to use, null for random
+ * @param string $clear The clear text to hash
+ * @param string $salt The salt to use, null for random
* @param int $compute The iteration count (between 4 and 31)
* @throws Exception
* @return string Hashed password
@@ -450,4 +460,38 @@ class PassHash {
return crypt($clear, $salt);
}
+ /**
+ * Password hashing method SHA512
+ *
+ * This is only supported on PHP 5.3.2 or higher and will throw an exception if
+ * the needed crypt support is not available
+ *
+ * @param string $clear The clear text to hash
+ * @param string $salt The salt to use, null for random
+ * @return string Hashed password
+ * @throws Exception
+ */
+ public function hash_sha512($clear, $salt = null) {
+ if(!defined('CRYPT_SHA512') || CRYPT_SHA512 != 1) {
+ throw new Exception('This PHP installation has no SHA512 support');
+ }
+ $this->init_salt($salt, 8, false);
+ return crypt($clear, '$6$'.$salt.'$');
+ }
+
+ /**
+ * Password hashing method 'mediawiki'
+ *
+ * Uses salted MD5, this is referred to as Method B in MediaWiki docs. Unsalted md5
+ * method 'A' is not supported.
+ *
+ * @link http://www.mediawiki.org/wiki/Manual_talk:User_table#user_password_column
+ * @param string $clear The clear text to hash
+ * @param string $salt The salt to use, null for random
+ * @return string Hashed password
+ */
+ public function hash_mediawiki($clear, $salt = null) {
+ $this->init_salt($salt, 8, false);
+ return ':B:'.$salt.':'.md5($salt.'-'.md5($clear));
+ }
}
diff --git a/inc/RemoteAPICore.php b/inc/RemoteAPICore.php
index c04a14f5c..81b211ec8 100644
--- a/inc/RemoteAPICore.php
+++ b/inc/RemoteAPICore.php
@@ -3,7 +3,7 @@
/**
* Increased whenever the API is changed
*/
-define('DOKU_API_VERSION', 7);
+define('DOKU_API_VERSION', 8);
class RemoteAPICore {
@@ -344,6 +344,8 @@ class RemoteAPICore {
for($i=0; $i<$len; $i++) {
unset($data[$i]['meta']);
+ $data[$i]['perms'] = $data[$i]['perm'];
+ unset($data[$i]['perm']);
$data[$i]['lastModified'] = $this->api->toDate($data[$i]['mtime']);
}
return $data;
@@ -654,7 +656,9 @@ class RemoteAPICore {
if(count($revisions)>0 && $first==0) {
array_unshift($revisions, ''); // include current revision
- array_pop($revisions); // remove extra log entry
+ if ( count($revisions) > $conf['recent'] ){
+ array_pop($revisions); // remove extra log entry
+ }
}
if(count($revisions) > $conf['recent']) {
diff --git a/inc/Tar.class.php b/inc/Tar.class.php
index 59e14c705..20f397395 100644
--- a/inc/Tar.class.php
+++ b/inc/Tar.class.php
@@ -17,7 +17,7 @@
*
* $tar = new Tar();
* $tar->open('myfile.tgz');
- * $tar->extract(/tmp);
+ * $tar->extract('/tmp');
*
* To create a new TAR archive directly on the filesystem (low memory requirements), create() it,
* add*() files and close() it:
@@ -81,7 +81,7 @@ class Tar {
$this->fh = @fopen($this->file, 'rb');
}
- if(!$this->fh) throw(new TarIOException('Could not open file for reading: '.$this->file));
+ if(!$this->fh) throw new TarIOException('Could not open file for reading: '.$this->file);
$this->closed = false;
}
@@ -107,9 +107,9 @@ class Tar {
* Reopen the file with open() again if you want to do additional operations
*/
public function contents() {
- if($this->closed || !$this->file) throw(new TarIOException('Can not read from a closed archive'));
+ if($this->closed || !$this->file) throw new TarIOException('Can not read from a closed archive');
- $result = Array();
+ $result = array();
while($read = $this->readbytes(512)) {
$header = $this->parseHeader($read);
if(!is_array($header)) continue;
@@ -148,7 +148,7 @@ class Tar {
* @return array
*/
function extract($outdir, $strip = '', $exclude = '', $include = '') {
- if($this->closed || !$this->file) throw(new TarIOException('Can not read from a closed archive'));
+ if($this->closed || !$this->file) throw new TarIOException('Can not read from a closed archive');
$outdir = rtrim($outdir, '/');
io_mkdir_p($outdir);
@@ -207,7 +207,7 @@ class Tar {
// is this a file?
if(!$header['typeflag']) {
$fp = fopen($output, "wb");
- if(!$fp) throw(new TarIOException('Could not open file for writing: '.$output));
+ if(!$fp) throw new TarIOException('Could not open file for writing: '.$output);
$size = floor($header['size'] / 512);
for($i = 0; $i < $size; $i++) {
@@ -260,7 +260,7 @@ class Tar {
$this->fh = @fopen($this->file, 'wb');
}
- if(!$this->fh) throw(new TarIOException('Could not open file for writing: '.$this->file));
+ if(!$this->fh) throw new TarIOException('Could not open file for writing: '.$this->file);
}
$this->writeaccess = false;
$this->closed = false;
@@ -275,13 +275,13 @@ class Tar {
* @throws TarIOException
*/
public function addFile($file, $name = '') {
- if($this->closed) throw(new TarIOException('Archive has been closed, files can no longer be added'));
+ if($this->closed) throw new TarIOException('Archive has been closed, files can no longer be added');
if(!$name) $name = $file;
$name = $this->cleanPath($name);
$fp = fopen($file, 'rb');
- if(!$fp) throw(new TarIOException('Could not open file for reading: '.$file));
+ if(!$fp) throw new TarIOException('Could not open file for reading: '.$file);
// create file header and copy all stat info from the original file
clearstatcache(false, $file);
@@ -314,7 +314,7 @@ class Tar {
* @throws TarIOException
*/
public function addData($name, $data, $uid = 0, $gid = 0, $perm = 0666, $mtime = 0) {
- if($this->closed) throw(new TarIOException('Archive has been closed, files can no longer be added'));
+ if($this->closed) throw new TarIOException('Archive has been closed, files can no longer be added');
$name = $this->cleanPath($name);
$len = strlen($data);
@@ -401,7 +401,7 @@ class Tar {
if($comptype === Tar::COMPRESS_AUTO) $comptype = $this->filetype($file);
if(!file_put_contents($file, $this->getArchive($comptype, $complevel))) {
- throw(new TarIOException('Could not write to file: '.$file));
+ throw new TarIOException('Could not write to file: '.$file);
}
}
@@ -439,14 +439,14 @@ class Tar {
} else {
$written = @fwrite($this->fh, $data);
}
- if($written === false) throw(new TarIOException('Failed to write to archive stream'));
+ if($written === false) throw new TarIOException('Failed to write to archive stream');
return $written;
}
/**
* Skip forward in the open file pointer
*
- * This is basically a wrapper around seek() (and a workarounf for bzip2)
+ * This is basically a wrapper around seek() (and a workaround for bzip2)
*
* @param int $bytes seek to this position
*/
@@ -494,11 +494,11 @@ class Tar {
}
// values are needed in octal
- $uid = sprintf("%6s ", DecOct($uid));
- $gid = sprintf("%6s ", DecOct($gid));
- $perm = sprintf("%6s ", DecOct($perm));
- $size = sprintf("%11s ", DecOct($size));
- $mtime = sprintf("%11s", DecOct($mtime));
+ $uid = sprintf("%6s ", decoct($uid));
+ $gid = sprintf("%6s ", decoct($gid));
+ $perm = sprintf("%6s ", decoct($perm));
+ $size = sprintf("%11s ", decoct($size));
+ $mtime = sprintf("%11s", decoct($mtime));
$data_first = pack("a100a8a8a8a12A12", $name, $perm, $uid, $gid, $size, $mtime);
$data_last = pack("a1a100a6a2a32a32a8a8a155a12", $typeflag, '', 'ustar', '', '', '', '', '', $prefix, "");
@@ -511,7 +511,7 @@ class Tar {
$this->writebytes($data_first);
- $chks = pack("a8", sprintf("%6s ", DecOct($chks)));
+ $chks = pack("a8", sprintf("%6s ", decoct($chks)));
$this->writebytes($chks.$data_last);
}
@@ -598,11 +598,11 @@ class Tar {
*/
protected function compressioncheck($comptype) {
if($comptype === Tar::COMPRESS_GZIP && !function_exists('gzopen')) {
- throw(new TarIllegalCompressionException('No gzip support available'));
+ throw new TarIllegalCompressionException('No gzip support available');
}
if($comptype === Tar::COMPRESS_BZIP && !function_exists('bzopen')) {
- throw(new TarIllegalCompressionException('No bzip2 support available'));
+ throw new TarIllegalCompressionException('No bzip2 support available');
}
}
@@ -631,4 +631,4 @@ class TarIOException extends Exception {
}
class TarIllegalCompressionException extends Exception {
-} \ No newline at end of file
+}
diff --git a/inc/actions.php b/inc/actions.php
index f65b47451..4083b0454 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -711,21 +711,28 @@ function act_subscription($act){
$target = $params['target'];
$style = $params['style'];
- $data = $params['data'];
$action = $params['action'];
// Perform action.
- if (!subscription_set($_SERVER['REMOTE_USER'], $target, $style, $data)) {
+ $sub = new Subscription();
+ if($action == 'unsubscribe'){
+ $ok = $sub->remove($target, $_SERVER['REMOTE_USER'], $style);
+ }else{
+ $ok = $sub->add($target, $_SERVER['REMOTE_USER'], $style);
+ }
+
+ if($ok) {
+ msg(sprintf($lang["subscr_{$action}_success"], hsc($INFO['userinfo']['name']),
+ prettyprint_id($target)), 1);
+ act_redirect($ID, $act);
+ } else {
throw new Exception(sprintf($lang["subscr_{$action}_error"],
hsc($INFO['userinfo']['name']),
prettyprint_id($target)));
}
- msg(sprintf($lang["subscr_{$action}_success"], hsc($INFO['userinfo']['name']),
- prettyprint_id($target)), 1);
- act_redirect($ID, $act);
// Assure that we have valid data if act_redirect somehow fails.
- $INFO['subscribed'] = get_info_subscribed();
+ $INFO['subscribed'] = $sub->user_subscription();
return 'show';
}
@@ -777,8 +784,7 @@ function subscription_handle_post(&$params) {
$style = null;
}
- $data = in_array($style, array('list', 'digest')) ? time() : null;
- $params = compact('target', 'style', 'data', 'action');
+ $params = compact('target', 'style', 'action');
}
//Setup VIM: ex: et ts=2 :
diff --git a/inc/auth.php b/inc/auth.php
index c68a699fe..c4f1dcf2b 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -780,23 +780,19 @@ function register() {
return false;
}
- // create substitutions for use in notification email
- $substitutions = array(
- 'NEWUSER' => $login,
- 'NEWNAME' => $fullname,
- 'NEWEMAIL' => $email,
- );
+ // send notification about the new user
+ $subscription = new Subscription();
+ $subscription->send_register($login, $fullname, $email);
+ // are we done?
if(!$conf['autopasswd']) {
msg($lang['regsuccess2'], 1);
- notify('', 'register', '', $login, false, $substitutions);
return true;
}
- // autogenerated password? then send him the password
+ // autogenerated password? then send password to user
if(auth_sendPassword($login, $pass)) {
msg($lang['regsuccess'], 1);
- notify('', 'register', '', $login, false, $substitutions);
return true;
} else {
msg($lang['regmailfail'], -1);
diff --git a/inc/changelog.php b/inc/changelog.php
index 688aebfd6..9768fea51 100644
--- a/inc/changelog.php
+++ b/inc/changelog.php
@@ -258,6 +258,7 @@ function getRecentsSince($from,$to=null,$ns='',$flags=0){
} else {
$lines = @file($conf['changelog']);
}
+ if(!$lines) return $recent;
// we start searching at the end of the list
$lines = array_reverse($lines);
diff --git a/inc/common.php b/inc/common.php
index 3c40a47dc..bc49e76b2 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -107,9 +107,11 @@ function pageinfo() {
$info['isadmin'] = false;
$info['ismanager'] = false;
if(isset($_SERVER['REMOTE_USER'])) {
+ $sub = new Subscription();
+
$info['userinfo'] = $USERINFO;
$info['perm'] = auth_quickaclcheck($ID);
- $info['subscribed'] = get_info_subscribed();
+ $info['subscribed'] = $sub->user_subscription();
$info['client'] = $_SERVER['REMOTE_USER'];
if($info['perm'] == AUTH_ADMIN) {
@@ -320,15 +322,13 @@ function idfilter($id, $ue = true) {
if($conf['useslash'] && $conf['userewrite']) {
$id = strtr($id, ':', '/');
} elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' &&
- $conf['userewrite'] &&
- strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') === false
+ $conf['userewrite']
) {
$id = strtr($id, ':', ';');
}
if($ue) {
$id = rawurlencode($id);
$id = str_replace('%3A', ':', $id); //keep as colon
- $id = str_replace('%3B', ';', $id); //keep as semicolon
$id = str_replace('%2F', '/', $id); //keep as slash
}
return $id;
@@ -1105,90 +1105,31 @@ function saveOldRevision($id) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function notify($id, $who, $rev = '', $summary = '', $minor = false, $replace = array()) {
- global $lang;
global $conf;
- global $INFO;
- global $DIFF_INLINESTYLES;
// decide if there is something to do, eg. whom to mail
if($who == 'admin') {
if(empty($conf['notify'])) return false; //notify enabled?
- $text = rawLocale('mailtext');
- $to = $conf['notify'];
- $bcc = '';
+ $tpl = 'mailtext';
+ $to = $conf['notify'];
} elseif($who == 'subscribers') {
- if(!$conf['subscribers']) return false; //subscribers enabled?
+ if(!actionOK('subscribe')) return false; //subscribers enabled?
if($conf['useacl'] && $_SERVER['REMOTE_USER'] && $minor) return false; //skip minors
$data = array('id' => $id, 'addresslist' => '', 'self' => false);
trigger_event(
'COMMON_NOTIFY_ADDRESSLIST', $data,
- 'subscription_addresslist'
+ array(new Subscription(), 'notifyaddresses')
);
- $bcc = $data['addresslist'];
- if(empty($bcc)) return false;
- $to = '';
- $text = rawLocale('subscr_single');
- } elseif($who == 'register') {
- if(empty($conf['registernotify'])) return false;
- $text = rawLocale('registermail');
- $to = $conf['registernotify'];
- $bcc = '';
+ $to = $data['addresslist'];
+ if(empty($to)) return false;
+ $tpl = 'subscr_single';
} else {
return false; //just to be safe
}
- // prepare replacements (keys not set in hrep will be taken from trep)
- $trep = array(
- 'NEWPAGE' => wl($id, '', true, '&'),
- 'PAGE' => $id,
- 'SUMMARY' => $summary
- );
- $trep = array_merge($trep, $replace);
- $hrep = array();
-
// prepare content
- if($who == 'register') {
- $subject = $lang['mail_new_user'].' '.$summary;
- } elseif($rev) {
- $subject = $lang['mail_changed'].' '.$id;
- $trep['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
- $old_content = rawWiki($id, $rev);
- $new_content = rawWiki($id);
- $df = new Diff(explode("\n", $old_content),
- explode("\n", $new_content));
- $dformat = new UnifiedDiffFormatter();
- $tdiff = $dformat->format($df);
-
- $DIFF_INLINESTYLES = true;
- $hdf = new Diff(explode("\n", hsc($old_content)),
- explode("\n", hsc($new_content)));
- $dformat = new InlineDiffFormatter();
- $hdiff = $dformat->format($hdf);
- $hdiff = '<table>'.$hdiff.'</table>';
- $DIFF_INLINESTYLES = false;
- } else {
- $subject = $lang['mail_newpage'].' '.$id;
- $trep['OLDPAGE'] = '---';
- $tdiff = rawWiki($id);
- $hdiff = nl2br(hsc($tdiff));
- }
- $trep['DIFF'] = $tdiff;
- $hrep['DIFF'] = $hdiff;
-
- // send mail
- $mail = new Mailer();
- $mail->to($to);
- $mail->bcc($bcc);
- $mail->subject($subject);
- $mail->setBody($text, $trep, $hrep);
- if($who == 'subscribers') {
- $mail->setHeader(
- 'List-Unsubscribe',
- '<'.wl($id, array('do'=> 'subscribe'), true, '&').'>',
- false
- );
- }
- return $mail->send();
+ $subscription = new Subscription();
+ return $subscription->send_diff($to, $tpl, $id, $rev, $summary);
}
/**
diff --git a/inc/html.php b/inc/html.php
index f4e6af663..5c1c75cf6 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1390,8 +1390,7 @@ function html_edit(){
$data = array('form' => $form,
'wr' => $wr,
'media_manager' => true,
- 'target' => ($INPUT->has('target') && $wr &&
- $RANGE !== '') ? $INPUT->str('target') : 'section',
+ 'target' => ($INPUT->has('target') && $wr) ? $INPUT->str('target') : 'section',
'intro_locale' => $include);
if ($data['target'] !== 'section') {
diff --git a/inc/indexer.php b/inc/indexer.php
index 7a62345bf..e518907d7 100644
--- a/inc/indexer.php
+++ b/inc/indexer.php
@@ -339,6 +339,109 @@ class Doku_Indexer {
}
/**
+ * Rename a page in the search index without changing the indexed content. This function doesn't check if the
+ * old or new name exists in the filesystem. It returns an error if the old page isn't in the page list of the
+ * indexer and it deletes all previously indexed content of the new page.
+ *
+ * @param string $oldpage The old page name
+ * @param string $newpage The new page name
+ * @return string|bool If the page was successfully renamed, can be a message in the case of an error
+ */
+ public function renamePage($oldpage, $newpage) {
+ if (!$this->lock()) return 'locked';
+
+ $pages = $this->getPages();
+
+ $id = array_search($oldpage, $pages);
+ if ($id === false) {
+ $this->unlock();
+ return 'page is not in index';
+ }
+
+ $new_id = array_search($newpage, $pages);
+ if ($new_id !== false) {
+ // make sure the page is not in the index anymore
+ if ($this->deletePageNoLock($newpage) !== true) {
+ return false;
+ }
+
+ $pages[$new_id] = 'deleted:'.time().rand(0, 9999);
+ }
+
+ $pages[$id] = $newpage;
+
+ // update index
+ if (!$this->saveIndex('page', '', $pages)) {
+ $this->unlock();
+ return false;
+ }
+
+ // reset the pid cache
+ $this->pidCache = array();
+
+ $this->unlock();
+ return true;
+ }
+
+ /**
+ * Renames a meta value in the index. This doesn't change the meta value in the pages, it assumes that all pages
+ * will be updated.
+ *
+ * @param string $key The metadata key of which a value shall be changed
+ * @param string $oldvalue The old value that shall be renamed
+ * @param string $newvalue The new value to which the old value shall be renamed, can exist (then values will be merged)
+ * @return bool|string If renaming the value has been successful, false or error message on error.
+ */
+ public function renameMetaValue($key, $oldvalue, $newvalue) {
+ if (!$this->lock()) return 'locked';
+
+ // change the relation references index
+ $metavalues = $this->getIndex($key, '_w');
+ $oldid = array_search($oldvalue, $metavalues);
+ if ($oldid !== false) {
+ $newid = array_search($newvalue, $metavalues);
+ if ($newid !== false) {
+ // free memory
+ unset ($metavalues);
+
+ // okay, now we have two entries for the same value. we need to merge them.
+ $indexline = $this->getIndexKey($key, '_i', $oldid);
+ if ($indexline != '') {
+ $newindexline = $this->getIndexKey($key, '_i', $newid);
+ $pagekeys = $this->getIndex($key, '_p');
+ $parts = explode(':', $indexline);
+ foreach ($parts as $part) {
+ list($id, $count) = explode('*', $part);
+ $newindexline = $this->updateTuple($newindexline, $id, $count);
+
+ $keyline = explode(':', $pagekeys[$id]);
+ // remove old meta value
+ $keyline = array_diff($keyline, array($oldid));
+ // add new meta value when not already present
+ if (!in_array($newid, $keyline)) {
+ array_push($keyline, $newid);
+ }
+ $pagekeys[$id] = implode(':', $keyline);
+ }
+ $this->saveIndex($key, '_p', $pagekeys);
+ unset($pagekeys);
+ $this->saveIndexKey($key, '_i', $oldid, '');
+ $this->saveIndexKey($key, '_i', $newid, $newindexline);
+ }
+ } else {
+ $metavalues[$oldid] = $newvalue;
+ if (!$this->saveIndex($key, '_w', $metavalues)) {
+ $this->unlock();
+ return false;
+ }
+ }
+ }
+
+ $this->unlock();
+ return true;
+ }
+
+ /**
* Remove a page from the index
*
* Erases entries in all known indexes.
@@ -351,10 +454,26 @@ class Doku_Indexer {
if (!$this->lock())
return "locked";
+ $result = $this->deletePageNoLock($page);
+
+ $this->unlock();
+
+ return $result;
+ }
+
+ /**
+ * Remove a page from the index without locking the index, only use this function if the index is already locked
+ *
+ * Erases entries in all known indexes.
+ *
+ * @param string $page a page name
+ * @return boolean the function completed successfully
+ * @author Tom N Harris <tnharris@whoopdedo.org>
+ */
+ protected function deletePageNoLock($page) {
// load known documents
$pid = $this->getPIDNoLock($page);
if ($pid === false) {
- $this->unlock();
return false;
}
@@ -380,7 +499,6 @@ class Doku_Indexer {
}
// Save the reverse index
if (!$this->saveIndexKey('pageword', '', $pid, "")) {
- $this->unlock();
return false;
}
@@ -397,7 +515,6 @@ class Doku_Indexer {
$this->saveIndexKey($metaname.'_p', '', $pid, '');
}
- $this->unlock();
return true;
}
diff --git a/inc/lang/ar/subscr_single.txt b/inc/lang/ar/subscr_single.txt
index 5c62aeaeb..611688415 100644
--- a/inc/lang/ar/subscr_single.txt
+++ b/inc/lang/ar/subscr_single.txt
@@ -15,7 +15,7 @@
لإلغاء إشعارات الصفحة,لُج الويكي في
@DOKUWIKIURL@ ثم زُر
-@NEWPAGE@
+@SUBSCRIBE@
وألغ الاشتراك من تغييرات الصفحة و/أو النطاق.
--
diff --git a/inc/lang/bg/subscr_single.txt b/inc/lang/bg/subscr_single.txt
index 7b26f8e96..a74a21fb8 100644
--- a/inc/lang/bg/subscr_single.txt
+++ b/inc/lang/bg/subscr_single.txt
@@ -14,7 +14,7 @@
Нова версия: @NEWPAGE@
Ако желаете да прекратите уведомяването за страницата трябва да се впишете на адрес @DOKUWIKIURL@, да посетите
-@NEWPAGE@
+@SUBSCRIBE@
и да прекратите абонамента за промени по страницата или именното пространство.
--
diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php
index 0fd88ec39..cb2b64686 100644
--- a/inc/lang/ca/lang.php
+++ b/inc/lang/ca/lang.php
@@ -5,6 +5,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Carles Bellver <carles.bellver@cent.uji.es>
* @author Carles Bellver <carles.bellver@gmail.com>
+ * @author daniel@6temes.cat
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -27,7 +28,7 @@ $lang['btn_revs'] = 'Revisions anteriors';
$lang['btn_recent'] = 'Canvis recents';
$lang['btn_upload'] = 'Penja';
$lang['btn_cancel'] = 'Cancel·la';
-$lang['btn_index'] = 'Índex';
+$lang['btn_index'] = 'Mapa del lloc';
$lang['btn_secedit'] = 'Edita';
$lang['btn_login'] = 'Entra';
$lang['btn_logout'] = 'Surt';
@@ -38,14 +39,15 @@ $lang['btn_back'] = 'Enrere';
$lang['btn_backlink'] = 'Què hi enllaça';
$lang['btn_backtomedia'] = 'Torna a la selecció de fitxers';
$lang['btn_subscribe'] = 'Subscripció a canvis d\'aquesta pàgina';
-$lang['btn_unsubscribe'] = 'Cancel·la subscripció a pàgina';
$lang['btn_profile'] = 'Actualització del perfil';
$lang['btn_reset'] = 'Reinicia';
+$lang['btn_resendpwd'] = 'Estableix una nova contrasenya';
$lang['btn_draft'] = 'Edita esborrany';
$lang['btn_recover'] = 'Recupera esborrany';
$lang['btn_draftdel'] = 'Suprimeix esborrany';
$lang['btn_revert'] = 'Restaura';
$lang['btn_register'] = 'Registra\'m';
+$lang['btn_apply'] = 'Aplica';
$lang['loggedinas'] = 'Heu entrat com';
$lang['user'] = 'Nom d\'usuari';
$lang['pass'] = 'Contrasenya';
@@ -75,6 +77,7 @@ $lang['profnoempty'] = 'No es pot deixar en blanc el nom o l\'adreça
$lang['profchanged'] = 'El perfil d\'usuari s\'ha actualitzat correctament.';
$lang['pwdforget'] = 'Heu oblidat la contrasenya? Podeu obtenir-ne una de nova.';
$lang['resendna'] = 'Aquest wiki no permet tornar a enviar la contrasenya.';
+$lang['resendpwd'] = 'Estableix una nova contrasenya per';
$lang['resendpwdmissing'] = 'Heu d\'emplenar tots els camps.';
$lang['resendpwdnouser'] = 'No s\'ha pogut trobar aquest usuari a la base de dades.';
$lang['resendpwdbadauth'] = 'Aquest codi d\'autenticació no és vàlid. Assegureu-vos d\'utilitzar l\'enllaç de confirmació complet.';
@@ -87,10 +90,52 @@ $lang['searchmedia_in'] = 'Cerca en: %s';
$lang['txt_upload'] = 'Trieu el fitxer que voleu penjar';
$lang['txt_filename'] = 'Introduïu el nom wiki (opcional)';
$lang['txt_overwrt'] = 'Sobreescriu el fitxer actual';
+$lang['maxuploadsize'] = 'Puja com a màxim %s per arxiu.';
$lang['lockedby'] = 'Actualment blocat per:';
$lang['lockexpire'] = 'Venciment del blocatge:';
-$lang['js']['willexpire'] = 'El blocatge per a editar aquesta pàgina venç d\'aquí a un minut.\nUtilitzeu la visualització prèvia per reiniciar el rellotge i evitar conflictes.';
-$lang['js']['notsavedyet'] = "Heu fet canvis que es perdran si no els deseu.\nVoleu continuar?";
+$lang['js']['willexpire'] = 'El blocatge per a editar aquesta pàgina venç d\'aquí a un minut.\nUtilitzeu la visualització prèvia per reiniciar el rellotge i evitar conflictes.';
+$lang['js']['notsavedyet'] = 'Heu fet canvis que es perdran si no els deseu.
+Voleu continuar?';
+$lang['js']['searchmedia'] = 'Cerca fitxers';
+$lang['js']['keepopen'] = 'Manté la finestra oberta';
+$lang['js']['hidedetails'] = 'Oculta detalls';
+$lang['js']['mediatitle'] = 'Propietats de l\'enllaç';
+$lang['js']['mediadisplay'] = 'Tipus d\'enllaç';
+$lang['js']['mediaalign'] = 'Alineació';
+$lang['js']['mediasize'] = 'Mida de la imatge';
+$lang['js']['mediatarget'] = 'Destí de l\'enllaç';
+$lang['js']['mediaclose'] = 'Tanca';
+$lang['js']['mediainsert'] = 'Inserta';
+$lang['js']['mediadisplayimg'] = 'Mostra la imatge';
+$lang['js']['mediadisplaylnk'] = 'Mostra només l\'enllaç';
+$lang['js']['mediasmall'] = 'Versió petita';
+$lang['js']['mediamedium'] = 'Versió mitjana';
+$lang['js']['medialarge'] = 'Versió gran';
+$lang['js']['mediaoriginal'] = 'Versió original';
+$lang['js']['medialnk'] = 'Enllaç a la pàgina de detalls';
+$lang['js']['mediadirect'] = 'Enllaç directe a l\'original';
+$lang['js']['medianolnk'] = 'No hi ha enllaç';
+$lang['js']['medianolink'] = 'No enllacis la imatge';
+$lang['js']['medialeft'] = 'Alinea la imatge a l\'esquerra.';
+$lang['js']['mediaright'] = 'Alinea la imatge a la dreta.';
+$lang['js']['mediacenter'] = 'Alinea la imatge al mig.';
+$lang['js']['medianoalign'] = 'No facis servir alineació.';
+$lang['js']['nosmblinks'] = 'Els enllaços amb recursos compartits de Windows només funcionen amb el Microsoft Internet Explorer.
+Si voleu podeu copiar i enganxar l\'enllaç.';
+$lang['js']['linkwiz'] = 'Auxiliar d\'enllaços';
+$lang['js']['linkto'] = 'Enllaça a:';
+$lang['js']['del_confirm'] = 'Suprimiu aquesta entrada?';
+$lang['js']['restore_confirm'] = 'Vols realment restaurar aquesta versió?';
+$lang['js']['media_diff'] = 'Veure les diferències:';
+$lang['js']['media_diff_both'] = 'Un al costat de l\'altre';
+$lang['js']['media_diff_opacity'] = 'Resalta';
+$lang['js']['media_diff_portions'] = 'Llisca';
+$lang['js']['media_select'] = 'Escull els arxius';
+$lang['js']['media_upload_btn'] = 'Pujar';
+$lang['js']['media_done_btn'] = 'Fet';
+$lang['js']['media_drop'] = 'Arrossega aquí els arxius a pujar';
+$lang['js']['media_cancel'] = 'esborra';
+$lang['js']['media_overwrt'] = 'Sobreescriu els arxius existents';
$lang['rssfailed'] = 'S\'ha produït un error en recollir aquesta alimentació: ';
$lang['nothingfound'] = 'No s\'ha trobat res.';
$lang['mediaselect'] = 'Selecció de fitxers';
@@ -108,14 +153,7 @@ $lang['deletefail'] = 'No s\'ha pogut suprimir el fitxer "%s". Compro
$lang['mediainuse'] = 'No s\'ha pogut suprimir el fitxer "%s". Encara s\'està utilitzant.';
$lang['namespaces'] = 'Espais';
$lang['mediafiles'] = 'Fitxers disponibles en';
-$lang['js']['searchmedia'] = 'Cerca fitxers';
-$lang['js']['keepopen'] = 'Manté la finestra oberta';
-$lang['js']['hidedetails'] = 'Oculta detalls';
-$lang['js']['nosmblinks'] = 'Els enllaços amb recursos compartits de Windows només funcionen amb el Microsoft Internet Explorer.
-Si voleu podeu copiar i enganxar l\'enllaç.';
-$lang['js']['linkwiz'] = 'Auxiliar d\'enllaços';
-$lang['js']['linkto'] = 'Enllaça a:';
-$lang['js']['del_confirm'] = 'Suprimiu aquesta entrada?';
+$lang['accessdenied'] = 'No teniu permís per a veure aquesta pàgina.';
$lang['mediausage'] = 'Utilitzeu la sintaxi següent per referir-vos a aquest enllaç:';
$lang['mediaview'] = 'Mostra el fitxer original';
$lang['mediaroot'] = 'arrel';
@@ -131,6 +169,10 @@ $lang['current'] = 'actual';
$lang['yours'] = 'La vostra versió';
$lang['diff'] = 'Mostra diferències amb la versió actual';
$lang['diff2'] = 'Mostra diferències entre les revisions seleccionades';
+$lang['difflink'] = 'Enllaç a la visualització de la comparació';
+$lang['diff_type'] = 'Veieu les diferències:';
+$lang['diff_inline'] = 'En línia';
+$lang['diff_side'] = 'Un al costat de l\'altre';
$lang['line'] = 'Línia';
$lang['breadcrumb'] = 'Camí';
$lang['youarehere'] = 'Sou aquí';
@@ -143,10 +185,20 @@ $lang['external_edit'] = 'edició externa';
$lang['summary'] = 'Resum d\'edició';
$lang['noflash'] = 'Per a visualitzar aquest contingut necessiteu el <a href="http://www.adobe.com/products/flashplayer/">connector d\'Adobe Flash</a>.';
$lang['download'] = 'Baixa el fragment';
+$lang['tools'] = 'Eines';
+$lang['user_tools'] = 'Eines de l\'usuari';
+$lang['site_tools'] = 'Eines del lloc';
+$lang['page_tools'] = 'Eines de la pàgina';
+$lang['skip_to_content'] = 'salta al contingut';
+$lang['sidebar'] = 'Barra lateral';
$lang['mail_newpage'] = 'pàgina afegida:';
$lang['mail_changed'] = 'pàgina modificada:';
$lang['mail_new_user'] = 'nou usuari:';
$lang['mail_upload'] = 'fitxer penjat:';
+$lang['changes_type'] = 'Veure els canvis de';
+$lang['pages_changes'] = 'Pàgines';
+$lang['media_changes'] = 'Arxius gràfics';
+$lang['both_changes'] = 'Pàgines i arxius gràfics';
$lang['qb_bold'] = 'Negreta';
$lang['qb_italic'] = 'Cursiva';
$lang['qb_underl'] = 'Subratllat';
@@ -187,13 +239,27 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Càmera';
$lang['img_keywords'] = 'Paraules clau';
-$lang['subscribe_success'] = 'S\'ha afegit %s a la llista de subscripcions de %s';
-$lang['subscribe_error'] = 'S\'ha produït un error en afegir %s a la llista de subscripcions de %s';
-$lang['subscribe_noaddress'] = 'No hi ha cap adreça de correu associada al vostre nom d\'usuari. No se us ha pogut afegir a la llista de subscripcions.';
-$lang['unsubscribe_success'] = '%s ha estat suprimit de la llista de subscripcions de %s';
-$lang['unsubscribe_error'] = 'S\'ha produït un error en suprimir %s de la llista de subscripcions de %s';
+$lang['img_width'] = 'Ample';
+$lang['img_height'] = 'Alçada';
+$lang['subscr_subscribe_success'] = 'S\'ha afegit %s a la llista de subscripcions per %s';
+$lang['subscr_subscribe_error'] = 'Hi ha hagut un error a l\'afegir %s a la llista per %s';
+$lang['subscr_subscribe_noaddress'] = 'No hi ha cap adreça associada pel vostre nom d\'usuari, no podeu ser afegit a la llista de subscripcions';
+$lang['subscr_unsubscribe_success'] = 'S\'ha esborrat %s de la llista de subscripcions per %s';
+$lang['subscr_unsubscribe_error'] = 'Hi ha hagut un error a l\'esborrar %s de la llista de subscripcions per %s';
+$lang['subscr_already_subscribed'] = '%s ja està subscrit a %s';
+$lang['subscr_not_subscribed'] = '%s no està subscrit a %s';
+$lang['subscr_m_not_subscribed'] = 'En aquests moments no esteu subscrit a l\'actual pàgina o espai';
+$lang['subscr_m_new_header'] = 'Afegeix subcripció';
+$lang['subscr_m_current_header'] = 'Subscripcions actuals';
+$lang['subscr_m_unsubscribe'] = 'Donar-se de baixa';
+$lang['subscr_m_subscribe'] = 'Donar-se d\'alta';
+$lang['subscr_m_receive'] = 'Rebre';
+$lang['subscr_style_every'] = 'Envia\'m un correu electrònic per a cada canvi';
+$lang['subscr_style_digest'] = 'Envia\'m un correu electrònic amb un resum dels canvis per a cada pàgina (cada %.2f dies)';
+$lang['subscr_style_list'] = 'llistat de pàgines canviades des de l\'últim correu electrònic (cada %.2f dies)';
$lang['authmodfailed'] = 'La configuració de l\'autenticació d\'usuaris és errònia. Informeu els administradors del wiki.';
$lang['authtempfail'] = 'L\'autenticació d\'usuaris no està disponible temporalment. Si aquesta situació persisteix, si us plau informeu els administradors del wiki.';
+$lang['authpwdexpire'] = 'La vostra contrasenya caducarà en %d dies, l\'hauríeu de canviar aviat.';
$lang['i_chooselang'] = 'Trieu l\'idioma';
$lang['i_installer'] = 'Instal·lador de DokuWiki';
$lang['i_wikiname'] = 'Nom del wiki';
@@ -208,13 +274,14 @@ $lang['i_confexists'] = '<code>%s</code> ja existeix';
$lang['i_writeerr'] = 'No es pot crear <code>%s</code>. Comproveu els permisos del directori i/o del fitxer i creeu el fitxer manualment.';
$lang['i_badhash'] = 'dokuwiki.php no reconegut o modificat (hash=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> - valor il·legal o buit';
-$lang['i_success'] = 'La configuració s\'ha acabat amb èxit. Ara podeu suprimir el fitxer install.php. Aneu al vostre nou <a href="doku.php?id=wiki:welcome">DokuWiki</a>.';
-$lang['i_failure'] = 'S\'han produït alguns errors en escriure els fitxers de configuració. Potser caldrà que els arregleu manualment abans d\'utilitzar el vostre nou <a href="doku.php?id=wiki:welcome">DokuWiki</a>.';
+$lang['i_success'] = 'La configuració s\'ha acabat amb èxit. Ara podeu suprimir el fitxer install.php. Aneu al vostre nou <a href="doku.php">DokuWiki</a>.';
+$lang['i_failure'] = 'S\'han produït alguns errors en escriure els fitxers de configuració. Potser caldrà que els arregleu manualment abans d\'utilitzar el vostre nou <a href="doku.php">DokuWiki</a>.';
$lang['i_policy'] = 'Política ACL inicial';
$lang['i_pol0'] = 'Wiki obert (tothom pot llegir, escriure i penjar fitxers)';
$lang['i_pol1'] = 'Wiki públic (tothom pot llegir, els usuaris registrats poden escriure i penjar fitxers)';
$lang['i_pol2'] = 'Wiki tancat (només els usuaris registrats poden llegir, escriure i penjar fitxers)';
$lang['i_retry'] = 'Reintenta';
+$lang['i_license'] = 'Escolliu el tipus de llicència que voleu fer servir per al vostre contingut:';
$lang['recent_global'] = 'Esteu veient els canvis recents de l\'espai <strong>%s</strong>. També podeu veure els <a href="%s">canvis recents de tot el wiki</a>.';
$lang['years'] = 'fa %d anys';
$lang['months'] = 'fa %d mesos';
@@ -223,3 +290,27 @@ $lang['days'] = 'fa %d dies';
$lang['hours'] = 'fa %d hores';
$lang['minutes'] = 'fa %d minuts';
$lang['seconds'] = 'fa %d segons';
+$lang['wordblock'] = 'El vostre canvi no s\'ha guardat perquè conté text blocat (spam)';
+$lang['media_uploadtab'] = 'Puja';
+$lang['media_searchtab'] = 'Busca';
+$lang['media_file'] = 'Fitxer';
+$lang['media_viewtab'] = 'Mostra';
+$lang['media_edittab'] = 'Edita';
+$lang['media_historytab'] = 'Històric';
+$lang['media_list_thumbs'] = 'Miniatura';
+$lang['media_list_rows'] = 'Files';
+$lang['media_sort_name'] = 'Nom';
+$lang['media_sort_date'] = 'Data';
+$lang['media_namespaces'] = 'Escolliu l\'espai';
+$lang['media_files'] = 'Arxius a %s';
+$lang['media_upload'] = 'Puja a %s';
+$lang['media_search'] = 'Busca a %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s a %s';
+$lang['media_edit'] = 'Edita %s';
+$lang['media_history'] = 'Històric de %s';
+$lang['media_meta_edited'] = 'metadata editada';
+$lang['media_perm_read'] = 'No teniu permisos suficients per a llegir arxius.';
+$lang['media_perm_upload'] = 'No teniu permisos suficients per a pujar arxius';
+$lang['media_update'] = 'Puja la nova versió';
+$lang['media_restore'] = 'Restaura aquesta versió';
diff --git a/inc/lang/ca/mailwrap.html b/inc/lang/ca/mailwrap.html
new file mode 100644
index 000000000..ed3bb6e9d
--- /dev/null
+++ b/inc/lang/ca/mailwrap.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<title>@TITLE@</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
+
+@HTMLBODY@
+
+<br /><hr />
+<small>Aquest correu electrònic ha estat generat per DokuWiki a @DOKUWIKIURL@.</small>
+</body>
+</html> \ No newline at end of file
diff --git a/inc/lang/ca/resetpwd.txt b/inc/lang/ca/resetpwd.txt
new file mode 100644
index 000000000..565f1d5b0
--- /dev/null
+++ b/inc/lang/ca/resetpwd.txt
@@ -0,0 +1,3 @@
+===== Establiu una nova contrasenya =====
+
+Introdueixi una nova contrasenya pel seu compte a aquest wiki. \ No newline at end of file
diff --git a/inc/lang/ca/subscr_digest.txt b/inc/lang/ca/subscr_digest.txt
new file mode 100644
index 000000000..2b95f97a5
--- /dev/null
+++ b/inc/lang/ca/subscr_digest.txt
@@ -0,0 +1,21 @@
+Hola!
+
+La pàgina @PAGE@ al wiki @TITLE@ ha canviat.
+A continuació podeu veure els canvis:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Versió anterior: @OLDPAGE@
+Nova versió: @NEWPAGE@
+
+Si voleu cancel·lar les notificacions per a la pàgina, accediu al wiki a
+@DOKUWIKIURL@, visiteu
+@SUBSCRIBE@
+i doneu-vos de baixa dels canvis de la pàgina o de l'espai.
+
+
+--
+Aquest mail ha estat generat per DokuWiki a
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/ca/subscr_form.txt b/inc/lang/ca/subscr_form.txt
new file mode 100644
index 000000000..d3679454f
--- /dev/null
+++ b/inc/lang/ca/subscr_form.txt
@@ -0,0 +1,3 @@
+===== Gestió de les Subscripcions =====
+
+Aquesta pàgina podeu gestiona les vostres subscripcions per a les pàgines i els espais actuals. \ No newline at end of file
diff --git a/inc/lang/ca/subscr_list.txt b/inc/lang/ca/subscr_list.txt
new file mode 100644
index 000000000..56bcad545
--- /dev/null
+++ b/inc/lang/ca/subscr_list.txt
@@ -0,0 +1,21 @@
+Hola!
+
+Alguna(es) pàgina(es) de l'espai @PAGE@ al wiki @TITLE@ han canviat.
+A continuació podeu veure els canvis:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Versió anterior: @OLDPAGE@
+Nova versió: @NEWPAGE@
+
+Si voleu cancel·lar les notificacions per a la pàgina, accediu al wiki a
+@DOKUWIKIURL@, visiteu
+@SUBSCRIBE@
+i doneu-vos de baixa dels canvis de la pàgina o de l'espai.
+
+
+--
+Aquest mail ha estat generat per DokuWiki a
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/da/subscr_single.txt b/inc/lang/da/subscr_single.txt
index 64b14588c..cdc554513 100644
--- a/inc/lang/da/subscr_single.txt
+++ b/inc/lang/da/subscr_single.txt
@@ -15,7 +15,7 @@ Ny Revision: @NEWPAGE@
For at slå side notifikationer fra, skal du logge ind på
@DOKUWIKIURL@ og besøge
-@NEWPAGE@
+@SUBSCRIBE@
og slå abonnoment for side / navnerum ændringer fra.
--
diff --git a/inc/lang/de-informal/subscr_single.txt b/inc/lang/de-informal/subscr_single.txt
index 3c557bc17..6e3f58b9f 100644
--- a/inc/lang/de-informal/subscr_single.txt
+++ b/inc/lang/de-informal/subscr_single.txt
@@ -15,7 +15,7 @@ Neue Revision: @NEWPAGE@
Um das Abonnement für diese Seite aufzulösen, melde dich im Wiki an
@DOKUWIKIURL@, besuche dann
-@NEWPAGE@
+@SUBSCRIBE@
und klicke auf den Link 'Aboverwaltung'.
--
diff --git a/inc/lang/de/subscr_single.txt b/inc/lang/de/subscr_single.txt
index f3e1cd393..da9914e50 100644
--- a/inc/lang/de/subscr_single.txt
+++ b/inc/lang/de/subscr_single.txt
@@ -15,7 +15,7 @@ Neue Revision: @NEWPAGE@
Um das Abonnement für diese Seite aufzulösen, melden Sie sich im Wiki an
@DOKUWIKIURL@, besuchen dann
-@NEWPAGE@
+@SUBSCRIBE@
und klicken auf die Taste 'Aboverwaltung'.
--
diff --git a/inc/lang/en/subscr_single.txt b/inc/lang/en/subscr_single.txt
index 673c4c32a..0bc310e04 100644
--- a/inc/lang/en/subscr_single.txt
+++ b/inc/lang/en/subscr_single.txt
@@ -15,7 +15,7 @@ New Revision: @NEWPAGE@
To cancel the page notifications, log into the wiki at
@DOKUWIKIURL@ then visit
-@NEWPAGE@
+@SUBSCRIBE@
and unsubscribe page and/or namespace changes.
--
diff --git a/inc/lang/eo/subscr_single.txt b/inc/lang/eo/subscr_single.txt
index 431fd0251..e4847e8ab 100644
--- a/inc/lang/eo/subscr_single.txt
+++ b/inc/lang/eo/subscr_single.txt
@@ -15,7 +15,7 @@ Nova versio: @NEWPAGE@
Por nuligi la paĝinformojn, ensalutu la vikion ĉe
@DOKUWIKIURL@, poste iru al
-@NEWPAGE@
+@SUBSCRIBE@
kaj malabonu la paĝajn kaj/aŭ nomspacajn ŝanĝojn.
--
diff --git a/inc/lang/he/subscr_single.txt b/inc/lang/he/subscr_single.txt
index 123b186c8..78b551e2f 100644
--- a/inc/lang/he/subscr_single.txt
+++ b/inc/lang/he/subscr_single.txt
@@ -14,7 +14,7 @@
לביטול התרעות בנוגע לעמוד, יש להיכנס לאתר הוויקי בכתובת
@DOKUWIKIURL@ ואז לבקר בדף
-@NEWPAGE@
+@SUBSCRIBE@
ולבטל את המינוי לקבלת שינויים בדף ו/או במרחב השם.
--
diff --git a/inc/lang/ia/subscr_single.txt b/inc/lang/ia/subscr_single.txt
index 3d6ef7103..445df197c 100644
--- a/inc/lang/ia/subscr_single.txt
+++ b/inc/lang/ia/subscr_single.txt
@@ -15,7 +15,7 @@ Version nove: @NEWPAGE@
Pro cancellar le notificationes de paginas, aperi un session al wiki a
@DOKUWIKIURL@ postea visita
-@NEWPAGE@
+@SUBSCRIBE@
e cancella tu subscription al modificationes in paginas e/o spatios de nomines.
--
diff --git a/inc/lang/it/subscr_single.txt b/inc/lang/it/subscr_single.txt
index 8cde8ea0f..a8649a4ef 100644
--- a/inc/lang/it/subscr_single.txt
+++ b/inc/lang/it/subscr_single.txt
@@ -15,7 +15,7 @@ Nuova revisione: @NEWPAGE@
Per non ricevere più queste notifiche, collegati al
wiki all'indirizzo @DOKUWIKIURL@ e poi visita
-@NEWPAGE@
+@SUBSCRIBE@
e rimuovi la sottoscrizione alle modifiche della
pagina o categoria.
diff --git a/inc/lang/ko/subscr_single.txt b/inc/lang/ko/subscr_single.txt
index 6bd1885e6..2679db393 100644
--- a/inc/lang/ko/subscr_single.txt
+++ b/inc/lang/ko/subscr_single.txt
@@ -14,7 +14,7 @@
새 버전 : @NEWPAGE@
이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
-@NEWPAGE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요.
+@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요.
--
@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file
diff --git a/inc/lang/la/subscr_digest.txt b/inc/lang/la/subscr_digest.txt
index 629213359..32d378a7e 100644
--- a/inc/lang/la/subscr_digest.txt
+++ b/inc/lang/la/subscr_digest.txt
@@ -12,7 +12,7 @@ Noua recensio: @NEWPAGE@
Ut paginae adnotationes deleas, in uicem ineas in
@DOKUWIKIURL@, deinde uideas
-@NEWPAGE@
+@SUBSCRIBE@
et paginarum generum optiones mutes.
--
diff --git a/inc/lang/la/subscr_single.txt b/inc/lang/la/subscr_single.txt
index 7839791ea..14285014c 100644
--- a/inc/lang/la/subscr_single.txt
+++ b/inc/lang/la/subscr_single.txt
@@ -15,7 +15,7 @@ Noua recensio: @NEWPAGE@
Ut paginae adnotationes deleas, in uicem ineas in
@DOKUWIKIURL@, deinde uideas
-@NEWPAGE@
+@SUBSCRIBE@
et paginarum et\aut generum optiones mutasa.
--
diff --git a/inc/lang/no/subscr_digest.txt b/inc/lang/no/subscr_digest.txt
index 6afd0cc5c..670d39d32 100644
--- a/inc/lang/no/subscr_digest.txt
+++ b/inc/lang/no/subscr_digest.txt
@@ -12,7 +12,7 @@ Ny versjon: @NEWPAGE@
For å avslutte varslingen, logg inn på
@DOKUWIKIURL@ og gå til
-@NEWPAGE@
+@SUBSCRIBE@
og avslutt abonnementet på endringer av siden eller i navnerommet.
--
diff --git a/inc/lang/no/subscr_list.txt b/inc/lang/no/subscr_list.txt
index 72cd307cb..860d88d2a 100644
--- a/inc/lang/no/subscr_list.txt
+++ b/inc/lang/no/subscr_list.txt
@@ -9,7 +9,7 @@ Her er endringene:
For å avslutte varslinga, logg inn på
@DOKUWIKIURL@ og gå til
-@NEWPAGE@
+@SUBSCRIBE@
og avslutt abonnementet på endringer av sida eller i navnerommet.
--
diff --git a/inc/lang/no/subscr_single.txt b/inc/lang/no/subscr_single.txt
index 25296da58..b26b3a879 100644
--- a/inc/lang/no/subscr_single.txt
+++ b/inc/lang/no/subscr_single.txt
@@ -15,7 +15,7 @@ Ny versjon: @NEWPAGE@
For å avslutte varslingen, logg inn på
@DOKUWIKIURL@, gå til
-@NEWPAGE@
+@SUBSCRIBE@
og avslutt abonnementet på endringer av siden eller i navnerommet.
--
diff --git a/inc/lang/pt/subscr_single.txt b/inc/lang/pt/subscr_single.txt
index 1187b5911..469c6bfb1 100644
--- a/inc/lang/pt/subscr_single.txt
+++ b/inc/lang/pt/subscr_single.txt
@@ -15,7 +15,7 @@ Revisão Nova: @NEWPAGE@
Para cancelar as notificações de página, inicie sessão no wiki em
@DOKUWIKIURL@, visite
-@NEWPAGE@
+@SUBSCRIBE@
e des-subscreva às alterações de página e/ou espaço de nome.
--
diff --git a/inc/lang/sq/subscr_single.txt b/inc/lang/sq/subscr_single.txt
index 90520be4f..df28ee176 100644
--- a/inc/lang/sq/subscr_single.txt
+++ b/inc/lang/sq/subscr_single.txt
@@ -15,7 +15,7 @@ Rishikimi i ri: @NEWPAGE@
Për të fshirë lajmërimet e faqes, hyni në wiki tek
@DOKUWIKIURL@ dhe pastaj vizitoni
-@NEWPAGE@
+@SUBSCRIBE@
dhe fshini ndryshimet e faqes dhe/ose hapësirës së emrit.
--
diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php
index a8d8c5ac9..5430905b1 100644
--- a/inc/lang/tr/lang.php
+++ b/inc/lang/tr/lang.php
@@ -8,6 +8,7 @@
* @author Cihan Kahveci <kahvecicihan@gmail.com>
* @author Yavuz Selim <yavuzselim@gmail.com>
* @author Caleb Maclennan <caleb@alerque.com>
+ * @author farukerdemoncel@gmail.com
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -43,11 +44,14 @@ $lang['btn_backtomedia'] = 'Çokluortam dosyası seçimine dön';
$lang['btn_subscribe'] = 'Sayfa Değişikliklerini Bildir';
$lang['btn_profile'] = 'Kullanıcı Bilgilerini Güncelle';
$lang['btn_reset'] = 'Sıfırla';
+$lang['btn_resendpwd'] = 'Yeni şifre belirle';
$lang['btn_draft'] = 'Taslağı düzenle';
$lang['btn_recover'] = 'Taslağı geri yükle';
$lang['btn_draftdel'] = 'Taslağı sil';
$lang['btn_revert'] = 'Geri Yükle';
$lang['btn_register'] = 'Kayıt ol';
+$lang['btn_apply'] = 'Uygula';
+$lang['btn_media'] = 'Çokluortam Yöneticisi';
$lang['loggedinas'] = 'Giriş ismi';
$lang['user'] = 'Kullanıcı ismi';
$lang['pass'] = 'Parola';
@@ -77,6 +81,7 @@ $lang['profnoempty'] = 'Boş isim veya e-posta adresine izin verilmiyo
$lang['profchanged'] = 'Kullanıcı bilgileri başarıyla değiştirildi.';
$lang['pwdforget'] = 'Parolanızı mı unuttunuz? Yeni bir parola alın';
$lang['resendna'] = 'Bu wiki parolayı tekrar göndermeyi desteklememektedir.';
+$lang['resendpwd'] = 'İçin yeni şifre belirle';
$lang['resendpwdmissing'] = 'Üzgünüz, tüm alanları doldurmalısınız.';
$lang['resendpwdnouser'] = 'Üzgünüz, veritabanımızda bu kullanıcıyı bulamadık.';
$lang['resendpwdbadauth'] = 'Üzgünüz, bu doğrulama kodu doğru değil. Doğrulama linkini tam olarak kullandığınıza emin olun.';
@@ -91,7 +96,7 @@ $lang['txt_filename'] = 'Dosya adı (zorunlu değil)';
$lang['txt_overwrt'] = 'Mevcut dosyanın üstüne yaz';
$lang['lockedby'] = 'Şu an şunun tarafından kilitli:';
$lang['lockexpire'] = 'Kilitin açılma tarihi:';
-$lang['js']['willexpire'] = 'Bu sayfayı değiştirme kilidinin süresi yaklaşık bir dakika içinde geçecek.\nÇakışmaları önlemek için önizleme tuşunu kullanarak kilit sayacını sıfırla.';
+$lang['js']['willexpire'] = 'Bu sayfayı değiştirme kilidinin süresi yaklaşık bir dakika içinde geçecek.\nÇakışmaları önlemek için önizleme tuşunu kullanarak kilit sayacını sıfırla.';
$lang['js']['notsavedyet'] = 'Kaydedilmemiş değişiklikler kaybolacak.
Devam etmek istiyor musunuz?';
$lang['js']['searchmedia'] = 'Dosyalar için Ara';
@@ -122,6 +127,14 @@ $lang['js']['nosmblinks'] = 'Windows paylaşımı sadece Microsoft Internet
$lang['js']['linkwiz'] = 'Bağlantı sihirbazı';
$lang['js']['linkto'] = 'Bağlantı:';
$lang['js']['del_confirm'] = 'Bu girişi sil?';
+$lang['js']['restore_confirm'] = 'Bu sürüme geri dönmek istediğinizden emin misiniz?';
+$lang['js']['media_diff'] = 'Farkları gör:';
+$lang['js']['media_select'] = 'Dosyalar seç...';
+$lang['js']['media_upload_btn'] = 'Yükle';
+$lang['js']['media_done_btn'] = 'Bitti';
+$lang['js']['media_drop'] = 'Yüklemek istediğiniz dosyaları buraya bırakın';
+$lang['js']['media_cancel'] = 'kaldır';
+$lang['js']['media_overwrt'] = 'Var olan dosyaların üzerine yaz';
$lang['rssfailed'] = 'Bu beslemeyi çekerken hata oluştu: ';
$lang['nothingfound'] = 'Hiçbir şey yok.';
$lang['mediaselect'] = 'Çokluortam dosyası seçimi';
@@ -172,6 +185,9 @@ $lang['mail_newpage'] = 'sayfa eklenme:';
$lang['mail_changed'] = 'sayfa değiştirilme:';
$lang['mail_new_user'] = 'yeni kullanıcı';
$lang['mail_upload'] = 'dosya yüklendi:';
+$lang['pages_changes'] = 'Sayfalar';
+$lang['media_changes'] = 'Çokluortam dosyaları';
+$lang['both_changes'] = 'Sayfalar ve çoklu ortam dosyaları';
$lang['qb_bold'] = 'Kalın Yazı';
$lang['qb_italic'] = 'Eğik Yazı';
$lang['qb_underl'] = 'Altı Çizgili Yazı';
@@ -209,8 +225,14 @@ $lang['img_copyr'] = 'Telif Hakkı';
$lang['img_format'] = 'Biçim';
$lang['img_camera'] = 'Fotoğraf Makinası';
$lang['img_keywords'] = 'Anahtar Sözcükler';
+$lang['img_width'] = 'Genişlik';
+$lang['img_height'] = 'Yükseklik';
+$lang['img_manager'] = 'Ortam oynatıcısında göster';
+$lang['subscr_m_subscribe'] = 'Kayıt ol';
+$lang['subscr_m_receive'] = 'Al';
$lang['authmodfailed'] = 'Yanlış kullanıcı onaylama ayarı. Lütfen Wiki yöneticisine bildiriniz.';
$lang['authtempfail'] = 'Kullanıcı doğrulama geçici olarak yapılamıyor. Eğer bu durum devam ederse lütfen Wiki yöneticine haber veriniz.';
+$lang['authpwdexpire'] = 'Şifreniz %d gün sonra geçersiz hale gelecek, yakın bir zamanda değiştirmelisiniz.';
$lang['i_chooselang'] = 'Dili seçiniz';
$lang['i_installer'] = 'Dokuwiki Kurulum Sihirbazı';
$lang['i_wikiname'] = 'Wiki Adı';
@@ -225,11 +247,38 @@ $lang['i_confexists'] = '<code>%s</code> zaten var';
$lang['i_writeerr'] = '<code>%s</code> oluşturulamadı. Dosya/Klasör izin ayarlarını gözden geçirip dosyayı elle oluşturmalısınız.';
$lang['i_badhash'] = 'dokuwiki.php tanınamadı ya da değiştirilmiş (hash=<code>%s</code>)';
$lang['i_badval'] = '<code>%s</code> - Yanlış veya boş değer';
-$lang['i_success'] = 'Kurulum başarıyla tamamlandı. Şimdi install.php dosyasını silebilirsiniz. <a href="doku.php?id=wiki:welcome">Yeni DokuWikiniz</a>i kullanabilirsiniz.';
-$lang['i_failure'] = 'Ayar dosyalarını yazarken bazı hatalar oluştu. <a href="doku.php?id=wiki:welcome">Yeni DokuWikiniz</a>i kullanmadan önce bu hatalarınızı elle düzeltmeniz gerekebilir.';
+$lang['i_success'] = 'Kurulum başarıyla tamamlandı. Şimdi install.php dosyasını silebilirsiniz. <a href="doku.php">Yeni DokuWikiniz</a>i kullanabilirsiniz.';
+$lang['i_failure'] = 'Ayar dosyalarını yazarken bazı hatalar oluştu. <a href="doku.php">Yeni DokuWikiniz</a>i kullanmadan önce bu hatalarınızı elle düzeltmeniz gerekebilir.';
$lang['i_policy'] = 'İlk ACL ayarı';
$lang['i_pol0'] = 'Tamamen Açık Wiki (herkes okuyabilir, yazabilir ve dosya yükleyebilir)';
$lang['i_pol1'] = 'Açık Wiki (herkes okuyabilir, ancak sadece üye olanlar yazabilir ve dosya yükleyebilir)';
$lang['i_pol2'] = 'Kapalı Wiki (sadece üye olanlar okuyabilir, yazabilir ve dosya yükleyebilir)';
$lang['i_retry'] = 'Tekrar Dene';
+$lang['i_license'] = 'Lütfen içeriği hangi lisans altında yayınlamak istediğniizi belirtin:';
$lang['recent_global'] = '<b>%s</b> namespace\'i içerisinde yapılan değişiklikleri görüntülemektesiniz. Wiki\'deki tüm değişiklikleri de <a href="%s">bu adresten</a> görebilirsiniz. ';
+$lang['years'] = '%d yıl önce';
+$lang['months'] = '%d ay önce';
+$lang['weeks'] = '%d hafta önce';
+$lang['days'] = '%d gün önce';
+$lang['hours'] = '%d saat önce';
+$lang['minutes'] = '%d dakika önce';
+$lang['seconds'] = '%d saniye önce';
+$lang['wordblock'] = 'Değişikliğiniz kaydedilmedi çünkü istenmeyen mesaj içeriyor (spam).';
+$lang['media_uploadtab'] = 'Karşıya yükle';
+$lang['media_searchtab'] = 'Ara';
+$lang['media_file'] = 'Dosya';
+$lang['media_viewtab'] = 'Görünüm';
+$lang['media_edittab'] = 'Düzenle';
+$lang['media_historytab'] = 'Geçmiş';
+$lang['media_list_thumbs'] = 'Küçük resimler';
+$lang['media_list_rows'] = 'Satırlar';
+$lang['media_sort_name'] = 'İsim';
+$lang['media_sort_date'] = 'Tarih';
+$lang['media_files'] = '%s deki dosyalar';
+$lang['media_upload'] = '%s dizinine yükle';
+$lang['media_search'] = '%s dizininde ara';
+$lang['media_view'] = '%s';
+$lang['media_edit'] = 'Düzenle %s';
+$lang['media_history'] = 'Geçmiş %s';
+$lang['media_perm_upload'] = 'Üzgünüm, karşıya dosya yükleme yetkiniz yok.';
+$lang['media_restore'] = 'Bu sürümü eski haline getir';
diff --git a/inc/lang/tr/resetpwd.txt b/inc/lang/tr/resetpwd.txt
new file mode 100644
index 000000000..1ed758693
--- /dev/null
+++ b/inc/lang/tr/resetpwd.txt
@@ -0,0 +1,3 @@
+ ====== Yeni şifre belirle ======
+
+Lütfen bu wiki hesabınız için yeni bir şifre belirleyin. \ No newline at end of file
diff --git a/inc/lang/zh-tw/adminplugins.txt b/inc/lang/zh-tw/adminplugins.txt
index fb1999269..6d21ac2cd 100644
--- a/inc/lang/zh-tw/adminplugins.txt
+++ b/inc/lang/zh-tw/adminplugins.txt
@@ -1 +1 @@
-===== 外加插件 ===== \ No newline at end of file
+===== 附加元件 ===== \ No newline at end of file
diff --git a/inc/lang/zh-tw/backlinks.txt b/inc/lang/zh-tw/backlinks.txt
index 5b36728e7..6a8bf8896 100644
--- a/inc/lang/zh-tw/backlinks.txt
+++ b/inc/lang/zh-tw/backlinks.txt
@@ -1,4 +1,4 @@
====== 反向連結 ======
-這裡是引用、連結到目前頁面的頁面清單。
+這是引用、連結到目前頁面的頁面清單。
diff --git a/inc/lang/zh-tw/diff.txt b/inc/lang/zh-tw/diff.txt
index 17fad7ba0..e2c05001f 100644
--- a/inc/lang/zh-tw/diff.txt
+++ b/inc/lang/zh-tw/diff.txt
@@ -1,3 +1,3 @@
====== 差異處 ======
-這裏顯示二個版本的差異處。 \ No newline at end of file
+這裏顯示兩個版本的差異處。 \ No newline at end of file
diff --git a/inc/lang/zh-tw/edit.txt b/inc/lang/zh-tw/edit.txt
index bbe5bb8ed..f6b74794f 100644
--- a/inc/lang/zh-tw/edit.txt
+++ b/inc/lang/zh-tw/edit.txt
@@ -1 +1 @@
-編輯本頁並按下''儲存''即可。可在[[wiki:syntax|維基語法]]找到語法說明。請只在能讓本文品質「**更好**」時才編輯。如果只是要測試,請使用 [[playground:playground|遊樂場]]。
+編輯本頁後,請按下「儲存」按鈕。若要參看語法說明,請到[[wiki:syntax|語法]]頁。請只在能讓本文品質**更好**時才編輯。如果只是要測試,請移玉步至 [[playground:playground|遊樂場]]。 \ No newline at end of file
diff --git a/inc/lang/zh-tw/editrev.txt b/inc/lang/zh-tw/editrev.txt
index 96f9a7c6a..98a800ab1 100644
--- a/inc/lang/zh-tw/editrev.txt
+++ b/inc/lang/zh-tw/editrev.txt
@@ -1,2 +1,2 @@
-**您目前載入的是本份文件的舊版!** 您如果存檔,這些資料就會被存成另一份。
+**您目前載入的是本份文件的舊版!** 您如果存檔,這些舊版資料就會變成最新版本。
----
diff --git a/inc/lang/zh-tw/index.txt b/inc/lang/zh-tw/index.txt
index bba277041..1b89e0c5d 100644
--- a/inc/lang/zh-tw/index.txt
+++ b/inc/lang/zh-tw/index.txt
@@ -1,3 +1,3 @@
====== 站台地圖 ======
-這個站台地圖列出了所有允許的頁面,依 [[doku>namespaces|分類空間]] 排序。 \ No newline at end of file
+這個站台地圖列出了所有允許的頁面,依 [[doku>namespaces|分類名稱]] 排序。 \ No newline at end of file
diff --git a/inc/lang/zh-tw/install.html b/inc/lang/zh-tw/install.html
index 2a8b1aac3..9a0d1dcd9 100644
--- a/inc/lang/zh-tw/install.html
+++ b/inc/lang/zh-tw/install.html
@@ -1,8 +1,8 @@
<p>本頁面旨在幫助您完成第一次安装和設定 <a href="http://dokuwiki.org">Dokuwiki</a>。關於安裝工具的更多訊息請參閱 <a href="http://dokuwiki.org/installer">官方文檔頁面</a>。</p>
-<p>DokuWiki 使用普通檔案儲存維基頁面以及與頁面相關的訊息(例如:圖像,搜尋索引,修訂記錄等)。為了正常運作,DokuWiki <strong>必須</strong> 擁有針對那些路徑和檔案的寫入權限。本安裝工具無法設定目錄權限,這通常要透過命令行、FTP 或您主機上的控制台(如cPanel)進行。</p>
+<p>DokuWiki 使用普通檔案來儲存 wiki 頁面,以及與頁面相關的訊息(例如:圖像、搜尋索引、修訂記錄等)。為了正常運作,DokuWiki <strong>必須</strong> 擁有針對那些路徑和檔案的寫入權限。本安裝工具無法設定目錄權限,這通常要透過命令行、FTP 或您主機上的控制台(如cPanel)進行。</p>
-<p>本安裝工具將設定您的 DokuWiki 用於 <abbr title="訪問控制列表">ACL</abbr> 的設定檔,它能讓管理員登入並使用「管理」功能來安裝插件、管理用户、管理訪問權限和其他設定設定。它並不是 DokuWiki 正常運作所必須,但安裝之後將更方便管理。</p>
+<p>本安裝工具將設定您的 DokuWiki 用於 <abbr title="訪問控制列表">ACL</abbr> 的設定檔,它能讓管理員登入並使用「管理」功能來安裝附加元件、管理使用者、管理訪問權限和其他設定設定。它並不是 DokuWiki 正常運作所必須,但安裝之後將更方便管理。</p>
-<p>有經驗的用戶或有特殊需求的用戶請參閱更詳細的 <a href="http://dokuwiki.org/install">安裝指南</a>
+<p>有經驗的或有特殊需求的使用者,請參閱更詳細的 <a href="http://dokuwiki.org/install">安裝指南</a>
和 <a href="http://dokuwiki.org/config">設定</a>。</p> \ No newline at end of file
diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php
index 9f380acb5..ddb35617e 100644
--- a/inc/lang/zh-tw/lang.php
+++ b/inc/lang/zh-tw/lang.php
@@ -11,6 +11,7 @@
* @author Danny Lin
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
+ * @author Ichirou Uchiki <syaoranhinata@gmail.com>
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -19,7 +20,7 @@ $lang['doublequoteclosing'] = '”';
$lang['singlequoteopening'] = '‘';
$lang['singlequoteclosing'] = '’';
$lang['apostrophe'] = '’';
-$lang['btn_edit'] = '編修本頁';
+$lang['btn_edit'] = '編輯本頁';
$lang['btn_source'] = '顯示原始碼';
$lang['btn_show'] = '顯示頁面';
$lang['btn_create'] = '建立此頁';
@@ -34,7 +35,7 @@ $lang['btn_recent'] = '最近更新';
$lang['btn_upload'] = '上傳';
$lang['btn_cancel'] = '取消';
$lang['btn_index'] = '站台地圖';
-$lang['btn_secedit'] = '改這段';
+$lang['btn_secedit'] = '編輯此段';
$lang['btn_login'] = '登入';
$lang['btn_logout'] = '登出';
$lang['btn_admin'] = '管理選單';
@@ -61,40 +62,40 @@ $lang['newpass'] = '新密碼';
$lang['oldpass'] = '目前密碼';
$lang['passchk'] = '確認密碼';
$lang['remember'] = '記住帳號密碼';
-$lang['fullname'] = '真實姓名';
+$lang['fullname'] = '姓名';
$lang['email'] = '電郵';
$lang['profile'] = '使用者個人資料';
$lang['badlogin'] = '很抱歉,您的使用者名稱或密碼可能有錯誤。';
$lang['minoredit'] = '小修改';
$lang['draftdate'] = '草稿已自動存檔於';
-$lang['nosecedit'] = '頁面在這之間已被修改,過時的區段資料已載入全頁取代。';
+$lang['nosecedit'] = '在您編輯期間,其他使用者修改過本頁面。區段資料已逾時,因此系統載入了全頁,以取代之。';
$lang['regmissing'] = '很抱歉,所有欄位都要填寫。';
-$lang['reguexists'] = '很抱歉,本帳號已被註冊。';
-$lang['regsuccess'] = '使用者已建立,密碼已寄發至該 email。';
-$lang['regsuccess2'] = '使用者已建立。';
+$lang['reguexists'] = '很抱歉,有人已使用了這個帳號。';
+$lang['regsuccess'] = '使用者帳號已建立,密碼已寄發至該電郵。';
+$lang['regsuccess2'] = '使用者帳號已建立。';
$lang['regmailfail'] = '寄出密碼信似乎發生錯誤,請跟管理員聯絡!';
-$lang['regbadmail'] = '您輸入的 email 似乎不對,如果您認為是正確的,請與管理員聯絡。';
+$lang['regbadmail'] = '您輸入的電郵似乎不對,如果您認為是正確的,請與管理員聯絡。';
$lang['regbadpass'] = '兩次輸入的密碼不一致,請再試一次。';
$lang['regpwmail'] = '您的 DokuWiki 帳號密碼';
$lang['reghere'] = '您還沒有帳號嗎?註冊一個吧。';
-$lang['profna'] = '本維基不開放修改個人資料。';
-$lang['profnochange'] = '未做任何變更。';
+$lang['profna'] = '在本 wiki 上,不能修改個人資料。';
+$lang['profnochange'] = '並未作任何變更。';
$lang['profnoempty'] = '帳號或電郵地址不可空白!';
-$lang['profchanged'] = '個人資料已成功更新。';
+$lang['profchanged'] = '個人資料已更新。';
$lang['pwdforget'] = '忘記密碼了?索取新密碼!';
-$lang['resendna'] = '本維基不開放重寄密碼。';
+$lang['resendna'] = '本 wiki 並不支援重寄密碼。';
$lang['resendpwd'] = '設定新密碼供';
$lang['resendpwdmissing'] = '抱歉,您必須填寫所有欄位。';
$lang['resendpwdnouser'] = '抱歉,資料庫內找不到這個使用者。';
$lang['resendpwdbadauth'] = '抱歉,認證碼無效。請確認您使用了完整的確認連結。';
$lang['resendpwdconfirm'] = '確認連結已通過郵件發送給您了。';
$lang['resendpwdsuccess'] = '您的新密碼已寄出。';
-$lang['license'] = '若未特別註明,此維基上的內容都是採用以下授權方式:';
+$lang['license'] = '若無特別註明,本 wiki 上的內容都是採用以下授權方式:';
$lang['licenseok'] = '注意:編輯此頁面表示您已同意以下的授權方式:';
$lang['searchmedia'] = '搜尋檔名:';
$lang['searchmedia_in'] = '在 %s 裏搜尋';
$lang['txt_upload'] = '請選擇要上傳的檔案';
-$lang['txt_filename'] = '請輸入要存在維基內的檔案名稱 (非必要)';
+$lang['txt_filename'] = '請輸入要上傳至本 wiki 的檔案名稱 (非必要)';
$lang['txt_overwrt'] = '是否要覆蓋原有檔案';
$lang['maxuploadsize'] = '每個上傳檔案不可大於 %s 。';
$lang['lockedby'] = '目前已被下列人員鎖定';
@@ -135,7 +136,7 @@ $lang['js']['media_diff'] = '檢視差異:';
$lang['js']['media_diff_both'] = '並排';
$lang['js']['media_diff_opacity'] = '重疊';
$lang['js']['media_diff_portions'] = '滑動';
-$lang['js']['media_select'] = '選擇檔案…';
+$lang['js']['media_select'] = '選擇檔案……';
$lang['js']['media_upload_btn'] = '上傳';
$lang['js']['media_done_btn'] = '完成';
$lang['js']['media_drop'] = '拖拉檔案到此上傳';
@@ -145,27 +146,27 @@ $lang['rssfailed'] = '擷取 RSS 饋送檔時發生錯誤:';
$lang['nothingfound'] = '沒找到任何結果。';
$lang['mediaselect'] = '媒體檔案';
$lang['fileupload'] = '上傳媒體檔案';
-$lang['uploadsucc'] = '上傳成功';
-$lang['uploadfail'] = '上傳失敗。似乎是權限錯誤?';
+$lang['uploadsucc'] = '已上傳';
+$lang['uploadfail'] = '無法上傳。是否因權限錯誤?';
$lang['uploadwrong'] = '拒絕上傳。這個副檔名被禁止了!';
$lang['uploadexist'] = '檔案已存在,未處理。';
$lang['uploadbadcontent'] = '上傳檔案的內容不符合 %s 檔的副檔名。';
-$lang['uploadspam'] = '這次的上傳被垃圾訊息黑名單阻檔了。';
-$lang['uploadxss'] = '這次的上傳因可能的惡意的內容而被阻檔。';
-$lang['uploadsize'] = '上傳的檔案太大了 (最大:%s)';
+$lang['uploadspam'] = '是次上傳被垃圾訊息黑名單阻檔了。';
+$lang['uploadxss'] = '因可能含有惡意內容,是次上傳已被阻檔。';
+$lang['uploadsize'] = '上傳的檔案太大了 (最大為:%s)';
$lang['deletesucc'] = '檔案 "%s" 已刪除。';
$lang['deletefail'] = '檔案 "%s" 無法刪除,請檢查權限定。';
-$lang['mediainuse'] = '檔案 "%s" 未刪除,因為它正被使用。';
-$lang['namespaces'] = '分類空間';
+$lang['mediainuse'] = '檔案 "%s" 仍在使用,並未刪除。';
+$lang['namespaces'] = '分類名稱';
$lang['mediafiles'] = '可用的檔案有';
$lang['accessdenied'] = '您不可以檢視此頁面。';
$lang['mediausage'] = '使用以下的語法來連結此檔案:';
$lang['mediaview'] = '檢視原始檔案';
$lang['mediaroot'] = 'root';
-$lang['mediaupload'] = '上傳檔案至目前的分類空間。要建立子分類空間,將其名稱加在「上傳並重命名為」檔案名的前面,並用英文冒號隔開。';
+$lang['mediaupload'] = '上傳檔案至目前分類名稱之下。要建立子分類名稱,請將其名稱加在「上傳並重命名為」檔案名的前面,並用英文冒號隔開。';
$lang['mediaextchange'] = '檔案類型已由 .%s 變更為 .%s !';
$lang['reference'] = '引用到本頁的,合計有';
-$lang['ref_inuse'] = '此檔案無法刪除,因為它正被以下頁面使用:';
+$lang['ref_inuse'] = '此檔案無法刪除,因以下頁面正在使用它:';
$lang['ref_hidden'] = '一些參考內容位於您沒有讀取權限的頁面中';
$lang['hits'] = '個符合';
$lang['quickhits'] = '符合的頁面名稱';
@@ -175,12 +176,12 @@ $lang['yours'] = '您的版本';
$lang['diff'] = '顯示與目前版本的差異';
$lang['diff2'] = '顯示選擇版本間的差異';
$lang['difflink'] = '連向這個比對檢視';
-$lang['diff_type'] = '檢視差異:';
+$lang['diff_type'] = '檢視差異:';
$lang['diff_inline'] = '行內';
$lang['diff_side'] = '並排';
$lang['line'] = '行';
$lang['breadcrumb'] = '足跡';
-$lang['youarehere'] = '您在這裡';
+$lang['youarehere'] = '您在這裏';
$lang['lastmod'] = '上一次變更';
$lang['by'] = '由';
$lang['deleted'] = '移除';
@@ -188,17 +189,17 @@ $lang['created'] = '建立';
$lang['restored'] = '恢復為舊版';
$lang['external_edit'] = '外部編輯';
$lang['summary'] = '編輯摘要';
-$lang['noflash'] = '顯示此內容需要 <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>';
+$lang['noflash'] = '顯示此內容需要 <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash 附加元件</a>。';
$lang['download'] = '下載程式碼片段';
$lang['tools'] = '工具';
-$lang['user_tools'] = '用戶工具';
+$lang['user_tools'] = '使用者工具';
$lang['site_tools'] = '網站工具';
$lang['page_tools'] = '頁面工具';
$lang['skip_to_content'] = '跳至內容';
$lang['sidebar'] = '側欄';
$lang['mail_newpage'] = '增加的頁面:';
$lang['mail_changed'] = '變更的頁面:';
-$lang['mail_subscribe_list'] = '分類空間中更動的頁面:';
+$lang['mail_subscribe_list'] = '分類名稱中變更的頁面:';
$lang['mail_new_user'] = '新使用者:';
$lang['mail_upload'] = '已上傳檔案:';
$lang['changes_type'] = '檢視最近更新類型';
@@ -229,10 +230,10 @@ $lang['qb_media'] = '加入圖片或檔案';
$lang['qb_sig'] = '插入簽名';
$lang['qb_smileys'] = '表情符號';
$lang['qb_chars'] = '特殊字元';
-$lang['upperns'] = '前往父分類空間';
+$lang['upperns'] = '前往父分類名稱';
$lang['admin_register'] = '新增使用者';
$lang['metaedit'] = '編輯後設資料';
-$lang['metasaveerr'] = '後設資料寫入失敗';
+$lang['metasaveerr'] = '後設資料無法寫入';
$lang['metasaveok'] = '後設資料已儲存';
$lang['img_backto'] = '回上一頁';
$lang['img_title'] = '標題';
@@ -253,9 +254,9 @@ $lang['subscr_subscribe_error'] = '將 %s 加入至 %s 的訂閱列表時發生
$lang['subscr_subscribe_noaddress'] = '沒有與您登入相關的地址,無法將您加入訂閱列表';
$lang['subscr_unsubscribe_success'] = '已將 %s 移除自 %s 的訂閱列表';
$lang['subscr_unsubscribe_error'] = '將 %s 移除自 %s 的訂閱列表時發生錯誤';
-$lang['subscr_already_subscribed'] = '%s 已經被 %s 訂閱了';
-$lang['subscr_not_subscribed'] = '%s 尚未被 %s 訂閱';
-$lang['subscr_m_not_subscribed'] = '您尚未訂閱目前的頁面或分類空間。';
+$lang['subscr_already_subscribed'] = '%s 已經獲 %s 訂閱了';
+$lang['subscr_not_subscribed'] = '%s 尚未獲 %s 訂閱';
+$lang['subscr_m_not_subscribed'] = '您尚未訂閱目前的頁面或分類名稱。';
$lang['subscr_m_new_header'] = '加入訂閱';
$lang['subscr_m_current_header'] = '目前訂閱';
$lang['subscr_m_unsubscribe'] = '取消訂閱';
@@ -264,34 +265,34 @@ $lang['subscr_m_receive'] = '接收';
$lang['subscr_style_every'] = '每次更改都發送信件';
$lang['subscr_style_digest'] = '對每個頁面發送更改的摘要信件 (每 %.2f 天)';
$lang['subscr_style_list'] = '自上次發信以來更改的頁面的列表 (每 %.2f 天)';
-$lang['authmodfailed'] = '帳號認證的設定不正確,請通知該維基管理員。';
-$lang['authtempfail'] = '帳號認證目前暫不提供,若本狀況持續發生的話,請通知該維基管理員。';
+$lang['authmodfailed'] = '帳號認證的設定不正確,請通知該本 wiki 管理員。';
+$lang['authtempfail'] = '帳號認證目前暫不提供。若本狀況持續,請通知本 wiki 管理員。';
$lang['authpwdexpire'] = '您的密碼將在 %d 天內到期,請馬上更換新密碼。';
$lang['i_chooselang'] = '選擇您的語系';
$lang['i_installer'] = 'DokuWiki 安裝工具';
-$lang['i_wikiname'] = '維基名稱';
+$lang['i_wikiname'] = '本 wiki 的名稱';
$lang['i_enableacl'] = '啟用 ACL (建議)';
-$lang['i_superuser'] = '超級用戶';
+$lang['i_superuser'] = '超級使用者';
$lang['i_problems'] = '安裝程式發現如下的問題。您必須修正它們才能繼續。';
$lang['i_modified'] = '出於安全考量,本腳本只能用於安裝全新且未修改的 Dokuwiki。
您可以重新解壓下載的封包或查閱完整的<a href=\"http://dokuwiki.org/install\">Dokuwiki 安裝指南</a>';
$lang['i_funcna'] = 'PHP 函數 <code>%s</code> 無法使用。也許您的主機供應者基於某些理由停用了它?';
$lang['i_phpver'] = '您的 PHP 版本 <code>%s</code> 比需要的版本 <code>%s</code> 還低。您必須更新您的PHP。';
-$lang['i_permfail'] = '<code>%s</code> 無法被 DokuWiki 寫入。您必須修正該目錄的權限!';
+$lang['i_permfail'] = '<code>%s</code> 無法經由 DokuWiki 寫入。您必須修正該目錄的權限!';
$lang['i_confexists'] = '<code>%s</code> 已經存在';
$lang['i_writeerr'] = '無法建立 <code>%s</code>。您必須檢查目錄/檔案的權限並手動建立該檔案。';
-$lang['i_badhash'] = '無法辨識或被變更的 dokuwiki.php (hash=<code>%s</code>)';
-$lang['i_badval'] = '<code>%s</code> - 非法或空白的值';
-$lang['i_success'] = '設定已成功完成。您現在可以刪除 install.php 檔案。繼續到
-<a href="doku.php?id=wiki:welcome">您的新 DokuWiki</a>.';
-$lang['i_failure'] = '寫入設定檔時發生了一些錯誤。您必須在使用<a href="doku.php?id=wiki:welcome">您的新 Dokuwiki</a> 之前手動修正它們。';
+$lang['i_badhash'] = '無法辨識或已遭修改的 dokuwiki.php (hash=<code>%s</code>)';
+$lang['i_badval'] = '<code>%s</code> —— 非法或空白的值';
+$lang['i_success'] = '設定已完成。您現在可以刪除 install.php 檔案。繼續到
+<a href="doku.php">您的新 DokuWiki</a>.';
+$lang['i_failure'] = '寫入設定檔時發生了一些錯誤。您必須在使用<a href="doku.php">您的新 Dokuwiki</a> 之前手動修正它們。';
$lang['i_policy'] = '初步的 ACL 政策';
-$lang['i_pol0'] = '開放的維基 (任何人可讀取、寫入、上傳)';
-$lang['i_pol1'] = '公開的維基 (任何人可讀取,註冊使用者可寫入與上傳)';
-$lang['i_pol2'] = '封閉的維基 (只有註冊使用者可讀取、寫入、上傳)';
+$lang['i_pol0'] = '開放的 wiki (任何人可讀取、寫入、上傳)';
+$lang['i_pol1'] = '公開的 wiki (任何人可讀取,註冊使用者可寫入與上傳)';
+$lang['i_pol2'] = '封閉的 wiki (只有註冊使用者可讀取、寫入、上傳)';
$lang['i_retry'] = '重試';
$lang['i_license'] = '請選擇您想要的內容發布許可協議:';
-$lang['recent_global'] = '您正在閱讀分類空間: <b>%s</b> 中的變更。您亦可觀看整個維基的<a href="%s">最近更新</a>。';
+$lang['recent_global'] = '您正在閱讀分類名稱: <b>%s</b> 中的變更。您亦可觀看本 wiki <a href="%s">所有的最近更新</a>。';
$lang['years'] = '%d 年前';
$lang['months'] = '%d 個月前';
$lang['weeks'] = '%d 週前';
@@ -299,7 +300,7 @@ $lang['days'] = '%d 天前';
$lang['hours'] = '%d 個小時前';
$lang['minutes'] = '%d 分鐘前';
$lang['seconds'] = '%s 秒鐘前';
-$lang['wordblock'] = '您的更改沒有被儲存,因为它包含被阻擋的文字 (垃圾訊息)。';
+$lang['wordblock'] = '無法儲存您的更改,因為它含有受阻擋的文字 (垃圾訊息)。';
$lang['media_uploadtab'] = '上傳';
$lang['media_searchtab'] = '搜尋';
$lang['media_file'] = '檔案';
@@ -310,7 +311,7 @@ $lang['media_list_thumbs'] = '縮圖';
$lang['media_list_rows'] = '列表';
$lang['media_sort_name'] = '名稱';
$lang['media_sort_date'] = '日期';
-$lang['media_namespaces'] = '選擇分類空間';
+$lang['media_namespaces'] = '選擇分類名稱';
$lang['media_files'] = '在 %s 中的檔案';
$lang['media_upload'] = '上傳至 %s';
$lang['media_search'] = '在 %s 中搜尋';
diff --git a/inc/lang/zh-tw/locked.txt b/inc/lang/zh-tw/locked.txt
index e13fdc890..819e59e2f 100644
--- a/inc/lang/zh-tw/locked.txt
+++ b/inc/lang/zh-tw/locked.txt
@@ -1,3 +1,3 @@
====== 頁面鎖定 ======
-本頁目前正由其他使用者編修中,您必須等他完成編輯或等鎖定時間過去。
+其他使用者正在編輯本頁,您必須等他完成編輯或等鎖定時間過去。
diff --git a/inc/lang/zh-tw/login.txt b/inc/lang/zh-tw/login.txt
index 058cc5712..b82f08a20 100644
--- a/inc/lang/zh-tw/login.txt
+++ b/inc/lang/zh-tw/login.txt
@@ -1,5 +1,4 @@
====== 登入 ======
-您尚未登入,請輸入您的使用者名稱和密碼。 另外,瀏覽器需要打開 cookies 設定以進行登入。
-
+您尚未登入,請輸入您的使用者名稱和密碼。 另外,瀏覽器需要啟用 cookies 以登入本 wiki。
diff --git a/inc/lang/zh-tw/mailtext.txt b/inc/lang/zh-tw/mailtext.txt
index 3b6ece377..2a402c2fb 100644
--- a/inc/lang/zh-tw/mailtext.txt
+++ b/inc/lang/zh-tw/mailtext.txt
@@ -2,7 +2,7 @@
日期 : @DATE@
瀏覽器 : @BROWSER@
-IP位址 : @IPADDRESS@
+IP 位址 : @IPADDRESS@
主機名稱 : @HOSTNAME@
舊版本 : @OLDPAGE@
新版本 : @NEWPAGE@
diff --git a/inc/lang/zh-tw/norev.txt b/inc/lang/zh-tw/norev.txt
index bd1c7a623..2a32ba6a8 100644
--- a/inc/lang/zh-tw/norev.txt
+++ b/inc/lang/zh-tw/norev.txt
@@ -1,3 +1,3 @@
====== 無此版本 ======
-該版本的文件不存在。請用 「舊版」按鈕檢視該文件所有舊版本清單。 \ No newline at end of file
+該版本的文件不存在。請用「舊版」按鈕檢視該文件所有舊版本清單。 \ No newline at end of file
diff --git a/inc/lang/zh-tw/preview.txt b/inc/lang/zh-tw/preview.txt
index c68f94819..95d4b10e1 100644
--- a/inc/lang/zh-tw/preview.txt
+++ b/inc/lang/zh-tw/preview.txt
@@ -1,4 +1,4 @@
====== 預覽 ======
-以下是預覽該文件的狀態。請記住:**它還沒被儲存喔**!
+以下是該文件的預覽。請記住:**您還未儲存它**!
diff --git a/inc/lang/zh-tw/pwconfirm.txt b/inc/lang/zh-tw/pwconfirm.txt
index 994367980..fb8a5cb82 100644
--- a/inc/lang/zh-tw/pwconfirm.txt
+++ b/inc/lang/zh-tw/pwconfirm.txt
@@ -1,13 +1,13 @@
@FULLNAME@ 您好!
-有人為您在 @DOKUWIKIURL@ 註冊的使用者 @TITLE@ 請求新密碼
+感謝您在 @TITLE@ ( @DOKUWIKIURL@ ) 註冊了使用者帳號。我們收到請求,希望能允許此帳號使用新密碼。
-如果您沒有請求新密碼,請忽略這封郵件。
+如果您沒有發送此請求,請忽略這封郵件。
-要確認使用新密碼,請拜訪以下的連結。
+若您真的要使用新密碼,請拜訪以下的連結。
@CONFIRM@
--
本信件由以下 DokuWiki 站台產生:
-@DOKUWIKIURL@
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/lang/zh-tw/read.txt b/inc/lang/zh-tw/read.txt
index a8305611f..4a472cd0d 100644
--- a/inc/lang/zh-tw/read.txt
+++ b/inc/lang/zh-tw/read.txt
@@ -1 +1 @@
-本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得這是誤判,請詢問管理員。 \ No newline at end of file
+本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得它不應被鎖上,請詢問管理員。 \ No newline at end of file
diff --git a/inc/lang/zh-tw/register.txt b/inc/lang/zh-tw/register.txt
index 0da401ccd..3ff68dee3 100644
--- a/inc/lang/zh-tw/register.txt
+++ b/inc/lang/zh-tw/register.txt
@@ -1,4 +1,3 @@
====== 註冊新使用者 ======
-填寫以下資料以註冊維基帳號,請確定您提供的是**合法的 email 地址**-如果這裡沒要求您填寫密碼,您的新密碼會自動產生並寄送到該地址。登錄名稱必須是合法的[[doku>pagename|頁面名稱]]。
-
+若要註冊本 wiki 的帳號,請填寫下列資料。請確定您提供的是**合法的電郵地址**。如果您不必填寫密碼,系統就會為您自動產生登入密碼,並寄送到該電郵地址。登錄名稱須符合正確[[doku>pagename|頁面名稱]]之條件。
diff --git a/inc/lang/zh-tw/registermail.txt b/inc/lang/zh-tw/registermail.txt
index 489e3f9d3..fb4951d60 100644
--- a/inc/lang/zh-tw/registermail.txt
+++ b/inc/lang/zh-tw/registermail.txt
@@ -2,11 +2,11 @@
帳號 : @NEWUSER@
姓名 : @NEWNAME@
-E-mail : @NEWEMAIL@
+電郵 : @NEWEMAIL@
日期 : @DATE@
瀏覽器 : @BROWSER@
-IP位址 : @IPADDRESS@
+IP 位址 : @IPADDRESS@
主機名稱 : @HOSTNAME@
--
diff --git a/inc/lang/zh-tw/resendpwd.txt b/inc/lang/zh-tw/resendpwd.txt
index 3dbfad750..46078a348 100644
--- a/inc/lang/zh-tw/resendpwd.txt
+++ b/inc/lang/zh-tw/resendpwd.txt
@@ -1,3 +1,3 @@
====== 寄送新密碼 ======
-請在以下欄位輸入您的帳號,新密碼將會寄送到您註冊時填寫的 email 地址。
+請在以下欄位輸入您的帳號,新密碼將會寄送到您註冊時填寫的電郵地址。 \ No newline at end of file
diff --git a/inc/lang/zh-tw/revisions.txt b/inc/lang/zh-tw/revisions.txt
index 479705b95..4818839ac 100644
--- a/inc/lang/zh-tw/revisions.txt
+++ b/inc/lang/zh-tw/revisions.txt
@@ -1,3 +1,3 @@
====== 舊版 ======
-以下是該文件的舊版本。如要恢復成某個舊版次,就點下它,然後按「編修本頁」,並存檔起來就可以了。
+以下是該文件的舊版本。如要恢復成某個舊版次,就點下它,然後按「編輯本頁」,並存檔起來就可以了。
diff --git a/inc/lang/zh-tw/stopwords.txt b/inc/lang/zh-tw/stopwords.txt
index 55b67ed16..e549250bd 100644
--- a/inc/lang/zh-tw/stopwords.txt
+++ b/inc/lang/zh-tw/stopwords.txt
@@ -1,9 +1,9 @@
-# 這檔是製作索引檔(index)時不要列入的關鍵字,格式為每字(詞)就使用一行。
-# 在修改時,請注意要用 UNIX 格式的換行符號(newline)處理,而非 DOS 的 CR-LR 喔
-# (如果在 MS Windows 環境使用的話,可使用 vim win32版 或 UltraEdit或其他類似編輯器修改)
+# 本清單列出製作索引檔 (index) 時不要列入的關鍵字,格式為每字 (詞) 佔一行。
+# 在修改本清單時,請注意要用 UNIX 格式的換行符號 (newline) 處理,而非 DOS 的 CR-LR 。
+# (如果在 MS Windows 環境使用的話,可使用 vim win32 版、 UltraEdit 或其他類似編輯器修改。)
#
-# 還有,不必把小於 3 個字元(英數字元)都包括進來。
-# 目前本清單的內容是以 http://www.ranks.nl/stopwords/ 為基礎而發展的。
+# 還有,不必把小於 3 個字元 (英數字元) 都包括進來。
+# 目前本清單的內容是以 http://www.ranks.nl/stopwords/ 為基礎,發展而成的。
about
are
and
diff --git a/inc/lang/zh-tw/subscr_digest.txt b/inc/lang/zh-tw/subscr_digest.txt
index a0f2be73e..a17a0551d 100644
--- a/inc/lang/zh-tw/subscr_digest.txt
+++ b/inc/lang/zh-tw/subscr_digest.txt
@@ -1,6 +1,6 @@
您好!
-維基 @TITLE@ 的頁面 @PAGE@ 已更改。
+本 wiki ( @TITLE@ ) 的頁面 @PAGE@ 已更改。
更改內容如下:
--------------------------------------------------------
@@ -10,9 +10,9 @@
舊版本:@OLDPAGE@
新版本:@NEWPAGE@
-要取消頁面提醒,請登入維基 @DOKUWIKIURL@
+要取消頁面提醒,請登入本 wiki @DOKUWIKIURL@
然後拜訪 @SUBSCRIBE@
-並取消訂閱頁面或分類空間的更改。
+並取消訂閱頁面或分類名稱的更改。
--
本信件由以下 DokuWiki 站台產生:
diff --git a/inc/lang/zh-tw/subscr_form.txt b/inc/lang/zh-tw/subscr_form.txt
index 394d4cbad..ba3f16113 100644
--- a/inc/lang/zh-tw/subscr_form.txt
+++ b/inc/lang/zh-tw/subscr_form.txt
@@ -1,3 +1,3 @@
====== 訂閱管理 ======
-這個頁面允許您管理在目前頁面和分類空間的訂閱。 \ No newline at end of file
+在此頁裏,您可以管理在目前頁面及分類名稱之訂閱。 \ No newline at end of file
diff --git a/inc/lang/zh-tw/subscr_list.txt b/inc/lang/zh-tw/subscr_list.txt
index 078eae63e..ea82dd35d 100644
--- a/inc/lang/zh-tw/subscr_list.txt
+++ b/inc/lang/zh-tw/subscr_list.txt
@@ -1,15 +1,15 @@
您好!
-維基 @TITLE@ 的 @PAGE@ 分類空間的頁面已更改。
+本 wiki ( @TITLE@ ) 的 @PAGE@ 分類名稱頁面已更改。
更改內容如下:
--------------------------------------------------------
@DIFF@
--------------------------------------------------------
-要取消頁面提醒,請登入維基 @DOKUWIKIURL@
+要取消頁面提醒,請登入本 wiki @DOKUWIKIURL@
然後拜訪 @SUBSCRIBE@
-並取消訂閱頁面或分類空間的更改。
+並取消訂閱頁面或分類名稱的更改。
--
本信件由以下 DokuWiki 站台產生:
diff --git a/inc/lang/zh-tw/subscr_single.txt b/inc/lang/zh-tw/subscr_single.txt
index 5128140d0..14d87bb73 100644
--- a/inc/lang/zh-tw/subscr_single.txt
+++ b/inc/lang/zh-tw/subscr_single.txt
@@ -1,6 +1,6 @@
您好!
-維基 @TITLE@ 的頁面 @PAGE@ 已更改。
+本 wiki ( @TITLE@ ) 的頁面 @PAGE@ 已更改。
更改內容如下:
--------------------------------------------------------
@@ -13,9 +13,9 @@
舊版本 : @OLDPAGE@
新版本 : @NEWPAGE@
-要取消頁面提醒,請登入維基 @DOKUWIKIURL@
+要取消頁面提醒,請登入本 wiki @DOKUWIKIURL@
然後拜訪 @NEWPAGE@
-並取消訂閱頁面或分類空間的更改。
+並取消訂閱頁面或分類名稱的更改。
--
本信件由以下 DokuWiki 站台產生:
diff --git a/inc/lang/zh-tw/updateprofile.txt b/inc/lang/zh-tw/updateprofile.txt
index 47f2ae1c4..a7a2ad803 100644
--- a/inc/lang/zh-tw/updateprofile.txt
+++ b/inc/lang/zh-tw/updateprofile.txt
@@ -1,3 +1,3 @@
====== 更新個人資料 ======
-您只需變更想更新的欄位就好,帳號名稱不能變更。 \ No newline at end of file
+您只需修改想更新的欄位就好,帳號名稱不能變更。 \ No newline at end of file
diff --git a/inc/lang/zh-tw/uploadmail.txt b/inc/lang/zh-tw/uploadmail.txt
index b4c1311ba..87bac7c9a 100644
--- a/inc/lang/zh-tw/uploadmail.txt
+++ b/inc/lang/zh-tw/uploadmail.txt
@@ -3,7 +3,7 @@
檔名 : @MEDIA@
日期 : @DATE@
瀏覽器 : @BROWSER@
-IP位址 : @IPADDRESS@
+IP 位址 : @IPADDRESS@
主機名稱 : @HOSTNAME@
大小 : @SIZE@
MIME類型 : @MIME@
@@ -11,4 +11,4 @@ MIME類型 : @MIME@
--
本信件由以下 DokuWiki 站台產生:
-@DOKUWIKIURL@
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/load.php b/inc/load.php
index 49c307054..7fd9fc9d0 100644
--- a/inc/load.php
+++ b/inc/load.php
@@ -82,6 +82,7 @@ function load_autoload($name){
'Mailer' => DOKU_INC.'inc/Mailer.class.php',
'RemoteAPI' => DOKU_INC.'inc/remote.php',
'RemoteAPICore' => DOKU_INC.'inc/RemoteAPICore.php',
+ 'Subscription' => DOKU_INC.'inc/subscription.php',
'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php',
'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php',
diff --git a/inc/media.php b/inc/media.php
index 6335bf210..572b1177c 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -535,32 +535,13 @@ function media_contentcheck($file,$mime){
* Send a notify mail on uploads
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @fixme this should embed thumbnails of images in HTML version
*/
function media_notify($id,$file,$mime,$old_rev=false){
- global $lang;
global $conf;
- global $INFO;
if(empty($conf['notify'])) return; //notify enabled?
- $text = rawLocale('uploadmail');
- $trep = array(
- 'MIME' => $mime,
- 'MEDIA' => ml($id,'',true,'&',true),
- 'SIZE' => filesize_h(filesize($file)),
- );
-
- if ($old_rev && $conf['mediarevisions']) {
- $trep['OLD'] = ml($id, "rev=$old_rev", true, '&', true);
- } else {
- $trep['OLD'] = '---';
- }
-
- $mail = new Mailer();
- $mail->to($conf['notify']);
- $mail->subject($lang['mail_upload'].' '.$id);
- $mail->setBody($text,$trep);
- return $mail->send();
+ $subscription = new Subscription();
+ return $subscription->send_media_diff($conf['notify'], 'uploadmail', $id, $old_rev, '');
}
/**
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 68b92ca43..71f3aa4bf 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -803,6 +803,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext);
$link['class'] .= ' mediafile mf_'.$class;
$link['url'] = ml($src,array('id'=>$ID,'cache'=>$cache),true);
+ $link['title'] .= ' (' . filesize_h(filesize(mediaFN($src))).')';
}
if($hash) $link['url'] .= '#'.$hash;
diff --git a/inc/plugin.php b/inc/plugin.php
index e4bba989d..153e89407 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -81,8 +81,8 @@ class DokuWiki_Plugin {
* retrieve a language dependent file and pass to xhtml renderer for display
* plugin equivalent of p_locale_xhtml()
*
- * @param $id id of language dependent wiki page
- * @return string parsed contents of the wiki page in xhtml format
+ * @param string $id id of language dependent wiki page
+ * @return string parsed contents of the wiki page in xhtml format
*/
function locale_xhtml($id) {
return p_cached_output($this->localFN($id));
diff --git a/inc/search.php b/inc/search.php
index 1cecfd5ec..53bd240e8 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -247,11 +247,16 @@ function search_pagename(&$data,$base,$file,$type,$lvl,$opts){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function search_allpages(&$data,$base,$file,$type,$lvl,$opts){
+ if(isset($opts['depth']) && $opts['depth']){
+ $parts = explode('/',ltrim($file,'/'));
+ if(($type == 'd' && count($parts) > $opts['depth'])
+ || ($type != 'd' && count($parts) > $opts['depth'] + 1)){
+ return false; // depth reached
+ }
+ }
+
//we do nothing with directories
if($type == 'd'){
- if(!$opts['depth']) return true; // recurse forever
- $parts = explode('/',ltrim($file,'/'));
- if(count($parts) == $opts['depth']) return false; // depth reached
return true;
}
diff --git a/inc/subscription.php b/inc/subscription.php
index 6b201c266..2989de032 100644
--- a/inc/subscription.php
+++ b/inc/subscription.php
@@ -1,414 +1,697 @@
<?php
/**
- * Utilities for handling (email) subscriptions
- *
- * The public interface of this file consists of the functions
- * - subscription_find
- * - subscription_send_digest
- * - subscription_send_list
- * - subscription_set
- * - get_info_subscribed
- * - subscription_addresslist
- * - subscription_lock
- * - subscription_unlock
+ * Class for handling (email) subscriptions
*
* @author Adrian Lang <lang@cosmocode.de>
+ * @author Andreas Gohr <andi@splitbrain.org>
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*/
+class Subscription {
-/**
- * Get the name of the metafile tracking subscriptions to target page or
- * namespace
- *
- * @author Adrian Lang <lang@cosmocode.de>
- *
- * @param string $id The target page or namespace, specified by id; Namespaces
- * are identified by appending a colon.
- * @return string
- */
-function subscription_filename($id) {
- $meta_fname = '.mlist';
- if ((substr($id, -1, 1) === ':')) {
- $meta_froot = getNS($id);
- $meta_fname = '/' . $meta_fname;
- } else {
- $meta_froot = $id;
+ /**
+ * Check if subscription system is enabled
+ *
+ * @return bool
+ */
+ public function isenabled() {
+ return actionOK('subscribe');
}
- return metaFN((string) $meta_froot, $meta_fname);
-}
-/**
- * Lock subscription info for an ID
- *
- * @author Adrian Lang <lang@cosmocode.de>
- * @param string $id The target page or namespace, specified by id; Namespaces
- * are identified by appending a colon.
- * @return string
- */
-function subscription_lock_filename ($id){
- global $conf;
- return $conf['lockdir'].'/_subscr_' . md5($id) . '.lock';
-}
+ /**
+ * Return the subscription meta file for the given ID
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param string $id The target page or namespace, specified by id; Namespaces
+ * are identified by appending a colon.
+ * @return string
+ */
+ protected function file($id) {
+ $meta_fname = '.mlist';
+ if((substr($id, -1, 1) === ':')) {
+ $meta_froot = getNS($id);
+ $meta_fname = '/'.$meta_fname;
+ } else {
+ $meta_froot = $id;
+ }
+ return metaFN((string) $meta_froot, $meta_fname);
+ }
-/**
- * Creates a lock file for writing subscription data
- *
- * @todo add lock time parameter to io_lock() and use this instead
- * @param $id
- * @return bool
- */
-function subscription_lock($id) {
- global $conf;
- $lock = subscription_lock_filename($id);
+ /**
+ * Lock subscription info
+ *
+ * We don't use io_lock() her because we do not wait for the lock and use a larger stale time
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ * @param string $id The target page or namespace, specified by id; Namespaces
+ * are identified by appending a colon.
+ * @return bool true, if you got a succesful lock
+ */
+ protected function lock($id) {
+ global $conf;
+
+ $lock = $conf['lockdir'].'/_subscr_'.md5($id).'.lock';
+
+ if(is_dir($lock) && time() - @filemtime($lock) > 60 * 5) {
+ // looks like a stale lock - remove it
+ @rmdir($lock);
+ }
+
+ // try creating the lock directory
+ if(!@mkdir($lock, $conf['dmode'])) {
+ return false;
+ }
- if (is_dir($lock) && time()-@filemtime($lock) > 60*5) {
- // looks like a stale lock - remove it
- @rmdir($lock);
+ if($conf['dperm']) chmod($lock, $conf['dperm']);
+ return true;
}
- // try creating the lock directory
- if (!@mkdir($lock,$conf['dmode'])) {
- return false;
+ /**
+ * Unlock subscription info
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ * @param string $id The target page or namespace, specified by id; Namespaces
+ * are identified by appending a colon.
+ * @return bool
+ */
+ protected function unlock($id) {
+ global $conf;
+ $lock = $conf['lockdir'].'/_subscr_'.md5($id).'.lock';
+ return @rmdir($lock);
}
- if($conf['dperm']) chmod($lock, $conf['dperm']);
- return true;
-}
+ /**
+ * Construct a regular expression for parsing a subscription definition line
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string|array $user
+ * @param string|array $style
+ * @param string|array $data
+ * @return string complete regexp including delimiters
+ * @throws Exception when no data is passed
+ */
+ protected function buildregex($user = null, $style = null, $data = null) {
+ // always work with arrays
+ $user = (array) $user;
+ $style = (array) $style;
+ $data = (array) $data;
-/**
- * Unlock subscription info for an ID
- *
- * @author Adrian Lang <lang@cosmocode.de>
- * @param string $id The target page or namespace, specified by id; Namespaces
- * are identified by appending a colon.
- * @return bool
- */
-function subscription_unlock($id) {
- $lockf = subscription_lock_filename($id);
- return @rmdir($lockf);
-}
+ // clean
+ $user = array_filter(array_map('trim', $user));
+ $style = array_filter(array_map('trim', $style));
+ $data = array_filter(array_map('trim', $data));
-/**
- * Set subscription information
- *
- * Allows to set subscription information for permanent storage in meta files.
- * Subscriptions consist of a target object, a subscribing user, a subscribe
- * style and optional data.
- * A subscription may be deleted by specifying an empty subscribe style.
- * Only one subscription per target and user is allowed.
- * The function returns false on error, otherwise true. Note that no error is
- * returned if a subscription should be deleted but the user is not subscribed
- * and the subscription meta file exists.
- *
- * @author Adrian Lang <lang@cosmocode.de>
- *
- * @param string $user The subscriber or unsubscriber
- * @param string $page The target object (page or namespace), specified by
- * id; Namespaces are identified by a trailing colon.
- * @param string $style The subscribe style; DokuWiki currently implements
- * “every”, “digest”, and “list”.
- * @param string $data An optional data blob
- * @param bool $overwrite Whether an existing subscription may be overwritten
- * @return bool
- */
-function subscription_set($user, $page, $style, $data = null,
- $overwrite = false) {
- global $lang;
- if (is_null($style)) {
- // Delete subscription.
- $file = subscription_filename($page);
- if (!@file_exists($file)) {
- msg(sprintf($lang['subscr_not_subscribed'], $user,
- prettyprint_id($page)), -1);
- return false;
+ // user names are encoded
+ $user = array_map('auth_nameencode', $user);
+
+ // quote
+ $user = array_map('preg_quote_cb', $user);
+ $style = array_map('preg_quote_cb', $style);
+ $data = array_map('preg_quote_cb', $data);
+
+ // join
+ $user = join('|', $user);
+ $style = join('|', $style);
+ $data = join('|', $data);
+
+ // any data at all?
+ if($user.$style.$data === '') throw new Exception('no data passed');
+
+ // replace empty values, set which ones are optional
+ $sopt = '';
+ $dopt = '';
+ if($user === '') {
+ $user = '\S+';
+ }
+ if($style === '') {
+ $style = '\S+';
+ $sopt = '?';
+ }
+ if($data === '') {
+ $data = '\S+';
+ $dopt = '?';
}
- // io_deleteFromFile does not return false if no line matched.
- return io_deleteFromFile($file,
- subscription_regex(array('user' => auth_nameencode($user))),
- true);
+ // assemble
+ return "/^($user)(?:\\s+($style))$sopt(?:\\s+($data))$dopt$/";
}
- // Delete subscription if one exists and $overwrite is true. If $overwrite
- // is false, fail.
- $subs = subscription_find($page, array('user' => $user));
- if (count($subs) > 0 && isset($subs[$page])) {
- if (!$overwrite) {
- msg(sprintf($lang['subscr_already_subscribed'], $user,
- prettyprint_id($page)), -1);
- return false;
- }
- // Fail if deletion failed, else continue.
- if (!subscription_set($user, $page, null)) {
- return false;
+ /**
+ * Recursively search for matching subscriptions
+ *
+ * This function searches all relevant subscription files for a page or
+ * namespace.
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param string $page The target object’s (namespace or page) id
+ * @param string|array $user
+ * @param string|array $style
+ * @param string|array $data
+ * @return array
+ */
+ public function subscribers($page, $user = null, $style = null, $data = null) {
+ if(!$this->isenabled()) return array();
+
+ // Construct list of files which may contain relevant subscriptions.
+ $files = array(':' => $this->file(':'));
+ do {
+ $files[$page] = $this->file($page);
+ $page = getNS(rtrim($page, ':')).':';
+ } while($page !== ':');
+
+ $re = $this->buildregex($user, $style, $data);
+
+ // Handle files.
+ $result = array();
+ foreach($files as $target => $file) {
+ if(!@file_exists($file)) continue;
+
+ $lines = file($file);
+ foreach($lines as $line) {
+ // fix old style subscription files
+ if(strpos($line, ' ') === false) $line = trim($line)." every\n";
+
+ // check for matching entries
+ if(!preg_match($re, $line, $m)) continue;
+
+ $u = rawurldecode($m[1]); // decode the user name
+ if(!isset($result[$target])) $result[$target] = array();
+ $result[$target][$u] = array($m[2], $m[3]); // add to result
+ }
}
+ return array_reverse($result);
}
- $file = subscription_filename($page);
- $content = auth_nameencode($user) . ' ' . $style;
- if (!is_null($data)) {
- $content .= ' ' . $data;
+ /**
+ * Adds a new subscription for the given page or namespace
+ *
+ * This will automatically overwrite any existent subscription for the given user on this
+ * *exact* page or namespace. It will *not* modify any subscription that may exist in higher namespaces.
+ *
+ * @param string $id The target page or namespace, specified by id; Namespaces
+ * are identified by appending a colon.
+ * @param string $user
+ * @param string $style
+ * @param string $data
+ * @throws Exception when user or style is empty
+ * @return bool
+ */
+ public function add($id, $user, $style, $data = '') {
+ if(!$this->isenabled()) return false;
+
+ // delete any existing subscription
+ $this->remove($id, $user);
+
+ $user = auth_nameencode(trim($user));
+ $style = trim($style);
+ $data = trim($data);
+
+ if(!$user) throw new Exception('no subscription user given');
+ if(!$style) throw new Exception('no subscription style given');
+ if(!$data) $data = time(); //always add current time for new subscriptions
+
+ $line = "$user $style $data\n";
+ $file = $this->file($id);
+ return io_saveFile($file, $line, true);
}
- return io_saveFile($file, $content . "\n", true);
-}
-/**
- * Recursively search for matching subscriptions
- *
- * This function searches all relevant subscription files for a page or
- * namespace.
- *
- * @author Adrian Lang <lang@cosmocode.de>
- * @see function subscription_regex for $pre documentation
- *
- * @param string $page The target object’s (namespace or page) id
- * @param array $pre A hash of predefined values
- * @return array
- */
-function subscription_find($page, $pre) {
- // Construct list of files which may contain relevant subscriptions.
- $filenames = array(':' => subscription_filename(':'));
- do {
- $filenames[$page] = subscription_filename($page);
- $page = getNS(rtrim($page, ':')) . ':';
- } while ($page !== ':');
-
- // Handle files.
- $matches = array();
- foreach ($filenames as $cur_page => $filename) {
- if (!@file_exists($filename)) {
- continue;
+ /**
+ * Removes a subscription for the given page or namespace
+ *
+ * This removes all subscriptions matching the given criteria on the given page or
+ * namespace. It will *not* modify any subscriptions that may exist in higher
+ * namespaces.
+ *
+ * @param string $id The target object’s (namespace or page) id
+ * @param string|array $user
+ * @param string|array $style
+ * @param string|array $data
+ * @return bool
+ */
+ public function remove($id, $user = null, $style = null, $data = null) {
+ if(!$this->isenabled()) return false;
+
+ $file = $this->file($id);
+ if(!file_exists($file)) return true;
+
+ $re = $this->buildregex($user, $style, $data);
+ return io_deleteFromFile($file, $re, true);
+ }
+
+ /**
+ * Get data for $INFO['subscribed']
+ *
+ * $INFO['subscribed'] is either false if no subscription for the current page
+ * and user is in effect. Else it contains an array of arrays with the fields
+ * “target”, “style”, and optionally “data”.
+ *
+ * @param string $id Page ID, defaults to global $ID
+ * @param string $user User, defaults to $_SERVER['REMOTE_USER']
+ * @return array
+ * @author Adrian Lang <lang@cosmocode.de>
+ */
+ function user_subscription($id = '', $user = '') {
+ if(!$this->isenabled()) return false;
+
+ global $ID;
+ if(!$id) $id = $ID;
+ if(!$user) $user = $_SERVER['REMOTE_USER'];
+
+ $subs = $this->subscribers($id, $user);
+ if(!count($subs)) return false;
+
+ $result = array();
+ foreach($subs as $target => $info) {
+ $result[] = array(
+ 'target' => $target,
+ 'style' => $info[$user][0],
+ 'data' => $info[$user][1]
+ );
}
- $subscriptions = file($filename);
- foreach ($subscriptions as $subscription) {
- if (strpos($subscription, ' ') === false) {
- // This is an old subscription file.
- $subscription = trim($subscription) . " every\n";
- }
- list($user, $rest) = explode(' ', $subscription, 2);
- $subscription = rawurldecode($user) . " " . $rest;
+ return $result;
+ }
- if (preg_match(subscription_regex($pre), $subscription,
- $line_matches) === 0) {
- continue;
- }
- $match = array_slice($line_matches, 1);
- if (!isset($matches[$cur_page])) {
- $matches[$cur_page] = array();
+ /**
+ * Send digest and list subscriptions
+ *
+ * This sends mails to all subscribers that have a subscription for namespaces above
+ * the given page if the needed $conf['subscribe_time'] has passed already.
+ *
+ * This function is called form lib/exe/indexer.php
+ *
+ * @param string $page
+ * @return int number of sent mails
+ */
+ public function send_bulk($page) {
+ if(!$this->isenabled()) return 0;
+
+ /** @var auth_basic $auth */
+ global $auth;
+ global $conf;
+ global $USERINFO;
+ $count = 0;
+
+ $subscriptions = $this->subscribers($page, null, array('digest', 'list'));
+
+ // remember current user info
+ $olduinfo = $USERINFO;
+ $olduser = $_SERVER['REMOTE_USER'];
+
+ foreach($subscriptions as $target => $users) {
+ if(!$this->lock($target)) continue;
+
+ foreach($users as $user => $info) {
+ list($style, $lastupdate) = $info;
+
+ $lastupdate = (int) $lastupdate;
+ if($lastupdate + $conf['subscribe_time'] > time()) {
+ // Less than the configured time period passed since last
+ // update.
+ continue;
+ }
+
+ // Work as the user to make sure ACLs apply correctly
+ $USERINFO = $auth->getUserData($user);
+ $_SERVER['REMOTE_USER'] = $user;
+ if($USERINFO === false) continue;
+ if(!$USERINFO['mail']) continue;
+
+ if(substr($target, -1, 1) === ':') {
+ // subscription target is a namespace, get all changes within
+ $changes = getRecentsSince($lastupdate, null, getNS($target));
+ } else {
+ // single page subscription, check ACL ourselves
+ if(auth_quickaclcheck($target) < AUTH_READ) continue;
+ $meta = p_get_metadata($target);
+ $changes = array($meta['last_change']);
+ }
+
+ // Filter out pages only changed in small and own edits
+ $change_ids = array();
+ foreach($changes as $rev) {
+ $n = 0;
+ while(!is_null($rev) && $rev['date'] >= $lastupdate &&
+ ($_SERVER['REMOTE_USER'] === $rev['user'] ||
+ $rev['type'] === DOKU_CHANGE_TYPE_MINOR_EDIT)) {
+ $rev = getRevisions($rev['id'], $n++, 1);
+ $rev = (count($rev) > 0) ? $rev[0] : null;
+ }
+
+ if(!is_null($rev) && $rev['date'] >= $lastupdate) {
+ // Some change was not a minor one and not by myself
+ $change_ids[] = $rev['id'];
+ }
+ }
+
+ // send it
+ if($style === 'digest') {
+ foreach($change_ids as $change_id) {
+ $this->send_digest(
+ $USERINFO['mail'], $change_id,
+ $lastupdate
+ );
+ $count++;
+ }
+ } elseif($style === 'list') {
+ $this->send_list($USERINFO['mail'], $change_ids, $target);
+ $count++;
+ }
+ // TODO: Handle duplicate subscriptions.
+
+ // Update notification time.
+ $this->add($target, $user, $style, time());
}
- $matches[$cur_page][] = $match;
+ $this->unlock($target);
}
- }
- return array_reverse($matches);
-}
-/**
- * Get data for $INFO['subscribed']
- *
- * $INFO['subscribed'] is either false if no subscription for the current page
- * and user is in effect. Else it contains an array of arrays with the fields
- * “target”, “style”, and optionally “data”.
- *
- * @author Adrian Lang <lang@cosmocode.de>
- */
-function get_info_subscribed() {
- global $ID;
- global $conf;
- if (!$conf['subscribers']) {
- return false;
+ // restore current user info
+ $USERINFO = $olduinfo;
+ $_SERVER['REMOTE_USER'] = $olduser;
+ return $count;
}
- $subs = subscription_find($ID, array('user' => $_SERVER['REMOTE_USER']));
- if (count($subs) === 0) {
- return false;
+ /**
+ * Send the diff for some page change
+ *
+ * @param string $subscriber_mail The target mail address
+ * @param string $template Mail template ('subscr_digest', 'subscr_single', 'mailtext', ...)
+ * @param string $id Page for which the notification is
+ * @param int|null $rev Old revision if any
+ * @param string $summary Change summary if any
+ * @return bool true if successfully sent
+ */
+ public function send_diff($subscriber_mail, $template, $id, $rev = null, $summary = '') {
+ global $DIFF_INLINESTYLES;
+
+ // prepare replacements (keys not set in hrep will be taken from trep)
+ $trep = array(
+ 'PAGE' => $id,
+ 'NEWPAGE' => wl($id, '', true, '&'),
+ 'SUMMARY' => $summary,
+ 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&')
+ );
+ $hrep = array();
+
+ if($rev) {
+ $subject = 'changed';
+ $trep['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
+
+ $old_content = rawWiki($id, $rev);
+ $new_content = rawWiki($id);
+
+ $df = new Diff(explode("\n", $old_content),
+ explode("\n", $new_content));
+ $dformat = new UnifiedDiffFormatter();
+ $tdiff = $dformat->format($df);
+
+ $DIFF_INLINESTYLES = true;
+ $df = new Diff(explode("\n", hsc($old_content)),
+ explode("\n", hsc($new_content)));
+ $dformat = new InlineDiffFormatter();
+ $hdiff = $dformat->format($df);
+ $hdiff = '<table>'.$hdiff.'</table>';
+ $DIFF_INLINESTYLES = false;
+ } else {
+ $subject = 'newpage';
+ $trep['OLDPAGE'] = '---';
+ $tdiff = rawWiki($id);
+ $hdiff = nl2br(hsc($tdiff));
+ }
+
+ $trep['DIFF'] = $tdiff;
+ $hrep['DIFF'] = $hdiff;
+
+ $headers = array('Message-Id' => $this->getMessageID($id));
+ if ($rev) {
+ $headers['In-Reply-To'] = $this->getMessageID($id, $rev);
+ }
+
+ return $this->send(
+ $subscriber_mail, $subject, $id,
+ $template, $trep, $hrep, $headers
+ );
}
- $_ret = array();
- foreach ($subs as $target => $subs_data) {
- $new = array('target' => $target,
- 'style' => $subs_data[0][0]);
- if (count($subs_data[0]) > 1) {
- $new['data'] = $subs_data[0][1];
+ /**
+ * Send the diff for some media change
+ *
+ * @fixme this should embed thumbnails of images in HTML version
+ * @param string $subscriber_mail The target mail address
+ * @param string $template Mail template ('uploadmail', ...)
+ * @param string $id Media file for which the notification is
+ * @param int|bool $rev Old revision if any
+ * @return bool true if successfully sent
+ */
+ public function send_media_diff($subscriber_mail, $template, $id, $rev = false) {
+ global $conf;
+
+ $file = mediaFN($id);
+ list($mime, $ext) = mimetype($id);
+
+ $trep = array(
+ 'MIME' => $mime,
+ 'MEDIA' => ml($id,'',true,'&',true),
+ 'SIZE' => filesize_h(filesize($file)),
+ );
+
+ if ($rev && $conf['mediarevisions']) {
+ $trep['OLD'] = ml($id, "rev=$rev", true, '&', true);
+ } else {
+ $trep['OLD'] = '---';
+ }
+
+ $headers = array('Message-Id' => $this->getMessageID($id, @filemtime($file)));
+ if ($rev) {
+ $headers['In-Reply-To'] = $this->getMessageID($id, $rev);
}
- $_ret[] = $new;
+
+ $this->send($subscriber_mail, 'upload', $id, $template, $trep, null, $headers);
+
}
- return $_ret;
-}
+ /**
+ * Send a notify mail on new registration
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @param string $login login name of the new user
+ * @param string $fullname full name of the new user
+ * @param string $email email address of the new user
+ * @return bool true if a mail was sent
+ */
+ public function send_register($login, $fullname, $email) {
+ global $conf;
+ if(empty($conf['registernotify'])) return false;
-/**
- * Construct a regular expression parsing a subscription definition line
- *
- * @author Adrian Lang <lang@cosmocode.de>
- *
- * @param array $pre A hash of predefined values; “user”, “style”, and
- * “data” may be set to limit the results to
- * subscriptions matching these parameters. If
- * “escaped” is true, these fields are inserted into the
- * regular expression without escaping.
- *
- * @return string complete regexp including delimiters
- */
-function subscription_regex($pre = array()) {
- if (!isset($pre['escaped']) || $pre['escaped'] === false) {
- $pre = array_map('preg_quote_cb', $pre);
+ $trep = array(
+ 'NEWUSER' => $login,
+ 'NEWNAME' => $fullname,
+ 'NEWEMAIL' => $email,
+ );
+
+ return $this->send(
+ $conf['registernotify'],
+ 'new_user',
+ $login,
+ 'registermail',
+ $trep
+ );
}
- foreach (array('user', 'style', 'data') as $key) {
- if (!isset($pre[$key])) {
- $pre[$key] = '(\S+)';
+
+ /**
+ * Send a digest mail
+ *
+ * Sends a digest mail showing a bunch of changes of a single page. Basically the same as send_diff()
+ * but determines the last known revision first
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param string $subscriber_mail The target mail address
+ * @param array $id The ID
+ * @param int $lastupdate Time of the last notification
+ * @return bool
+ */
+ protected function send_digest($subscriber_mail, $id, $lastupdate) {
+ $n = 0;
+ do {
+ $rev = getRevisions($id, $n++, 1);
+ $rev = (count($rev) > 0) ? $rev[0] : null;
+ } while(!is_null($rev) && $rev > $lastupdate);
+
+ return $this->send_diff(
+ $subscriber_mail,
+ 'subscr_digest',
+ $id, $rev
+ );
+ }
+
+ /**
+ * Send a list mail
+ *
+ * Sends a list mail showing a list of changed pages.
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param string $subscriber_mail The target mail address
+ * @param array $ids Array of ids
+ * @param string $ns_id The id of the namespace
+ * @return bool true if a mail was sent
+ */
+ protected function send_list($subscriber_mail, $ids, $ns_id) {
+ if(count($ids) === 0) return false;
+
+ $tlist = '';
+ $hlist = '<ul>';
+ foreach($ids as $id) {
+ $link = wl($id, array(), true);
+ $tlist .= '* '.$link.NL;
+ $hlist .= '<li><a href="'.$link.'">'.hsc($id).'</a></li>'.NL;
}
+ $hlist .= '</ul>';
+
+ $id = prettyprint_id($ns_id);
+ $trep = array(
+ 'DIFF' => rtrim($tlist),
+ 'PAGE' => $id,
+ 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&')
+ );
+ $hrep = array(
+ 'DIFF' => $hlist
+ );
+
+ return $this->send(
+ $subscriber_mail,
+ 'subscribe_list',
+ $ns_id,
+ 'subscr_list', $trep, $hrep
+ );
}
- return '/^' . $pre['user'] . '(?: ' . $pre['style'] .
- '(?: ' . $pre['data'] . ')?)?$/';
-}
-/**
- * Return a string with the email addresses of all the
- * users subscribed to a page
- *
- * This is the default action for COMMON_NOTIFY_ADDRESSLIST.
- *
- * @author Steven Danz <steven-danz@kc.rr.com>
- * @author Adrian Lang <lang@cosmocode.de>
- *
- * @todo this does NOT return a string but uses a reference to write back, either fix function or docs
- * @param array $data Containing $id (the page id), $self (whether the author
- * should be notified, $addresslist (current email address
- * list)
- * @return string
- */
-function subscription_addresslist(&$data){
- global $conf;
- /** @var auth_basic $auth */
- global $auth;
+ /**
+ * Helper function for sending a mail
+ *
+ * @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @param string $subscriber_mail The target mail address
+ * @param string $subject The lang id of the mail subject (without the
+ * prefix “mail_”)
+ * @param string $context The context of this mail, eg. page or namespace id
+ * @param string $template The name of the mail template
+ * @param array $trep Predefined parameters used to parse the
+ * template (in text format)
+ * @param array $hrep Predefined parameters used to parse the
+ * template (in HTML format), null to default to $trep
+ * @param array $headers Additional mail headers in the form 'name' => 'value'
+ * @return bool
+ */
+ protected function send($subscriber_mail, $subject, $context, $template, $trep, $hrep = null, $headers = array()) {
+ global $lang;
+ global $conf;
+
+ $text = rawLocale($template);
+ $subject = $lang['mail_'.$subject].' '.$context;
+ $mail = new Mailer();
+ $mail->bcc($subscriber_mail);
+ $mail->subject($subject);
+ $mail->setBody($text, $trep, $hrep);
+ if(in_array($template, array('subscr_list', 'subscr_digest'))){
+ $mail->from($conf['mailfromnobody']);
+ }
+ if(isset($trep['SUBSCRIBE'])) {
+ $mail->setHeader('List-Unsubscribe', '<'.$trep['SUBSCRIBE'].'>', false);
+ }
- $id = $data['id'];
- $self = $data['self'];
- $addresslist = $data['addresslist'];
+ foreach ($headers as $header => $value) {
+ $mail->setHeader($header, $value);
+ }
- if (!$conf['subscribers'] || $auth === null) {
- return '';
+ return $mail->send();
}
- $pres = array('style' => 'every', 'escaped' => true);
- if (!$self && isset($_SERVER['REMOTE_USER'])) {
- $pres['user'] = '((?!' . preg_quote_cb($_SERVER['REMOTE_USER']) .
- '(?: |$))\S+)';
+
+ /**
+ * Get a valid message id for a certain $id and revision (or the current revision)
+ * @param string $id The id of the page (or media file) the message id should be for
+ * @param string $rev The revision of the page, set to the current revision of the page $id if not set
+ * @return string
+ */
+ protected function getMessageID($id, $rev = NULL) {
+ static $listid = null;
+ if (is_null($listid)) {
+ $server = parse_url(DOKU_URL, PHP_URL_HOST);
+ $listid = join('.', array_reverse(explode('/', DOKU_BASE))).$server;
+ $listid = urlencode($listid);
+ $listid = strtolower(trim($listid, '.'));
+ }
+
+ if (is_null($rev)) {
+ $rev = @filemtime(wikiFN($id));
+ }
+
+ return "<$id?rev=$rev@$listid>";
}
- $subs = subscription_find($id, $pres);
- $emails = array();
- foreach ($subs as $by_targets) {
- foreach ($by_targets as $sub) {
- $info = $auth->getUserData($sub[0]);
- if ($info === false) continue;
- $level = auth_aclcheck($id, $sub[0], $info['grps']);
- if ($level >= AUTH_READ) {
- if (strcasecmp($info['mail'], $conf['notify']) != 0) {
- $emails[$sub[0]] = $info['mail'];
+
+ /**
+ * Default callback for COMMON_NOTIFY_ADDRESSLIST
+ *
+ * Aggregates all email addresses of user who have subscribed the given page with 'every' style
+ *
+ * @author Steven Danz <steven-danz@kc.rr.com>
+ * @author Adrian Lang <lang@cosmocode.de>
+ *
+ * @todo move the whole functionality into this class, trigger SUBSCRIPTION_NOTIFY_ADDRESSLIST instead,
+ * use an array for the addresses within it
+ *
+ * @param array &$data Containing $id (the page id), $self (whether the author
+ * should be notified, $addresslist (current email address
+ * list)
+ */
+ public function notifyaddresses(&$data) {
+ if(!$this->isenabled()) return;
+
+ /** @var auth_basic $auth */
+ global $auth;
+ global $conf;
+
+ $id = $data['id'];
+ $self = $data['self'];
+ $addresslist = $data['addresslist'];
+
+ $subscriptions = $this->subscribers($id, null, 'every');
+
+ $result = array();
+ foreach($subscriptions as $target => $users) {
+ foreach($users as $user => $info) {
+ $userinfo = $auth->getUserData($user);
+ if($userinfo === false) continue;
+ if(!$userinfo['mail']) continue;
+ if(!$self && $user == $_SERVER['REMOTE_USER']) continue; //skip our own changes
+
+ $level = auth_aclcheck($id, $user, $userinfo['grps']);
+ if($level >= AUTH_READ) {
+ if(strcasecmp($userinfo['mail'], $conf['notify']) != 0) { //skip user who get notified elsewhere
+ $result[$user] = $userinfo['mail'];
+ }
}
}
}
+ $data['addresslist'] = trim($addresslist.','.implode(',', $result), ',');
}
- $data['addresslist'] = trim($addresslist . ',' . implode(',', $emails), ',');
}
/**
- * Send a digest mail
+ * Compatibility wrapper around Subscription:notifyaddresses
*
- * Sends a digest mail showing a bunch of changes.
+ * for plugins emitting COMMON_NOTIFY_ADDRESSLIST themselves and relying on on this to
+ * be the default handler
*
- * @author Adrian Lang <lang@cosmocode.de>
+ * @param array $data event data for
*
- * @param string $subscriber_mail The target mail address
- * @param array $id The ID
- * @param int $lastupdate Time of the last notification
+ * @deprecated 2012-12-07
*/
-function subscription_send_digest($subscriber_mail, $id, $lastupdate) {
- $n = 0;
- do {
- $rev = getRevisions($id, $n++, 1);
- $rev = (count($rev) > 0) ? $rev[0] : null;
- } while (!is_null($rev) && $rev > $lastupdate);
-
- $replaces = array('NEWPAGE' => wl($id, '', true, '&'),
- 'SUBSCRIBE' => wl($id, array('do' => 'subscribe'), true, '&'));
- if (!is_null($rev)) {
- $subject = 'changed';
- $replaces['OLDPAGE'] = wl($id, "rev=$rev", true, '&');
- $df = new Diff(explode("\n", rawWiki($id, $rev)),
- explode("\n", rawWiki($id)));
- $dformat = new UnifiedDiffFormatter();
- $replaces['DIFF'] = $dformat->format($df);
- } else {
- $subject = 'newpage';
- $replaces['OLDPAGE'] = 'none';
- $replaces['DIFF'] = rawWiki($id);
- }
- subscription_send($subscriber_mail, $replaces, $subject, $id,
- 'subscr_digest');
-}
-
-/**
- * Send a list mail
- *
- * Sends a list mail showing a list of changed pages.
- *
- * @author Adrian Lang <lang@cosmocode.de>
- *
- * @param string $subscriber_mail The target mail address
- * @param array $ids Array of ids
- * @param string $ns_id The id of the namespace
- */
-function subscription_send_list($subscriber_mail, $ids, $ns_id) {
- if (count($ids) === 0) return;
- global $conf;
- $list = '';
- foreach ($ids as $id) {
- $list .= '* ' . wl($id, array(), true) . NL;
- }
- subscription_send($subscriber_mail,
- array('DIFF' => rtrim($list),
- 'SUBSCRIBE' => wl($ns_id . $conf['start'],
- array('do' => 'subscribe'),
- true, '&')),
- 'subscribe_list',
- prettyprint_id($ns_id),
- 'subscr_list');
-}
-
-/**
- * Helper function for sending a mail
- *
- * @author Adrian Lang <lang@cosmocode.de>
- *
- * @param string $subscriber_mail The target mail address
- * @param array $replaces Predefined parameters used to parse the
- * template
- * @param string $subject The lang id of the mail subject (without the
- * prefix “mail_”)
- * @param string $id The page or namespace id
- * @param string $template The name of the mail template
- * @return bool
- */
-function subscription_send($subscriber_mail, $replaces, $subject, $id, $template) {
- global $lang;
- global $conf;
-
- $text = rawLocale($template);
- $trep = array_merge($replaces, array('PAGE' => $id));
- $hrep = $trep;
- $hrep['DIFF'] = nl2br(htmlspecialchars($hrep['DIFF']));
-
- $subject = $lang['mail_' . $subject] . ' ' . $id;
- $mail = new Mailer();
- $mail->bcc($subscriber_mail);
- $mail->subject($subject);
- $mail->setBody($text,$trep,$hrep);
- $mail->from($conf['mailfromnobody']);
- $mail->setHeader(
- 'List-Unsubscribe',
- '<'.wl($id,array('do'=>'subscribe'),true,'&').'>',
- false
- );
- return $mail->send();
-}
+function subscription_addresslist(&$data) {
+ $sub = new Subscription();
+ $sub->notifyaddresses($data);
+} \ No newline at end of file
diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php
index 28ee5331f..27576f76d 100644
--- a/lib/exe/indexer.php
+++ b/lib/exe/indexer.php
@@ -169,97 +169,20 @@ function runSitemapper(){
* @author Adrian Lang <lang@cosmocode.de>
*/
function sendDigest() {
- echo 'sendDigest(): started'.NL;
- global $ID;
global $conf;
- if (!$conf['subscribers']) {
+ global $ID;
+
+ echo 'sendDigest(): started'.NL;
+ if(!actionOK('subscribe')) {
echo 'sendDigest(): disabled'.NL;
return false;
}
- $subscriptions = subscription_find($ID, array('style' => '(digest|list)',
- 'escaped' => true));
- /** @var auth_basic $auth */
- global $auth;
- global $lang;
- global $conf;
- global $USERINFO;
-
- $sent = false;
-
- // remember current user info
- $olduinfo = $USERINFO;
- $olduser = $_SERVER['REMOTE_USER'];
-
- foreach($subscriptions as $id => $users) {
- if (!subscription_lock($id)) {
- continue;
- }
- foreach($users as $data) {
- list($user, $style, $lastupdate) = $data;
- $lastupdate = (int) $lastupdate;
- if ($lastupdate + $conf['subscribe_time'] > time()) {
- // Less than the configured time period passed since last
- // update.
- continue;
- }
-
- // Work as the user to make sure ACLs apply correctly
- $USERINFO = $auth->getUserData($user);
- $_SERVER['REMOTE_USER'] = $user;
- if ($USERINFO === false) {
- continue;
- }
-
- if (substr($id, -1, 1) === ':') {
- // The subscription target is a namespace
- $changes = getRecentsSince($lastupdate, null, getNS($id));
- } else {
- if(auth_quickaclcheck($id) < AUTH_READ) continue;
-
- $meta = p_get_metadata($id);
- $changes = array($meta['last_change']);
- }
-
- // Filter out pages only changed in small and own edits
- $change_ids = array();
- foreach($changes as $rev) {
- $n = 0;
- while (!is_null($rev) && $rev['date'] >= $lastupdate &&
- ($_SERVER['REMOTE_USER'] === $rev['user'] ||
- $rev['type'] === DOKU_CHANGE_TYPE_MINOR_EDIT)) {
- $rev = getRevisions($rev['id'], $n++, 1);
- $rev = (count($rev) > 0) ? $rev[0] : null;
- }
-
- if (!is_null($rev) && $rev['date'] >= $lastupdate) {
- // Some change was not a minor one and not by myself
- $change_ids[] = $rev['id'];
- }
- }
-
- if ($style === 'digest') {
- foreach($change_ids as $change_id) {
- subscription_send_digest($USERINFO['mail'], $change_id,
- $lastupdate);
- $sent = true;
- }
- } elseif ($style === 'list') {
- subscription_send_list($USERINFO['mail'], $change_ids, $id);
- $sent = true;
- }
- // TODO: Handle duplicate subscriptions.
-
- // Update notification time.
- subscription_set($user, $id, $style, time(), true);
- }
- subscription_unlock($id);
- }
+ $sub = new Subscription();
+ $sent = $sub->send_bulk($ID);
- // restore current user info
- $USERINFO = $olduinfo;
- $_SERVER['REMOTE_USER'] = $olduser;
+ echo "sendDigest(): sent $sent mails".NL;
echo 'sendDigest(): finished'.NL;
- return $sent;
+ return (bool) $sent;
}
/**
diff --git a/lib/images/interwiki/dokubug.gif b/lib/images/interwiki/dokubug.gif
index 3432b8d57..08c1ca1f1 100644
--- a/lib/images/interwiki/dokubug.gif
+++ b/lib/images/interwiki/dokubug.gif
Binary files differ
diff --git a/lib/images/interwiki/paypal.gif b/lib/images/interwiki/paypal.gif
index a2dc89431..633797fac 100644
--- a/lib/images/interwiki/paypal.gif
+++ b/lib/images/interwiki/paypal.gif
Binary files differ
diff --git a/lib/images/interwiki/skype.gif b/lib/images/interwiki/skype.gif
index 2c900a8b2..d9bd575a6 100644
--- a/lib/images/interwiki/skype.gif
+++ b/lib/images/interwiki/skype.gif
Binary files differ
diff --git a/lib/plugins/acl/lang/ca/lang.php b/lib/plugins/acl/lang/ca/lang.php
index 10f656062..183db711b 100644
--- a/lib/plugins/acl/lang/ca/lang.php
+++ b/lib/plugins/acl/lang/ca/lang.php
@@ -7,6 +7,7 @@
* @author Carles Bellver <carles.bellver@gmail.com>
* @author carles.bellver@gmail.com
* @author carles.bellver@cent.uji.es
+ * @author daniel@6temes.cat
*/
$lang['admin_acl'] = 'Gestió de la Llista de Control d\'Accés';
$lang['acl_group'] = 'Grup';
diff --git a/lib/plugins/acl/lang/tr/lang.php b/lib/plugins/acl/lang/tr/lang.php
index de96d2906..629ca546b 100644
--- a/lib/plugins/acl/lang/tr/lang.php
+++ b/lib/plugins/acl/lang/tr/lang.php
@@ -8,6 +8,7 @@
* @author Cihan Kahveci <kahvecicihan@gmail.com>
* @author Yavuz Selim <yavuzselim@gmail.com>
* @author Caleb Maclennan <caleb@alerque.com>
+ * @author farukerdemoncel@gmail.com
*/
$lang['admin_acl'] = 'Erişim Kontrol Listesi (ACL) Yönetimi';
$lang['acl_group'] = 'Grup';
diff --git a/lib/plugins/acl/lang/zh-tw/help.txt b/lib/plugins/acl/lang/zh-tw/help.txt
index d5d031059..2d1c84b7d 100644
--- a/lib/plugins/acl/lang/zh-tw/help.txt
+++ b/lib/plugins/acl/lang/zh-tw/help.txt
@@ -1,11 +1,11 @@
-=== 快速指南: ===
+=== 快速指南: ===
-你可以用這個頁面為維基中的分類空間或頁面增加或移除權限。
+你可以用這個頁面,為本 wiki 中的分類名稱或頁面增加或移除權限。
-左方面板顯示了所有分類空間和頁面。
+左方面板顯示了所有分類名稱和頁面。
上方表格允許你觀看及修改選取的使用者或群組的權限。
下方表格顯示了目前所有的存取控制表 (ACL),你可以用它快速刪除或更改多項規則。
-閱讀 [[doku>acl|official documentation on ACL]] 可以幫助你完整地了解 DokuWiki 存取控制的運作。
+閱讀 [[doku>acl|official documentation on ACL]] 可以幫助你完整地了解 DokuWiki 存取控制的運作。 \ No newline at end of file
diff --git a/lib/plugins/acl/lang/zh-tw/lang.php b/lib/plugins/acl/lang/zh-tw/lang.php
index ff115df18..ff2c6a184 100644
--- a/lib/plugins/acl/lang/zh-tw/lang.php
+++ b/lib/plugins/acl/lang/zh-tw/lang.php
@@ -12,25 +12,26 @@
* @author Danny Lin <danny0838@pchome.com.tw>
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
+ * @author Ichirou Uchiki <syaoranhinata@gmail.com>
*/
$lang['admin_acl'] = '管理存取控制表 (ACL)';
$lang['acl_group'] = '群組';
$lang['acl_user'] = '使用者';
$lang['acl_perms'] = '設定權限於';
$lang['page'] = '頁面';
-$lang['namespace'] = '分類空間';
+$lang['namespace'] = '分類名稱';
$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> 的成員目前在分類空間 <b class=\"aclns\">%s</b> 擁有以下權限:<i>%s</i>。';
+$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> 的成員目前在分類名稱 <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'] = '注意:這些權限並未明確指定,而是從群組或上層的分類空間繼承而來。';
-$lang['p_isadmin'] = '注意:選取的群組或使用者擁有完整權限,因為它被設定為超級使用者。';
-$lang['p_include'] = '較高的權限亦包含了較低的權限。新增、上傳與刪除權限只能設定在分類空間,不能設定在頁面。';
+$lang['p_choose_ns'] = '請在上方表格<b>輸入使用者或群組</b>以檢視或編輯分類名稱 <b class=\"aclns\">%s</b> 的權限設定。';
+$lang['p_inherited'] = '注意:這些權限並未明確指定,它們是從群組或上層的分類名稱繼承而來。';
+$lang['p_isadmin'] = '注意:選取的群組或使用者擁有完整權限,因為他或他們已成為超級使用者。';
+$lang['p_include'] = '較高的權限亦包含了較低的權限。新增、上傳與刪除權限只能套用至分類名稱,不能套用至頁面。';
$lang['current'] = '目前的存取控制規則';
-$lang['where'] = '頁面/分類空間';
+$lang['where'] = '頁面/分類名稱';
$lang['who'] = '使用者/群組';
$lang['perm'] = '權限';
$lang['acl_perm0'] = '無';
diff --git a/lib/plugins/config/lang/ca/lang.php b/lib/plugins/config/lang/ca/lang.php
index 84680450a..205d7aa6b 100644
--- a/lib/plugins/config/lang/ca/lang.php
+++ b/lib/plugins/config/lang/ca/lang.php
@@ -6,6 +6,7 @@
* @author carles.bellver@gmail.com
* @author carles.bellver@cent.uji.es
* @author Carles Bellver <carles.bellver@cent.uji.es>
+ * @author daniel@6temes.cat
*/
$lang['menu'] = 'Paràmetres de configuració';
$lang['error'] = 'Els paràmetres no s\'han pogut actualitzar per causa d\'un valor incorrecte Reviseu els canvis i torneu a enviar-los.<br />Els valors incorrectes es ressaltaran amb un marc vermell.';
@@ -28,6 +29,8 @@ $lang['_anti_spam'] = 'Paràmetres anti-brossa';
$lang['_editing'] = 'Paràmetres d\'edició';
$lang['_links'] = 'Paràmetres d\'enllaços';
$lang['_media'] = 'Paràmetres de mitjans';
+$lang['_notifications'] = 'Paràmetres de notificació';
+$lang['_syndication'] = 'Paràmetres de sindicació';
$lang['_advanced'] = 'Paràmetres avançats';
$lang['_network'] = 'Paràmetres de xarxa';
$lang['_plugin_sufix'] = 'Paràmetres de connectors';
@@ -35,25 +38,29 @@ $lang['_template_sufix'] = 'Paràmetres de plantilla';
$lang['_msg_setting_undefined'] = 'Falten metadades de paràmetre.';
$lang['_msg_setting_no_class'] = 'Falta classe de paràmetre.';
$lang['_msg_setting_no_default'] = 'No hi ha valor per defecte.';
-$lang['fmode'] = 'Mode de creació de fitxers';
-$lang['dmode'] = 'Mode de creació de directoris';
-$lang['lang'] = 'Idioma';
-$lang['basedir'] = 'Directori base';
-$lang['baseurl'] = 'URL base';
-$lang['savedir'] = 'Directori per desar les dades';
-$lang['start'] = 'Nom de la pàgina d\'inici';
$lang['title'] = 'Títol del wiki';
+$lang['start'] = 'Nom de la pàgina d\'inici';
+$lang['lang'] = 'Idioma';
$lang['template'] = 'Plantilla';
+$lang['tagline'] = 'Lema (si la plantilla ho suporta)';
+$lang['sidebar'] = 'Nom de la barra lateral (si la plantilla ho suporta). Si ho deixeu buit, la barra lateral es deshabilitarà.';
$lang['license'] = 'Amb quina llicència voleu publicar el contingut?';
-$lang['fullpath'] = 'Mostra el camí complet de les pàgines al peu';
+$lang['savedir'] = 'Directori per desar les dades';
+$lang['basedir'] = 'Directori base';
+$lang['baseurl'] = 'URL base';
+$lang['cookiedir'] = 'Adreça per a les galetes. Si ho deixeu en blanc, es farà servir la URL base.';
+$lang['dmode'] = 'Mode de creació de directoris';
+$lang['fmode'] = 'Mode de creació de fitxers';
+$lang['allowdebug'] = 'Permet depuració <strong>inhabiliteu si no és necessari</strong>';
$lang['recent'] = 'Canvis recents';
+$lang['recent_days'] = 'Quantitat de canvis recents que es mantenen (dies)';
$lang['breadcrumbs'] = 'Nombre d\'engrunes';
$lang['youarehere'] = 'Camí d\'engrunes jeràrquic';
+$lang['fullpath'] = 'Mostra el camí complet de les pàgines al peu';
$lang['typography'] = 'Substitucions tipogràfiques';
-$lang['htmlok'] = 'Permet HTML incrustat';
-$lang['phpok'] = 'Permet PHP incrustat';
$lang['dformat'] = 'Format de data (vg. la funció PHP <a href="http://www.php.net/strftime">strftime</a>)';
$lang['signature'] = 'Signatura';
+$lang['showuseras'] = 'Què cal visualitzar quan es mostra el darrer usuari que ha editat la pàgina';
$lang['toptoclevel'] = 'Nivell superior per a la taula de continguts';
$lang['tocminheads'] = 'Quantitat mínima d\'encapçalaments que determina si es construeix o no la taula de continguts.';
$lang['maxtoclevel'] = 'Nivell màxim per a la taula de continguts';
@@ -61,15 +68,8 @@ $lang['maxseclevel'] = 'Nivell màxim d\'edició de seccions';
$lang['camelcase'] = 'Utilitza CamelCase per als enllaços';
$lang['deaccent'] = 'Noms de pàgina nets';
$lang['useheading'] = 'Utilitza el primer encapçalament per als noms de pàgina';
-$lang['refcheck'] = 'Comprova la referència en els fitxers de mitjans';
-$lang['refshow'] = 'Nombre de referències de mitjans per mostrar';
-$lang['allowdebug'] = 'Permet depuració <strong>inhabiliteu si no és necessari</strong>';
-$lang['usewordblock'] = 'Bloca brossa per llista de paraules';
-$lang['indexdelay'] = 'Retard abans d\'indexar (segons)';
-$lang['relnofollow'] = 'Utilitza rel="nofollow" en enllaços externs';
-$lang['mailguard'] = 'Ofusca les adreces de correu';
-$lang['iexssprotect'] = 'Comprova codi HTML o Javascript maligne en els fitxers penjats';
-$lang['showuseras'] = 'Què cal visualitzar quan es mostra el darrer usuari que ha editat la pàgina';
+$lang['sneaky_index'] = 'Per defecte, DokuWiki mostrarà tots els espai en la visualització d\'índex. Si activeu aquest paràmetre, s\'ocultaran aquells espais en els quals l\'usuari no té accés de lectura. Això pot fer que s\'ocultin subespais que sí que són accessibles. En algunes configuracions ACL pot fer que l\'índex resulti inutilitzable.';
+$lang['hidepages'] = 'Oculta pàgines coincidents (expressions regulars)';
$lang['useacl'] = 'Utilitza llistes de control d\'accés';
$lang['autopasswd'] = 'Generació automàtica de contrasenyes';
$lang['authtype'] = 'Rerefons d\'autenticació';
@@ -78,54 +78,60 @@ $lang['defaultgroup'] = 'Grup per defecte';
$lang['superuser'] = 'Superusuari: un grup o usuari amb accés complet a totes les pàgines i funcions independentment dels paràmetres ACL';
$lang['manager'] = 'Administrador: un grup o usuari amb accés a certes funcions d\'administració';
$lang['profileconfirm'] = 'Confirma amb contrasenya els canvis en el perfil';
+$lang['rememberme'] = 'Permet galetes de sessió permanents ("recorda\'m")';
$lang['disableactions'] = 'Inhabilita accions DokuWiki';
$lang['disableactions_check'] = 'Revisa';
$lang['disableactions_subscription'] = 'Subscripció/cancel·lació';
$lang['disableactions_wikicode'] = 'Mostra/exporta font';
$lang['disableactions_other'] = 'Altres accions (separades per comes)';
-$lang['sneaky_index'] = 'Per defecte, DokuWiki mostrarà tots els espai en la visualització d\'índex. Si activeu aquest paràmetre, s\'ocultaran aquells espais en els quals l\'usuari no té accés de lectura. Això pot fer que s\'ocultin subespais que sí que són accessibles. En algunes configuracions ACL pot fer que l\'índex resulti inutilitzable.';
$lang['auth_security_timeout'] = 'Temps d\'espera de seguretat en l\'autenticació (segons)';
$lang['securecookie'] = 'Les galetes que s\'han creat via HTTPS, només s\'han d\'enviar des del navegador per HTTPS? Inhabiliteu aquesta opció si només l\'inici de sessió del wiki es fa amb SSL i la navegació del wiki es fa sense seguretat.';
+$lang['usewordblock'] = 'Bloca brossa per llista de paraules';
+$lang['relnofollow'] = 'Utilitza rel="nofollow" en enllaços externs';
+$lang['indexdelay'] = 'Retard abans d\'indexar (segons)';
+$lang['mailguard'] = 'Ofusca les adreces de correu';
+$lang['iexssprotect'] = 'Comprova codi HTML o Javascript maligne en els fitxers penjats';
+$lang['usedraft'] = 'Desa automàticament un esborrany mentre s\'edita';
+$lang['htmlok'] = 'Permet HTML incrustat';
+$lang['phpok'] = 'Permet PHP incrustat';
+$lang['locktime'] = 'Durada màxima dels fitxers de bloqueig (segons)';
+$lang['cachetime'] = 'Durada màxima de la memòria cau (segons)';
+$lang['target____wiki'] = 'Finestra de destinació en enllaços interns';
+$lang['target____interwiki'] = 'Finestra de destinació en enllaços interwiki';
+$lang['target____extern'] = 'Finestra de destinació en enllaços externs';
+$lang['target____media'] = 'Finestra de destinació en enllaços de mitjans';
+$lang['target____windows'] = 'Finestra de destinació en enllaços de Windows';
+$lang['refcheck'] = 'Comprova la referència en els fitxers de mitjans';
+$lang['refshow'] = 'Nombre de referències de mitjans per mostrar';
+$lang['gdlib'] = 'Versió GD Lib';
+$lang['im_convert'] = 'Camí de la utilitat convert d\'ImageMagick';
+$lang['jpg_quality'] = 'Qualitat de compressió JPEG (0-100)';
+$lang['fetchsize'] = 'Mida màxima (bytes) que fetch.php pot baixar d\'un lloc extern';
+$lang['subscribers'] = 'Habilita la subscripció a pàgines';
+$lang['notify'] = 'Envia notificacions de canvis a aquesta adreça de correu';
+$lang['registernotify'] = 'Envia informació sobre nous usuaris registrats a aquesta adreça de correu';
+$lang['mailfrom'] = 'Adreça de correu remitent per a missatges automàtics';
+$lang['sitemap'] = 'Genera mapa del lloc en format Google (dies)';
+$lang['rss_type'] = 'Tipus de canal XML';
+$lang['rss_linkto'] = 'Destinació dels enllaços en el canal XML';
+$lang['rss_content'] = 'Què es mostrarà en els elements del canal XML?';
+$lang['rss_update'] = 'Interval d\'actualització del canal XML (segons)';
+$lang['rss_show_summary'] = 'Mostra resum en els títols del canal XML';
$lang['updatecheck'] = 'Comprova actualitzacions i avisos de seguretat. DokuWiki necessitarà contactar amb update.dokuwiki.org per utilitzar aquesta característica.';
$lang['userewrite'] = 'Utilitza URL nets';
$lang['useslash'] = 'Utilitza la barra / com a separador d\'espais en els URL';
-$lang['usedraft'] = 'Desa automàticament un esborrany mentre s\'edita';
$lang['sepchar'] = 'Separador de paraules en els noms de pàgina';
$lang['canonical'] = 'Utilitza URL canònics complets';
$lang['autoplural'] = 'Comprova formes plurals en els enllaços';
$lang['compression'] = 'Mètode de compressió per als fitxers de les golfes';
-$lang['cachetime'] = 'Durada màxima de la memòria cau (segons)';
-$lang['locktime'] = 'Durada màxima dels fitxers de bloqueig (segons)';
-$lang['fetchsize'] = 'Mida màxima (bytes) que fetch.php pot baixar d\'un lloc extern';
-$lang['notify'] = 'Envia notificacions de canvis a aquesta adreça de correu';
-$lang['registernotify'] = 'Envia informació sobre nous usuaris registrats a aquesta adreça de correu';
-$lang['mailfrom'] = 'Adreça de correu remitent per a missatges automàtics';
$lang['gzip_output'] = 'Codifica contingut xhtml com a gzip';
-$lang['gdlib'] = 'Versió GD Lib';
-$lang['im_convert'] = 'Camí de la utilitat convert d\'ImageMagick';
-$lang['jpg_quality'] = 'Qualitat de compressió JPEG (0-100)';
-$lang['subscribers'] = 'Habilita la subscripció a pàgines';
$lang['compress'] = 'Sortida CSS i Javascript compacta';
-$lang['hidepages'] = 'Oculta pàgines coincidents (expressions regulars)';
$lang['send404'] = 'Envia "HTTP 404/Page Not Found" per a les pàgines inexistents';
-$lang['sitemap'] = 'Genera mapa del lloc en format Google (dies)';
$lang['broken_iua'] = 'No funciona en el vostre sistema la funció ignore_user_abort? Això podria malmetre l\'índex de cerques. Amb IIS+PHP/CGI se sap que no funciona. Vg. <a href="http://bugs.splitbrain.org/?do=details&amp;task_id=852">Bug 852</a> per a més informació.';
$lang['xsendfile'] = 'Utilitza la capçalera X-Sendfile perquè el servidor web distribueixi fitxers estàtics. No funciona amb tots els servidors web.';
$lang['renderer_xhtml'] = 'Renderitzador que cal utilitzar per a la sortida principal (xhtml) del wiki';
$lang['renderer__core'] = '%s (ànima del dokuwiki)';
$lang['renderer__plugin'] = '%s (connector)';
-$lang['rememberme'] = 'Permet galetes de sessió permanents ("recorda\'m")';
-$lang['rss_type'] = 'Tipus de canal XML';
-$lang['rss_linkto'] = 'Destinació dels enllaços en el canal XML';
-$lang['rss_content'] = 'Què es mostrarà en els elements del canal XML?';
-$lang['rss_update'] = 'Interval d\'actualització del canal XML (segons)';
-$lang['recent_days'] = 'Quantitat de canvis recents que es mantenen (dies)';
-$lang['rss_show_summary'] = 'Mostra resum en els títols del canal XML';
-$lang['target____wiki'] = 'Finestra de destinació en enllaços interns';
-$lang['target____interwiki'] = 'Finestra de destinació en enllaços interwiki';
-$lang['target____extern'] = 'Finestra de destinació en enllaços externs';
-$lang['target____media'] = 'Finestra de destinació en enllaços de mitjans';
-$lang['target____windows'] = 'Finestra de destinació en enllaços de Windows';
$lang['proxy____host'] = 'Nom del servidor intermediari';
$lang['proxy____port'] = 'Port del servidor intermediari';
$lang['proxy____user'] = 'Nom d\'usuari del servidor intermediari';
diff --git a/lib/plugins/config/lang/tr/lang.php b/lib/plugins/config/lang/tr/lang.php
index 6d7d7cc2e..5bc4f3fc1 100644
--- a/lib/plugins/config/lang/tr/lang.php
+++ b/lib/plugins/config/lang/tr/lang.php
@@ -6,6 +6,7 @@
* @author Cihan Kahveci <kahvecicihan@gmail.com>
* @author Yavuz Selim <yavuzselim@gmail.com>
* @author Caleb Maclennan <caleb@alerque.com>
+ * @author farukerdemoncel@gmail.com
*/
$lang['menu'] = 'Site Ayarları';
$lang['error'] = 'Ayarlar yanlış bir değer girildiği için güncellenemedi. Lütfen değişikliklerinizi gözden geçirin ve tekrar gönderin.
@@ -36,25 +37,25 @@ $lang['_template_sufix'] = 'Şablon (Template) Ayarları';
$lang['_msg_setting_undefined'] = 'Ayar üstverisi yok.';
$lang['_msg_setting_no_class'] = 'Ayar sınıfı yok.';
$lang['_msg_setting_no_default'] = 'Varsayılan değer yok.';
-$lang['fmode'] = 'Dosya oluşturma yetkisi';
-$lang['dmode'] = 'Klasör oluşturma yetkisi';
-$lang['lang'] = 'Dil';
-$lang['basedir'] = 'Kök dizin';
-$lang['baseurl'] = 'Kök URL';
-$lang['savedir'] = 'Verileri kaydetmek için kullanılacak klasör';
-$lang['start'] = 'Ana sayfa adı';
$lang['title'] = 'Wiki başlığı';
+$lang['start'] = 'Ana sayfa adı';
+$lang['lang'] = 'Dil';
$lang['template'] = 'Şablon (Template)';
$lang['license'] = 'İçeriğinizi hangi lisans altında yayınlansın?';
-$lang['fullpath'] = 'sayfaların tüm patikasını (full path) göster';
+$lang['savedir'] = 'Verileri kaydetmek için kullanılacak klasör';
+$lang['basedir'] = 'Kök dizin';
+$lang['baseurl'] = 'Kök URL';
+$lang['dmode'] = 'Klasör oluşturma yetkisi';
+$lang['fmode'] = 'Dosya oluşturma yetkisi';
+$lang['allowdebug'] = 'Yanlış ayıklamasına izin ver <b>lazım değilse etkisiz kıl!</b>';
$lang['recent'] = 'En son değiştirilenler';
$lang['breadcrumbs'] = 'Ekmek kırıntıların sayısı';
$lang['youarehere'] = 'hiyerarşik ekmek kırıntıları';
+$lang['fullpath'] = 'sayfaların tüm patikasını (full path) göster';
$lang['typography'] = 'Tipografik değiştirmeleri yap';
-$lang['htmlok'] = 'Gömülü HTML koduna izin ver';
-$lang['phpok'] = 'Gömülü PHP koduna izin ver';
$lang['dformat'] = 'Tarih biçimi (PHP\'nin <a href="http://www.php.net/strftime">strftime</a> fonksiyonuna bakın)';
$lang['signature'] = 'İmza';
+$lang['showuseras'] = 'Bir sayfayı en son düzenleyen kullanıcıya ne gösterilsin';
$lang['toptoclevel'] = 'İçindekiler için en üst seviye';
$lang['tocminheads'] = 'İçindekilerin oluşturulması için gereken (en az) başlık sayısı';
$lang['maxtoclevel'] = 'İçindekiler için en fazla seviye';
@@ -62,15 +63,6 @@ $lang['maxseclevel'] = 'Bölümün azami düzenleme düzeyi';
$lang['camelcase'] = 'Linkler için CamelCase kullan';
$lang['deaccent'] = 'Sayfa adlarınız temizle';
$lang['useheading'] = 'Sayfa isimleri için ilk başlığı kullan';
-$lang['refcheck'] = 'Araç kaynak denetimi';
-$lang['refshow'] = 'Gösterilecek araç kaynağı sayısı';
-$lang['allowdebug'] = 'Yanlış ayıklamasına izin ver <b>lazım değilse etkisiz kıl!</b>';
-$lang['usewordblock'] = 'Wordlistesine göre spam engelle';
-$lang['indexdelay'] = 'Indekslemeden evvel zaman gecikmesi (saniye)';
-$lang['relnofollow'] = 'Dışsal linkler rel="nofollow" kullan';
-$lang['mailguard'] = 'Email adreslerini karart';
-$lang['iexssprotect'] = 'Yüklenmiş dosyaları muhtemel kötu niyetli JavaScript veya HTML koduna kontrol et';
-$lang['showuseras'] = 'Bir sayfayı en son düzenleyen kullanıcıya ne gösterilsin';
$lang['useacl'] = 'Erişim kontrol listesini kullan';
$lang['autopasswd'] = 'Parolaları otamatikmen üret';
$lang['authtype'] = 'Kimlik denetleme arka uç';
@@ -79,16 +71,25 @@ $lang['defaultgroup'] = 'Varsayılan grup';
$lang['disableactions'] = 'DokuWiki eylemlerini etkisiz kıl';
$lang['disableactions_check'] = 'Kontrol et';
$lang['disableactions_subscription'] = 'Abone ol/Abonelikten vazgeç';
-$lang['canonical'] = 'Tamolarak kurallara uygun URL\'leri kullan';
-$lang['mailfrom'] = 'Otomatik e-postalar için kullanılacak e-posta adresi';
+$lang['usewordblock'] = 'Wordlistesine göre spam engelle';
+$lang['relnofollow'] = 'Dışsal linkler rel="nofollow" kullan';
+$lang['indexdelay'] = 'Indekslemeden evvel zaman gecikmesi (saniye)';
+$lang['mailguard'] = 'Email adreslerini karart';
+$lang['iexssprotect'] = 'Yüklenmiş dosyaları muhtemel kötu niyetli JavaScript veya HTML koduna kontrol et';
+$lang['htmlok'] = 'Gömülü HTML koduna izin ver';
+$lang['phpok'] = 'Gömülü PHP koduna izin ver';
+$lang['refcheck'] = 'Araç kaynak denetimi';
+$lang['refshow'] = 'Gösterilecek araç kaynağı sayısı';
$lang['gdlib'] = 'GD Lib sürümü';
$lang['jpg_quality'] = 'JPG sıkıştırma kalitesi [0-100]';
+$lang['mailfrom'] = 'Otomatik e-postalar için kullanılacak e-posta adresi';
$lang['sitemap'] = 'Google site haritası oluştur (gün)';
-$lang['renderer__core'] = '%s (dokuwiki çekirdeği)';
-$lang['renderer__plugin'] = '%s (eklenti)';
$lang['rss_content'] = 'XML beslemesinde ne gösterilsin?';
$lang['rss_update'] = 'XML beslemesini güncelleme aralığı';
$lang['rss_show_summary'] = 'XML beslemesinde özeti başlıkta göster';
+$lang['canonical'] = 'Tamolarak kurallara uygun URL\'leri kullan';
+$lang['renderer__core'] = '%s (dokuwiki çekirdeği)';
+$lang['renderer__plugin'] = '%s (eklenti)';
$lang['proxy____host'] = 'Proxy sunucu adı';
$lang['proxy____user'] = 'Proxy kullanıcı adı';
$lang['proxy____pass'] = 'Proxy şifresi';
diff --git a/lib/plugins/config/lang/zh-tw/intro.txt b/lib/plugins/config/lang/zh-tw/intro.txt
index 4cacfc43f..228c12e0a 100644
--- a/lib/plugins/config/lang/zh-tw/intro.txt
+++ b/lib/plugins/config/lang/zh-tw/intro.txt
@@ -1,7 +1,7 @@
====== 設定管理器 ======
-使用本頁控制您的 Dokuwiki 設定。每個獨立設定的相關訊息可參閱 [[doku>config]]。設定管理器的更多訊息請參閱 [[doku>plugin:config]]。
+使用本頁控制您的 Dokuwiki 設定。您可以參閱 [[doku>config]],查看每個獨立設定的相關訊息。要知道更多設定管理器的資訊,請瀏覽 [[doku>plugin:config]]。
-淡紅色背景的項目是被保護的,不能通過這個管理器更改。藍色背景的項目是系統的預設值,白色背景的項目是您更改過的。藍色和白色的設定項目都可以更改。
+淡紅色背景的項目是受到保護的,不能通過這管理器更改。藍色背景的項目是系統的預設值,白色背景的項目是您更改過的。藍色和白色的設定項目都可以更改。
-離開本頁之前不要忘記點擊最下面的 **儲存** 按鈕,否則您的修改將不會生效。 \ No newline at end of file
+離開本頁之前,不要忘記點擊最下面的 **儲存** 按鈕,否則您的修改不會生效。 \ No newline at end of file
diff --git a/lib/plugins/config/lang/zh-tw/lang.php b/lib/plugins/config/lang/zh-tw/lang.php
index 204b2b229..8f5b16220 100644
--- a/lib/plugins/config/lang/zh-tw/lang.php
+++ b/lib/plugins/config/lang/zh-tw/lang.php
@@ -10,19 +10,20 @@
* @author Danny Lin
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
+ * @author Ichirou Uchiki <syaoranhinata@gmail.com>
*/
$lang['menu'] = '系統設定';
-$lang['error'] = '設定因為不合法的值而未更新,請檢查您的更改並重新送出。
-<br />不正確的值會被紅色方框包住。';
-$lang['updated'] = '成功地更新設定。';
+$lang['error'] = '因為含有不合規格的設定值,故未能更新設定。請檢查您的更改並重新送出。
+<br />不正確的設定值,會以紅色方框包住。';
+$lang['updated'] = '設定已更新。';
$lang['nochoice'] = '(無其他可用選項)';
$lang['locked'] = '設定檔無法更新,若非故意,請確認本地檔名及權限正確。';
-$lang['danger'] = '危險:改變此選項可能使您無法存取維基及設定選單。';
+$lang['danger'] = '危險:改變此選項,可能使您無法存取本 wiki 及設定選單。';
$lang['warning'] = '警告:改變此選項可能導致不可預期的行為。';
$lang['security'] = '安全性警告:改變此選項可能造成安全風險。';
$lang['_configuration_manager'] = '設定管理器';
$lang['_header_dokuwiki'] = 'DokuWiki 設定';
-$lang['_header_plugin'] = '插件設定';
+$lang['_header_plugin'] = '附加元件設定';
$lang['_header_template'] = '樣板設定';
$lang['_header_undefined'] = '未定義設定';
$lang['_basic'] = '基本設定';
@@ -32,17 +33,21 @@ $lang['_anti_spam'] = '反垃圾設定';
$lang['_editing'] = '編輯設定';
$lang['_links'] = '連結設定';
$lang['_media'] = '媒體設定';
+$lang['_notifications'] = '提醒設定';
+$lang['_syndication'] = '聚合設定';
$lang['_advanced'] = '進階設定';
$lang['_network'] = '網路設定';
-$lang['_plugin_sufix'] = '插件設定';
+$lang['_plugin_sufix'] = '附加元件設定';
$lang['_template_sufix'] = '樣板設定';
$lang['_msg_setting_undefined'] = '設定的後設數據不存在。';
$lang['_msg_setting_no_class'] = '設定的分類不存在。';
$lang['_msg_setting_no_default'] = '無預設值';
-$lang['title'] = '維基標題';
+$lang['title'] = '本 wiki 的標題';
$lang['start'] = '開始頁面的名稱';
$lang['lang'] = '語系';
$lang['template'] = '樣板';
+$lang['tagline'] = '副標題 (若模板支援此功能)';
+$lang['sidebar'] = '側欄的頁面名稱 (若模板支援此功能) 。若把它留空,則會停用側欄';
$lang['license'] = '您希望您的內容為何種授權方式?';
$lang['savedir'] = '儲存資料的目錄';
$lang['basedir'] = '根目錄';
@@ -67,15 +72,15 @@ $lang['maxseclevel'] = '可編輯段落的最大層級';
$lang['camelcase'] = '對連結使用 CamelCase';
$lang['deaccent'] = '清理頁面名稱';
$lang['useheading'] = '使用第一個標題作為頁面名稱';
-$lang['sneaky_index'] = '預設情況下,DokuWiki 會在索引頁會顯示所有分類空間。啟用此選項會隱藏用戶沒有閱讀權限的頁面,但也可能將能閱讀的子頁面一併隱藏。在特定 ACL 設定下,這可能導致索引無法使用。';
+$lang['sneaky_index'] = '預設情況下,DokuWiki 會在索引頁會顯示所有分類名稱。啟用此選項,會隱藏使用者沒有閱讀權限的頁面,但也可能將他可以閱讀的子頁面一併隱藏。在特定 ACL 設定下,這可能導致索引無法使用。';
$lang['hidepages'] = '隱藏匹配的界面 (正規式)';
$lang['useacl'] = '使用存取控制名單';
$lang['autopasswd'] = '自動產生密碼';
$lang['authtype'] = '認證後台管理方式';
$lang['passcrypt'] = '密碼加密方式';
$lang['defaultgroup'] = '預設群組';
-$lang['superuser'] = '超級用戶 - 不論 ACL 如何設定,都能訪問所有頁面與功能的用戶組/用戶';
-$lang['manager'] = '管理員 - 能訪問相應管理功能的用戶组/用戶';
+$lang['superuser'] = '超級使用者 —— 不論 ACL 如何設定,都能訪問所有頁面與功能的群組或使用者';
+$lang['manager'] = '管理員 —— 能訪問相應管理功能的群組或使用者';
$lang['profileconfirm'] = '修改個人資料時需要確認密碼';
$lang['rememberme'] = '允許自動登入 (記住我)';
$lang['disableactions'] = '停用的 DokuWiki 動作';
@@ -84,11 +89,13 @@ $lang['disableactions_subscription'] = '訂閱/取消訂閱';
$lang['disableactions_wikicode'] = '檢視原始碼/匯出原始檔';
$lang['disableactions_other'] = '其他功能 (逗號分隔)';
$lang['auth_security_timeout'] = '安全認證的計時 (秒)';
-$lang['securecookie'] = 'HTTPS 頁面設定的 cookie 是否只能由瀏覽器經 HTTPS 傳送?取消此選項後,只有登入維基會被 SSL 保護而瀏覽時不會。';
+$lang['securecookie'] = 'HTTPS 頁面設定的 cookie 是否只能由瀏覽器經 HTTPS 傳送?取消此選項後,只有登入本 wiki 才會受 SSL 保護,瀏覽時則不受保護。';
+$lang['remote'] = '啟用遠程 API 系统。這允許其他程式經 XML-RPC 或其他機制來訪問本 wiki 。';
+$lang['remoteuser'] = '將遠程 API 的訪問權限,限制在指定的群組或使用者中。以逗號分隔群組或使用者。留空表示允許任何人訪問。';
$lang['usewordblock'] = '根據字詞表阻擋垃圾訊息';
$lang['relnofollow'] = '外部連結使用 rel="nofollow"';
$lang['indexdelay'] = '建立索引前的延遲時間 (秒)';
-$lang['mailguard'] = '混淆 E-mail 位址';
+$lang['mailguard'] = '自動弄亂使用者的電郵地址,以作保護';
$lang['iexssprotect'] = '檢查上傳的檔案中是否隱含惡意的 JavaScript 或 HTML 碼';
$lang['usedraft'] = '編輯時自動儲存草稿';
$lang['htmlok'] = '允許嵌入式 HTML';
@@ -96,10 +103,11 @@ $lang['phpok'] = '允許嵌入式 PHP';
$lang['locktime'] = '檔案的最大鎖定時間 (秒)';
$lang['cachetime'] = '緩存的最大存在時間 (秒)';
$lang['target____wiki'] = '內部連結的目標視窗';
-$lang['target____interwiki'] = '跨維基連結的目標視窗';
+$lang['target____interwiki'] = 'Wiki間互連的目標視窗';
$lang['target____extern'] = '外部連結的目標視窗';
$lang['target____media'] = '媒體連結的目標視窗';
$lang['target____windows'] = 'Windows 連結的目標視窗';
+$lang['mediarevisions'] = '啟用媒體修訂歷史嗎?';
$lang['refcheck'] = '媒體連結檢查';
$lang['refshow'] = '媒體連結的顯示數量';
$lang['gdlib'] = 'GD Lib 版本';
@@ -108,11 +116,12 @@ $lang['jpg_quality'] = 'JPG 壓縮品質(0-100)';
$lang['fetchsize'] = 'fetch.php 可以從外部下載的最大檔案尺寸 (bytes)';
$lang['subscribers'] = '啟用頁面訂閱';
$lang['subscribe_time'] = '訂閱列表和摘要發送的時間間隔 (秒);這個值應該小於指定的最近更改保留時間 (recent_days)。';
-$lang['notify'] = '寄送變更通知信到這個 E-mail 位址';
-$lang['registernotify'] = '寄送新使用者註冊資訊到這個 E-mail 位址';
+$lang['notify'] = '寄送變更通知信到這個電郵地址';
+$lang['registernotify'] = '寄送新使用者註冊資訊到這個電郵地址';
$lang['mailfrom'] = '自動發送郵件時使用的郵件地址';
$lang['mailprefix'] = '自動發送郵件時使用的標題前綴';
-$lang['sitemap'] = '產生 Google 站台地圖 (天)';
+$lang['htmlmail'] = '發送更加美觀,但體積會更大的 HTML 多部份電郵。若停用它,表示只發送純文字電郵。';
+$lang['sitemap'] = '產生 Google 站台地圖 (以多少天計算) 。輸入0表示停用';
$lang['rss_type'] = 'XML feed 類型';
$lang['rss_linkto'] = 'XML feed 連結到';
$lang['rss_content'] = 'XML feed 項目中顯示什麼呢?';
@@ -121,7 +130,7 @@ $lang['rss_show_summary'] = '於標題中顯示簡要的 XML feed';
$lang['rss_media'] = '在 XML feed 中應列出哪些變更?';
$lang['updatecheck'] = '檢查更新與安全性警告?DokuWiki 需要聯繫 update.dokuwiki.org 才能使用此功能。';
$lang['userewrite'] = '使用好看的 URL';
-$lang['useslash'] = '在 URL 中使用斜線作為分類空間的分隔字元';
+$lang['useslash'] = '在 URL 中使用斜線作為分類名稱的分隔字元';
$lang['sepchar'] = '頁面名稱中單字的分隔字元';
$lang['canonical'] = '使用最典型的 URL';
$lang['fnencode'] = '非 ASCII 文件名稱的編輯方法。';
@@ -129,13 +138,14 @@ $lang['autoplural'] = '檢查複數形式的連結 (英文)';
$lang['compression'] = 'attic 文件的壓縮方式';
$lang['gzip_output'] = '對 xhtml 使用 gzip 內容編碼';
$lang['compress'] = '壓縮 CSS 與 JavaScript 的輸出';
-$lang['cssdatauri'] = 'CSS 中所引用的圖片假如小於該數字大小(bytes),將會被直接嵌入 CSS 中來減少 HTTP Request 的發送。此功能在 IE 7 及之下版本不支援。推薦使用 <code>400</code> 到 <code>600</code> 之間。設定為<code>0</code> 則停用。';
+$lang['cssdatauri'] = '假如 CSS 中所引用的圖片小於該數字大小(bytes),圖片將被直接嵌入 CSS 中,以減少 HTTP Request 的發送。 IE 7 及以下的版本並不支援此功能。推薦把此數值設定成 <code>400</code> 至 <code>600</code> bytes 之間。若輸入 <code>0</code> 則停用此功能。';
$lang['send404'] = '存取不存在的頁面時送出 "HTTP 404/Page Not Found"';
$lang['broken_iua'] = 'ignore_user_abort 功能失效了?這有可能導致搜索索引不可用。IIS+PHP/CGI 已損壞。請參閱 <a href=\"http://bugs.splitbrain.org/?do=details&task_id=852\">Bug 852</a> 獲取更多信息。';
$lang['xsendfile'] = '使用 X-Sendfile 頭讓服務器發送狀態文件?您的服務器需要支持該功能。';
-$lang['renderer_xhtml'] = '主要維基輸出 (xhtml) 的的渲染器';
+$lang['renderer_xhtml'] = '主要wiki輸出 (xhtml) 的渲染器';
$lang['renderer__core'] = '%s (dokuwiki 核心)';
-$lang['renderer__plugin'] = '%s (插件)';
+$lang['renderer__plugin'] = '%s (附加元件)';
+$lang['dnslookups'] = 'Dokuwiki 將查詢使用者編輯頁面的遠程 IP 位址主機名稱。若您的 DNS 服務器速度較慢、失效,或者您不想要此功能,请停用此選項';
$lang['proxy____host'] = 'Proxy 伺服器名稱';
$lang['proxy____port'] = 'Proxy 連接埠';
$lang['proxy____user'] = 'Proxy 使用者名稱';
@@ -183,10 +193,10 @@ $lang['xsendfile_o_2'] = '標準 X-Sendfile 標頭';
$lang['xsendfile_o_3'] = '專有 Nginx X-Accel-Redirect 標頭';
$lang['showuseras_o_loginname'] = '登入名稱';
$lang['showuseras_o_username'] = '完整姓名';
-$lang['showuseras_o_email'] = '使用者的 email 位址 (根據郵件監控設定混淆化)';
-$lang['showuseras_o_email_link'] = '使用者的 email 位址標示成 mailto: link';
+$lang['showuseras_o_email'] = '使用者的電郵地址 (根據郵件監控設定混淆化)';
+$lang['showuseras_o_email_link'] = '使用者的電郵地址標示成 mailto: 連結';
$lang['useheading_o_0'] = '永不';
$lang['useheading_o_navigation'] = '僅導覽';
-$lang['useheading_o_content'] = '僅維基內容';
+$lang['useheading_o_content'] = '僅本 wiki 內容';
$lang['useheading_o_1'] = '總是';
$lang['readdircache'] = 'readdir 緩存的最大存在時間 (秒)';
diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php
index 3607f56c6..89824381b 100644
--- a/lib/plugins/config/settings/config.metadata.php
+++ b/lib/plugins/config/settings/config.metadata.php
@@ -126,7 +126,7 @@ $meta['_authentication'] = array('fieldset');
$meta['useacl'] = array('onoff');
$meta['autopasswd'] = array('onoff');
$meta['authtype'] = array('authtype');
-$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','lsmd5','crypt','mysql','my411','kmd5','pmd5','hmd5','bcrypt'));
+$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','lsmd5','crypt','mysql','my411','kmd5','pmd5','hmd5','mediawiki','bcrypt','sha512'));
$meta['defaultgroup']= array('string');
$meta['superuser'] = array('string');
$meta['manager'] = array('string');
diff --git a/lib/plugins/plugin/lang/ca/lang.php b/lib/plugins/plugin/lang/ca/lang.php
index 0e3ef05df..5c7933666 100644
--- a/lib/plugins/plugin/lang/ca/lang.php
+++ b/lib/plugins/plugin/lang/ca/lang.php
@@ -6,6 +6,7 @@
* @author carles.bellver@gmail.com
* @author carles.bellver@cent.uji.es
* @author Carles Bellver <carles.bellver@cent.uji.es>
+ * @author daniel@6temes.cat
*/
$lang['menu'] = 'Gestió de connectors';
$lang['download'] = 'Baixa i instal·la un nou connector';
@@ -51,3 +52,4 @@ $lang['enabled'] = 'S\'ha habilitat el connector %s.';
$lang['notenabled'] = 'No s\'ha pogut habilitar el connector %s. Comproveu els permisos dels fitxers.';
$lang['disabled'] = 'S\'ha inhabilitat el connector %s.';
$lang['notdisabled'] = 'No s\'ha pogut inhabilitar el connector %s. Comproveu els permisos dels fitxers.';
+$lang['packageinstalled'] = 'El paquet del connector (%d plugins(s): %s) s\'ha instal·lat correctament.';
diff --git a/lib/plugins/plugin/lang/tr/lang.php b/lib/plugins/plugin/lang/tr/lang.php
index 9a655e400..9598ade7d 100644
--- a/lib/plugins/plugin/lang/tr/lang.php
+++ b/lib/plugins/plugin/lang/tr/lang.php
@@ -6,6 +6,7 @@
* @author Cihan Kahveci <kahvecicihan@gmail.com>
* @author Yavuz Selim <yavuzselim@gmail.com>
* @author Caleb Maclennan <caleb@alerque.com>
+ * @author farukerdemoncel@gmail.com
*/
$lang['menu'] = 'Eklenti Yönetimi';
$lang['download'] = 'Yeni bir eklenti indirip kur';
diff --git a/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt b/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt
index 84d095f51..54fe7a59e 100644
--- a/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt
+++ b/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt
@@ -1,3 +1,3 @@
-====== 插件管理器 ======
+====== 附加元件管理器 ======
-您可以用本頁管理與 Dokuwiki [[doku>plugins|插件]] 相關的選項。若要正常下載及安裝插件,插件所在的資料夾必須允許網頁伺服器寫入。
+您可以用本頁管理與 Dokuwiki [[doku>plugins|附加元件]] 相關的選項。若要正常下載及安裝附加元件,附加元件所在的資料夾必須允許網頁伺服器寫入。 \ No newline at end of file
diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php
index 8fa3efb0a..7b38a02c8 100644
--- a/lib/plugins/plugin/lang/zh-tw/lang.php
+++ b/lib/plugins/plugin/lang/zh-tw/lang.php
@@ -10,10 +10,11 @@
* @author Danny Lin
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
+ * @author Ichirou Uchiki <syaoranhinata@gmail.com>
*/
-$lang['menu'] = '管理插件 (Plugins)';
-$lang['download'] = '下載與安裝插件';
-$lang['manage'] = '已安裝的插件';
+$lang['menu'] = '管理附加元件';
+$lang['download'] = '下載與安裝附加元件';
+$lang['manage'] = '已安裝的附加元件';
$lang['btn_info'] = '資訊';
$lang['btn_update'] = '更新';
$lang['btn_delete'] = '刪除';
@@ -25,34 +26,34 @@ $lang['installed'] = '安裝:';
$lang['lastupdate'] = '上次更新:';
$lang['source'] = '來源:';
$lang['unknown'] = '未知';
-$lang['updating'] = '更新中 ...';
-$lang['updated'] = '插件 %s 成功地更新';
-$lang['updates'] = '以下的插件已經成功地更新';
-$lang['update_none'] = '找不到更新';
-$lang['deleting'] = '刪除中 ...';
-$lang['deleted'] = '插件 %s 已刪除。';
-$lang['downloading'] = '下載中 ...';
-$lang['downloaded'] = '插件 %s 已成功地安裝';
-$lang['downloads'] = '以下的插件已成功地安裝:';
-$lang['download_none'] = '找不到插件,或在下載與安裝時發生了未知的問題';
-$lang['plugin'] = '插件:';
+$lang['updating'] = '更新中……';
+$lang['updated'] = '已更新附加元件 %s ';
+$lang['updates'] = '已更新下列附加元件';
+$lang['update_none'] = '找不到更新。';
+$lang['deleting'] = '刪除中……';
+$lang['deleted'] = '已刪除附加元件 %s 。';
+$lang['downloading'] = '下載中……';
+$lang['downloaded'] = '已安裝附加元件 %s ';
+$lang['downloads'] = '已安裝下列附加元件:';
+$lang['download_none'] = '找不到附加元件,或者在下載與安裝時發生了未知的問題。';
+$lang['plugin'] = '附加元件:';
$lang['components'] = '元件';
-$lang['noinfo'] = '此插件沒有回傳任何資訊,可能是無效的';
+$lang['noinfo'] = '此附加元件沒有回傳任何資訊,它可能已失效。';
$lang['name'] = '名稱:';
$lang['date'] = '日期:';
$lang['type'] = '類型:';
$lang['desc'] = '描述:';
$lang['author'] = '作者:';
-$lang['www'] = '網頁:';
-$lang['error'] = '一個未知的錯誤發生。';
-$lang['error_download'] = '無法下載插件檔案: %s';
-$lang['error_badurl'] = 'URL 可能有問題 - 從 URL 中無法得知文件名';
+$lang['www'] = '網頁:';
+$lang['error'] = '發生了未知的錯誤。';
+$lang['error_download'] = '無法下載附加元件檔案: %s';
+$lang['error_badurl'] = 'URL 可能有問題 —— 從 URL 中無法得知文件名';
$lang['error_dircreate'] = '無法建立暫存目錄來接收下載的內容';
-$lang['error_decompress'] = '插件管理器無法解壓下載的文件。這可能是由於下載出現錯誤,遇到這種情況,請您再次嘗試;或者是壓縮格式無法識別,遇到這種情況,您需要手動下載並安裝該插件。';
-$lang['error_copy'] = '嘗試安裝插件 <em>%s</em> 的相關文件時發生複製錯誤:可能是磁碟空間不足或檔案存取權限錯誤。這可能是由於未安裝完全的插件使維基系統不穩定導致。';
-$lang['error_delete'] = '嘗試刪除插件 <em>%s</em> 時發生錯誤。最可能原因是檔案或目錄存取權限不足';
-$lang['enabled'] = '插件 %s 已啟用。';
-$lang['notenabled'] = '插件 %s 無法啟用,請檢查檔案權限。';
-$lang['disabled'] = '插件 %s 已停用。';
-$lang['notdisabled'] = '插件 %s 無法停用,請檢查檔案權限。';
-$lang['packageinstalled'] = '插件 (%d 插件%s: %s) 已成功地安裝。';
+$lang['error_decompress'] = '附加元件管理器無法把下載的文件解壓,這可能是由於下載出現錯誤。遇到這種情況,請您再次嘗試。此外,無法識別壓縮格式也可能導致無法解壓。若是如此,您需要手動下載並安裝該附加元件。';
+$lang['error_copy'] = '嘗試安裝附加元件 <em>%s</em> 的相關文件時,發生複製錯誤。這可能是磁碟空間不足,或檔案存取權限錯誤。未安裝好的附加元件,也許會令wiki系統不穩定。';
+$lang['error_delete'] = '嘗試刪除附加元件 <em>%s</em> 時發生錯誤。最有可能原因是檔案或目錄存取權限不足';
+$lang['enabled'] = '附加元件 %s 已啟用。';
+$lang['notenabled'] = '附加元件 %s 無法啟用,請檢查檔案權限。';
+$lang['disabled'] = '附加元件 %s 已停用。';
+$lang['notdisabled'] = '附加元件 %s 無法停用,請檢查檔案權限。';
+$lang['packageinstalled'] = '附加元件 (%d 附加元件%s: %s) 已安裝好。';
diff --git a/lib/plugins/popularity/lang/ca/lang.php b/lib/plugins/popularity/lang/ca/lang.php
index e6fdcd533..b30846118 100644
--- a/lib/plugins/popularity/lang/ca/lang.php
+++ b/lib/plugins/popularity/lang/ca/lang.php
@@ -5,6 +5,7 @@
* @author Carles Bellver <carles.bellver@cent.uji.es>
* @author Carles Bellver <carles.bellver@gmail.com>
* @author carles.bellver@cent.uji.es
+ * @author daniel@6temes.cat
*/
$lang['name'] = 'Retroacció sobre popularitat (pot trigar una mica a carregar)';
$lang['submit'] = 'Envia dades';
diff --git a/lib/plugins/popularity/lang/tr/lang.php b/lib/plugins/popularity/lang/tr/lang.php
index fe87d1548..5339176bc 100644
--- a/lib/plugins/popularity/lang/tr/lang.php
+++ b/lib/plugins/popularity/lang/tr/lang.php
@@ -6,6 +6,8 @@
* @author Cihan Kahveci <kahvecicihan@gmail.com>
* @author Yavuz Selim <yavuzselim@gmail.com>
* @author Caleb Maclennan <caleb@alerque.com>
+ * @author farukerdemoncel@gmail.com
*/
$lang['name'] = 'Popülerlik Geribeslemesi (yüklemesi uzun sürebilir)';
$lang['submit'] = 'Verileri Gönder';
+$lang['lastSent'] = 'Bilgiler gönderildi';
diff --git a/lib/plugins/popularity/lang/zh-tw/intro.txt b/lib/plugins/popularity/lang/zh-tw/intro.txt
index 37c63dced..2a6337237 100644
--- a/lib/plugins/popularity/lang/zh-tw/intro.txt
+++ b/lib/plugins/popularity/lang/zh-tw/intro.txt
@@ -1,10 +1,9 @@
====== 人氣回饋 ======
-本工具會從您的維基站台收集訊息,並以匿名的方式發送給 DokuWiki 的開發者。這有助於他們了解使用者們如何使用 DokuWiki ,並能基於實際統計資料對未來開發做出更準確的決策。
+本工具會從您的 wiki 站台收集訊息,並以匿名的方式發送給 DokuWiki 的開發者。這有助於他們了解使用者們如何使用 DokuWiki ,並能基於實際統計資料對未來開發做出更準確的決策。
-我們鼓勵您經常重複這個步驟,讓開發者了解您的維基站台的成長情形。您的資料集將會被標識為一個匿名的識別碼 (ID)。
+我們鼓勵您經常重複這個步驟,讓開發者了解您的 wiki 站台的成長情形。您的資料集將會被標識為一個匿名的識別碼 (ID) 。
-收集的資料包括 DokuWiki 版本、頁面數量、檔案大小、安裝的插件、伺服器的 PHP 資訊。
-
-將被發送的原始資料顯示如下。請點擊「發送資料」按鈕進行傳輸。
+收集的資料包括 DokuWiki 版本、頁面數量、檔案大小、安裝的附加元件,以及伺服器的 PHP 資訊。
+將送出的原始資料顯示如下。請點擊「發送資料」按鈕進行傳輸。 \ No newline at end of file
diff --git a/lib/plugins/popularity/lang/zh-tw/lang.php b/lib/plugins/popularity/lang/zh-tw/lang.php
index 3d19ce53a..890c23bfa 100644
--- a/lib/plugins/popularity/lang/zh-tw/lang.php
+++ b/lib/plugins/popularity/lang/zh-tw/lang.php
@@ -10,11 +10,12 @@
* @author Danny Lin
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
+ * @author Ichirou Uchiki <syaoranhinata@gmail.com>
*/
-$lang['name'] = '人氣回饋(載入可能需要一些時間)';
+$lang['name'] = '人氣回饋(可能需要一些時間載入)';
$lang['submit'] = '發送資料';
$lang['autosubmit'] = '每月自動發送';
-$lang['submissionFailed'] = '由於以下原因,資料無法發送:';
-$lang['submitDirectly'] = '你可以利用以下的表單來發手動發送資料.';
-$lang['autosubmitError'] = '由於以下原因,上次自動發送失敗:';
+$lang['submissionFailed'] = '由於以下原因,資料無法發送:';
+$lang['submitDirectly'] = '你可以利用以下的表單來發手動發送資料。';
+$lang['autosubmitError'] = '由於以下原因,上次自動發送無法進行:';
$lang['lastSent'] = '資料已發送';
diff --git a/lib/plugins/popularity/lang/zh-tw/submitted.txt b/lib/plugins/popularity/lang/zh-tw/submitted.txt
index 6febcd5b8..430a8a47a 100644
--- a/lib/plugins/popularity/lang/zh-tw/submitted.txt
+++ b/lib/plugins/popularity/lang/zh-tw/submitted.txt
@@ -1,3 +1,3 @@
====== 人氣回饋 ======
-資料已發送成功 \ No newline at end of file
+資料已發送。 \ No newline at end of file
diff --git a/lib/plugins/revert/lang/ca/lang.php b/lib/plugins/revert/lang/ca/lang.php
index b8800911f..4f4d518ea 100644
--- a/lib/plugins/revert/lang/ca/lang.php
+++ b/lib/plugins/revert/lang/ca/lang.php
@@ -6,6 +6,7 @@
* @author carles.bellver@gmail.com
* @author carles.bellver@cent.uji.es
* @author Carles Bellver <carles.bellver@cent.uji.es>
+ * @author daniel@6temes.cat
*/
$lang['menu'] = 'Gestió de reversions';
$lang['filter'] = 'Cerca pàgines brossa';
diff --git a/lib/plugins/revert/lang/tr/lang.php b/lib/plugins/revert/lang/tr/lang.php
index aa1458a95..9030c31e3 100644
--- a/lib/plugins/revert/lang/tr/lang.php
+++ b/lib/plugins/revert/lang/tr/lang.php
@@ -6,6 +6,7 @@
* @author Cihan Kahveci <kahvecicihan@gmail.com>
* @author Yavuz Selim <yavuzselim@gmail.com>
* @author Caleb Maclennan <caleb@alerque.com>
+ * @author farukerdemoncel@gmail.com
*/
$lang['menu'] = 'Eskiye Döndürme';
$lang['filter'] = 'Spam bulunan sayfaları ara';
diff --git a/lib/plugins/revert/lang/zh-tw/intro.txt b/lib/plugins/revert/lang/zh-tw/intro.txt
index 17632b1dd..b6da47e58 100644
--- a/lib/plugins/revert/lang/zh-tw/intro.txt
+++ b/lib/plugins/revert/lang/zh-tw/intro.txt
@@ -1,3 +1,3 @@
====== 還原管理器 ======
-本頁面能幫助您自動還原被垃圾訊息攻擊的頁面過來。先輸入關鍵字詞搜尋包含垃圾訊息的頁面(如垃圾訊息的 URL),確認找到的頁面確實包含垃圾訊息,再將它們還原。
+本頁面能幫助您自動還原遭垃圾訊息攻擊的頁面。先輸入關鍵字詞,搜尋包含垃圾訊息的頁面(例如垃圾訊息的 URL),確認找到的頁面確實包含垃圾訊息,再將它們還原。 \ No newline at end of file
diff --git a/lib/plugins/revert/lang/zh-tw/lang.php b/lib/plugins/revert/lang/zh-tw/lang.php
index 64da648cd..afd858455 100644
--- a/lib/plugins/revert/lang/zh-tw/lang.php
+++ b/lib/plugins/revert/lang/zh-tw/lang.php
@@ -10,6 +10,7 @@
* @author Danny Lin <danny0838@pchome.com.tw>
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
+ * @author Ichirou Uchiki <syaoranhinata@gmail.com>
*/
$lang['menu'] = '還原管理';
$lang['filter'] = '搜索包含垃圾訊息的頁面';
@@ -17,6 +18,6 @@ $lang['revert'] = '還原選取的頁面';
$lang['reverted'] = '%s 已還原為版本 %s';
$lang['removed'] = '%s 已移除';
$lang['revstart'] = '已開始還原操作。有可能需要很長時間。如果程式執行逾時,請嘗試分次還原少量內容。';
-$lang['revstop'] = '還原程序已成功完成。';
+$lang['revstop'] = '還原程序已完成。';
$lang['note1'] = '注意:搜尋區分大小寫';
-$lang['note2'] = '注意:此頁面將被還原為最後一個不含垃圾訊息 <i>%s</i> 的版本。';
+$lang['note2'] = '注意:我們將把此頁面還原作最後一個不含垃圾訊息 <i>%s</i> 的版本。';
diff --git a/lib/plugins/usermanager/lang/ca/lang.php b/lib/plugins/usermanager/lang/ca/lang.php
index 445556973..6debd73ca 100644
--- a/lib/plugins/usermanager/lang/ca/lang.php
+++ b/lib/plugins/usermanager/lang/ca/lang.php
@@ -6,6 +6,7 @@
* @author carles.bellver@gmail.com
* @author carles.bellver@cent.uji.es
* @author Carles Bellver <carles.bellver@cent.uji.es>
+ * @author daniel@6temes.cat
*/
$lang['menu'] = 'Gestió d\'usuaris';
$lang['noauth'] = '(l\'autenticació d\'usuaris no està disponible)';
diff --git a/lib/plugins/usermanager/lang/tr/lang.php b/lib/plugins/usermanager/lang/tr/lang.php
index b9c9cfc52..7ddb7dd5d 100644
--- a/lib/plugins/usermanager/lang/tr/lang.php
+++ b/lib/plugins/usermanager/lang/tr/lang.php
@@ -6,6 +6,7 @@
* @author Cihan Kahveci <kahvecicihan@gmail.com>
* @author Yavuz Selim <yavuzselim@gmail.com>
* @author Caleb Maclennan <caleb@alerque.com>
+ * @author farukerdemoncel@gmail.com
*/
$lang['menu'] = 'Kullanıcı Yönetimi';
$lang['noauth'] = '(kullanıcı onaylaması yoktur)';
diff --git a/lib/plugins/usermanager/lang/zh-tw/lang.php b/lib/plugins/usermanager/lang/zh-tw/lang.php
index 23b4fdac6..1db35cc82 100644
--- a/lib/plugins/usermanager/lang/zh-tw/lang.php
+++ b/lib/plugins/usermanager/lang/zh-tw/lang.php
@@ -11,6 +11,7 @@
* @author Danny Lin <danny0838@pchome.com.tw>
* @author Shuo-Ting Jian <shoting@gmail.com>
* @author syaoranhinata@gmail.com
+ * @author Ichirou Uchiki <syaoranhinata@gmail.com>
*/
$lang['menu'] = '帳號管理器';
$lang['noauth'] = '(帳號認證尚未開放)';
@@ -18,8 +19,8 @@ $lang['nosupport'] = '(尚不支援帳號管理)';
$lang['badauth'] = '錯誤的認證機制';
$lang['user_id'] = '帳號';
$lang['user_pass'] = '密碼';
-$lang['user_name'] = '真實姓名';
-$lang['user_mail'] = 'E-mail';
+$lang['user_name'] = '名稱';
+$lang['user_mail'] = '電郵';
$lang['user_groups'] = '群組';
$lang['field'] = '欄位';
$lang['value'] = '設定值';
@@ -36,10 +37,10 @@ $lang['filter'] = '篩選條件(Filter)';
$lang['summary'] = '顯示帳號 %1$d-%2$d,共 %3$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) 失敗,因為有同名帳號存在(其他修改已套用)。';
+$lang['update_fail'] = '無法更新該帳號';
+$lang['update_exists'] = '無法變更帳號名稱 (%s) ,因為有同名帳號存在。其他修改則已套用。';
$lang['start'] = '開始';
$lang['prev'] = '上一頁';
$lang['next'] = '下一頁';
@@ -47,9 +48,9 @@ $lang['last'] = '最後一頁';
$lang['edit_usermissing'] = '找不到選取的帳號,可能已被刪除或改為其他名稱。';
$lang['user_notify'] = '通知使用者';
$lang['note_notify'] = '通知信只會在指定使用者新密碼時寄送。';
-$lang['note_group'] = '如果沒有指定群組,新使用者將會被加入到預設群組(%s)當中。';
+$lang['note_group'] = '如果沒有指定群組,新使用者將會列入至預設群組(%s)當中。';
$lang['note_pass'] = '如果沒有輸入這個欄位而且有勾選通知使用者,則會自動產生一組密碼。';
-$lang['add_ok'] = '新增使用者成功';
-$lang['add_fail'] = '新增使用者失敗';
+$lang['add_ok'] = '已新增使用者';
+$lang['add_fail'] = '無法新增使用者';
$lang['notify_ok'] = '通知信已寄出';
$lang['notify_fail'] = '通知信無法寄出';
diff --git a/lib/scripts/fileuploaderextended.js b/lib/scripts/fileuploaderextended.js
index 4abd63bef..0ba7a0525 100644
--- a/lib/scripts/fileuploaderextended.js
+++ b/lib/scripts/fileuploaderextended.js
@@ -173,7 +173,7 @@ qq.extend(qq.FileUploaderExtended.prototype, {
if (result.success){
qq.addClass(item, this._classes.success);
- $link = '<a href="' + result.link + '" name="h_:' + result.id + '" class="select">' + nameInput.value + '</a>';
+ $link = '<a href="' + result.link + '" id="h_:' + result.id + '" class="select">' + nameInput.value + '</a>';
jQuery(fileElement).html($link);
} else {
diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js
index 04d30c1a6..059a4ba5c 100644
--- a/lib/scripts/toolbar.js
+++ b/lib/scripts/toolbar.js
@@ -94,7 +94,7 @@ function tb_format(btn, props, edid) {
* @author Andreas Gohr <andi@splitbrain.org>
*/
function tb_formatln(btn, props, edid) {
- var sample = props.title || props.sample,
+ var sample = props.sample || props.title,
opts,
selection = getSelection(jQuery('#'+edid)[0]);
diff --git a/lib/tpl/dokuwiki/css/pagetools.css b/lib/tpl/dokuwiki/css/pagetools.css
index a40d525b3..60dc43fb1 100644
--- a/lib/tpl/dokuwiki/css/pagetools.css
+++ b/lib/tpl/dokuwiki/css/pagetools.css
@@ -53,6 +53,7 @@
padding: 0;
/* add transparent border to prevent jumping when proper border is added on hover */
border: 1px solid transparent;
+ z-index: 10;
}
[dir=rtl] #dokuwiki__pagetools ul {
right: auto;