raster pushed a commit to branch master.

http://git.enlightenment.org/website/www.git/commit/?id=6db69ff62a44de5a069c8a2772112493bad5d133

commit 6db69ff62a44de5a069c8a2772112493bad5d133
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Fri Apr 17 09:57:31 2015 +0900

    Revert "MINOR: Remove dist and example files"
    
    This reverts commit ea04fd391393db0815437e6f14d3dab9817e670d.
---
 public_html/.htaccess.dist              |  35 +++++
 public_html/conf/acl.auth.php.dist      |  21 +++
 public_html/conf/local.php.dist         |  16 ++
 public_html/conf/mysql.conf.php.example | 253 ++++++++++++++++++++++++++++++++
 public_html/conf/users.auth.php.dist    |  10 ++
 public_html/inc/preload.php.dist        |  17 +++
 6 files changed, 352 insertions(+)

diff --git a/public_html/.htaccess.dist b/public_html/.htaccess.dist
new file mode 100644
index 0000000..5724a6e
--- /dev/null
+++ b/public_html/.htaccess.dist
@@ -0,0 +1,35 @@
+## Enable this to restrict editing to logged in users only
+
+## You should disable Indexes and MultiViews either here or in the
+## global config. Symlinks maybe needed for URL rewriting.
+#Options -Indexes -MultiViews +FollowSymLinks
+
+## make sure nobody gets the htaccess, README, COPYING or VERSION files
+<Files ~ "^([\._]ht|README$|VERSION$|COPYING$)">
+    Order allow,deny
+    Deny from all
+</Files>
+
+## Uncomment these rules if you want to have nice URLs using
+## $conf['userewrite'] = 1 - not needed for rewrite mode 2
+#RewriteEngine on
+#
+#RewriteRule ^_media/(.*)              lib/exe/fetch.php?media=$1  [QSA,L]
+#RewriteRule ^_detail/(.*)             lib/exe/detail.php?media=$1  [QSA,L]
+#RewriteRule ^_export/([^/]+)/(.*)     doku.php?do=export_$1&id=$2  [QSA,L]
+#RewriteRule ^$                        doku.php  [L]
+#RewriteCond %{REQUEST_FILENAME}       !-f
+#RewriteCond %{REQUEST_FILENAME}       !-d
+#RewriteRule (.*)                      doku.php?id=$1  [QSA,L]
+#RewriteRule ^index.php$               doku.php
+#
+## Not all installations will require the following line.  If you do,
+## change "/dokuwiki" to the path to your dokuwiki directory relative
+## to your document root.
+#RewriteBase /dokuwiki
+#
+## If you enable DokuWikis XML-RPC interface, you should consider to
+## restrict access to it over HTTPS only! Uncomment the following two
+## rules if your server setup allows HTTPS.
+#RewriteCond %{HTTPS} !=on
+#RewriteRule ^lib/exe/xmlrpc.php$      https://%{SERVER_NAME}%{REQUEST_URI} 
[L,R=301]
diff --git a/public_html/conf/acl.auth.php.dist 
b/public_html/conf/acl.auth.php.dist
new file mode 100644
index 0000000..14344d7
--- /dev/null
+++ b/public_html/conf/acl.auth.php.dist
@@ -0,0 +1,21 @@
+# acl.auth.php
+# <?php exit()?>
+# Don't modify the lines above
+#
+# Access Control Lists
+#
+# Editing this file by hand shouldn't be necessary. Use the ACL
+# Manager interface instead.
+#
+# If your auth backend allows special char like spaces in groups
+# or user names you need to urlencode them (only chars <128, leave
+# UTF-8 multibyte chars as is)
+#
+# none   0
+# read   1
+# edit   2
+# create 4
+# upload 8
+# delete 16
+
+*               @ALL        8
diff --git a/public_html/conf/local.php.dist b/public_html/conf/local.php.dist
new file mode 100644
index 0000000..0397954
--- /dev/null
+++ b/public_html/conf/local.php.dist
@@ -0,0 +1,16 @@
+<?php
+/**
+ * This is an example of how a local.php could look like.
+ * Simply copy the options you want to change from dokuwiki.php
+ * to this file and change them.
+ *
+ * When using the installer, a correct local.php file be generated for
+ * you automatically.
+ */
+
+
+//$conf['title']       = 'My Wiki';        //what to show in the title
+
+//$conf['useacl']      = 1;                //Use Access Control Lists to 
restrict access?
+//$conf['superuser']   = 'joe';
+
diff --git a/public_html/conf/mysql.conf.php.example 
b/public_html/conf/mysql.conf.php.example
new file mode 100644
index 0000000..8337f51
--- /dev/null
+++ b/public_html/conf/mysql.conf.php.example
@@ -0,0 +1,253 @@
+<?php
+/*
+ * This is an example configuration for the mysql auth plugin.
+ *
+ * This SQL statements are optimized for following table structure.
+ * If you use a different one you have to change them accordingly.
+ * See comments of every statement for details.
+ *
+ * TABLE users
+ *     uid   login   pass   firstname   lastname   email
+ *
+ * TABLE groups
+ *     gid   name
+ *
+ * TABLE usergroup
+ *     uid   gid
+ *
+ * To use this configuration you have to copy them to local.protected.php
+ * or at least include this file in local.protected.php.
+ */
+
+/* Options to configure database access. You need to set up this
+ * options carefully, otherwise you won't be able to access you
+ * database.
+ */
+$conf['plugin']['authmysql']['server']   = '';
+$conf['plugin']['authmysql']['user']     = '';
+$conf['plugin']['authmysql']['password'] = '';
+$conf['plugin']['authmysql']['database'] = '';
+
+/* This option enables debug messages in the mysql plugin. It is
+ * mostly useful for system admins.
+ */
+$conf['plugin']['authmysql']['debug'] = 0;
+
+/* Normally password encryption is done by DokuWiki (recommended) but for
+ * some reasons it might be usefull to let the database do the encryption.
+ * Set 'forwardClearPass' to '1' and the cleartext password is forwarded to
+ * the database, otherwise the encrypted one.
+ */
+$conf['plugin']['authmysql']['forwardClearPass'] = 0;
+
+/* Multiple table operations will be protected by locks. This array tolds
+ * the plugin which tables to lock. If you use any aliases for table names
+ * these array must also contain these aliases. Any unamed alias will cause
+ * a warning during operation. See the example below.
+ */
+$conf['plugin']['authmysql']['TablesToLock']= array("users", "users AS 
u","groups", "groups AS g", "usergroup", "usergroup AS ug");
+
+/***********************************************************************/
+/*       Basic SQL statements for user authentication (required)       */
+/***********************************************************************/
+
+/* This statement is used to grant or deny access to the wiki. The result
+ * should be a table with exact one line containing at least the password
+ * of the user. If the result table is empty or contains more than one
+ * row, access will be denied.
+ *
+ * The plugin accesses the password as 'pass' so an alias might be necessary.
+ *
+ * Following patters will be replaced:
+ *   %{user}    user name
+ *   %{pass}    encrypted or clear text password (depends on 'encryptPass')
+ *   %{dgroup}  default group name
+ */
+$conf['plugin']['authmysql']['checkPass']   = "SELECT pass
+                                               FROM usergroup AS ug
+                                               JOIN users AS u ON u.uid=ug.uid
+                                               JOIN groups AS g ON g.gid=ug.gid
+                                               WHERE login='%{user}'
+                                               AND name='%{dgroup}'";
+
+/* This statement should return a table with exact one row containing
+ * information about one user. The field needed are:
+ * 'pass'  containing the encrypted or clear text password
+ * 'name'  the user's full name
+ * 'mail'  the user's email address
+ *
+ * Keep in mind that Dokuwiki will access thise information through the
+ * names listed above so aliasses might be neseccary.
+ *
+ * Following patters will be replaced:
+ *   %{user}    user name
+ */
+$conf['plugin']['authmysql']['getUserInfo'] = "SELECT pass, CONCAT(firstname,' 
',lastname) AS name, email AS mail
+                                               FROM users
+                                               WHERE login='%{user}'";
+
+/* This statement is used to get all groups a user is member of. The
+ * result should be a table containing all groups the given user is
+ * member of. The plugin accesses the group name as 'group' so an alias
+ * might be nessecary.
+ *
+ * Following patters will be replaced:
+ *   %{user}    user name
+ */
+$conf['plugin']['authmysql']['getGroups']   = "SELECT name as `group`
+                                               FROM groups g, users u, 
usergroup ug
+                                               WHERE u.uid = ug.uid
+                                               AND g.gid = ug.gid
+                                               AND u.login='%{user}'";
+
+/***********************************************************************/
+/*      Additional minimum SQL statements to use the user manager      */
+/***********************************************************************/
+
+/* This statement should return a table containing all user login names
+ * that meet certain filter criteria. The filter expressions will be added
+ * case dependend by the plugin. At the end a sort expression will be added.
+ * Important is that this list contains no double entries for a user. Each
+ * user name is only allowed once in the table.
+ *
+ * The login name will be accessed as 'user' to an alias might be neseccary.
+ * No patterns will be replaced in this statement but following patters
+ * will be replaced in the filter expressions:
+ *   %{user}    in FilterLogin  user's login name
+ *   %{name}    in FilterName   user's full name
+ *   %{email}   in FilterEmail  user's email address
+ *   %{group}   in FilterGroup  group name
+ */
+$conf['plugin']['authmysql']['getUsers']    = "SELECT DISTINCT login AS user
+                                               FROM users AS u
+                                               LEFT JOIN usergroup AS ug ON 
u.uid=ug.uid
+                                               LEFT JOIN groups AS g ON 
ug.gid=g.gid";
+$conf['plugin']['authmysql']['FilterLogin'] = "login LIKE '%{user}'";
+$conf['plugin']['authmysql']['FilterName']  = "CONCAT(firstname,' ',lastname) 
LIKE '%{name}'";
+$conf['plugin']['authmysql']['FilterEmail'] = "email LIKE '%{email}'";
+$conf['plugin']['authmysql']['FilterGroup'] = "name LIKE '%{group}'";
+$conf['plugin']['authmysql']['SortOrder']   = "ORDER BY login";
+
+/***********************************************************************/
+/*   Additional SQL statements to add new users with the user manager  */
+/***********************************************************************/
+
+/* This statement should add a user to the database. Minimum information
+ * to store are: login name, password, email address and full name.
+ *
+ * Following patterns will be replaced:
+ *   %{user}    user's login name
+ *   %{pass}    password (encrypted or clear text, depends on 'encryptPass')
+ *   %{email}   email address
+ *   %{name}    user's full name
+ */
+$conf['plugin']['authmysql']['addUser']     = "INSERT INTO users
+                                               (login, pass, email, firstname, 
lastname)
+                                               VALUES ('%{user}', '%{pass}', 
'%{email}',
+                                               SUBSTRING_INDEX('%{name}',' ', 
1),
+                                               SUBSTRING_INDEX('%{name}',' ', 
-1))";
+
+/* This statement should add a group to the database.
+ * Following patterns will be replaced:
+ *   %{group}   group name
+ */
+$conf['plugin']['authmysql']['addGroup']    = "INSERT INTO groups (name)
+                                               VALUES ('%{group}')";
+
+/* This statement should connect a user to a group (a user become member
+ * of that group).
+ * Following patterns will be replaced:
+ *   %{user}    user's login name
+ *   %{uid}     id of a user dataset
+ *   %{group}   group name
+ *   %{gid}     id of a group dataset
+ */
+$conf['plugin']['authmysql']['addUserGroup']= "INSERT INTO usergroup (uid, gid)
+                                               VALUES ('%{uid}', '%{gid}')";
+
+/* This statement should remove a group fom the database.
+ * Following patterns will be replaced:
+ *   %{group}   group name
+ *   %{gid}     id of a group dataset
+ */
+$conf['plugin']['authmysql']['delGroup']    = "DELETE FROM groups
+                                               WHERE gid='%{gid}'";
+
+/* This statement should return the database index of a given user name.
+ * The plugin will access the index with the name 'id' so an alias might be
+ * necessary.
+ * following patters will be replaced:
+ *   %{user}    user name
+ */
+$conf['plugin']['authmysql']['getUserID']   = "SELECT uid AS id
+                                               FROM users
+                                               WHERE login='%{user}'";
+
+/***********************************************************************/
+/*   Additional SQL statements to delete users with the user manager   */
+/***********************************************************************/
+
+/* This statement should remove a user fom the database.
+ * Following patterns will be replaced:
+ *   %{user}    user's login name
+ *   %{uid}     id of a user dataset
+ */
+$conf['plugin']['authmysql']['delUser']     = "DELETE FROM users
+                                               WHERE uid='%{uid}'";
+
+/* This statement should remove all connections from a user to any group
+ * (a user quits membership of all groups).
+ * Following patterns will be replaced:
+ *   %{uid}     id of a user dataset
+ */
+$conf['plugin']['authmysql']['delUserRefs'] = "DELETE FROM usergroup
+                                               WHERE uid='%{uid}'";
+
+/***********************************************************************/
+/*   Additional SQL statements to modify users with the user manager   */
+/***********************************************************************/
+
+/* This statements should modify a user entry in the database. The
+ * statements UpdateLogin, UpdatePass, UpdateEmail and UpdateName will be
+ * added to updateUser on demand. Only changed parameters will be used.
+ *
+ * Following patterns will be replaced:
+ *   %{user}    user's login name
+ *   %{pass}    password (encrypted or clear text, depends on 'encryptPass')
+ *   %{email}   email address
+ *   %{name}    user's full name
+ *   %{uid}     user id that should be updated
+ */
+$conf['plugin']['authmysql']['updateUser']  = "UPDATE users SET";
+$conf['plugin']['authmysql']['UpdateLogin'] = "login='%{user}'";
+$conf['plugin']['authmysql']['UpdatePass']  = "pass='%{pass}'";
+$conf['plugin']['authmysql']['UpdateEmail'] = "email='%{email}'";
+$conf['plugin']['authmysql']['UpdateName']  = 
"firstname=SUBSTRING_INDEX('%{name}',' ', 1),
+                                               
lastname=SUBSTRING_INDEX('%{name}',' ', -1)";
+$conf['plugin']['authmysql']['UpdateTarget']= "WHERE uid=%{uid}";
+
+/* This statement should remove a single connection from a user to a
+ * group (a user quits membership of that group).
+ *
+ * Following patterns will be replaced:
+ *   %{user}    user's login name
+ *   %{uid}     id of a user dataset
+ *   %{group}   group name
+ *   %{gid}     id of a group dataset
+ */
+$conf['plugin']['authmysql']['delUserGroup']= "DELETE FROM usergroup
+                                               WHERE uid='%{uid}'
+                                               AND gid='%{gid}'";
+
+/* This statement should return the database index of a given group name.
+ * The plugin will access the index with the name 'id' so an alias might
+ * be necessary.
+ *
+ * Following patters will be replaced:
+ *   %{group}   group name
+ */
+$conf['plugin']['authmysql']['getGroupID']  = "SELECT gid AS id
+                                               FROM groups
+                                               WHERE name='%{group}'";
+
+
diff --git a/public_html/conf/users.auth.php.dist 
b/public_html/conf/users.auth.php.dist
new file mode 100644
index 0000000..df3c784
--- /dev/null
+++ b/public_html/conf/users.auth.php.dist
@@ -0,0 +1,10 @@
+# users.auth.php
+# <?php exit()?>
+# Don't modify the lines above
+#
+# Userfile
+#
+# Format:
+#
+# login:passwordhash:Real Name:email:groups,comma,seperated
+
diff --git a/public_html/inc/preload.php.dist b/public_html/inc/preload.php.dist
new file mode 100644
index 0000000..7acda0e
--- /dev/null
+++ b/public_html/inc/preload.php.dist
@@ -0,0 +1,17 @@
+<?php
+/**
+ * This is an example for a farm setup. Simply copy this file to preload.php 
and
+ * uncomment what you need. See http://www.dokuwiki.org/farms for more 
information.
+ * You can also use preload.php for other things than farming, e.g. for moving
+ * local configuration files out of the main ./conf directory.
+ */
+
+// set this to your farm directory
+//if(!defined('DOKU_FARMDIR')) define('DOKU_FARMDIR', '/var/www/farm');
+
+// include this after DOKU_FARMDIR if you want to use farms
+//include(fullpath(dirname(__FILE__)).'/farm.php');
+
+// you can overwrite the $config_cascade to your liking
+//$config_cascade = array(
+//);

-- 


Reply via email to