diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2013-02-25 14:50:59 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-02-25 14:50:59 +0000 |
commit | 1fe0882c56ea31e738540e942b743966927415fd (patch) | |
tree | c3324566ada64f09775b35bc989592c7701c32d4 /lib | |
parent | 177daee5492e8c3cdfdb950cdf61a6798f7a9586 (diff) | |
parent | 058fd09655df42c72f3c447e3b9561e4909e978d (diff) | |
download | rpg-1fe0882c56ea31e738540e942b743966927415fd.tar.gz rpg-1fe0882c56ea31e738540e942b743966927415fd.tar.bz2 |
Merge branch 'master' into FS#2415
Diffstat (limited to 'lib')
47 files changed, 415 insertions, 170 deletions
diff --git a/lib/exe/detail.php b/lib/exe/detail.php index e597db3a2..db635c016 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -31,7 +31,7 @@ if($AUTH >= AUTH_READ){ $SRC = mediaFN($IMG); if(!@file_exists($SRC)){ //doesn't exist! - header("HTTP/1.0 404 File not Found"); + http_status(404); $ERROR = 'File not found'; } }else{ diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 73e74af40..9bac4d272 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -58,7 +58,7 @@ if(!defined('SIMPLE_TEST')) { } // send any non 200 status if($data['status'] != 200) { - header('HTTP/1.0 '.$data['status'].' '.$data['statusmessage']); + http_status($data['status'], $data['statusmessage']); } // die on errors if($data['status'] > 203) { @@ -137,7 +137,7 @@ function sendFile($file, $mime, $dl, $cache) { if($fp) { http_rangeRequest($fp, filesize($file), $mime); } else { - header("HTTP/1.0 500 Internal Server Error"); + http_status(500); print "Could not read $file - bad permissions?"; } } diff --git a/lib/exe/js.php b/lib/exe/js.php index 41d3e735c..4ff48133e 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -62,7 +62,7 @@ function js_out(){ DOKU_INC.'lib/scripts/locktimer.js', DOKU_INC.'lib/scripts/linkwiz.js', DOKU_INC.'lib/scripts/media.js', - DOKU_INC.'lib/scripts/compatibility.js', +# deprecated DOKU_INC.'lib/scripts/compatibility.js', # disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js', DOKU_INC.'lib/scripts/behaviour.js', DOKU_INC.'lib/scripts/page.js', diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index 7e0543540..a205c4570 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -36,19 +36,16 @@ // do not display the manager if user does not have read access if($AUTH < AUTH_READ && !$fullscreen) { - header('HTTP/1.0 403 Forbidden'); + http_status(403); die($lang['accessdenied']); } - // create the given namespace (just for beautification) - if($AUTH >= AUTH_UPLOAD) { io_createNamespace("$NS:xxx", 'media'); } - // handle flash upload if(isset($_FILES['Filedata'])){ $_FILES['upload'] =& $_FILES['Filedata']; $JUMPTO = media_upload($NS,$AUTH); if($JUMPTO == false){ - header("HTTP/1.0 400 Bad Request"); + http_status(400); echo 'Upload failed'; } echo 'ok'; diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 5e6c197d0..c09daa17c 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -29,10 +29,10 @@ class dokuwiki_xmlrpc_server extends IXR_Server { return $result; } catch (RemoteAccessDeniedException $e) { if (!isset($_SERVER['REMOTE_USER'])) { - header('HTTP/1.1 401 Unauthorized'); + http_status(401); return new IXR_Error(-32603, "server error. not authorized to call method $methodname"); } else { - header('HTTP/1.1 403 Forbidden'); + http_status(403); return new IXR_Error(-32604, "server error. forbidden to call the method $methodname"); } } catch (RemoteException $e) { diff --git a/lib/plugins/acl/lang/vi/help.txt b/lib/plugins/acl/lang/vi/help.txt index 23e258678..816e5ee71 100644 --- a/lib/plugins/acl/lang/vi/help.txt +++ b/lib/plugins/acl/lang/vi/help.txt @@ -1,12 +1,12 @@ -=== Trợ giúp nhanh: ===
-
-Trang này giúp bạn thêm hoặc xóa quyền được cấp cho 1 thư mục hoặc trang wiki của bạn.
-
-Của sổ bên trái hiển thị tất cả các thư mục và trang văn bản.
-
-Khung trên đây cho phép bạn xem và sửa quyền của một nhóm hoặc thành viên đã chọn.
-
-Bảng bên dưới hiển thị tất cả các quyền được cấp. Bạn có thể sửa hoặc hóa các quyền đó một cách nhanh chóng.
-
-Đọc [[doku>acl|tài liệu chính thức về ACL]] sẽ giúp bạn hiểu hơn về cách phân quyền ở DokuWiki.
-
+=== Trợ giúp nhanh: === + +Trang này giúp bạn thêm hoặc xóa quyền được cấp cho 1 thư mục hoặc trang wiki của bạn. + +Của sổ bên trái hiển thị tất cả các thư mục và trang văn bản. + +Khung trên đây cho phép bạn xem và sửa quyền của một nhóm hoặc thành viên đã chọn. + +Bảng bên dưới hiển thị tất cả các quyền được cấp. Bạn có thể sửa hoặc hóa các quyền đó một cách nhanh chóng. + +Đọc [[doku>acl|tài liệu chính thức về ACL]] sẽ giúp bạn hiểu hơn về cách phân quyền ở DokuWiki. + diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js index 0ba91cdc9..c3763dc8d 100644 --- a/lib/plugins/acl/script.js +++ b/lib/plugins/acl/script.js @@ -117,11 +117,3 @@ var dw_acl = { }; jQuery(dw_acl.init); - -var acl = { - init: DEPRECATED_WRAP(dw_acl.init, dw_acl), - userselhandler: DEPRECATED_WRAP(dw_acl.userselhandler, dw_acl), - loadinfo: DEPRECATED_WRAP(dw_acl.loadinfo, dw_acl), - parseatt: DEPRECATED_WRAP(dw_acl.parseatt, dw_acl), - treehandler: DEPRECATED_WRAP(dw_acl.treehandler, dw_acl) -}; diff --git a/lib/plugins/acl/style.css b/lib/plugins/acl/style.css index f4277c341..d8f0b53f3 100644 --- a/lib/plugins/acl/style.css +++ b/lib/plugins/acl/style.css @@ -1,5 +1,5 @@ -div#acl_manager div#acl__tree { +#acl__tree { font-size: 90%; width: 25%; height: 300px; @@ -8,61 +8,61 @@ div#acl_manager div#acl__tree { border: 1px solid __border__; text-align: left; } -[dir=rtl] div#acl_manager div#acl__tree { +[dir=rtl] #acl__tree { float: right; text-align: right; } -div#acl_manager div#acl__tree a.cur { +#acl__tree a.cur { background-color: __highlight__; font-weight: bold; } -div#acl_manager div#acl__tree ul { +#acl__tree ul { list-style-type: none; margin: 0; padding: 0; } -div#acl_manager div#acl__tree li { +#acl__tree li { padding-left: 1em; list-style-image: none; } -[dir=rtl] div#acl_manager div#acl__tree li { +[dir=rtl] #acl__tree li { padding-left: 0em; padding-right: 1em; } -div#acl_manager div#acl__tree ul img { +#acl__tree ul img { margin-right: 0.25em; cursor: pointer; } -[dir=rtl] div#acl_manager div#acl__tree ul img { +[dir=rtl] #acl__tree ul img { margin-left: 0.25em; margin-right: 0em; } -div#acl_manager div#acl__detail { +#acl__detail { width: 73%; height: 300px; float: right; overflow: auto; } -[dir=rtl] div#acl_manager div#acl__detail { +[dir=rtl] #acl__detail { float: left; } -div#acl_manager div#acl__detail fieldset { +#acl__detail fieldset { width: 90%; } -div#acl_manager div#acl__detail div#acl__user { +#acl__detail div#acl__user { border: 1px solid __border__; padding: 0.5em; margin-bottom: 0.6em; } -div#acl_manager table.inline { +#acl_manager table.inline { width: 100%; margin: 0; } @@ -75,59 +75,60 @@ div#acl_manager table.inline { text-align: right; } -div#acl_manager .aclgroup { +#acl_manager .aclgroup { background: transparent url(pix/group.png) 0px 1px no-repeat; padding: 1px 0px 1px 18px; } -[dir=rtl] div#acl_manager .aclgroup { +[dir=rtl] #acl_manager .aclgroup { background: transparent url(pix/group.png) right 1px no-repeat; padding: 1px 18px 1px 0px; display: inline-block; /* needed for IE7 */ } -div#acl_manager .acluser { +#acl_manager .acluser { background: transparent url(pix/user.png) 0px 1px no-repeat; padding: 1px 0px 1px 18px; } -[dir=rtl] div#acl_manager .acluser { +[dir=rtl] #acl_manager .acluser { background: transparent url(pix/user.png) right 1px no-repeat; padding: 1px 18px 1px 0px; display: inline-block; /* needed for IE7 */ } -div#acl_manager .aclpage { +#acl_manager .aclpage { background: transparent url(pix/page.png) 0px 1px no-repeat; padding: 1px 0px 1px 18px; } -[dir=rtl] div#acl_manager .aclpage { +[dir=rtl] #acl_manager .aclpage { background: transparent url(pix/page.png) right 1px no-repeat; padding: 1px 18px 1px 0px; display: inline-block; /* needed for IE7 */ } -div#acl_manager .aclns { +#acl_manager .aclns { background: transparent url(pix/ns.png) 0px 1px no-repeat; padding: 1px 0px 1px 18px; } -[dir=rtl] div#acl_manager .aclns { +[dir=rtl] #acl_manager .aclns { background: transparent url(pix/ns.png) right 1px no-repeat; padding: 1px 18px 1px 0px; display: inline-block; /* needed for IE7 */ } -div#acl_manager label.disabled { - color: __text_neu__!important; +#acl_manager label.disabled { + opacity: .5; + cursor: auto; } #acl_manager label { - text-align: left; - font-weight: normal; - display: inline; + text-align: left; + font-weight: normal; + display: inline; } #acl_manager table { - margin-left: 10%; - width: 80%; + margin-left: 10%; + width: 80%; } #acl_manager table tr { diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index f651d87a1..6c49eafbb 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -71,6 +71,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * Constructor */ public function __construct() { + global $INPUT; parent::__construct(); // we load the config early to modify it a bit here @@ -99,8 +100,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { // we need to simulate a login if(empty($_COOKIE[DOKU_COOKIE])) { - $_REQUEST['u'] = $_SERVER['REMOTE_USER']; - $_REQUEST['p'] = 'sso_only'; + $INPUT->set('u', $_SERVER['REMOTE_USER']); + $INPUT->set('p', 'sso_only'); } } diff --git a/lib/plugins/authad/conf/default.php b/lib/plugins/authad/conf/default.php new file mode 100644 index 000000000..05d6c328e --- /dev/null +++ b/lib/plugins/authad/conf/default.php @@ -0,0 +1,14 @@ +<?php + +$conf['account_suffix'] = ''; +$conf['base_dn'] = ''; +$conf['domain_controllers'] = ''; +$conf['sso'] = 0; +$conf['ad_username'] = ''; +$conf['ad_password'] = ''; +$conf['real_primarygroup'] = 0; +$conf['use_ssl'] = 0; +$conf['use_tls'] = 0; +$conf['debug'] = 0; +$conf['expirywarn'] = 0; +$conf['additional'] = '';
\ No newline at end of file diff --git a/lib/plugins/authad/lang/it/settings.php b/lib/plugins/authad/lang/it/settings.php new file mode 100644 index 000000000..10ae72f87 --- /dev/null +++ b/lib/plugins/authad/lang/it/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Italian language file + * + */ diff --git a/lib/plugins/authad/lang/zh/settings.php b/lib/plugins/authad/lang/zh/settings.php new file mode 100644 index 000000000..9fd3c4e35 --- /dev/null +++ b/lib/plugins/authad/lang/zh/settings.php @@ -0,0 +1,18 @@ +<?php +/** + * Chinese language file + * + * @author lainme <lainme993@gmail.com> + */ +$lang['account_suffix'] = '您的账户后缀。例如 <code>@my.domain.org</code>'; +$lang['base_dn'] = '您的基本分辨名。例如 <code>DC=my,DC=domain,DC=org</code>'; +$lang['domain_controllers'] = '逗号分隔的域名控制器列表。例如 <code>srv1.domain.org,srv2.domain.org</code>'; +$lang['ad_username'] = '一个活动目录的特权用户,可以查看其他所有用户的数据。可选,但对某些活动例如发送订阅邮件是必须的。'; +$lang['ad_password'] = '上述用户的密码。'; +$lang['sso'] = '是否使用经由 Kerberos 和 NTLM 的 Single-Sign-On?'; +$lang['real_primarygroup'] = ' 是否解析真实的主要组,而不是假设为“域用户” (较慢)'; +$lang['use_ssl'] = '使用 SSL 连接?如果是,不要激活下面的 TLS。'; +$lang['use_tls'] = '使用 TLS 连接?如果是 ,不要激活上面的 SSL。'; +$lang['debug'] = '有错误时显示额外的调试信息?'; +$lang['expirywarn'] = '提前多少天警告用户密码即将到期。0 则禁用。'; +$lang['additional'] = '需要从用户数据中获取的额外 AD 属性的列表,以逗号分隔。用于某些插件。'; diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index 35971d41d..d07f9c82e 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -1,7 +1,19 @@ <?php -$conf['port'] = 389; - -$conf['groupkey'] = 'cn'; +$conf['server'] = ''; +$conf['port'] = 389; +$conf['usertree'] = ''; +$conf['grouptree'] = ''; +$conf['userfilter'] = ''; +$conf['groupfilter'] = ''; +$conf['version'] = 2; +$conf['starttls'] = 0; +$conf['referrals'] = 0; +$conf['binddn'] = ''; +$conf['bindpw'] = ''; +//$conf['mapping']['name'] unsupported in config manager +//$conf['mapping']['grps'] unsupported in config manager $conf['userscope'] = 'sub'; -$conf['groupscope'] = 'sub';
\ No newline at end of file +$conf['groupscope'] = 'sub'; +$conf['groupkey'] = 'cn'; +$conf['debug'] = array('onoff');
\ No newline at end of file diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php index e0815f789..fc5b2e63c 100644 --- a/lib/plugins/authldap/conf/metadata.php +++ b/lib/plugins/authldap/conf/metadata.php @@ -14,4 +14,5 @@ $meta['bindpw'] = array('password'); //$meta['mapping']['grps'] unsupported in config manager $meta['userscope'] = array('multichoice','_choices' => array('sub','one','base')); $meta['groupscope'] = array('multichoice','_choices' => array('sub','one','base')); +$meta['groupkey'] = array('string'); $meta['debug'] = array('onoff');
\ No newline at end of file diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index e3f4bab31..ddedf8ae3 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -1,15 +1,16 @@ <?php $lang['server'] = 'Your LDAP server. Either hostname (<code>localhost</code>) or full qualified URL (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'LDAP server port if no full URL was given above'; -$lang['usertree'] = 'Where to finde the user accounts. Eg. <code>ou=People, dc=server, dc=tld</code>'; +$lang['usertree'] = 'Where to find the user accounts. Eg. <code>ou=People, dc=server, dc=tld</code>'; $lang['grouptree'] = 'Where to find the user groups. Eg. <code>ou=Group, dc=server, dc=tld</code>'; -$lang['userfilter'] = 'LDAP filter to search for user accounts. Eg. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; -$lang['groupfilter'] = 'LDAP filter to search for groups. Eg. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['userfilter'] = 'LDAP filter to search for user accounts. Eg. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'LDAP filter to search for groups. Eg. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; $lang['version'] = 'The protocol version to use. You may need to set this to <code>3</code>'; $lang['starttls'] = 'Use TLS connections?'; $lang['referrals'] = 'Shall referrals be followed?'; -$lang['binddn'] = 'DN of an ptional bind user if anonymous bind is not sufficient. Eg. <code>cn=admin, dc=my, dc=home</code>'; +$lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; -$lang['debug'] = 'Display additional debug information on errors';
\ No newline at end of file +$lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number'; +$lang['debug'] = 'Display additional debug information on errors'; diff --git a/lib/plugins/authldap/lang/it/settings.php b/lib/plugins/authldap/lang/it/settings.php new file mode 100644 index 000000000..10ae72f87 --- /dev/null +++ b/lib/plugins/authldap/lang/it/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Italian language file + * + */ diff --git a/lib/plugins/authldap/lang/zh/settings.php b/lib/plugins/authldap/lang/zh/settings.php new file mode 100644 index 000000000..e84511b42 --- /dev/null +++ b/lib/plugins/authldap/lang/zh/settings.php @@ -0,0 +1,20 @@ +<?php +/** + * Chinese language file + * + * @author lainme <lainme993@gmail.com> + */ +$lang['server'] = '您的 LDAP 服务器。填写主机名 (<code>localhost</code>) 或者完整的 URL (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'LDAP 服务器端口 (如果上面没有给出完整的 URL)'; +$lang['usertree'] = '何处查找用户账户。例如 <code>ou=People, dc=server, dc=tld</code>'; +$lang['grouptree'] = '何处查找用户组。例如 <code>ou=Group, dc=server, dc=tld</code>'; +$lang['userfilter'] = '用于搜索用户账户的 LDAP 筛选器。例如 <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = '用于搜索组的 LDAP 筛选器。例如 <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = '使用的协议版本。您或许需要设置为 <code>3</code>'; +$lang['starttls'] = '使用 TLS 连接?'; +$lang['referrals'] = '是否允许引用 (referrals)?'; +$lang['binddn'] = '一个可选的绑定用户的 DN (如果匿名绑定不满足要求)。例如 Eg. <code>cn=admin, dc=my, dc=home</code>'; +$lang['bindpw'] = '上述用户的密码'; +$lang['userscope'] = '限制用户搜索的范围'; +$lang['groupscope'] = '限制组搜索的范围'; +$lang['debug'] = '有错误时显示额外的调试信息'; diff --git a/lib/plugins/authmysql/conf/default.php b/lib/plugins/authmysql/conf/default.php index ea2cdad72..647f3d96c 100644 --- a/lib/plugins/authmysql/conf/default.php +++ b/lib/plugins/authmysql/conf/default.php @@ -1,3 +1,34 @@ <?php -$conf['charset'] = 'utf8';
\ No newline at end of file +$conf['charset'] = 'utf8'; +$conf['server'] = ''; +$conf['user'] = ''; +$conf['password'] = ''; +$conf['database'] = ''; +$conf['debug'] = 0; +$conf['forwardClearPass'] = 0; +$conf['TablesToLock'] = ''; +$conf['checkPass'] = ''; +$conf['getUserInfo'] = ''; +$conf['getGroups'] = ''; +$conf['getUsers'] = ''; +$conf['FilterLogin'] = ''; +$conf['FilterName'] = ''; +$conf['FilterEmail'] = ''; +$conf['FilterGroup'] = ''; +$conf['SortOrder'] = ''; +$conf['addUser'] = ''; +$conf['addGroup'] = ''; +$conf['addUserGroup'] = ''; +$conf['delGroup'] = ''; +$conf['getUserID'] = ''; +$conf['delUser'] = ''; +$conf['delUserRefs'] = ''; +$conf['updateUser'] = ''; +$conf['UpdateLogin'] = ''; +$conf['UpdatePass'] = ''; +$conf['UpdateEmail'] = ''; +$conf['UpdateName'] = ''; +$conf['UpdateTarget'] = ''; +$conf['delUserGroup'] = ''; +$conf['getGroupID'] = '';
\ No newline at end of file diff --git a/lib/plugins/authmysql/conf/metadata.php b/lib/plugins/authmysql/conf/metadata.php index f63bbe481..05d150fdf 100644 --- a/lib/plugins/authmysql/conf/metadata.php +++ b/lib/plugins/authmysql/conf/metadata.php @@ -4,6 +4,7 @@ $meta['server'] = array('string'); $meta['user'] = array('string'); $meta['password'] = array('password'); $meta['database'] = array('string'); +$meta['charset'] = array('string'); $meta['debug'] = array('multichoice','_choices' => array(0,1,2)); $meta['forwardClearPass'] = array('onoff'); $meta['TablesToLock'] = array('array'); diff --git a/lib/plugins/authmysql/lang/en/settings.php b/lib/plugins/authmysql/lang/en/settings.php index dcdbbb16b..77e4806b9 100644 --- a/lib/plugins/authmysql/lang/en/settings.php +++ b/lib/plugins/authmysql/lang/en/settings.php @@ -4,6 +4,7 @@ $lang['server'] = 'Your MySQL server'; $lang['user'] = 'MySQL user name'; $lang['password'] = 'Password for above user'; $lang['database'] = 'Database to use'; +$lang['charset'] = 'Character set used in database'; $lang['debug'] = 'Display additional debug information'; $lang['forwardClearPass'] = 'Pass user passwords as cleartext to the SQL statements below, instead of using the passcrypt option'; $lang['TablesToLock'] = 'Comma separated list of tables that should be locked on write operations'; @@ -20,7 +21,7 @@ $lang['addUser'] = 'SQL statement to add a new user'; $lang['addGroup'] = 'SQL statement to add a new group'; $lang['addUserGroup'] = 'SQL statment to add a user to an existing group'; $lang['delGroup'] = 'SQL statement to remove a group'; -$lang['getUserID'] = 'SQL statement to get the primary ey of a user'; +$lang['getUserID'] = 'SQL statement to get the primary key of a user'; $lang['delUser'] = 'SQL statement to delete a user'; $lang['delUserRefs'] = 'SQL statement to remove a user from all groups'; $lang['updateUser'] = 'SQL statement to update a user profile'; diff --git a/lib/plugins/authmysql/lang/it/settings.php b/lib/plugins/authmysql/lang/it/settings.php new file mode 100644 index 000000000..10ae72f87 --- /dev/null +++ b/lib/plugins/authmysql/lang/it/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Italian language file + * + */ diff --git a/lib/plugins/authmysql/lang/zh/settings.php b/lib/plugins/authmysql/lang/zh/settings.php new file mode 100644 index 000000000..43cfbb3c0 --- /dev/null +++ b/lib/plugins/authmysql/lang/zh/settings.php @@ -0,0 +1,40 @@ +<?php +/** + * Chinese language file + * + * @author lainme <lainme993@gmail.com> + */ +$lang['server'] = '您的 MySQL 服务器'; +$lang['user'] = 'MySQL 用户名'; +$lang['password'] = '上述用户的密码'; +$lang['database'] = '使用的数据库'; +$lang['debug'] = '显示额外调试信息'; +$lang['forwardClearPass'] = '将用户密码以明文形式传送给下面的 SQL 语句,而不使用 passcrypt 密码加密选项'; +$lang['TablesToLock'] = '在写操作时需要锁定的数据表列表,以逗号分隔'; +$lang['checkPass'] = '检查密码的 SQL 语句'; +$lang['getUserInfo'] = '获取用户信息的 SQL 语句'; +$lang['getGroups'] = '或许用户的组成员身份的 SQL 语句'; +$lang['getUsers'] = '列出所有用户的 SQL 语句'; +$lang['FilterLogin'] = '根据登录名筛选用户的 SQL 子句'; +$lang['FilterName'] = '根据全名筛选用户的 SQL 子句'; +$lang['FilterEmail'] = '根据电子邮件地址筛选用户的 SQL 子句'; +$lang['FilterGroup'] = '根据组成员身份筛选用户的 SQL 子句'; +$lang['SortOrder'] = '对用户排序的 SQL 子句'; +$lang['addUser'] = '添加新用户的 SQL 语句'; +$lang['addGroup'] = '添加新组的 SQL 语句'; +$lang['addUserGroup'] = '将用户添加到现有组的 SQL 语句'; +$lang['delGroup'] = '删除组的 SQL 语句'; +$lang['getUserID'] = '获取用户主键的 SQL 语句'; +$lang['delUser'] = '删除用户的 SQL 语句'; +$lang['delUserRefs'] = '从所有组中删除一个用户的 SQL 语句'; +$lang['updateUser'] = '更新用户信息的 SQL 语句'; +$lang['UpdateLogin'] = '更新用户登录名的 Update 子句'; +$lang['UpdatePass'] = '更新用户密码的 Update 子句'; +$lang['UpdateEmail'] = '更新用户电子邮件地址的 Update 子句'; +$lang['UpdateName'] = '更新用户全名的 Update 子句'; +$lang['UpdateTarget'] = '更新时识别用户的 Limit 子句'; +$lang['delUserGroup'] = '从指定组删除用户的 SQL 语句'; +$lang['getGroupID'] = '获取指定组主键的 SQL 语句'; +$lang['debug_o_0'] = '无'; +$lang['debug_o_1'] = '仅在有错误时'; +$lang['debug_o_2'] = '所有 SQL 查询'; diff --git a/lib/plugins/authpgsql/conf/default.php b/lib/plugins/authpgsql/conf/default.php index 401da80b7..7f78280f9 100644 --- a/lib/plugins/authpgsql/conf/default.php +++ b/lib/plugins/authpgsql/conf/default.php @@ -1,3 +1,33 @@ <?php -$conf['port'] = 5432;
\ No newline at end of file +$conf['server'] = ''; +$conf['port'] = 5432; +$conf['user'] = ''; +$conf['password'] = ''; +$conf['database'] = ''; +$conf['debug'] = 0; +$conf['forwardClearPass'] = 0; +$conf['checkPass'] = ''; +$conf['getUserInfo'] = ''; +$conf['getGroups'] = ''; +$conf['getUsers'] = ''; +$conf['FilterLogin'] = ''; +$conf['FilterName'] = ''; +$conf['FilterEmail'] = ''; +$conf['FilterGroup'] = ''; +$conf['SortOrder'] = ''; +$conf['addUser'] = ''; +$conf['addGroup'] = ''; +$conf['addUserGroup'] = ''; +$conf['delGroup'] = ''; +$conf['getUserID'] = ''; +$conf['delUser'] = ''; +$conf['delUserRefs'] = ''; +$conf['updateUser'] = ''; +$conf['UpdateLogin'] = ''; +$conf['UpdatePass'] = ''; +$conf['UpdateEmail'] = ''; +$conf['UpdateName'] = ''; +$conf['UpdateTarget'] = ''; +$conf['delUserGroup'] = ''; +$conf['getGroupID'] = '';
\ No newline at end of file diff --git a/lib/plugins/authpgsql/lang/en/settings.php b/lib/plugins/authpgsql/lang/en/settings.php index 74a1c1cc9..8c048fa0f 100644 --- a/lib/plugins/authpgsql/lang/en/settings.php +++ b/lib/plugins/authpgsql/lang/en/settings.php @@ -20,7 +20,7 @@ $lang['addUser'] = 'SQL statement to add a new user'; $lang['addGroup'] = 'SQL statement to add a new group'; $lang['addUserGroup'] = 'SQL statment to add a user to an existing group'; $lang['delGroup'] = 'SQL statement to remove a group'; -$lang['getUserID'] = 'SQL statement to get the primary ey of a user'; +$lang['getUserID'] = 'SQL statement to get the primary key of a user'; $lang['delUser'] = 'SQL statement to delete a user'; $lang['delUserRefs'] = 'SQL statement to remove a user from all groups'; $lang['updateUser'] = 'SQL statement to update a user profile'; diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php new file mode 100644 index 000000000..10ae72f87 --- /dev/null +++ b/lib/plugins/authpgsql/lang/it/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Italian language file + * + */ diff --git a/lib/plugins/authpgsql/lang/zh/settings.php b/lib/plugins/authpgsql/lang/zh/settings.php new file mode 100644 index 000000000..dc7223d89 --- /dev/null +++ b/lib/plugins/authpgsql/lang/zh/settings.php @@ -0,0 +1,37 @@ +<?php +/** + * Chinese language file + * + * @author lainme <lainme993@gmail.com> + */ +$lang['server'] = '您的 PostgreSQL 服务器'; +$lang['port'] = '您的 PostgreSQL 服务器端口'; +$lang['user'] = 'PostgreSQL 用户名'; +$lang['password'] = '上述用户的密码'; +$lang['database'] = '使用的数据库'; +$lang['debug'] = '显示额外调试信息'; +$lang['forwardClearPass'] = '将用户密码以明文形式传送给下面的 SQL 语句,而不使用 passcrypt 密码加密选项'; +$lang['checkPass'] = '检查密码的 SQL 语句'; +$lang['getUserInfo'] = '获取用户信息的 SQL 语句'; +$lang['getGroups'] = '获取用户的组成员身份的 SQL 语句'; +$lang['getUsers'] = '列出所有用户的 SQL 语句'; +$lang['FilterLogin'] = '根据登录名筛选用户的 SQL 子句'; +$lang['FilterName'] = '根据全名筛选用户的 SQL 子句'; +$lang['FilterEmail'] = '根据电子邮件地址筛选用户的 SQL 子句'; +$lang['FilterGroup'] = '根据组成员身份筛选用户的 SQL 子句'; +$lang['SortOrder'] = '对用户排序的 SQL 子句'; +$lang['addUser'] = '添加新用户的 SQL 语句'; +$lang['addGroup'] = '添加新组的 SQL 语句'; +$lang['addUserGroup'] = '将用户添加到现有组的 SQL 语句'; +$lang['delGroup'] = '删除组的 SQL 语句'; +$lang['getUserID'] = '获取用户主键的 SQL 语句'; +$lang['delUser'] = '删除用户的 SQL 语句'; +$lang['delUserRefs'] = '从所有组中删除一个用户的 SQL 语句'; +$lang['updateUser'] = '更新用户信息的 SQL 语句'; +$lang['UpdateLogin'] = '更新用户登录名的 Update 子句'; +$lang['UpdatePass'] = '更新用户密码的 Update 子句'; +$lang['UpdateEmail'] = '更新用户电子邮件地址的 Update 子句'; +$lang['UpdateName'] = '更新用户全名的 Update 子句'; +$lang['UpdateTarget'] = '更新时识别用户的 Limit 子句'; +$lang['delUserGroup'] = '从指定组删除用户的 SQL 语句'; +$lang['getGroupID'] = '获取指定组主键的 SQL 语句'; diff --git a/lib/plugins/config/lang/en/intro.txt b/lib/plugins/config/lang/en/intro.txt index c83a80205..7cf46cee3 100644 --- a/lib/plugins/config/lang/en/intro.txt +++ b/lib/plugins/config/lang/en/intro.txt @@ -4,6 +4,6 @@ Use this page to control the settings of your DokuWiki installation. For help o Settings shown with a light red background are protected and can not be altered with this plugin. Settings shown with a blue background are the default values and settings shown with a white background have been set locally for this particular installation. Both blue and white settings can be altered. -Remember to press the **SAVE** button before leaving this page otherwise your changes will be lost. +Remember to press the **Save** button before leaving this page otherwise your changes will be lost. diff --git a/lib/plugins/config/lang/it/lang.php b/lib/plugins/config/lang/it/lang.php index 751e5ee95..62dd00f0c 100644 --- a/lib/plugins/config/lang/it/lang.php +++ b/lib/plugins/config/lang/it/lang.php @@ -39,6 +39,7 @@ $lang['_editing'] = 'Impostazioni Modifica'; $lang['_links'] = 'Impostazioni Collegamenti'; $lang['_media'] = 'Impostazioni File'; $lang['_notifications'] = 'Impostazioni di notifica'; +$lang['_syndication'] = 'Impostazioni di collaborazione'; $lang['_advanced'] = 'Impostazioni Avanzate'; $lang['_network'] = 'Impostazioni Rete'; $lang['_plugin_sufix'] = 'Impostazioni Plugin'; diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 5b81be782..8eb99284d 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -20,6 +20,7 @@ if (!class_exists('configuration')) { var $_metadata = array(); // holds metadata describing the settings var $setting = array(); // array of setting objects var $locked = false; // configuration is considered locked if it can't be updated + var $show_disabled_plugins = false; // configuration filenames var $_default_files = array(); @@ -70,9 +71,14 @@ if (!class_exists('configuration')) { foreach ($keys as $key) { if (isset($this->_metadata[$key])) { $class = $this->_metadata[$key][0]; - $class = ($class && class_exists('setting_'.$class)) ? 'setting_'.$class : 'setting'; - if ($class=='setting') { - $this->setting[] = new setting_no_class($key,$param); + + if($class && class_exists('setting_'.$class)){ + $class = 'setting_'.$class; + } else { + if($class != '') { + $this->setting[] = new setting_no_class($key,$param); + } + $class = 'setting'; } $param = $this->_metadata[$key]; @@ -262,7 +268,7 @@ if (!class_exists('configuration')) { function get_plugin_list() { if (is_null($this->_plugin_list)) { - $list = plugin_list('',true); // all plugins, including disabled ones + $list = plugin_list('',$this->show_disabled_plugins); // remove this plugin from the list $idx = array_search('config',$list); @@ -364,7 +370,7 @@ if (!class_exists('setting')) { var $_cautionList = array( 'basedir' => 'danger', 'baseurl' => 'danger', 'savedir' => 'danger', 'cookiedir' => 'danger', 'useacl' => 'danger', 'authtype' => 'danger', 'superuser' => 'danger', 'userewrite' => 'danger', 'start' => 'warning', 'camelcase' => 'warning', 'deaccent' => 'warning', 'sepchar' => 'warning', 'compression' => 'warning', 'xsendfile' => 'warning', 'renderer_xhtml' => 'warning', 'fnencode' => 'warning', - 'allowdebug' => 'security', 'htmlok' => 'security', 'phpok' => 'security', 'iexssprotect' => 'security', 'xmlrpc' => 'security', 'fullpath' => 'security' + 'allowdebug' => 'security', 'htmlok' => 'security', 'phpok' => 'security', 'iexssprotect' => 'security', 'remote' => 'security', 'fullpath' => 'security' ); function setting($key, $params=null) { @@ -387,10 +393,12 @@ if (!class_exists('setting')) { } /** - * update setting with user provided value $input - * if value fails error check, save it + * update changed setting with user provided value $input + * - if changed value fails error check, save it to $this->_input (to allow echoing later) + * - if changed value passes error check, set $this->_local to the new value * - * @return boolean true if changed, false otherwise (incl. on error) + * @param mixed $input the new value + * @return boolean true if changed, false otherwise (incl. on error) */ function update($input) { if (is_null($input)) return false; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index 663eab9dd..22e76a013 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -70,14 +70,6 @@ $config['varname'] = 'conf'; // name of the config variable, sans $ // this value can be overriden when calling save_settings() method $config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings'; -/* DEPRECATED -// ---------------[ setting files ]-------------------------------------- -// these values can be string expressions, they will be eval'd before use -$file['local'] = "DOKU_CONF.'local.php'"; // mandatory (file doesn't have to exist) -$file['default'] = "DOKU_CONF.'dokuwiki.php'"; // optional -$file['protected'] = "DOKU_CONF.'local.protected.php'"; // optional - */ - // test value (FIXME, remove before publishing) //$meta['test'] = array('multichoice','_choices' => array('')); @@ -127,7 +119,7 @@ $meta['_authentication'] = array('fieldset'); $meta['useacl'] = array('onoff'); $meta['autopasswd'] = array('onoff'); $meta['authtype'] = array('authtype'); -$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','lsmd5','crypt','mysql','my411','kmd5','pmd5','hmd5','mediawiki','bcrypt','sha512')); +$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','lsmd5','crypt','mysql','my411','kmd5','pmd5','hmd5','mediawiki','bcrypt','djangomd5','djangosha1','sha512')); $meta['defaultgroup']= array('string'); $meta['superuser'] = array('string'); $meta['manager'] = array('string'); diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index 6998e1fbf..e4b97eb01 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -43,56 +43,50 @@ if (!class_exists('setting_authtype')) { class setting_authtype extends setting_multichoice { function initialize($default,$local,$protected) { - global $plugin_controller; + global $plugin_controller; - // retrive auth types provided by plugins - foreach ($plugin_controller->getList('auth') as $plugin) { - $this->_choices[] = $plugin; - } + // retrieve auth types provided by plugins + foreach ($plugin_controller->getList('auth') as $plugin) { + $this->_choices[] = $plugin; + } - parent::initialize($default,$local,$protected); + parent::initialize($default,$local,$protected); } function update($input) { - global $plugin_controller; - - // is an update posible? - $mayUpdate = parent::update($input); - - // is it an auth plugin? - if (in_array($input, $plugin_controller->getList('auth'))) { - // reject disabled plugins - if ($plugin_controller->isdisabled($input)) { - $this->_error = true; - msg('Auth type ' . $input . ' is disabled.', -1); - return false; - } - - // load the plugin - $auth_plugin = $plugin_controller->load('auth', $input); - - // @TODO: throw an error in plugin controller instead of returning null - if (is_null($auth_plugin)) { - $this->_error = true; - msg('Cannot load Auth Plugin "' . $input . '"', -1); - return false; - } - - // verify proper instanciation (is this really a plugin?) @TODO use instanceof? impement interface? - if (is_object($auth_plugin) && !method_exists($auth_plugin, 'getPluginName')) { - $this->_error = true; - msg('Cannot create Auth Plugin "' . $input . '"', -1); - return false; - } - } + global $plugin_controller; + + // is an update possible/requested? + $local = $this->_local; // save this, parent::update() may change it + if (!parent::update($input)) return false; // nothing changed or an error caught by parent + $this->_local = $local; // restore original, more error checking to come + + // attempt to load the plugin + $auth_plugin = $plugin_controller->load('auth', $input); + + // @TODO: throw an error in plugin controller instead of returning null + if (is_null($auth_plugin)) { + $this->_error = true; + msg('Cannot load Auth Plugin "' . $input . '"', -1); + return false; + } + + // verify proper instantiation (is this really a plugin?) @TODO use instanceof? implement interface? + if (is_object($auth_plugin) && !method_exists($auth_plugin, 'getPluginName')) { + $this->_error = true; + msg('Cannot create Auth Plugin "' . $input . '"', -1); + return false; + } // did we change the auth type? logout global $conf; if($conf['authtype'] != $input) { - msg('Authentication system changed. Please re-login.'); - auth_logoff(); + msg('Authentication system changed. Please re-login.'); + auth_logoff(); } - return true; + + $this->_local = $input; + return true; } } } diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php index 8b1ee3c7d..de4de6aef 100644 --- a/lib/plugins/plugin/admin.php +++ b/lib/plugins/plugin/admin.php @@ -61,11 +61,12 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin { * handle user request */ function handle() { + global $INPUT; // enable direct access to language strings $this->setupLocale(); - $fn = $_REQUEST['fn']; + $fn = $INPUT->param('fn'); if (is_array($fn)) { $this->cmd = key($fn); $this->plugin = is_array($fn[$this->cmd]) ? key($fn[$this->cmd]) : null; diff --git a/lib/plugins/plugin/lang/ar/lang.php b/lib/plugins/plugin/lang/ar/lang.php index 8327e5ce3..a1a778131 100644 --- a/lib/plugins/plugin/lang/ar/lang.php +++ b/lib/plugins/plugin/lang/ar/lang.php @@ -50,4 +50,4 @@ $lang['enabled'] = 'الاضافة %s فُعلت. '; $lang['notenabled'] = 'تعذر تفعيل الاضافة %s، تحقق من اذونات الملف.'; $lang['disabled'] = 'عُطلت الإضافة %s.'; $lang['notdisabled'] = 'تعذر تعطيل الإضافة %s، تحقق من اذونات الملف.'; -$lang['packageinstalled'] = 'حزمة الإضافة (%d plugin(s): %Xs) ثبتت بنجاج.'; +$lang['packageinstalled'] = 'حزمة الإضافة (%d plugin(s): %s) ثبتت بنجاج.'; diff --git a/lib/plugins/plugin/lang/hi/lang.php b/lib/plugins/plugin/lang/hi/lang.php index ab29c6550..67b177256 100644 --- a/lib/plugins/plugin/lang/hi/lang.php +++ b/lib/plugins/plugin/lang/hi/lang.php @@ -6,7 +6,6 @@ * @author yndesai@gmail.com */ $lang['unknown'] = 'अज्ञात'; -$lang['deleted'] = 'मिटाया हुआ'; $lang['date'] = 'दिनांक:'; $lang['author'] = 'लेखक:'; $lang['error'] = 'अज्ञात त्रुटि हुइ'; diff --git a/lib/plugins/plugin/lang/pl/lang.php b/lib/plugins/plugin/lang/pl/lang.php index 1d3bbbc03..faaa69630 100644 --- a/lib/plugins/plugin/lang/pl/lang.php +++ b/lib/plugins/plugin/lang/pl/lang.php @@ -60,4 +60,4 @@ $lang['enabled'] = 'Wtyczka %s włączona.'; $lang['notenabled'] = 'Nie udało się uruchomić wtyczki %s, sprawdź uprawnienia dostępu do plików.'; $lang['disabled'] = 'Wtyczka %s wyłączona.'; $lang['notdisabled'] = 'Nie udało się wyłączyć wtyczki %s, sprawdź uprawnienia dostępu do plików.'; -$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki:% s) zainstalowany pomyślnie.'; +$lang['packageinstalled'] = 'Pakiet wtyczek (%d wtyczki: %s) zainstalowany pomyślnie.'; diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php index 7b38a02c8..56149e79e 100644 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ b/lib/plugins/plugin/lang/zh-tw/lang.php @@ -56,4 +56,4 @@ $lang['enabled'] = '附加元件 %s 已啟用。'; $lang['notenabled'] = '附加元件 %s 無法啟用,請檢查檔案權限。'; $lang['disabled'] = '附加元件 %s 已停用。'; $lang['notdisabled'] = '附加元件 %s 無法停用,請檢查檔案權限。'; -$lang['packageinstalled'] = '附加元件 (%d 附加元件%s: %s) 已安裝好。'; +$lang['packageinstalled'] = '附加元件 (%d 附加元件: %s) 已安裝好。'; diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index fcdaa230d..847e38876 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -44,15 +44,16 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { * output appropriate html */ function html() { + global $INPUT; echo $this->plugin_locale_xhtml('intro'); $this->_searchform(); - if(is_array($_REQUEST['revert']) && checkSecurityToken()){ - $this->_revert($_REQUEST['revert'],$_REQUEST['filter']); - }elseif(isset($_REQUEST['filter'])){ - $this->_list($_REQUEST['filter']); + if(is_array($INPUT->param('revert')) && checkSecurityToken()){ + $this->_revert($INPUT->arr('revert'),$INPUT->str('filter')); + }elseif($INPUT->has('filter')){ + $this->_list($INPUT->str('filter')); } } @@ -60,10 +61,10 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { * Display the form for searching spam pages */ function _searchform(){ - global $lang; + global $lang, $INPUT; echo '<form action="" method="post"><div class="no">'; echo '<label>'.$this->getLang('filter').': </label>'; - echo '<input type="text" name="filter" class="edit" value="'.hsc($_REQUEST['filter']).'" />'; + echo '<input type="text" name="filter" class="edit" value="'.hsc($INPUT->str('filter')).'" />'; echo ' <input type="submit" class="button" value="'.$lang['btn_search'].'" />'; echo ' <span>'.$this->getLang('note1').'</span>'; echo '</div></form><br /><br />'; diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index cf8963e64..01f4a4cdb 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -73,11 +73,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * handle user request */ function handle() { + global $INPUT; if (is_null($this->_auth)) return false; // extract the command and any specific parameters // submit button name is of the form - fn[cmd][param(s)] - $fn = $_REQUEST['fn']; + $fn = $INPUT->param('fn'); if (is_array($fn)) { $cmd = key($fn); @@ -88,8 +89,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } if ($cmd != "search") { - if (!empty($_REQUEST['start'])) - $this->_start = $_REQUEST['start']; + $this->_start = $INPUT->int('start', 0); $this->_filter = $this->_retrieveFilter(); } @@ -345,6 +345,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } function _addUser(){ + global $INPUT; if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('addUser')) return false; @@ -353,7 +354,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if ($this->_auth->canDo('modPass')){ if (empty($pass)){ - if(!empty($_REQUEST['usernotify'])){ + if($INPUT->has('usernotify')){ $pass = auth_pwgen(); } else { msg($this->lang['add_fail'], -1); @@ -393,7 +394,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { msg($this->lang['add_ok'], 1); - if (!empty($_REQUEST['usernotify']) && $pass) { + if ($INPUT->has('usernotify') && $pass) { $this->_notifyUser($user,$pass); } } else { @@ -407,13 +408,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * Delete user */ function _deleteUser(){ - global $conf; + global $conf, $INPUT; if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('delUser')) return false; - $selected = $_REQUEST['delete']; - if (!is_array($selected) || empty($selected)) return false; + $selected = $INPUT->arr('delete'); + if (empty($selected)) return false; $selected = array_keys($selected); if(in_array($_SERVER['REMOTE_USER'], $selected)) { @@ -463,13 +464,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * Modify user (modified user data has been recieved) */ function _modifyUser(){ - global $conf; + global $conf, $INPUT; if (!checkSecurityToken()) return false; if (!$this->_auth->canDo('UserMod')) return false; // get currently valid user data - $olduser = cleanID(preg_replace('/.*:/','',$_REQUEST['userid_old'])); + $olduser = cleanID(preg_replace('/.*:/','',$INPUT->str('userid_old'))); $oldinfo = $this->_auth->getUserData($olduser); // get new user data subject to change @@ -494,7 +495,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } // generate password if left empty and notification is on - if(!empty($_REQUEST['usernotify']) && empty($newpass)){ + if($INPUT->has('usernotify') && empty($newpass)){ $newpass = auth_pwgen(); } @@ -510,7 +511,7 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) { msg($this->lang['update_ok'],1); - if (!empty($_REQUEST['usernotify']) && $newpass) { + if ($INPUT->has('usernotify') && $newpass) { $notify = empty($changes['user']) ? $olduser : $newuser; $this->_notifyUser($notify,$newpass); } diff --git a/lib/plugins/usermanager/lang/ca-valencia/lang.php b/lib/plugins/usermanager/lang/ca-valencia/lang.php index 5b0c628ed..c39c2f9b3 100644 --- a/lib/plugins/usermanager/lang/ca-valencia/lang.php +++ b/lib/plugins/usermanager/lang/ca-valencia/lang.php @@ -33,7 +33,7 @@ $lang['delete_ok'] = '%d usuaris borrats'; $lang['delete_fail'] = 'Erro borrant %d.'; $lang['update_ok'] = 'Usuari actualisat correctament'; $lang['update_fail'] = 'Erro actualisant usuari'; -$lang['update_exists'] = 'Erro canviant el nom de l\'usuari, el nom d\'usuari que ha donat ya existix (els demés canvis s\'aplicaran).'; +$lang['update_exists'] = 'Erro canviant el nom de l\'usuari (%s), el nom d\'usuari que ha donat ya existix (els demés canvis s\'aplicaran).'; $lang['start'] = 'primera'; $lang['prev'] = 'anterior'; $lang['next'] = 'següent'; diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js index 0c3609ada..e5cc73b49 100644 --- a/lib/scripts/qsearch.js +++ b/lib/scripts/qsearch.js @@ -12,6 +12,7 @@ var dw_qsearch = { $inObj: null, $outObj: null, timer: null, + curRequest: null, /** * initialize the quick search @@ -35,12 +36,16 @@ var dw_qsearch = { // attach eventhandler to search field do_qsearch = function () { + // abort any previous request + if (dw_qsearch.curRequest != null) { + dw_qsearch.curRequest.abort(); + } var value = dw_qsearch.$inObj.val(); if (value === '') { dw_qsearch.clear_results(); return; } - jQuery.post( + dw_qsearch.curRequest = jQuery.post( DOKU_BASE + 'lib/exe/ajax.php', { call: 'qsearch', @@ -84,6 +89,8 @@ var dw_qsearch = { onCompletion: function(data) { var max, $links, too_big; + dw_qsearch.curRequest = null; + if (data === '') { dw_qsearch.clear_results(); return; diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index 059a4ba5c..6d75215e0 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -72,7 +72,7 @@ function initToolbar(tbid,edid,tb, allowblock){ * @author Andreas Gohr <andi@splitbrain.org> */ function tb_format(btn, props, edid) { - var sample = props.title || props.sample; + var sample = props.sample || props.title; insertTags(edid, fixtxt(props.open), fixtxt(props.close), diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index 3405ec258..4772fd2a5 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -632,7 +632,6 @@ div.dokuwiki td.diff-blockheader { div.dokuwiki table.diff th { border-bottom: 1px solid __border__; font-size: 110%; - width: 50%; font-weight: normal; text-align: left; } @@ -650,6 +649,17 @@ div.dokuwiki table.diff th span.sum { div.dokuwiki table.diff th.minor { font-style: italic; } +.dokuwiki table.diff_sidebyside th { + width: 50%; +} +.dokuwiki table.diff .diff-lineheader { + width: .7em; + text-align: right; +} +[dir=rtl] .dokuwiki table.diff .diff-lineheader { + text-align: left; +} +.dokuwiki table.diff .diff-lineheader, div.dokuwiki table.diff td { font-family: monospace; font-size: 100%; diff --git a/lib/tpl/dokuwiki/css/_diff.css b/lib/tpl/dokuwiki/css/_diff.css index 62f831213..58c24b5c7 100644 --- a/lib/tpl/dokuwiki/css/_diff.css +++ b/lib/tpl/dokuwiki/css/_diff.css @@ -21,7 +21,6 @@ .dokuwiki table.diff th { border-bottom: 1px solid __border__; font-size: 110%; - width: 50%; font-weight: normal; } .dokuwiki table.diff th a { @@ -37,8 +36,19 @@ .dokuwiki table.diff th.minor { color: #999; } +.dokuwiki table.diff_sidebyside th { + width: 50%; +} /* table body */ +.dokuwiki table.diff .diff-lineheader { + width: .7em; + text-align: right; +} +[dir=rtl] .dokuwiki table.diff .diff-lineheader { + text-align: left; +} +.dokuwiki table.diff .diff-lineheader, .dokuwiki table.diff td { font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Nimbus Mono L", Monaco, "Courier New", monospace; } diff --git a/lib/tpl/dokuwiki/css/design.css b/lib/tpl/dokuwiki/css/design.css index 2c2109228..2eb357a59 100644 --- a/lib/tpl/dokuwiki/css/design.css +++ b/lib/tpl/dokuwiki/css/design.css @@ -205,6 +205,7 @@ background-position: 5px 0; margin-left: 0; margin-right: -20px; + position: relative; } #dokuwiki__sitetools ul { diff --git a/lib/tpl/dokuwiki/css/mobile.css b/lib/tpl/dokuwiki/css/mobile.css index 88333c012..e1d4dda72 100644 --- a/lib/tpl/dokuwiki/css/mobile.css +++ b/lib/tpl/dokuwiki/css/mobile.css @@ -89,6 +89,10 @@ .dokuwiki div.page { padding: 1em; } +/* enable horizontal scrolling in media manager */ +.mode_media div.page { + overflow: auto; +} /* _edit */ .dokuwiki div.section_highlight { diff --git a/lib/tpl/dokuwiki/css/pagetools.css b/lib/tpl/dokuwiki/css/pagetools.css index 60dc43fb1..0c31e283f 100644 --- a/lib/tpl/dokuwiki/css/pagetools.css +++ b/lib/tpl/dokuwiki/css/pagetools.css @@ -222,7 +222,7 @@ [dir=rtl] #dokuwiki__pagetools ul li a.revs:hover, [dir=rtl] #dokuwiki__pagetools ul li a.revs:active, [dir=rtl] #dokuwiki__pagetools ul li a.revs:focus, -.mode_revisions [dir=rtl] #dokuwiki__pagetools ul li a.revs { +[dir=rtl] .mode_revisions #dokuwiki__pagetools ul li a.revs { background-position: left -585px; } @@ -241,7 +241,7 @@ [dir=rtl] #dokuwiki__pagetools ul li a.backlink:hover, [dir=rtl] #dokuwiki__pagetools ul li a.backlink:active, [dir=rtl] #dokuwiki__pagetools ul li a.backlink:focus, -.mode_backlink [dir=rtl] #dokuwiki__pagetools ul li a.backlink { +[dir=rtl] .mode_backlink #dokuwiki__pagetools ul li a.backlink { background-position: left -675px; } @@ -277,7 +277,7 @@ [dir=rtl] #dokuwiki__pagetools ul li a.revert:hover, [dir=rtl] #dokuwiki__pagetools ul li a.revert:active, [dir=rtl] #dokuwiki__pagetools ul li a.revert:focus, -.mode_revert [dir=rtl] #dokuwiki__pagetools ul li a.revert { +[dir=rtl] .mode_revert #dokuwiki__pagetools ul li a.revert { background-position: left -495px; } @@ -296,7 +296,7 @@ [dir=rtl] #dokuwiki__pagetools ul li a.subscribe:hover, [dir=rtl] #dokuwiki__pagetools ul li a.subscribe:active, [dir=rtl] #dokuwiki__pagetools ul li a.subscribe:focus, -.mode_subscribe [dir=rtl] #dokuwiki__pagetools ul li a.subscribe { +[dir=rtl] .mode_subscribe #dokuwiki__pagetools ul li a.subscribe { background-position: left -765px; } diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js index 3ed8dbabe..4eb92a417 100644 --- a/lib/tpl/dokuwiki/script.js +++ b/lib/tpl/dokuwiki/script.js @@ -1,11 +1,10 @@ /** * We handle several device classes based on browser width. - * see http://twitter.github.com/bootstrap/scaffolding.html#responsive * - * - desktop: 980+ - * - mobile: < 980 - * - tablet 481 - 979 (ostensibly for tablets in portrait mode) - * - phone <= 480 + * - desktop: > __tablet_width__ (as set in style.ini) + * - mobile: + * - tablet <= __tablet_width__ + * - phone <= __phone_width__ */ var device_class = ''; // not yet known var device_classes = 'desktop mobile tablet phone'; @@ -13,7 +12,7 @@ var device_classes = 'desktop mobile tablet phone'; function tpl_dokuwiki_mobile(){ // the z-index in mobile.css is (mis-)used purely for detecting the screen mode here - var screen_mode = jQuery('#screen__mode').css('z-index'); + var screen_mode = jQuery('#screen__mode').css('z-index') + ''; // determine our device pattern // TODO: consider moving into dokuwiki core |