summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_test/tests/inc/cache_use.test.php36
-rw-r--r--inc/cache.php8
-rw-r--r--lib/plugins/acl/lang/et/lang.php2
-rw-r--r--lib/plugins/authldap/lang/et/settings.php9
-rw-r--r--lib/plugins/usermanager/lang/et/lang.php4
5 files changed, 54 insertions, 5 deletions
diff --git a/_test/tests/inc/cache_use.test.php b/_test/tests/inc/cache_use.test.php
new file mode 100644
index 000000000..f5349df13
--- /dev/null
+++ b/_test/tests/inc/cache_use.test.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * Class cache_use_test
+ *
+ * Tests if caching can actually be used
+ */
+class cache_use_test extends DokuWikiTest {
+ /** @var cache_renderer $cache */
+ private $cache;
+
+ function setUp() {
+ global $ID;
+ parent::setUp();
+
+ $ID = 'cached';
+ $file = wikiFN($ID);
+
+ saveWikiText($ID, 'Content', 'Created');
+ // set the modification time a second in the past in order to ensure that the cache is newer than the page
+ touch($file, time()-1);
+
+ # Create cache. Note that the metadata cache is used as the xhtml cache triggers metadata rendering
+ $this->cache = new cache_renderer($ID, $file, 'metadata');
+ $this->cache->storeCache('Test');
+ }
+
+ function test_use() {
+ $this->assertTrue($this->cache->useCache());
+ }
+
+
+ function test_purge() {
+ $this->assertFalse($this->cache->useCache(array('purge' => true)));
+ }
+} \ No newline at end of file
diff --git a/inc/cache.php b/inc/cache.php
index 5f54a34a9..56c5b65f2 100644
--- a/inc/cache.php
+++ b/inc/cache.php
@@ -63,11 +63,13 @@ class cache {
* age - expire cache if older than age (seconds)
* files - expire cache if any file in this array was updated more recently than the cache
*
+ * Note that this function needs to be public as it is used as callback for the event handler
+ *
* can be overridden
*
* @return bool see useCache()
*/
- protected function _useCache() {
+ public function _useCache() {
if (!empty($this->depends['purge'])) return false; // purge requested?
if (!($this->_time = @filemtime($this->cache))) return false; // cache exists?
@@ -194,7 +196,7 @@ class cache_parser extends cache {
*
* @return bool see useCache()
*/
- protected function _useCache() {
+ public function _useCache() {
if (!@file_exists($this->file)) return false; // source exists?
return parent::_useCache();
@@ -229,7 +231,7 @@ class cache_renderer extends cache_parser {
*
* @return bool see useCache()
*/
- protected function _useCache() {
+ public function _useCache() {
global $conf;
if (!parent::_useCache()) return false;
diff --git a/lib/plugins/acl/lang/et/lang.php b/lib/plugins/acl/lang/et/lang.php
index bdf3dd6b5..acb9a1d63 100644
--- a/lib/plugins/acl/lang/et/lang.php
+++ b/lib/plugins/acl/lang/et/lang.php
@@ -11,7 +11,7 @@
* @author Janar Leas <janar.leas@eesti.ee>
*/
$lang['admin_acl'] = 'Ligipääsukontrolli nimekirja haldamine';
-$lang['acl_group'] = 'Grupp';
+$lang['acl_group'] = 'Rühm';
$lang['acl_user'] = 'Kasutaja';
$lang['acl_perms'] = 'Lubatud';
$lang['page'] = 'leht';
diff --git a/lib/plugins/authldap/lang/et/settings.php b/lib/plugins/authldap/lang/et/settings.php
new file mode 100644
index 000000000..9bba85dda
--- /dev/null
+++ b/lib/plugins/authldap/lang/et/settings.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Janar Leas <janar.leas@eesti.ee>
+ */
+$lang['grouptree'] = 'Kus kohast kasutaja rühmi otsida. Nt. <code>ou=Rühm, dc=server, dc=tld</code';
+$lang['groupscope'] = 'Piiritle otsingu ulatus rühma otsinguga';
diff --git a/lib/plugins/usermanager/lang/et/lang.php b/lib/plugins/usermanager/lang/et/lang.php
index 93b28a6b8..deb1e0be1 100644
--- a/lib/plugins/usermanager/lang/et/lang.php
+++ b/lib/plugins/usermanager/lang/et/lang.php
@@ -5,13 +5,14 @@
*
* @author kristian.kankainen@kuu.la
* @author Rivo Zängov <eraser@eraser.ee>
+ * @author Janar Leas <janar.leas@eesti.ee>
*/
$lang['menu'] = 'Kasutajate haldamine';
$lang['user_id'] = 'Kasutaja';
$lang['user_pass'] = 'Parool';
$lang['user_name'] = 'Tegelik nimi';
$lang['user_mail'] = 'E-post';
-$lang['user_groups'] = 'Grupid';
+$lang['user_groups'] = 'Rühmad';
$lang['field'] = 'Väli';
$lang['value'] = 'Väärtus';
$lang['add'] = 'Lisa';
@@ -29,3 +30,4 @@ $lang['prev'] = 'eelmine';
$lang['next'] = 'järgmine';
$lang['last'] = 'viimased';
$lang['user_notify'] = 'Teavita kasutajat';
+$lang['note_group'] = 'Kui rühma pole määratletud, siis lisatakse uued kasutajad vaikimisi rühma (%s).';