Skip to content
Snippets Groups Projects
Commit b174aeae authored by chris's avatar chris
Browse files

update wl,ml,buildURLParams with optional separator string, update config...

update wl,ml,buildURLParams with optional separator string, update config plugin redirect with new wl(), add meta & lang details for $conf['resendpasswd']

darcs-hash:20060130232818-9b6ab-2f395bc25c536b06bb5ade616a8252060ecb5278.gz
parent fedd542e
No related branches found
No related tags found
No related merge requests found
......@@ -94,11 +94,11 @@ function pageinfo(){
*
* @author Andreas Gohr
*/
function buildURLparams($params){
function buildURLparams($params, $sep='&'){
$url = '';
$amp = false;
foreach($params as $key => $val){
if($amp) $url .= '&';
if($amp) $url .= $sep;
$url .= $key.'=';
$url .= rawurlencode($val);
......@@ -247,12 +247,12 @@ function idfilter($id,$ue=true){
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function wl($id='',$more='',$abs=false){
function wl($id='',$more='',$abs=false,$sep='&amp;'){
global $conf;
if(is_array($more)){
$more = buildURLparams($more);
$more = buildURLparams($more,$sep);
}else{
$more = str_replace(',','&amp;',$more);
$more = str_replace(',',$sep,$more);
}
$id = idfilter($id);
......@@ -270,7 +270,7 @@ function wl($id='',$more='',$abs=false){
if($more) $xlink .= '?'.$more;
}else{
$xlink .= DOKU_SCRIPT.'?id='.$id;
if($more) $xlink .= '&amp;'.$more;
if($more) $xlink .= $sep.$more;
}
return $xlink;
......@@ -281,12 +281,12 @@ function wl($id='',$more='',$abs=false){
*
* Will return a link to the detail page if $direct is false
*/
function ml($id='',$more='',$direct=true){
function ml($id='',$more='',$direct=true,$sep='&amp;'){
global $conf;
if(is_array($more)){
$more = buildURLparams($more);
$more = buildURLparams($more,$sep);
}else{
$more = str_replace(',','&amp;',$more);
$more = str_replace(',',$sep,$more);
}
$xlink = DOKU_BASE;
......@@ -296,7 +296,7 @@ function ml($id='',$more='',$direct=true){
$xlink .= 'lib/exe/fetch.php';
if($more){
$xlink .= '?'.$more;
$xlink .= '&amp;media='.rawurlencode($id);
$xlink .= $sep.'media='.rawurlencode($id);
}else{
$xlink .= '?media='.rawurlencode($id);
}
......@@ -327,7 +327,7 @@ function ml($id='',$more='',$direct=true){
}else{
if($more){
$xlink .= $script.'?'.$more;
$xlink .= '&amp;media='.$id;
$xlink .= $sep.'media='.$id;
}else{
$xlink .= $script.'?media='.$id;
}
......
......@@ -79,7 +79,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin {
// save state & force a page reload to get the new settings to take effect
$_SESSION['PLUGIN_CONFIG'] = array('state' => 'updated', 'time' => time());
$this->_close_session();
header("Location: ".str_replace('&amp;','&',wl($ID,'do=admin&page=config')));
header("Location: ".wl($ID,array('do'=>'admin','page'=>'config'),true,'&'));
exit();
}
......
......@@ -54,6 +54,7 @@ $lang['mailguard'] = 'obfuscate email addresses'; //obfuscate email addresses
$lang['useacl'] = 'use ACL'; //Use Access Control Lists to restrict access?
$lang['openregister']= 'open register'; //Should users to be allowed to register?
$lang['autopasswd'] = 'autogenerate passwords'; //autogenerate passwords and email them to user
$lang['resendpasswd']= 'allow resend password'; //allow resend password function?
$lang['authtype'] = 'authentication backend'; //which authentication backend should be used
$lang['passcrypt'] = 'password encryption'; //Used crypt method (smd5,md5,sha1,ssha,crypt,mysql,my411)
$lang['defaultgroup']= 'default group'; //Default groups new Users are added to
......
......@@ -103,6 +103,7 @@ $meta['mailguard'] = array('multichoice','_choices' => array('visible','hex','
$meta['useacl'] = array('onoff');
$meta['openregister']= array('onoff');
$meta['autopasswd'] = array('onoff');
$meta['resendpasswd'] = array('onoff');
$meta['authtype'] = array('authtype');
$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','sha1','ssha','crypt','mysql','my411'));
$meta['defaultgroup']= array('');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment