diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-05-11 22:02:35 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-05-11 22:02:35 +0200 |
commit | d1c7b6ec50c31bdac17533c13e908fb41c1e1990 (patch) | |
tree | dd8c9de9482bdf5f303afba582109dcdf8e51ccf | |
parent | b54f94e00cd0f1a818dd79fb2ce3bca7117e243e (diff) | |
download | rpg-d1c7b6ec50c31bdac17533c13e908fb41c1e1990.tar.gz rpg-d1c7b6ec50c31bdac17533c13e908fb41c1e1990.tar.bz2 |
add sneaky_index option
This disables the last patch and adds an option to enable it on demand.
darcs-hash:20070511200235-7ad00-a3ea769bc4965710b7fd261d31e2c9f8a3d9d7f5.gz
-rw-r--r-- | conf/dokuwiki.php | 1 | ||||
-rw-r--r-- | inc/search.php | 5 | ||||
-rw-r--r-- | lib/plugins/config/lang/en/lang.php | 1 | ||||
-rw-r--r-- | lib/plugins/config/settings/config.metadata.php | 1 |
4 files changed, 6 insertions, 2 deletions
diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index a6ba7d6ce..f6c595e18 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -67,6 +67,7 @@ $conf['superuser'] = '!!not set!!'; //The admin can be user or @group $conf['manager'] = '!!not set!!'; //The manager can be user or @group $conf['profileconfirm'] = '1'; //Require current password to confirm changes to user profile $conf['disableactions'] = ''; //comma separated list of actions to disable +$conf['sneaky_index'] = 0; //check for namespace read permission in index view (0|1) (1 might cause unexpected behavior) /* Advanced Options */ diff --git a/inc/search.php b/inc/search.php index 3b225ddec..eac70cd05 100644 --- a/inc/search.php +++ b/inc/search.php @@ -142,6 +142,7 @@ function search_qsearch(&$data,$base,$file,$type,$lvl,$opts){ * @author Andreas Gohr <andi@splitbrain.org> */ function search_index(&$data,$base,$file,$type,$lvl,$opts){ + global $conf; $return = true; $item = array(); @@ -156,8 +157,8 @@ function search_index(&$data,$base,$file,$type,$lvl,$opts){ $id = pathID($file); - if($type=='d' && auth_quickaclcheck($id.':') < AUTH_READ){ - return false; + if($type=='d' && $conf['sneaky_index'] && auth_quickaclcheck($id.':') < AUTH_READ){ + return false; } //check hidden diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index 41f688d0a..f60747c18 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -96,6 +96,7 @@ $lang['disableactions_check'] = 'Check'; $lang['disableactions_subscription'] = 'Subscribe/Unsubscribe'; $lang['disableactions_wikicode'] = 'View source/Export Raw'; $lang['disableactions_other'] = 'Other actions (comma separated)'; +$lang['sneaky_index'] = 'By default, DokuWiki will show all namespaces in the index view. Enabling this option will hide those where the user doesn\'t have read permissions. This might result in hiding of accessable subnamespaces. This may make the index unusable with certain ACL setups.'; /* Advanced Options */ $lang['updatecheck'] = 'Check for updates and security warnings? DokuWiki needs to contact splitbrain.org for this feature.'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index 20a62f72d..65e74dd7d 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -116,6 +116,7 @@ $meta['registernotify'] = array('email'); $meta['disableactions'] = array('disableactions', '_choices' => array('backlink','index','recent','revisions','search','subscription','register','resendpwd','profile','edit','wikicode','check'), '_combine' => array('subscription' => array('subscribe','unsubscribe'), 'wikicode' => array('source','export_raw'))); +$meta['sneaky_index'] = array('onoff'); $meta['_anti_spam'] = array('fieldset'); $meta['usewordblock']= array('onoff'); |