From 9d2e1be699d573eebda922cf67f030d3d2aa462d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 Feb 2013 18:29:20 +0100 Subject: introduced http_status() for sending HTTP status code FS#1698 It seems, some servers require a special Status: header for sending the HTTP status code from PHP (F)CGI to the server. This patch introduces a new function (adopted from CodeIgniter) for simplifying the status handling. --- lib/exe/detail.php | 2 +- lib/exe/fetch.php | 4 ++-- lib/exe/mediamanager.php | 4 ++-- lib/exe/xmlrpc.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'lib') 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/mediamanager.php b/lib/exe/mediamanager.php index 04dd178cc..e0a90a291 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -36,7 +36,7 @@ // 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']); } @@ -48,7 +48,7 @@ $_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) { -- cgit v1.2.3 From 994211890f92c1678536b003354146fbb44b8f2f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 Feb 2013 18:38:11 +0100 Subject: disabled JavaScript compatibility layer this disables the JavaScript compatibility layer which let pre-jQuery migration plugins run with their old code. This will break plugins using outdated JavaScript. These plugins have to be updated according to https://www.dokuwiki.org/devel:jqueryfaq As a courtesy to users, the compatibility.js is not deleted, yet. Undoing this single patch can be used as a temporary workaround. --- lib/exe/js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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', -- cgit v1.2.3 From 80faa902000c2bcf4602999e24a6016e1fafb997 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Feb 2013 16:58:31 +0000 Subject: corrected some inline documentation in template's js --- lib/tpl/dokuwiki/script.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js index 3ed8dbabe..375500f78 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'; -- cgit v1.2.3 From 71f791fff9c3912682e5e0c8866e695a0749aa82 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 Feb 2013 19:08:57 +0100 Subject: removed deprecated ACL wrapper object --- lib/plugins/acl/script.js | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib') 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) -}; -- cgit v1.2.3 From dd90013a5a9ce204250f4d94072e089f617e09db Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 16 Feb 2013 18:06:47 +0100 Subject: Media manager: don't create empty namespaces FS#2642 Previously the media manager created an empty namespace whenever you opened a non-existing namespace with upload permissions. Now the current namespace is only displayed in the tree but not actually created. --- lib/exe/mediamanager.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib') diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index e0a90a291..53d438321 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -40,9 +40,6 @@ 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']; -- cgit v1.2.3 From b480dd4215925c5e9aaecaa5c086346b009692b4 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 16 Feb 2013 18:10:00 +0100 Subject: Abort old quick search requests when starting new ones This prevents old requests that need longer than the newer ones (likely, as if you type more less results are returned) from overriding the results list. --- lib/scripts/qsearch.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3 From 87bba75a4043643511c89cb89ef9cf11e59fbf2c Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sat, 16 Feb 2013 12:53:24 -0500 Subject: Add django compatible hashes to the config options. --- lib/plugins/config/settings/config.metadata.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index 663eab9dd..bdbc4311f 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -127,7 +127,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'); -- cgit v1.2.3 From 5398a7b652eabdd0a20f154b97b60f89cad72f8c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 Feb 2013 19:57:01 +0100 Subject: fixed language file placeholders FS#2682 --- lib/plugins/plugin/lang/ar/lang.php | 2 +- lib/plugins/plugin/lang/hi/lang.php | 1 - lib/plugins/plugin/lang/pl/lang.php | 2 +- lib/plugins/plugin/lang/zh-tw/lang.php | 2 +- lib/plugins/usermanager/lang/ca-valencia/lang.php | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) (limited to 'lib') 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/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'; -- cgit v1.2.3 From 45970804e69e3d087fe19ad9cefaff0ef44be795 Mon Sep 17 00:00:00 2001 From: Klap-in Date: Sat, 16 Feb 2013 22:53:38 +0100 Subject: Complete metadata and defaults of auth plugin configs --- lib/plugins/authad/conf/default.php | 14 +++++++++++++ lib/plugins/authldap/conf/default.php | 20 ++++++++++++++---- lib/plugins/authldap/conf/metadata.php | 1 + lib/plugins/authldap/lang/en/settings.php | 5 ++++- lib/plugins/authmysql/conf/default.php | 33 +++++++++++++++++++++++++++++- lib/plugins/authmysql/conf/metadata.php | 1 + lib/plugins/authmysql/lang/en/settings.php | 1 + lib/plugins/authpgsql/conf/default.php | 32 ++++++++++++++++++++++++++++- 8 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 lib/plugins/authad/conf/default.php (limited to 'lib') 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 @@ + 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..f20b7d2a3 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -12,4 +12,7 @@ $lang['binddn'] = 'DN of an ptional bind user if anonymous bind is not suff $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/authmysql/conf/default.php b/lib/plugins/authmysql/conf/default.php index ea2cdad72..4add3f57c 100644 --- a/lib/plugins/authmysql/conf/default.php +++ b/lib/plugins/authmysql/conf/default.php @@ -1,3 +1,34 @@ 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..7b409ee1c 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'; 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 @@ Date: Sat, 16 Feb 2013 23:03:01 +0100 Subject: separate default settings from non-existing settings setting type read from metadata eqaul to empty string is default 'setting' class (a textarea), everything else should be a existing class otherwise 'setting_no_class' is loaded --- lib/plugins/config/settings/config.class.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 16be9a689..a3cfae9f8 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -70,9 +70,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]; -- cgit v1.2.3 From 4005b0809260fbd36cb8652c7d726a5ee417c6f6 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Feb 2013 19:42:38 +0000 Subject: fixed html error in plugin lang file --- lib/plugins/authldap/lang/en/settings.php | 4 ++-- lib/plugins/config/lang/en/intro.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index e3f4bab31..cc9143169 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -3,8 +3,8 @@ $lang['server'] = 'Your LDAP server. Either hostname (localhost Date: Sat, 16 Feb 2013 23:55:52 +0100 Subject: litte fixes --- lib/plugins/authldap/lang/en/settings.php | 2 -- lib/plugins/authmysql/conf/default.php | 2 +- lib/plugins/authmysql/lang/en/settings.php | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index bca666e9f..0bb397be5 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -14,5 +14,3 @@ $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; $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/authmysql/conf/default.php b/lib/plugins/authmysql/conf/default.php index 4add3f57c..647f3d96c 100644 --- a/lib/plugins/authmysql/conf/default.php +++ b/lib/plugins/authmysql/conf/default.php @@ -2,7 +2,7 @@ $conf['charset'] = 'utf8'; $conf['server'] = ''; -$conf['user'] =''; +$conf['user'] = ''; $conf['password'] = ''; $conf['database'] = ''; $conf['debug'] = 0; diff --git a/lib/plugins/authmysql/lang/en/settings.php b/lib/plugins/authmysql/lang/en/settings.php index 7b409ee1c..77e4806b9 100644 --- a/lib/plugins/authmysql/lang/en/settings.php +++ b/lib/plugins/authmysql/lang/en/settings.php @@ -21,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'; -- cgit v1.2.3 From 56133a04d1c5dcd4825f4c0c978b8a9336d603d0 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sat, 16 Feb 2013 18:15:13 -0500 Subject: Fix width of indicator column. --- lib/tpl/default/design.css | 12 +++++++++++- lib/tpl/dokuwiki/css/_diff.css | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'lib') 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; } -- cgit v1.2.3 From 0fc50f81064736071e053d874b60a990fd1af8c2 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 17 Feb 2013 15:47:42 +0000 Subject: add property to show disabled plugins, set it to false (to hide by default) --- lib/plugins/config/settings/config.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 5b81be782..46e27654b 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(); @@ -262,7 +263,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); -- cgit v1.2.3 From aae735fc981470a44856ec34a838c4910ac68062 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 17 Feb 2013 16:54:23 +0000 Subject: tidy up authtype setting class (incl. fix issue with auth change/logoff occurring when only one auth plugin is enabled and other settings are updated) --- lib/plugins/config/settings/extra.class.php | 74 +++++++++++++---------------- 1 file changed, 34 insertions(+), 40 deletions(-) (limited to 'lib') 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; } } } -- cgit v1.2.3 From 22b77eded0c1fe0f6866972d97895a9e9dc26a1f Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 17 Feb 2013 16:55:12 +0000 Subject: improve comments on settings::update() method --- lib/plugins/config/settings/config.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 46e27654b..8be53b145 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -388,10 +388,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; -- cgit v1.2.3 From 1947d1b49884a38ff63ed13d434b64dc4bb777a6 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 17 Feb 2013 21:57:53 +0000 Subject: force screen_mode to string type (IE returns a number which is always triggering the default option in the following switch/case block --- lib/tpl/dokuwiki/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js index 375500f78..4eb92a417 100644 --- a/lib/tpl/dokuwiki/script.js +++ b/lib/tpl/dokuwiki/script.js @@ -12,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 -- cgit v1.2.3 From e5f0efe2a3ff34ae70388fe8d068935416174f1c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 17 Feb 2013 22:52:28 +0000 Subject: improved disabled acl permission styling (FS#2714) --- lib/plugins/acl/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/plugins/acl/style.css b/lib/plugins/acl/style.css index f4277c341..f8574fe58 100644 --- a/lib/plugins/acl/style.css +++ b/lib/plugins/acl/style.css @@ -116,7 +116,8 @@ div#acl_manager .aclns { } div#acl_manager label.disabled { - color: __text_neu__!important; + opacity: .5; + cursor: auto; } #acl_manager label { -- cgit v1.2.3 From eda319e6664ad3c786312ffee7ce7cfbfa4eda1c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 17 Feb 2013 22:55:55 +0000 Subject: removed unnecessary css parts --- lib/plugins/acl/style.css | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'lib') diff --git a/lib/plugins/acl/style.css b/lib/plugins/acl/style.css index f8574fe58..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,60 +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 { - opacity: .5; - cursor: auto; +#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 { -- cgit v1.2.3 From c33b315b06b3a52a61cb1ecc2b3beadd4ecd0311 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 18 Feb 2013 01:08:40 +0000 Subject: removed a bunch of functions which were deprecated in 2005/2006 --- lib/plugins/config/settings/config.metadata.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib') diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index bdbc4311f..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('')); -- cgit v1.2.3 From 07a30891fae578fc908dc88ad4ee02ee336fffe7 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Mon, 18 Feb 2013 01:21:07 +0000 Subject: fixed line endings --- lib/plugins/acl/lang/vi/help.txt | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib') 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. + -- cgit v1.2.3 From 00d58927261c5bed6f093ca4aa2064a18139a228 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 20 Feb 2013 20:26:05 +0100 Subject: Fix remaining missing $INPUT uses FS#2577 This adds $INPUT in all places where it was still missing and available. $INPUT is now also used in places where using $_REQUEST/... was okay in order to make the code consistent. --- lib/plugins/authad/auth.php | 5 +++-- lib/plugins/plugin/admin.php | 3 ++- lib/plugins/revert/admin.php | 13 +++++++------ lib/plugins/usermanager/admin.php | 25 +++++++++++++------------ 4 files changed, 25 insertions(+), 21 deletions(-) (limited to 'lib') 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/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/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 '
'; echo ''; - echo ''; + echo ''; echo ' '; echo ' '.$this->getLang('note1').''; echo '


'; 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); } -- cgit v1.2.3 From d00152be83dd30024aa5dd89b9ad9a70eb25d80f Mon Sep 17 00:00:00 2001 From: Lorenzo Radaelli Date: Sun, 24 Feb 2013 10:36:18 +0100 Subject: Italian language update --- lib/plugins/authad/lang/it/settings.php | 5 +++++ lib/plugins/authldap/lang/it/settings.php | 5 +++++ lib/plugins/authmysql/lang/it/settings.php | 5 +++++ lib/plugins/authpgsql/lang/it/settings.php | 5 +++++ lib/plugins/config/lang/it/lang.php | 1 + 5 files changed, 21 insertions(+) create mode 100644 lib/plugins/authad/lang/it/settings.php create mode 100644 lib/plugins/authldap/lang/it/settings.php create mode 100644 lib/plugins/authmysql/lang/it/settings.php create mode 100644 lib/plugins/authpgsql/lang/it/settings.php (limited to 'lib') 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 @@ + Date: Sun, 24 Feb 2013 10:37:45 +0100 Subject: Simplified Chinese language update --- lib/plugins/authad/lang/zh/settings.php | 18 ++++++++++++++ lib/plugins/authldap/lang/zh/settings.php | 20 +++++++++++++++ lib/plugins/authmysql/lang/zh/settings.php | 40 ++++++++++++++++++++++++++++++ lib/plugins/authpgsql/lang/zh/settings.php | 37 +++++++++++++++++++++++++++ 4 files changed, 115 insertions(+) create mode 100644 lib/plugins/authad/lang/zh/settings.php create mode 100644 lib/plugins/authldap/lang/zh/settings.php create mode 100644 lib/plugins/authmysql/lang/zh/settings.php create mode 100644 lib/plugins/authpgsql/lang/zh/settings.php (limited to 'lib') 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 @@ + + */ +$lang['account_suffix'] = '您的账户后缀。例如 @my.domain.org'; +$lang['base_dn'] = '您的基本分辨名。例如 DC=my,DC=domain,DC=org'; +$lang['domain_controllers'] = '逗号分隔的域名控制器列表。例如 srv1.domain.org,srv2.domain.org'; +$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/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 @@ + + */ +$lang['server'] = '您的 LDAP 服务器。填写主机名 (localhost) 或者完整的 URL (ldap://server.tld:389)'; +$lang['port'] = 'LDAP 服务器端口 (如果上面没有给出完整的 URL)'; +$lang['usertree'] = '何处查找用户账户。例如 ou=People, dc=server, dc=tld'; +$lang['grouptree'] = '何处查找用户组。例如 ou=Group, dc=server, dc=tld'; +$lang['userfilter'] = '用于搜索用户账户的 LDAP 筛选器。例如 (&(uid=%{user})(objectClass=posixAccount))'; +$lang['groupfilter'] = '用于搜索组的 LDAP 筛选器。例如 (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; +$lang['version'] = '使用的协议版本。您或许需要设置为 3'; +$lang['starttls'] = '使用 TLS 连接?'; +$lang['referrals'] = '是否允许引用 (referrals)?'; +$lang['binddn'] = '一个可选的绑定用户的 DN (如果匿名绑定不满足要求)。例如 Eg. cn=admin, dc=my, dc=home'; +$lang['bindpw'] = '上述用户的密码'; +$lang['userscope'] = '限制用户搜索的范围'; +$lang['groupscope'] = '限制组搜索的范围'; +$lang['debug'] = '有错误时显示额外的调试信息'; 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 @@ + + */ +$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/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 @@ + + */ +$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 语句'; -- cgit v1.2.3 From 338ac38c748d94f32ca394dc604dda97ce6762e3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Feb 2013 10:39:52 +0100 Subject: fixed typos --- lib/plugins/authldap/lang/en/settings.php | 4 ++-- lib/plugins/authpgsql/lang/en/settings.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index 0bb397be5..ddedf8ae3 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -1,14 +1,14 @@ localhost) or full qualified URL (ldap://server.tld:389)'; $lang['port'] = 'LDAP server port if no full URL was given above'; -$lang['usertree'] = 'Where to finde the user accounts. Eg. ou=People, dc=server, dc=tld'; +$lang['usertree'] = 'Where to find the user accounts. Eg. ou=People, dc=server, dc=tld'; $lang['grouptree'] = 'Where to find the user groups. Eg. ou=Group, dc=server, dc=tld'; $lang['userfilter'] = 'LDAP filter to search for user accounts. Eg. (&(uid=%{user})(objectClass=posixAccount))'; $lang['groupfilter'] = 'LDAP filter to search for groups. Eg. (&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))'; $lang['version'] = 'The protocol version to use. You may need to set this to 3'; $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. cn=admin, dc=my, dc=home'; +$lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. cn=admin, dc=my, dc=home'; $lang['bindpw'] = 'Password of above user'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; 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'; -- cgit v1.2.3 From e0d6578c4fcc8130316f82645446333b06849a0e Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Mon, 18 Feb 2013 17:32:13 +0000 Subject: fix security caution for 'remote' setting (was 'xmlrpc') --- lib/plugins/config/settings/config.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index e5e09d8f8..8eb99284d 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -370,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) { -- cgit v1.2.3 From fd215c0fad082b21c598826c70aa0c5f1e078440 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 24 Feb 2013 14:03:13 +0100 Subject: Fix sample handling in toolbar in tb_format FS#2691 The previous fix in e38f3066cedb80722b3488e7ab3b2809b6db5363 fixed this bug only in tb_formatln. --- lib/scripts/toolbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 */ 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), -- cgit v1.2.3 From 8770796f2519e41d394b3d774bc831b9315e10a8 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 24 Feb 2013 19:10:48 +0000 Subject: make scrolling possible in media manager on smaller screens (FS#2723) --- lib/tpl/dokuwiki/css/mobile.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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 { -- cgit v1.2.3 From aaec90e43993614263ee747a827f0c8555698958 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 25 Feb 2013 00:42:45 +0100 Subject: Fix search button in rtl languages in Chrome For some reason without position: relative the search button is hidden in rtl languages. --- lib/tpl/dokuwiki/css/design.css | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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 { -- cgit v1.2.3 From 058fd09655df42c72f3c447e3b9561e4909e978d Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 25 Feb 2013 00:45:46 +0100 Subject: Fix current mode icons in rtl languages --- lib/tpl/dokuwiki/css/pagetools.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') 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; } -- cgit v1.2.3