From 2a7abf2d7fee6a2d6418e5ad4b79e37e6049bd92 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 31 Jul 2013 18:14:26 +0200 Subject: FS#2751 - self deletion of user account --- inc/html.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index fb39fcb3c..5e3388a52 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1381,6 +1381,23 @@ function html_updateprofile(){ $form->addElement(form_makeButton('reset', '', $lang['btn_reset'])); $form->endFieldset(); html_form('updateprofile', $form); + + if ($auth->canDo('delUser') && actionOK('profile_delete')) { + $form_profiledelete = new Doku_Form(array('id' => 'dw__profiledelete')); + $form_profiledelete->startFieldset($lang['profdeleteuser']); + $form_profiledelete->addHidden('do', 'profile_delete'); + $form_profiledelete->addHidden('delete', '1'); + $form_profiledelete->addElement(form_makeCheckboxField('confirm_delete', '1', $lang['profconfdelete'],'dw__confirmdelete','', array('required' => 'required'))); + if ($conf['profileconfirm']) { + $form_profiledelete->addElement(form_makeTag('br')); + $form_profiledelete->addElement(form_makePasswordField('oldpass', $lang['oldpass'], '', 'block', array('size'=>'50', 'required' => 'required'))); + } + $form_profiledelete->addElement(form_makeButton('submit', '', $lang['btn_deleteuser'])); + $form_profiledelete->endFieldset(); + + html_form('profiledelete', $form_profiledelete); + } + print ''.NL; } -- cgit v1.2.3 From a669bfe08c4c0ef180e38dd3189eaf81c0029f1c Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 31 Jul 2013 18:38:02 +0200 Subject: add html5 attributes to register form --- inc/html.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index fb39fcb3c..d94291090 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1318,19 +1318,22 @@ function html_register(){ global $conf; global $INPUT; + $base_attrs = array('size'=>50,'required'=>'required'); + $email_attrs = $base_attrs + array('type'=>'email','class'=>'edit'); + print p_locale_xhtml('register'); print '
'.NL; $form = new Doku_Form(array('id' => 'dw__register')); $form->startFieldset($lang['btn_register']); $form->addHidden('do', 'register'); $form->addHidden('save', '1'); - $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block', $base_attrs)); if (!$conf['autopasswd']) { - $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50'))); - $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', $base_attrs)); + $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', $base_attrs)); } - $form->addElement(form_makeTextField('fullname', $INPUT->post->str('fullname'), $lang['fullname'], '', 'block', array('size'=>'50'))); - $form->addElement(form_makeTextField('email', $INPUT->post->str('email'), $lang['email'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makeTextField('fullname', $INPUT->post->str('fullname'), $lang['fullname'], '', 'block', $base_attrs)); + $form->addElement(form_makeField('email','email', $INPUT->post->str('email'), $lang['email'], '', 'block', $email_attrs)); $form->addElement(form_makeButton('submit', '', $lang['btn_register'])); $form->endFieldset(); html_form('register', $form); -- cgit v1.2.3 From 3b1338fffdb38ad47f7d814bc8d61b2f06305d69 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 31 Jul 2013 18:38:31 +0200 Subject: add html5 attributes to update profile form --- inc/html.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index d94291090..53f4c45ff 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1356,10 +1356,10 @@ function html_updateprofile(){ global $auth; print p_locale_xhtml('updateprofile'); + print '
'.NL; $fullname = $INPUT->post->str('fullname', $INFO['userinfo']['name'], true); $email = $INPUT->post->str('email', $INFO['userinfo']['mail'], true); - print '
'.NL; $form = new Doku_Form(array('id' => 'dw__register')); $form->startFieldset($lang['profile']); $form->addHidden('do', 'profile'); @@ -1368,9 +1368,9 @@ function html_updateprofile(){ $attr = array('size'=>'50'); if (!$auth->canDo('modName')) $attr['disabled'] = 'disabled'; $form->addElement(form_makeTextField('fullname', $fullname, $lang['fullname'], '', 'block', $attr)); - $attr = array('size'=>'50'); + $attr = array('size'=>'50', 'class'=>'edit'); if (!$auth->canDo('modMail')) $attr['disabled'] = 'disabled'; - $form->addElement(form_makeTextField('email', $email, $lang['email'], '', 'block', $attr)); + $form->addElement(form_makeField('email','email', $email, $lang['email'], '', 'block', $attr)); $form->addElement(form_makeTag('br')); if ($auth->canDo('modPass')) { $form->addElement(form_makePasswordField('newpass', $lang['newpass'], '', 'block', array('size'=>'50'))); @@ -1378,10 +1378,11 @@ function html_updateprofile(){ } if ($conf['profileconfirm']) { $form->addElement(form_makeTag('br')); - $form->addElement(form_makePasswordField('oldpass', $lang['oldpass'], '', 'block', array('size'=>'50'))); + $form->addElement(form_makePasswordField('oldpass', $lang['oldpass'], '', 'block', array('size'=>'50', 'required' => 'required'))); } $form->addElement(form_makeButton('submit', '', $lang['btn_save'])); $form->addElement(form_makeButton('reset', '', $lang['btn_reset'])); + $form->endFieldset(); html_form('updateprofile', $form); print '
'.NL; -- cgit v1.2.3 From b1af90141d42f8844159ff4fad76968a8ee78687 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 1 Aug 2013 16:32:28 +0200 Subject: Improve nofollow behaviour for ?do=index In response to FS#2766 - make namespace links in the browser sitemap nofollow - remove nofollow from browser sitemap link on the wiki start page when sitemap.xml generation is disabled --- inc/html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 53f4c45ff..53a100ec7 100644 --- a/inc/html.php +++ b/inc/html.php @@ -859,7 +859,8 @@ function html_list_index($item){ $base = ':'.$item['id']; $base = substr($base,strrpos($base,':')+1); if($item['type']=='d'){ - $ret .= ''; + // FS#2766, no need for search bots to follow namespace links in the index + $ret .= ''; $ret .= $base; $ret .= ''; }else{ -- cgit v1.2.3 From 5a99d25b24f7e14f137084100f40325b7a2a71b4 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Thu, 1 Aug 2013 16:38:02 +0100 Subject: added aria attributes to edit mode --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index fb39fcb3c..9c69c9845 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1488,7 +1488,7 @@ function html_edit(){ echo 'textChanged = ' . ($mod ? 'true' : 'false'); echo '/*!]]>*/' . NL; } ?> -
+
-- cgit v1.2.3 From 74ef17786eb9ce751a8dd7c66ab7523efa92c79f Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 1 Aug 2013 22:46:16 +0200 Subject: include namespace links when index access from the wiki start page and no automatic sitemap.xml is being generated. --- inc/html.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 53a100ec7..5f94d7dce 100644 --- a/inc/html.php +++ b/inc/html.php @@ -854,13 +854,17 @@ function html_index($ns){ * @author Andreas Gohr */ function html_list_index($item){ - global $ID; + global $ID, $conf; + + // prevent searchbots needlessly following links - only necessary when accessed from the homepage and no sitemap.xml is being generated + $nofollow = ($ID != $conf['start'] || $conf['sitemap']) ? ' rel="nofollow"' : ''; + $ret = ''; $base = ':'.$item['id']; $base = substr($base,strrpos($base,':')+1); if($item['type']=='d'){ // FS#2766, no need for search bots to follow namespace links in the index - $ret .= ''; + $ret .= ''; $ret .= $base; $ret .= ''; }else{ -- cgit v1.2.3 From b8bc53ce8da2f0fb9cfedb01df6507b29f32daaa Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Thu, 1 Aug 2013 23:06:57 +0200 Subject: simplify comment --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 5f94d7dce..d43611940 100644 --- a/inc/html.php +++ b/inc/html.php @@ -856,7 +856,7 @@ function html_index($ns){ function html_list_index($item){ global $ID, $conf; - // prevent searchbots needlessly following links - only necessary when accessed from the homepage and no sitemap.xml is being generated + // prevent searchbots needlessly following links $nofollow = ($ID != $conf['start'] || $conf['sitemap']) ? ' rel="nofollow"' : ''; $ret = ''; -- cgit v1.2.3 From d317fb5d70f8903dc518943c731202869d450d68 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Fri, 2 Aug 2013 14:04:04 +0100 Subject: fixed some bi-directionality issues Fixed some issues which occur whenever RTL and LTR languages could potentially be mixed, using the HTML5 `` element. This element is currently only supported by Chrome and Firefox. The old and only partially working fix for tpl_breadcrumbs() was removed in favour of this solution. --- inc/html.php | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 614cf172c..2d2bb8a7c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -575,18 +575,18 @@ function html_revisions($first=0, $media_id = false){ if ($info['sum']) { $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); if (!$media_id) $form->addElement(' – '); - $form->addElement(htmlspecialchars($info['sum'])); + $form->addElement(''.htmlspecialchars($info['sum']).''); $form->addElement(form_makeCloseTag('span')); } $form->addElement(form_makeOpenTag('span', array('class' => 'user'))); if($info['user']){ - $form->addElement(editorinfo($info['user'])); + $form->addElement(''.editorinfo($info['user']).''); if(auth_ismanager()){ - $form->addElement(' ('.$info['ip'].')'); + $form->addElement(' ('.$info['ip'].')'); } }else{ - $form->addElement($info['ip']); + $form->addElement(''.$info['ip'].''); } $form->addElement(form_makeCloseTag('span')); @@ -774,12 +774,12 @@ function html_recent($first=0, $show_changes='both'){ $form->addElement(form_makeOpenTag('span', array('class' => 'user'))); if($recent['user']){ - $form->addElement(editorinfo($recent['user'])); + $form->addElement(''.editorinfo($recent['user']).''); if(auth_ismanager()){ - $form->addElement(' ('.$recent['ip'].')'); + $form->addElement(' ('.$recent['ip'].')'); } }else{ - $form->addElement($recent['ip']); + $form->addElement(''.$recent['ip'].''); } $form->addElement(form_makeCloseTag('span')); @@ -1027,52 +1027,52 @@ function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = fa }else{ $l_info = getRevisionInfo($id,$l_rev,true, $media); if($l_info['user']){ - $l_user = editorinfo($l_info['user']); - if(auth_ismanager()) $l_user .= ' ('.$l_info['ip'].')'; + $l_user = ''.editorinfo($l_info['user']).''; + if(auth_ismanager()) $l_user .= ' ('.$l_info['ip'].')'; } else { - $l_user = $l_info['ip']; + $l_user = ''.$l_info['ip'].''; } $l_user = ''.$l_user.''; - $l_sum = ($l_info['sum']) ? ''.hsc($l_info['sum']).'' : ''; + $l_sum = ($l_info['sum']) ? ''.hsc($l_info['sum']).'' : ''; if ($l_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $l_minor = 'class="minor"'; $l_head_title = ($media) ? dformat($l_rev) : $id.' ['.dformat($l_rev).']'; - $l_head = ''. - $l_head_title.''. + $l_head = ''. + $l_head_title.''. $head_separator.$l_user.' '.$l_sum; } if($r_rev){ $r_info = getRevisionInfo($id,$r_rev,true, $media); if($r_info['user']){ - $r_user = editorinfo($r_info['user']); - if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')'; + $r_user = ''.editorinfo($r_info['user']).''; + if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')'; } else { - $r_user = $r_info['ip']; + $r_user = ''.$r_info['ip'].''; } $r_user = ''.$r_user.''; - $r_sum = ($r_info['sum']) ? ''.hsc($r_info['sum']).'' : ''; + $r_sum = ($r_info['sum']) ? ''.hsc($r_info['sum']).'' : ''; if ($r_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $r_minor = 'class="minor"'; $r_head_title = ($media) ? dformat($r_rev) : $id.' ['.dformat($r_rev).']'; - $r_head = ''. - $r_head_title.''. + $r_head = ''. + $r_head_title.''. $head_separator.$r_user.' '.$r_sum; }elseif($_rev = @filemtime($media_or_wikiFN($id))){ $_info = getRevisionInfo($id,$_rev,true, $media); if($_info['user']){ - $_user = editorinfo($_info['user']); - if(auth_ismanager()) $_user .= ' ('.$_info['ip'].')'; + $_user = ''.editorinfo($_info['user']).''; + if(auth_ismanager()) $_user .= ' ('.$_info['ip'].')'; } else { - $_user = $_info['ip']; + $_user = ''.$_info['ip'].''; } $_user = ''.$_user.''; - $_sum = ($_info['sum']) ? ''.hsc($_info['sum']).'' : ''; + $_sum = ($_info['sum']) ? ''.hsc($_info['sum']).'' : ''; if ($_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $r_minor = 'class="minor"'; $r_head_title = ($media) ? dformat($_rev) : $id.' ['.dformat($_rev).']'; - $r_head = ''. - $r_head_title.' '. + $r_head = ''. + $r_head_title.' '. '('.$lang['current'].')'. $head_separator.$_user.' '.$_sum; }else{ -- cgit v1.2.3