Revert "MINOR: Update .gitignore and ignore more files that we do not need once"
This reverts commit de8ac4b1d4
.
This commit is contained in:
parent
24e870a38b
commit
338aeba323
|
@ -1,5 +1,4 @@
|
|||
# Dokuwiki
|
||||
public_html/install.php
|
||||
public_html/conf/local.php.bak
|
||||
public_html/conf/users.auth.php
|
||||
public_html/data/attic
|
||||
|
@ -10,12 +9,6 @@ public_html/data/media_meta
|
|||
public_html/data/locks
|
||||
public_html/data/tmp
|
||||
public_html/data/www-content
|
||||
public_html/**/.travis.yml
|
||||
public_html/**/_test
|
||||
public_html/**/README
|
||||
public_html/**/README.md
|
||||
public_html/**/*.dist
|
||||
public_html/**/*.example
|
||||
|
||||
# Screenshots
|
||||
public_html/ss/*.png
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
All documentation for DokuWiki is available online
|
||||
at http://www.dokuwiki.org/
|
||||
|
||||
For Installation Instructions see
|
||||
http://www.dokuwiki.org/install
|
||||
|
||||
DokuWiki - 2004-2014 (c) Andreas Gohr <andi@splitbrain.org>
|
||||
and the DokuWiki Community
|
||||
See COPYING and file headers for license info
|
||||
|
|
@ -0,0 +1,658 @@
|
|||
<?php
|
||||
/**
|
||||
* Dokuwiki installation assistance
|
||||
*
|
||||
* @author Chris Smith <chris@jalakai.co.uk>
|
||||
*/
|
||||
|
||||
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/');
|
||||
if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/');
|
||||
if(!defined('DOKU_LOCAL')) define('DOKU_LOCAL',DOKU_INC.'conf/');
|
||||
|
||||
require_once(DOKU_INC.'inc/PassHash.class.php');
|
||||
|
||||
// check for error reporting override or set error reporting to sane values
|
||||
if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); }
|
||||
else { error_reporting(DOKU_E_LEVEL); }
|
||||
|
||||
// kill magic quotes
|
||||
if (get_magic_quotes_gpc() && !defined('MAGIC_QUOTES_STRIPPED')) {
|
||||
if (!empty($_GET)) remove_magic_quotes($_GET);
|
||||
if (!empty($_POST)) remove_magic_quotes($_POST);
|
||||
if (!empty($_COOKIE)) remove_magic_quotes($_COOKIE);
|
||||
if (!empty($_REQUEST)) remove_magic_quotes($_REQUEST);
|
||||
@ini_set('magic_quotes_gpc', 0);
|
||||
define('MAGIC_QUOTES_STRIPPED',1);
|
||||
}
|
||||
if (function_exists('set_magic_quotes_runtime')) @set_magic_quotes_runtime(0);
|
||||
@ini_set('magic_quotes_sybase',0);
|
||||
|
||||
// language strings
|
||||
require_once(DOKU_INC.'inc/lang/en/lang.php');
|
||||
if(isset($_REQUEST['l']) && !is_array($_REQUEST['l'])) {
|
||||
$LC = preg_replace('/[^a-z\-]+/','',$_REQUEST['l']);
|
||||
}
|
||||
if(empty($LC)) $LC = 'en';
|
||||
if($LC && $LC != 'en' ) {
|
||||
require_once(DOKU_INC.'inc/lang/'.$LC.'/lang.php');
|
||||
}
|
||||
|
||||
// initialise variables ...
|
||||
$error = array();
|
||||
|
||||
$dokuwiki_hash = array(
|
||||
'2005-09-22' => 'e33223e957b0b0a130d0520db08f8fb7',
|
||||
'2006-03-05' => '51295727f79ab9af309a2fd9e0b61acc',
|
||||
'2006-03-09' => '51295727f79ab9af309a2fd9e0b61acc',
|
||||
'2006-11-06' => 'b3a8af76845977c2000d85d6990dd72b',
|
||||
'2007-05-24' => 'd80f2740c84c4a6a791fd3c7a353536f',
|
||||
'2007-06-26' => 'b3ca19c7a654823144119980be73cd77',
|
||||
'2008-05-04' => '1e5c42eac3219d9e21927c39e3240aad',
|
||||
'2009-02-14' => 'ec8c04210732a14fdfce0f7f6eead865',
|
||||
'2009-12-25' => '993c4b2b385643efe5abf8e7010e11f4',
|
||||
'2010-11-07' => '7921d48195f4db21b8ead6d9bea801b8',
|
||||
'2011-05-25' => '4241865472edb6fa14a1227721008072',
|
||||
'2011-11-10' => 'b46ff19a7587966ac4df61cbab1b8b31',
|
||||
'2012-01-25' => '72c083c73608fc43c586901fd5dabb74',
|
||||
'2012-09-10' => 'eb0b3fc90056fbc12bac6f49f7764df3',
|
||||
'2013-05-10' => '7b62b75245f57f122d3e0f8ed7989623',
|
||||
'2013-12-08' => '263c76af309fbf083867c18a34ff5214',
|
||||
'2014-05-05' => '263c76af309fbf083867c18a34ff5214',
|
||||
);
|
||||
|
||||
|
||||
// begin output
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $LC?>" dir="<?php echo $lang['direction']?>">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title><?php echo $lang['i_installer']?></title>
|
||||
<style type="text/css">
|
||||
body { width: 90%; margin: 0 auto; font: 84% Verdana, Helvetica, Arial, sans-serif; }
|
||||
img { border: none }
|
||||
br.cl { clear:both; }
|
||||
code { font-size: 110%; color: #800000; }
|
||||
fieldset { border: none }
|
||||
label { display: block; margin-top: 0.5em; }
|
||||
select.text, input.text { width: 30em; margin: 0 0.5em; }
|
||||
a {text-decoration: none}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function acltoggle(){
|
||||
var cb = document.getElementById('acl');
|
||||
var fs = document.getElementById('acldep');
|
||||
if(!cb || !fs) return;
|
||||
if(cb.checked){
|
||||
fs.style.display = '';
|
||||
}else{
|
||||
fs.style.display = 'none';
|
||||
}
|
||||
}
|
||||
window.onload = function(){
|
||||
acltoggle();
|
||||
var cb = document.getElementById('acl');
|
||||
if(cb) cb.onchange = acltoggle;
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body style="">
|
||||
<h1 style="float:left">
|
||||
<img src="lib/exe/fetch.php?media=wiki:dokuwiki-128.png"
|
||||
style="vertical-align: middle;" alt="" height="64" width="64" />
|
||||
<?php echo $lang['i_installer']?>
|
||||
</h1>
|
||||
<div style="float:right; margin: 1em;">
|
||||
<?php langsel()?>
|
||||
</div>
|
||||
<br class="cl" />
|
||||
|
||||
<div style="float: right; width: 34%;">
|
||||
<?php
|
||||
if(file_exists(DOKU_INC.'inc/lang/'.$LC.'/install.html')){
|
||||
include(DOKU_INC.'inc/lang/'.$LC.'/install.html');
|
||||
}else{
|
||||
print "<div lang=\"en\" dir=\"ltr\">\n";
|
||||
include(DOKU_INC.'inc/lang/en/install.html');
|
||||
print "</div>\n";
|
||||
}
|
||||
?>
|
||||
<a style="background: transparent url(data/security.png) left top no-repeat;
|
||||
display: block; width:380px; height:73px; border:none; clear:both;"
|
||||
target="_blank"
|
||||
href="http://www.dokuwiki.org/security#web_access_security"></a>
|
||||
</div>
|
||||
|
||||
<div style="float: left; width: 58%;">
|
||||
<?php
|
||||
if(! (check_functions() && check_permissions()) ){
|
||||
echo '<p>'.$lang['i_problems'].'</p>';
|
||||
print_errors();
|
||||
print_retry();
|
||||
}elseif(!check_configs()){
|
||||
echo '<p>'.$lang['i_modified'].'</p>';
|
||||
print_errors();
|
||||
}elseif(check_data($_REQUEST['d'])){
|
||||
// check_data has sanitized all input parameters
|
||||
if(!store_data($_REQUEST['d'])){
|
||||
echo '<p>'.$lang['i_failure'].'</p>';
|
||||
print_errors();
|
||||
}else{
|
||||
echo '<p>'.$lang['i_success'].'</p>';
|
||||
}
|
||||
}else{
|
||||
print_errors();
|
||||
print_form($_REQUEST['d']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="clear: both">
|
||||
<a href="http://dokuwiki.org/"><img src="lib/tpl/dokuwiki/images/button-dw.png" alt="driven by DokuWiki" /></a>
|
||||
<a href="http://www.php.net"><img src="lib/tpl/dokuwiki/images/button-php.gif" alt="powered by PHP" /></a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Print the input form
|
||||
*
|
||||
* @param array $d submitted entry 'd' of request data
|
||||
*/
|
||||
function print_form($d){
|
||||
global $lang;
|
||||
global $LC;
|
||||
|
||||
include(DOKU_CONF.'license.php');
|
||||
|
||||
if(!is_array($d)) $d = array();
|
||||
$d = array_map('htmlspecialchars',$d);
|
||||
|
||||
if(!isset($d['acl'])) $d['acl']=1;
|
||||
if(!isset($d['pop'])) $d['pop']=1;
|
||||
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="l" value="<?php echo $LC ?>" />
|
||||
<fieldset>
|
||||
<label for="title"><?php echo $lang['i_wikiname']?>
|
||||
<input type="text" name="d[title]" id="title" value="<?php echo $d['title'] ?>" style="width: 20em;" />
|
||||
</label>
|
||||
|
||||
<fieldset style="margin-top: 1em;">
|
||||
<label for="acl">
|
||||
<input type="checkbox" name="d[acl]" id="acl" <?php echo(($d['acl'] ? ' checked="checked"' : ''));?> />
|
||||
<?php echo $lang['i_enableacl']?></label>
|
||||
|
||||
<fieldset id="acldep">
|
||||
<label for="superuser"><?php echo $lang['i_superuser']?></label>
|
||||
<input class="text" type="text" name="d[superuser]" id="superuser" value="<?php echo $d['superuser'] ?>" />
|
||||
|
||||
<label for="fullname"><?php echo $lang['fullname']?></label>
|
||||
<input class="text" type="text" name="d[fullname]" id="fullname" value="<?php echo $d['fullname'] ?>" />
|
||||
|
||||
<label for="email"><?php echo $lang['email']?></label>
|
||||
<input class="text" type="text" name="d[email]" id="email" value="<?php echo $d['email'] ?>" />
|
||||
|
||||
<label for="password"><?php echo $lang['pass']?></label>
|
||||
<input class="text" type="password" name="d[password]" id="password" />
|
||||
|
||||
<label for="confirm"><?php echo $lang['passchk']?></label>
|
||||
<input class="text" type="password" name="d[confirm]" id="confirm" />
|
||||
|
||||
<label for="policy"><?php echo $lang['i_policy']?></label>
|
||||
<select class="text" name="d[policy]" id="policy">
|
||||
<option value="0" <?php echo ($d['policy'] == 0)?'selected="selected"':'' ?>><?php echo $lang['i_pol0']?></option>
|
||||
<option value="1" <?php echo ($d['policy'] == 1)?'selected="selected"':'' ?>><?php echo $lang['i_pol1']?></option>
|
||||
<option value="2" <?php echo ($d['policy'] == 2)?'selected="selected"':'' ?>><?php echo $lang['i_pol2']?></option>
|
||||
</select>
|
||||
|
||||
<label for="allowreg">
|
||||
<input type="checkbox" name="d[allowreg]" id="allowreg" <?php echo(($d['allowreg'] ? ' checked="checked"' : ''));?> />
|
||||
<?php echo $lang['i_allowreg']?>
|
||||
</label>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<p><?php echo $lang['i_license']?></p>
|
||||
<?php
|
||||
array_push($license,array('name' => $lang['i_license_none'], 'url'=>''));
|
||||
if(empty($d['license'])) $d['license'] = 'cc-by-sa';
|
||||
foreach($license as $key => $lic){
|
||||
echo '<label for="lic_'.$key.'">';
|
||||
echo '<input type="radio" name="d[license]" value="'.htmlspecialchars($key).'" id="lic_'.$key.'"'.
|
||||
(($d['license'] === $key)?' checked="checked"':'').'>';
|
||||
echo htmlspecialchars($lic['name']);
|
||||
if($lic['url']) echo ' <a href="'.$lic['url'].'" target="_blank"><sup>[?]</sup></a>';
|
||||
echo '</label>';
|
||||
}
|
||||
?>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<p><?php echo $lang['i_pop_field']?></p>
|
||||
<label for="pop">
|
||||
<input type="checkbox" name="d[pop]" id="pop" <?php echo(($d['pop'] ? ' checked="checked"' : ''));?> />
|
||||
<?php echo $lang['i_pop_label']?> <a href="http://www.dokuwiki.org/popularity" target="_blank"><sup>[?]</sup></a>
|
||||
</label>
|
||||
</fieldset>
|
||||
|
||||
</fieldset>
|
||||
<fieldset id="process">
|
||||
<input class="button" type="submit" name="submit" value="<?php echo $lang['btn_save']?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
function print_retry() {
|
||||
global $lang;
|
||||
global $LC;
|
||||
?>
|
||||
<form action="" method="get">
|
||||
<fieldset>
|
||||
<input type="hidden" name="l" value="<?php echo $LC ?>" />
|
||||
<input class="button" type="submit" value="<?php echo $lang['i_retry'];?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Check validity of data
|
||||
*
|
||||
* @author Andreas Gohr
|
||||
*
|
||||
* @param array $d
|
||||
* @return bool ok?
|
||||
*/
|
||||
function check_data(&$d){
|
||||
static $form_default = array(
|
||||
'title' => '',
|
||||
'acl' => '1',
|
||||
'superuser' => '',
|
||||
'fullname' => '',
|
||||
'email' => '',
|
||||
'password' => '',
|
||||
'confirm' => '',
|
||||
'policy' => '0',
|
||||
'allowreg' => '0',
|
||||
'license' => 'cc-by-sa'
|
||||
);
|
||||
global $lang;
|
||||
global $error;
|
||||
|
||||
if(!is_array($d)) $d = array();
|
||||
foreach($d as $k => $v) {
|
||||
if(is_array($v))
|
||||
unset($d[$k]);
|
||||
else
|
||||
$d[$k] = (string)$v;
|
||||
}
|
||||
|
||||
//autolowercase the username
|
||||
$d['superuser'] = isset($d['superuser']) ? strtolower($d['superuser']) : "";
|
||||
|
||||
$ok = false;
|
||||
|
||||
if(isset($_REQUEST['submit'])) {
|
||||
$ok = true;
|
||||
|
||||
// check input
|
||||
if(empty($d['title'])){
|
||||
$error[] = sprintf($lang['i_badval'],$lang['i_wikiname']);
|
||||
$ok = false;
|
||||
}
|
||||
if(isset($d['acl'])){
|
||||
if(!preg_match('/^[a-z0-9_]+$/',$d['superuser'])){
|
||||
$error[] = sprintf($lang['i_badval'],$lang['i_superuser']);
|
||||
$ok = false;
|
||||
}
|
||||
if(empty($d['password'])){
|
||||
$error[] = sprintf($lang['i_badval'],$lang['pass']);
|
||||
$ok = false;
|
||||
}
|
||||
elseif(!isset($d['confirm']) || $d['confirm'] != $d['password']){
|
||||
$error[] = sprintf($lang['i_badval'],$lang['passchk']);
|
||||
$ok = false;
|
||||
}
|
||||
if(empty($d['fullname']) || strstr($d['fullname'],':')){
|
||||
$error[] = sprintf($lang['i_badval'],$lang['fullname']);
|
||||
$ok = false;
|
||||
}
|
||||
if(empty($d['email']) || strstr($d['email'],':') || !strstr($d['email'],'@')){
|
||||
$error[] = sprintf($lang['i_badval'],$lang['email']);
|
||||
$ok = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
$d = array_merge($form_default, $d);
|
||||
return $ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the data to the config files
|
||||
*
|
||||
* @author Chris Smith <chris@jalakai.co.uk>
|
||||
*
|
||||
* @param array $d
|
||||
* @return bool
|
||||
*/
|
||||
function store_data($d){
|
||||
global $LC;
|
||||
$ok = true;
|
||||
$d['policy'] = (int) $d['policy'];
|
||||
|
||||
// create local.php
|
||||
$now = gmdate('r');
|
||||
$output = <<<EOT
|
||||
<?php
|
||||
/**
|
||||
* Dokuwiki's Main Configuration File - Local Settings
|
||||
* Auto-generated by install script
|
||||
* Date: $now
|
||||
*/
|
||||
|
||||
EOT;
|
||||
// add any config options set by a previous installer
|
||||
$preset = __DIR__.'/install.conf';
|
||||
if(file_exists($preset)){
|
||||
$output .= "# preset config options\n";
|
||||
$output .= file_get_contents($preset);
|
||||
$output .= "\n\n";
|
||||
$output .= "# options selected in installer\n";
|
||||
@unlink($preset);
|
||||
}
|
||||
|
||||
$output .= '$conf[\'title\'] = \''.addslashes($d['title'])."';\n";
|
||||
$output .= '$conf[\'lang\'] = \''.addslashes($LC)."';\n";
|
||||
$output .= '$conf[\'license\'] = \''.addslashes($d['license'])."';\n";
|
||||
if($d['acl']){
|
||||
$output .= '$conf[\'useacl\'] = 1'.";\n";
|
||||
$output .= "\$conf['superuser'] = '@admin';\n";
|
||||
}
|
||||
if(!$d['allowreg']){
|
||||
$output .= '$conf[\'disableactions\'] = \'register\''.";\n";
|
||||
}
|
||||
$ok = $ok && fileWrite(DOKU_LOCAL.'local.php',$output);
|
||||
|
||||
if ($d['acl']) {
|
||||
// hash the password
|
||||
$phash = new PassHash();
|
||||
$pass = $phash->hash_smd5($d['password']);
|
||||
|
||||
// create users.auth.php
|
||||
// --- user:SMD5password:Real Name:email:groups,comma,seperated
|
||||
$output = join(":",array($d['superuser'], $pass, $d['fullname'], $d['email'], 'admin,user'));
|
||||
$output = @file_get_contents(DOKU_CONF.'users.auth.php.dist')."\n$output\n";
|
||||
$ok = $ok && fileWrite(DOKU_LOCAL.'users.auth.php', $output);
|
||||
|
||||
// create acl.auth.php
|
||||
$output = <<<EOT
|
||||
# acl.auth.php
|
||||
# <?php exit()?>
|
||||
# Don't modify the lines above
|
||||
#
|
||||
# Access Control Lists
|
||||
#
|
||||
# Auto-generated by install script
|
||||
# Date: $now
|
||||
|
||||
EOT;
|
||||
if($d['policy'] == 2){
|
||||
$output .= "* @ALL 0\n";
|
||||
$output .= "* @user 8\n";
|
||||
}elseif($d['policy'] == 1){
|
||||
$output .= "* @ALL 1\n";
|
||||
$output .= "* @user 8\n";
|
||||
}else{
|
||||
$output .= "* @ALL 8\n";
|
||||
}
|
||||
$ok = $ok && fileWrite(DOKU_LOCAL.'acl.auth.php', $output);
|
||||
}
|
||||
|
||||
// enable popularity submission
|
||||
if($d['pop']){
|
||||
@touch(DOKU_INC.'data/cache/autosubmit.txt');
|
||||
}
|
||||
|
||||
// disable auth plugins til needed
|
||||
$output = <<<EOT
|
||||
<?php
|
||||
/*
|
||||
* Local plugin enable/disable settings
|
||||
*
|
||||
* Auto-generated by install script
|
||||
* Date: $now
|
||||
*/
|
||||
|
||||
\$plugins['authad'] = 0;
|
||||
\$plugins['authldap'] = 0;
|
||||
\$plugins['authmysql'] = 0;
|
||||
\$plugins['authpgsql'] = 0;
|
||||
|
||||
EOT;
|
||||
$ok = $ok && fileWrite(DOKU_LOCAL.'plugins.local.php', $output);
|
||||
|
||||
return $ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the given content to a file
|
||||
*
|
||||
* @author Chris Smith <chris@jalakai.co.uk>
|
||||
*
|
||||
* @param string $filename
|
||||
* @param string $data
|
||||
* @return bool
|
||||
*/
|
||||
function fileWrite($filename, $data) {
|
||||
global $error;
|
||||
global $lang;
|
||||
|
||||
if (($fp = @fopen($filename, 'wb')) === false) {
|
||||
$filename = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}/', $filename);
|
||||
$error[] = sprintf($lang['i_writeerr'],$filename);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!empty($data)) { fwrite($fp, $data); }
|
||||
fclose($fp);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* check installation dependent local config files and tests for a known
|
||||
* unmodified main config file
|
||||
*
|
||||
* @author Chris Smith <chris@jalakai.co.uk>
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function check_configs(){
|
||||
global $error;
|
||||
global $lang;
|
||||
global $dokuwiki_hash;
|
||||
|
||||
$ok = true;
|
||||
|
||||
$config_files = array(
|
||||
'local' => DOKU_LOCAL.'local.php',
|
||||
'users' => DOKU_LOCAL.'users.auth.php',
|
||||
'auth' => DOKU_LOCAL.'acl.auth.php'
|
||||
);
|
||||
|
||||
// main dokuwiki config file (conf/dokuwiki.php) must not have been modified
|
||||
$installation_hash = md5(preg_replace("/(\015\012)|(\015)/","\012",
|
||||
@file_get_contents(DOKU_CONF.'dokuwiki.php')));
|
||||
if (!in_array($installation_hash, $dokuwiki_hash)) {
|
||||
$error[] = sprintf($lang['i_badhash'],$installation_hash);
|
||||
$ok = false;
|
||||
}
|
||||
|
||||
// configs shouldn't exist
|
||||
foreach ($config_files as $file) {
|
||||
if (file_exists($file) && filesize($file)) {
|
||||
$file = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}/', $file);
|
||||
$error[] = sprintf($lang['i_confexists'],$file);
|
||||
$ok = false;
|
||||
}
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check other installation dir/file permission requirements
|
||||
*
|
||||
* @author Chris Smith <chris@jalakai.co.uk>
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function check_permissions(){
|
||||
global $error;
|
||||
global $lang;
|
||||
|
||||
$dirs = array(
|
||||
'conf' => DOKU_LOCAL,
|
||||
'data' => DOKU_INC.'data',
|
||||
'pages' => DOKU_INC.'data/pages',
|
||||
'attic' => DOKU_INC.'data/attic',
|
||||
'media' => DOKU_INC.'data/media',
|
||||
'media_attic' => DOKU_INC.'data/media_attic',
|
||||
'media_meta' => DOKU_INC.'data/media_meta',
|
||||
'meta' => DOKU_INC.'data/meta',
|
||||
'cache' => DOKU_INC.'data/cache',
|
||||
'locks' => DOKU_INC.'data/locks',
|
||||
'index' => DOKU_INC.'data/index',
|
||||
'tmp' => DOKU_INC.'data/tmp'
|
||||
);
|
||||
|
||||
$ok = true;
|
||||
foreach($dirs as $dir){
|
||||
if(!file_exists("$dir/.") || !is_writable($dir)){
|
||||
$dir = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}', $dir);
|
||||
$error[] = sprintf($lang['i_permfail'],$dir);
|
||||
$ok = false;
|
||||
}
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the availability of functions used in DokuWiki and the PHP version
|
||||
*
|
||||
* @author Andreas Gohr <andi@splitbrain.org>
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function check_functions(){
|
||||
global $error;
|
||||
global $lang;
|
||||
$ok = true;
|
||||
|
||||
if(version_compare(phpversion(),'5.3.3','<')){
|
||||
$error[] = sprintf($lang['i_phpver'],phpversion(),'5.3.3');
|
||||
$ok = false;
|
||||
}
|
||||
|
||||
if(ini_get('mbstring.func_overload') != 0){
|
||||
$error[] = $lang['i_mbfuncoverload'];
|
||||
$ok = false;
|
||||
}
|
||||
|
||||
$funcs = explode(' ','addslashes call_user_func chmod copy fgets '.
|
||||
'file file_exists fseek flush filesize ftell fopen '.
|
||||
'glob header ignore_user_abort ini_get mail mkdir '.
|
||||
'ob_start opendir parse_ini_file readfile realpath '.
|
||||
'rename rmdir serialize session_start unlink usleep '.
|
||||
'preg_replace file_get_contents htmlspecialchars_decode '.
|
||||
'spl_autoload_register stream_select fsockopen pack');
|
||||
|
||||
if (!function_exists('mb_substr')) {
|
||||
$funcs[] = 'utf8_encode';
|
||||
$funcs[] = 'utf8_decode';
|
||||
}
|
||||
|
||||
foreach($funcs as $func){
|
||||
if(!function_exists($func)){
|
||||
$error[] = sprintf($lang['i_funcna'],$func);
|
||||
$ok = false;
|
||||
}
|
||||
}
|
||||
return $ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print language selection
|
||||
*
|
||||
* @author Andreas Gohr <andi@splitbrain.org>
|
||||
*/
|
||||
function langsel(){
|
||||
global $lang;
|
||||
global $LC;
|
||||
|
||||
$dir = DOKU_INC.'inc/lang';
|
||||
$dh = opendir($dir);
|
||||
if(!$dh) return;
|
||||
|
||||
$langs = array();
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
if(preg_match('/^[\._]/',$file)) continue;
|
||||
if(is_dir($dir.'/'.$file) && file_exists($dir.'/'.$file.'/lang.php')){
|
||||
$langs[] = $file;
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
sort($langs);
|
||||
|
||||
echo '<form action="">';
|
||||
echo $lang['i_chooselang'];
|
||||
echo ': <select name="l" onchange="submit()">';
|
||||
foreach($langs as $l){
|
||||
$sel = ($l == $LC) ? 'selected="selected"' : '';
|
||||
echo '<option value="'.$l.'" '.$sel.'>'.$l.'</option>';
|
||||
}
|
||||
echo '</select> ';
|
||||
echo '<input type="submit" value="'.$lang['btn_update'].'" />';
|
||||
echo '</form>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Print global error array
|
||||
*
|
||||
* @author Andreas Gohr <andi@splitbrain.org>
|
||||
*/
|
||||
function print_errors(){
|
||||
global $error;
|
||||
if(!empty($error)) {
|
||||
echo '<ul>';
|
||||
foreach ($error as $err){
|
||||
echo "<li>$err</li>";
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* remove magic quotes recursivly
|
||||
*
|
||||
* @author Andreas Gohr <andi@splitbrain.org>
|
||||
*
|
||||
* @param array $array
|
||||
*/
|
||||
function remove_magic_quotes(&$array) {
|
||||
foreach (array_keys($array) as $key) {
|
||||
if (is_array($array[$key])) {
|
||||
remove_magic_quotes($array[$key]);
|
||||
}else {
|
||||
$array[$key] = stripslashes($array[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
Icons: email.png, external-link.png, unc.png
|
||||
Icon set: Dusseldorf
|
||||
Designer: pc.de
|
||||
License: Creative Commons Attribution License [http://creativecommons.org/licenses/by/3.0/]
|
||||
URL: http://pc.de/icons/#Dusseldorf
|
|
@ -0,0 +1,2 @@
|
|||
These icons were taken from the nuvoX KDE icon theme and are GPL licensed
|
||||
See http://www.kde-look.org/content/show.php/nuvoX?content=38467
|
|
@ -0,0 +1,2 @@
|
|||
For the generator of these files see
|
||||
https://github.com/splitbrain/file-icon-generator/blob/master/example-dokuwiki.php
|
|
@ -0,0 +1,25 @@
|
|||
captcha Plugin for DokuWiki
|
||||
|
||||
All documentation for this plugin can be found at
|
||||
http://www.dokuwiki.org/plugin:captcha
|
||||
|
||||
If you install this plugin manually, make sure it is installed in
|
||||
lib/plugins/captcha/ - if the folder is called different it
|
||||
will not work!
|
||||
|
||||
Please refer to http://www.dokuwiki.org/plugins for additional info
|
||||
on how to install plugins in DokuWiki.
|
||||
|
||||
----
|
||||
Copyright (C) Andreas Gohr <andi@splitbrain.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
See the COPYING file in your DokuWiki folder for details
|
|
@ -0,0 +1,8 @@
|
|||
All fonts placed in this directory will be used randomly for the image captcha.
|
||||
The more and exotic fonts you use, the harder it will be to OCR. However you
|
||||
should be aware that most fonts are very hard to read when used for small sizes.
|
||||
|
||||
Provided fonts:
|
||||
|
||||
VeraSe.ttf - Bitsream Vera, http://www-old.gnome.org/fonts/
|
||||
Rufscript010.ttf - Rufscript, http://openfontlibrary.org/en/font/rufscript
|
|
@ -0,0 +1,13 @@
|
|||
Author: Michael Klier <chi@chimeric.de>
|
||||
Link: http://www.chimeric.de/projects/npa
|
||||
Voice: Christian Spellenberg
|
||||
|
||||
These samples represent the NATO phonetical alphabet. They are protected
|
||||
by the Creative Commons Sampling Plus 1.0 License. You are free to use
|
||||
and redistribute these samples under the conditions defined by the
|
||||
license. For further information read the LICENSE file and visit
|
||||
http://www.creativecommons.org.
|
||||
|
||||
Note: The original high quality wave files were downsampled and converted
|
||||
to 8-Bit mono files for distribution with the CAPTCHA plugin. Visit
|
||||
the link above for the original files.
|
|
@ -0,0 +1,11 @@
|
|||
====== Const Plugin for DokuWiki ======
|
||||
|
||||
All documentation for the Const Plugin is available online at:
|
||||
|
||||
* http://dokuwiki.org/plugin:const
|
||||
|
||||
(c) 2013 by lisps
|
||||
|
||||
This plugin uses the evalmath class (http://www.phpclasses.org/package/2695-PHP-Safely-evaluate-mathematical-expressions.html) by Miles Kaufmann (BSD License).
|
||||
|
||||
See LICENSE for license info.
|
|
@ -0,0 +1,10 @@
|
|||
====== Discussion Plugin for DokuWiki ======
|
||||
|
||||
All documentation for the Discussion Plugin is available online at:
|
||||
|
||||
* https://dokuwiki.org/plugin:discussion
|
||||
|
||||
(c) 2005 - 2007 by Esther Brunner <wikidesign@gmail.com>
|
||||
(c) 2008 - 2009 by Gina Häußge, Michael Klier <dokuwiki@chimeric.de>
|
||||
(c) 2013 by Michael Hamann <michael@content-space.de>
|
||||
See COPYING for license info.
|
|
@ -0,0 +1,26 @@
|
|||
DokuWiki plugin ExtTab3
|
||||
=======================
|
||||
|
||||
The third trial to implement extended (MediaWiki-style) table syntax in DokuWiki
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
http://www.mediawiki.org/wiki/Help:Tables
|
||||
|
||||
| markup | description |
|
||||
|:-- |:-- |
|
||||
|<code>{|</code> | table start |
|
||||
|<code>{+</code> | table caption |
|
||||
|<code>{-</code> | table row |
|
||||
|<code>!</code> | table header |
|
||||
|<code>|</code> | table data |
|
||||
|<code>|}</code> | table end |
|
||||
|
||||
----
|
||||
Licensed under the GNU Public License (GPL) version 2
|
||||
|
||||
More infomation is available:
|
||||
* http://www.dokuwiki.org/plugin:exttab3
|
||||
|
||||
(c) 2014 Satoshi Sahara \<sahara.satoshi@gmail.com>
|
|
@ -0,0 +1,27 @@
|
|||
gitbacked Plugin for DokuWiki
|
||||
|
||||
Store/Sync pages and media files in a git repository
|
||||
|
||||
All documentation for this plugin can be found at
|
||||
http://www.dokuwiki.org/plugin:gitbacked
|
||||
|
||||
If you install this plugin manually, make sure it is installed in
|
||||
lib/plugins/gitbacked/ - if the folder is called different it
|
||||
will not work!
|
||||
|
||||
Please refer to http://www.dokuwiki.org/plugins for additional info
|
||||
on how to install plugins in DokuWiki.
|
||||
|
||||
----
|
||||
Copyright (C) Wolfgang Gassler <wolfgang@gassler.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
See the COPYING file in your DokuWiki folder for details
|
|
@ -0,0 +1,71 @@
|
|||
GROUPMANAGER
|
||||
========
|
||||
|
||||
GROUPMANAGER is based on the original plugin GROUPMGR by Alex Forencich. This plugin has
|
||||
not been updated since 2010. It actually even never left the devel-zone, but the idea is
|
||||
great!
|
||||
|
||||
GROUPMGR already allowed easy modification of group membership by non-admins.
|
||||
This greatly simplified management of collaborative projects by group-admins.
|
||||
|
||||
GROUPMANAGER adds in functionality from the usermanager by Christopher Smith. This way
|
||||
existing users can easily be found and added to groups in Wikis with many users.
|
||||
Groupmanager may also enable group-admins to add and delete users independently from a
|
||||
super user, if these users belong to the groups they administer.
|
||||
|
||||
GROUPMANAGER has been designed with a certain scenario and setup in mind.
|
||||
This scenario is helpful to make Groupmanager a workable solution.
|
||||
That's why it is worked out at https://www.dokuwiki.org/plugin:groupmanager in more detail.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Unzip into lib/plugins directory
|
||||
|
||||
=====Syntax=====
|
||||
|
||||
<code>~~groupmanager|[groups to manage]|[allowed users and groups]~~</code>
|
||||
|
||||
Groups to manage separated by commas; the first group in the list will be the default group.
|
||||
|
||||
**Be careful**:
|
||||
Use ''~~groupmanager~~'' in lowercase letters; ''~~GROUPMANAGER~~'' may not work!
|
||||
|
||||
==== Example 1 ====
|
||||
|
||||
<code>~~groupmanager|wg_mygroup_reader|@wg_mygroup_admin~~</code>
|
||||
|
||||
Members of group ‘ wg_mygroup_reader ‘ can be managed by group ‘ wg_mygroup_admin ‘
|
||||
|
||||
==== Example 2 ====
|
||||
|
||||
<code>~~groupmanager|wg_mygroup_reader, wg_mygroup_editor|harald, @admin~~</code>
|
||||
|
||||
Members of ‘ wg_mygroup_reader ‘ and ‘ wg_mygroup_editor ‘ can be managed by user ‘harald’ and members of the group ‘admin’
|
||||
|
||||
|
||||
REMARKS
|
||||
-------
|
||||
1. In the examples above groups managed by groupmanager are named following the naming
|
||||
convention “wg_[groupname]_[role]”. This is not required by the syntax, but I would
|
||||
advise it nevertheless. (Side note: The interface beautifies the name of groups for
|
||||
simple users a bit by deleting the prefix “wg_”, replacing “_” with ” ” and
|
||||
capitalizing the first letter of the resulting words.)
|
||||
2. Super user groups can only be managed by super users
|
||||
3. Group-admins may assign the group-admin role to other users!
|
||||
4. But: users cannot remove themselves from the group that grants them access to the
|
||||
group admin (including admins)
|
||||
5. The conf_namespace option specifies a separate namespace for configuration.
|
||||
When the config namespace is used, a placeholder tag (~~groupmanager~~) can be used
|
||||
in the actual page while the full tag is placed in the configuration namespace at
|
||||
config_namespace:ID.
|
||||
6. If require_conf_namespace is set, all configuration options placed in the page
|
||||
are ignored, necessitating the use of the configuration namespace. For security
|
||||
reasons, this is the default configuration.
|
||||
7. The “forbidden_groups” configuration setting specifies groups that cannot be
|
||||
edited with the plugin (only relevant if conf_namespace is not configured).
|
||||
8. If allow_add_user is set, a dialog will be present in the interface that will
|
||||
allow users to be added to the Wiki. They will be automatically added to the
|
||||
“default” group, which is the first managed group (wg_mygroup_reader in the example).
|
||||
9. If allow_delete_user is set, checkboxes will be added to each user-record.
|
||||
Clicking on “update group” will delete checked users.
|
|
@ -0,0 +1,11 @@
|
|||
====== Include Plugin for DokuWiki ======
|
||||
|
||||
All documentation for the Include Plugin is available online at:
|
||||
|
||||
* http://dokuwiki.org/plugin:include
|
||||
|
||||
(c) 2005 - 2007 by Esther Brunner <wikidesign@gmail.com> and Christopher
|
||||
Smith <chris@jalakai.co.uk>
|
||||
(c) 2008 - 2009 by Gina Häußge, Michael Klier <dokuwiki@chimeric.de>
|
||||
(c) 2010 - 2012 by Michael Hamann <michael@content-space.de>, Gina Häußge and Michael Klier <dokuwiki@chimeric.de>
|
||||
See COPYING for license info.
|
|
@ -0,0 +1,25 @@
|
|||
vshare Plugin for DokuWiki
|
||||
|
||||
All documentation for this plugin can be found at
|
||||
http://www.dokuwiki.org/plugin:vshare
|
||||
|
||||
If you install this plugin manually, make sure it is installed in
|
||||
lib/plugins/vshare/ - if the folder is called different it
|
||||
will not work!
|
||||
|
||||
Please refer to http://www.dokuwiki.org/plugins for additional info
|
||||
on how to install plugins in DokuWiki.
|
||||
|
||||
----
|
||||
Copyright (C) Andreas Gohr <andi@splitbrain.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
See the COPYING file in your DokuWiki folder for details
|
|
@ -0,0 +1,19 @@
|
|||
dokuwiki-yalist-plugin
|
||||
======================
|
||||
|
||||
This plugin extends DokuWiki's list markup syntax to allow definition lists
|
||||
and list items with multiple paragraphs. The complete syntax is as follows:
|
||||
|
||||
```
|
||||
- ordered list item [<ol><li>] <!-- as standard syntax -->
|
||||
* unordered list item [<ul><li>] <!-- as standard syntax -->
|
||||
? definition list term [<dl><dt>]
|
||||
: definition list definition [<dl><dd>]
|
||||
|
||||
-- ordered list item w/ multiple paragraphs
|
||||
** unordered list item w/ multiple paragraphs
|
||||
:: definition list definition w/multiple paragraphs
|
||||
.. new paragraph in --, **, or ::
|
||||
```
|
||||
|
||||
Lists can be nested within lists, just as in the standard DokuWiki syntax.
|
|
@ -0,0 +1,102 @@
|
|||
# About
|
||||
|
||||
In this template I attempt a number of things:
|
||||
|
||||
* Make the layout of dokuwiki as simple as possible, striping it from any excess features I do not need, such as .discussions.. Simplyfying the layout further.
|
||||
* Fully support Bootstrap 3, with http://bootswatch.com/default/ theme as default, though I prefer ``yeti`` better.
|
||||
* My goal is to build a template in which I can easily publish my frequently used text's, commands, action plans etc for my friends a colleagues to use and add to.
|
||||
|
||||
# Features
|
||||
|
||||
* Back to basics, sharing knowledge and information between peers without collatoral.
|
||||
* Easily switch template visuals using pre-populated styles from http://bootswatch.com
|
||||
* Bootstrap 3 ready.
|
||||
* Automatic sidebar that scrolls along with you, collapsing / opening the main header of where you are in the page
|
||||
* Dokuwiki Menu functions out of sight, but just 2 clicks away.
|
||||
|
||||
# Screenshots
|
||||
|
||||
1. [Big width](https://raw.githubusercontent.com/badeendjuh/dokubootstrap-yeti/master/screenshot_big_width.png)
|
||||
2. [Medium width](https://raw.githubusercontent.com/badeendjuh/dokubootstrap-yeti/master/screenshot_small_width.png)
|
||||
|
||||
# Installation from Github
|
||||
|
||||
Do something like the following:
|
||||
|
||||
1. Install DokuWiki as you normally would. See
|
||||
[DokuWiki.org](https://www.dokuwiki.org).
|
||||
2. ```cd dokuwiki/lib/tpl```
|
||||
3. ```mkdir dokubootstrapsimplified```
|
||||
4. ```cd dokubootstrapsimplified```
|
||||
5. ```git init```
|
||||
6. ```git pull https://github.com/badeendjuh/dokubootstrap-simplified.git```
|
||||
7. Using DokuWiki's admin interface, change the wiki's template to
|
||||
dokubootstrap-simplified.
|
||||
|
||||
# Customization
|
||||
|
||||
From the Configuration Manager screen you can change to any of the available bootstrap themes on http://bootswatch.com/
|
||||
|
||||
If however you want to substitute the library with your own bootsrap theme you need to be aware of the following files
|
||||
|
||||
* css/
|
||||
* bootstrap-<theme>.min.css
|
||||
* modifications.css: place minor global modifications to the
|
||||
bootstrap theme here. See included modifications.css, which enables the use of TOC sidebar.
|
||||
* js/
|
||||
* bootstrap.min.js: compile all your desired plugins into a single
|
||||
minimized javascript file. The included bootstrap.min.js is version 3.0.2 andincludes all
|
||||
plugins.
|
||||
* modifications.js: Contains all javascript additions, including some client-side fixing of markup, adding the scroll behavior to the TOC etc.
|
||||
|
||||
|
||||
# Warning
|
||||
|
||||
This theme is hard-coded to use minified Bootstrap CSS and Bootstrap javascript.
|
||||
|
||||
Tested with Dokuwiki "Binky" and "Ponder Stibbon".
|
||||
|
||||
This theme is intended primarily for small sites that are modified by only a handfull of people. Effort has been made to make public facing things look nice, but non-public interfaces (e.g., edit interfaces, admin, configuration settings) may not have been updated and may appear ugly. These should still be functional.
|
||||
|
||||
When making changes, please have a carefull look at js/modifications.js; it contains some client side fixing of markup, which could be done in the Dokuwiki core code, but that's to deep a change to be included in this template. The comments in the .js file should provide suffiecient clarification on the purpose of each statement.
|
||||
|
||||
## Bugs
|
||||
|
||||
The only major ``bug`` that I am aware of is that, when attempting to upload a
|
||||
new file to the median manager, a file upload button might not appear. Click on
|
||||
the words "select files..." and the file upload select box will appear.
|
||||
|
||||
|
||||
# DokuWiki Specifics
|
||||
|
||||
This template supports the use of a ```nav.html``` file (a sample is included).
|
||||
Add any Wiki-wide links that you would like to, with each link being inside an
|
||||
li element. I tried adding support for a Wiki-based navigation page, instead of
|
||||
raw HTML, but due to how DokuWiki outputs lists, the output clashed with
|
||||
existing CSS and was unusable.
|
||||
|
||||
This template does support a ```footer.html``` file, which will be output after
|
||||
the page information and site license.
|
||||
|
||||
This template does support a ```meta.html``` file, which will be output right
|
||||
before the head element is closed.
|
||||
|
||||
# Acknowledgements
|
||||
|
||||
This theme started as a fork from https://github.com/ryanwmoore/dokutwitterbootstrap
|
||||
So big thanks to Ryan.
|
||||
|
||||
Also, this template would not exists without http://getbootstrap.com and http://bootswatch.com
|
||||
|
||||
# License
|
||||
|
||||
This DokuWiki theme is based off of the [dokutwitterbootstrap Template](https://github.com/ryanwmoore/dokutwitterbootstrap), released
|
||||
under GPL v2.0. Therefore, this template is also released under that license.
|
||||
|
||||
I've modified the template to make even more use of Twitter Bootstrap
|
||||
code/functionality. Twitter Bootstrap is licensed under Apache License v2.0.
|
||||
According to http://www.apache.org/licenses/GPL-compatibility.html , the Free
|
||||
Software Foundation does not consider GPL2 to be compatible with Apache 2.0.
|
||||
|
||||
I don't really know how much it matters to the average user. Consult a lawyer if you're worried about this potential incompatibility.
|
||||
|
Loading…
Reference in New Issue