Skip to content

Commit

Permalink
Merge branch 'master' of http://github.com/splitbrain/dokuwiki
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Schulte committed Sep 11, 2011
2 parents e2b5ad8 + 29d511b commit 1614eb9
Show file tree
Hide file tree
Showing 62 changed files with 4,802 additions and 442 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -8,6 +8,7 @@
/conf/words.aspell
/conf/lang/*
/conf/plugin_lang/*
/conf/plugins.local.*
.htaccess
*.swp
*.bak
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
102 changes: 102 additions & 0 deletions _test/cases/inc/search/search.test.php
@@ -0,0 +1,102 @@
<?php
require_once DOKU_INC.'inc/search.php';

class search_test extends UnitTestCase {
function strip_index_data($entry) {
$n_entry = array();
foreach(array('id', 'type', 'level', 'open') as $k) {
$n_entry[$k] = $entry[$k];
}
return $n_entry;
}

function test_search_index(){
$data = array();
search($data, dirname(__FILE__) . '/data', 'search_index',
array('ns' => 'ns2'));
$this->assertEqual(array_map(array($this, 'strip_index_data'), $data),
array(
array(
'id' => 'ns1',
'type' => 'd',
'level' => 1,
'open' => false
), array(
'id' => 'ns2',
'type' => 'd',
'level' => 1,
'open' => true
), array(
'id' => 'ns2:page1',
'type' => 'f',
'level' => 2,
'open' => true,
), ));
$data = array();
search($data, dirname(__FILE__) . '/data', 'search_index',
array('ns' => 'ns1/ns3'));
$this->assertEqual(array_map(array($this, 'strip_index_data'), $data),
array(
array(
'id' => 'ns1',
'type' => 'd',
'level' => 1,
'open' => true,
),
array(
'id' => 'ns1:ns3',
'type' => 'd',
'level' => 2,
'open' => true,
),
array(
'id' => 'ns1:ns3:page3',
'type' => 'f',
'level' => 3,
'open' => true,
),
array(
'id' => 'ns1:page1',
'type' => 'f',
'level' => 2,
'open' => true,
),
array(
'id' => 'ns1:page2',
'type' => 'f',
'level' => 2,
'open' => true,
),
array(
'id' => 'ns2',
'type' => 'd',
'level' => 1,
'open' => false,
), ));
$data = array();
search($data, dirname(__FILE__) . '/data', 'search_index',
array('ns' => 'ns1/ns3', 'nofiles' => true));
$this->assertEqual(array_map(array($this, 'strip_index_data'), $data),
array(
array(
'id' => 'ns1',
'type' => 'd',
'level' => 1,
'open' => true,
),
array(
'id' => 'ns1:ns3',
'type' => 'd',
'level' => 2,
'open' => true,
),
array(
'id' => 'ns2',
'type' => 'd',
'level' => 1,
'open' => false,
), ));

}
}
//Setup VIM: ex: et ts=4 :
1 change: 1 addition & 0 deletions conf/dokuwiki.php
Expand Up @@ -20,6 +20,7 @@
$conf['baseurl'] = ''; //URL to server including protocol - blank for autodetect
$conf['savedir'] = './data'; //where to store all the files
$conf['allowdebug'] = 0; //allow debug output, enable if needed 0|1
$conf['mediarevisions'] = 1; //enable/disable media revisions

/* Display Options */

Expand Down
44 changes: 39 additions & 5 deletions conf/mediameta.php
Expand Up @@ -29,29 +29,63 @@
'img_title',
'text'),

20 => array('Iptc.Caption',
20 => array('',
'img_date',
'date',
array('Date.EarliestTime')),

30 => array('',
'img_fname',
'text',
array('File.Name')),

40 => array('Iptc.Caption',
'img_caption',
'textarea',
array('Exif.UserComment',
'Exif.TIFFImageDescription',
'Exif.TIFFUserComment')),

30 => array('Iptc.Byline',
50 => array('Iptc.Byline',
'img_artist',
'text',
array('Exif.TIFFArtist',
'Exif.Artist',
'Iptc.Credit')),

40 => array('Iptc.CopyrightNotice',
60 => array('Iptc.CopyrightNotice',
'img_copyr',
'text',
array('Exif.TIFFCopyright',
'Exif.Copyright')),

50 => array('Iptc.Keywords',
70 => array('',
'img_format',
'text',
array('File.Format')),

80 => array('',
'img_fsize',
'text',
array('File.NiceSize')),

90 => array('',
'img_width',
'text',
array('File.Width')),

100 => array('',
'img_height',
'text',
array('File.Height')),

110 => array('',
'img_camera',
'text',
array('Simple.Camera')),

120 => array('Iptc.Keywords',
'img_keywords',
'text',
array('Exif.Category')),
);

11 changes: 11 additions & 0 deletions conf/plugins.protected.php
@@ -0,0 +1,11 @@
<?php
/**
* This file configures the enabled/disabled status of plugins, which are also protected
* from changes by the extention manager. These settings will override any local settings.
* It is not recommended to change this file, as it is overwritten on DokuWiki upgrades.
*/
$plugins['acl'] = 1;
$plugins['plugin'] = 1;
$plugins['config'] = 1;
$plugins['usermanager'] = 1;
$plugins['revert'] = 1;
Empty file added data/media_attic/_dummy
Empty file.
Empty file added data/media_meta/_dummy
Empty file.

0 comments on commit 1614eb9

Please sign in to comment.