Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/splitbrain/dokuwiki
Browse files Browse the repository at this point in the history
  • Loading branch information
HakanS committed Oct 23, 2010
2 parents e3626db + 06ce34e commit bcb79ff
Show file tree
Hide file tree
Showing 169 changed files with 1,424 additions and 1,111 deletions.
19 changes: 19 additions & 0 deletions _test/cases/inc/common_pagetemplate.test.php
@@ -0,0 +1,19 @@
<?php

require_once DOKU_INC.'inc/common.php';

class common_pagetemplate_test extends UnitTestCase {

function test_none(){
global $conf;
$conf['sepchar'] = '-';
$data = array(
'id' => 'page-id-long',
'tpl' => '"@PAGE@" "@!PAGE@" "@!!PAGE@" "@!PAGE!@"',
);
$old = error_reporting(E_ALL & ~E_NOTICE);
$this->assertEqual(parsePageTemplate($data), '"page id long" "Page id long" "Page Id Long" "PAGE ID LONG"');
error_reporting($old);
}
}
//Setup VIM: ex: et ts=4 enc=utf-8 :
7 changes: 0 additions & 7 deletions bin/indexer.php
Expand Up @@ -71,13 +71,6 @@ function _usage() {
function _update(){
global $conf;

// upgrade to version 2
if (!@file_exists($conf['indexdir'].'/pageword.idx')){
_lock();
idx_upgradePageWords();
_unlock();
}

$data = array();
_quietecho("Searching pages... ");
search($data,$conf['datadir'],'search_allpages',array('skipacl' => true));
Expand Down
8 changes: 4 additions & 4 deletions inc/auth/ldap.class.php
Expand Up @@ -222,12 +222,12 @@ function getUserData($user,$inbind=false) {
$base = $this->_makeFilter($this->cnf['grouptree'], $user_result);
$filter = $this->_makeFilter($this->cnf['groupfilter'], $user_result);
$sr = $this->_ldapsearch($this->con, $base, $filter, $this->cnf['groupscope'], array($this->cnf['groupkey']));
if($this->cnf['debug']){
msg('LDAP group search: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__);
msg('LDAP search at: '.htmlspecialchars($base.' '.$filter),0,__LINE__,__FILE__);
}
if(!$sr){
msg("LDAP: Reading group memberships failed",-1);
if($this->cnf['debug']){
msg('LDAP group search: '.htmlspecialchars(ldap_error($this->con)),0,__LINE__,__FILE__);
msg('LDAP search at: '.htmlspecialchars($base.' '.$filter),0,__LINE__,__FILE__);
}
return false;
}
$result = ldap_get_entries($this->con, $sr);
Expand Down
2 changes: 1 addition & 1 deletion inc/common.php
Expand Up @@ -843,7 +843,7 @@ function parsePageTemplate(&$data) {

// replace placeholders
$file = noNS($id);
$page = strtr($file,'_',' ');
$page = strtr($file, $conf['sepchar'], ' ');

$tpl = str_replace(array(
'@ID@',
Expand Down
8 changes: 4 additions & 4 deletions inc/feedcreator.class.php
Expand Up @@ -50,11 +50,11 @@
* added a switch to select an external stylesheet (thanks to Pascal Van Hecke)
* changed default content-type to application/xml
* added character encoding setting
* fixed numerous smaller bugs (thanks to Sören Fuhrmann of golem.de)
* fixed numerous smaller bugs (thanks to Sören Fuhrmann of golem.de)
* improved changing ATOM versions handling (thanks to August Trometer)
* improved the UniversalFeedCreator's useCached method (thanks to Sören Fuhrmann of golem.de)
* added charset output in HTTP headers (thanks to Sören Fuhrmann of golem.de)
* added Slashdot namespace to RSS 1.0 (thanks to Sören Fuhrmann of golem.de)
* improved the UniversalFeedCreator's useCached method (thanks to Sören Fuhrmann of golem.de)
* added charset output in HTTP headers (thanks to Sören Fuhrmann of golem.de)
* added Slashdot namespace to RSS 1.0 (thanks to Sören Fuhrmann of golem.de)
*
* See www.bitfolge.de for additional changelog info
*/
Expand Down
45 changes: 0 additions & 45 deletions inc/indexer.php
Expand Up @@ -701,49 +701,4 @@ function idx_tokenizer($string,&$stopwords,$wc=false){
return $words;
}

/**
* Create a pagewords index from the existing index.
*
* @author Tom N Harris <tnharris@whoopdedo.org>
*/
function idx_upgradePageWords(){
global $conf;
$page_idx = idx_getIndex('page','');
if (empty($page_idx)) return;
$pagewords = array();
$len = count($page_idx);
for ($n=0;$n<$len;$n++){
$pagewords[] = array();
}
unset($page_idx);

$n=0;
foreach (idx_indexLengths($n) as $wlen) {
$lines = idx_getIndex('i',$wlen);
$len = count($lines);
for ($wid=0;$wid<$len;$wid++) {
$wkey = "$wlen*$wid";
foreach (explode(':',trim($lines[$wid])) as $part) {
if($part == '') continue;
list($doc,$cnt) = explode('*',$part);
$pagewords[(int)$doc][] = $wkey;
}
}
}

$fn = $conf['indexdir'].'/pageword';
$fh = @fopen($fn.'.tmp','w');
if (!$fh){
trigger_error("Failed to write word index", E_USER_ERROR);
return false;
}
foreach ($pagewords as $line){
fwrite($fh, join(':',$line)."\n");
}
fclose($fh);
if($conf['fperm']) chmod($fn.'.tmp', $conf['fperm']);
io_rename($fn.'.tmp', $fn.'.idx');
return true;
}

//Setup VIM: ex: et ts=4 enc=utf-8 :
41 changes: 0 additions & 41 deletions inc/init.php
Expand Up @@ -200,10 +200,6 @@ function_exists('ob_gzhandler')) {
init_paths();
init_files();

// automatic upgrade to script versions of certain files
scriptify(DOKU_CONF.'users.auth');
scriptify(DOKU_CONF.'acl.auth');

// setup plugin controller class (can be overwritten in preload.php)
$plugin_types = array('admin','syntax','action','renderer', 'helper');
global $plugin_controller_class, $plugin_controller;
Expand Down Expand Up @@ -462,43 +458,6 @@ function is_ssl(){
}
}

/**
* Append a PHP extension to a given file and adds an exit call
*
* This is used to migrate some old configfiles. An added PHP extension
* ensures the contents are not shown to webusers even if .htaccess files
* do not work
*
* @author Jan Decaluwe <jan@jandecaluwe.com>
*/
function scriptify($file) {
// checks
if (!is_readable($file)) {
return;
}
$fn = $file.'.php';
if (@file_exists($fn)) {
return;
}
$fh = fopen($fn, 'w');
if (!$fh) {
nice_die($fn.' is not writable. Check your permission settings!');
}
// write php exit hack first
fwrite($fh, "# $fn\n");
fwrite($fh, '# <?php exit()?>'."\n");
fwrite($fh, "# Don't modify the lines above\n");
fwrite($fh, "#\n");
// copy existing lines
$lines = file($file);
foreach ($lines as $line){
fwrite($fh, $line);
}
fclose($fh);
//try to rename the old file
io_rename($file,"$file.old");
}

/**
* print a nice message even if no styles are loaded yet.
*/
Expand Down
17 changes: 0 additions & 17 deletions inc/lang/ar/subscribermail.txt

This file was deleted.

2 changes: 1 addition & 1 deletion inc/lang/az/lang.php
Expand Up @@ -5,7 +5,7 @@
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Pasha L. Topchiyev <pasha@itopchiyev.com>
*/
$lang['encoding'] = ' utf-8';
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
$lang['doublequoteopening'] = '«';
$lang['doublequoteclosing'] = '»';
Expand Down
19 changes: 0 additions & 19 deletions inc/lang/az/subscribermail.txt

This file was deleted.

16 changes: 0 additions & 16 deletions inc/lang/bg/subscribermail.txt

This file was deleted.

23 changes: 0 additions & 23 deletions inc/lang/ca-valencia/subscribermail.txt

This file was deleted.

15 changes: 0 additions & 15 deletions inc/lang/ca/subscribermail.txt

This file was deleted.

23 changes: 0 additions & 23 deletions inc/lang/cs/subscribermail.txt

This file was deleted.

14 changes: 13 additions & 1 deletion inc/lang/da/lang.php
Expand Up @@ -14,7 +14,7 @@
* @author rasmus@kinnerup.com
* @author Michael Pedersen subben@gmail.com
*/
$lang['encoding'] = 'ISO 8859-1 ';
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
$lang['doublequoteopening'] = '„';
$lang['doublequoteclosing'] = '“';
Expand Down Expand Up @@ -108,6 +108,7 @@
$lang['js']['mediadisplay'] = 'Link type';
$lang['js']['mediaalign'] = 'Juster';
$lang['js']['mediasize'] = 'Billede størrelse';
$lang['js']['mediatarget'] = 'Link mål';
$lang['js']['mediaclose'] = 'Luk';
$lang['js']['mediainsert'] = 'Indsæt';
$lang['js']['mediadisplayimg'] = 'Vis billedet';
Expand All @@ -116,6 +117,7 @@
$lang['js']['mediamedium'] = 'Medium version';
$lang['js']['medialarge'] = 'Stor version';
$lang['js']['mediaoriginal'] = 'Original version';
$lang['js']['medialnk'] = 'Link til detajle side';
$lang['js']['mediadirect'] = 'Direkte link til originalen';
$lang['js']['medianolnk'] = 'Intet link';
$lang['js']['medianolink'] = 'Link ikke billedet';
Expand Down Expand Up @@ -146,6 +148,7 @@
$lang['mediainuse'] = 'Filen "%s" er ikke slettet - den er stadig i brug.';
$lang['namespaces'] = 'Navnerum';
$lang['mediafiles'] = 'Tilgængelige filer i';
$lang['accessdenied'] = 'Du har ikke tilladelse til at se denne side';
$lang['mediausage'] = 'Brug den følgende syntaks til at henvise til denne fil:';
$lang['mediaview'] = 'Vis oprindelig fil';
$lang['mediaroot'] = 'rod';
Expand All @@ -161,6 +164,7 @@
$lang['yours'] = 'Din version';
$lang['diff'] = 'Vis forskelle i forhold til den nuværende udgave';
$lang['diff2'] = 'Vis forskelle i forhold til de valgte revisioner';
$lang['difflink'] = 'Link til denne sammenlinings vising';
$lang['line'] = 'Linje';
$lang['breadcrumb'] = 'Sti';
$lang['youarehere'] = 'Du er her';
Expand Down Expand Up @@ -220,8 +224,16 @@
$lang['img_keywords'] = 'Emneord';
$lang['subscr_subscribe_success'] = 'Tilføjede %s til abonnement listen for %s';
$lang['subscr_subscribe_error'] = 'Fejl ved tilføjelse af %s til abonnement listen for %s';
$lang['subscr_subscribe_noaddress'] = 'Der er ikke nogen addresse forbundet til din bruger, så du kan ikke blive tilføjet til abonnement listen';
$lang['subscr_unsubscribe_success'] = 'Fjernede %s fra abonnement listen for %s';
$lang['subscr_unsubscribe_error'] = 'Fejl ved fjernelse af %s fra abonnement listen for %s';
$lang['subscr_already_subscribed'] = '%s har allerede et abonnement for listen %s';
$lang['subscr_not_subscribed'] = '%s har ikke et abonnement for listen %s';
$lang['subscr_m_not_subscribed'] = 'Du har ikke et abonnement til denne side eller navnerum';
$lang['subscr_m_new_header'] = 'Tilføj abonnement';
$lang['subscr_m_current_header'] = 'Nuværende abonnementer';
$lang['subscr_m_unsubscribe'] = 'Fjern abonnement';
$lang['subscr_m_subscribe'] = 'Abonér';
$lang['subscr_m_receive'] = 'Modtag';
$lang['subscr_style_every'] = 'email på hver ændring';
$lang['subscr_style_list'] = 'list af ændrede sider siden sidste email (hver %.2f dage)';
Expand Down
23 changes: 23 additions & 0 deletions inc/lang/da/subscr_single.txt
@@ -0,0 +1,23 @@
Hej!

Siden @PAGE@ i wikien @TITLE@ er blevet ændret.
Her er ændringerne:

--------------------------------------------------------
@DIFF@
--------------------------------------------------------

Dato : @DATE@
Bruger : @USER@
Summering: @SUMMARY@
Gammel Revision: @OLDPAGE@
Ny Revision: @NEWPAGE@

For at slå side notifikationer fra, skal du logge ind på
@DOKUWIKIURL@ og besøge
@NEWPAGE@
og slå abonnoment for side / navnerum ændringer fra.

--
Denne email blev generet af DokuWiki på
@DOKUWIKIURL@

0 comments on commit bcb79ff

Please sign in to comment.