Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show notice that ip is publicly displayed for anonymous edits #2523

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions inc/html.php
Expand Up @@ -1787,6 +1787,11 @@ function html_edit(){
} else {
html_edit_form($data);
}

if ($wr && empty($_SERVER['REMOTE_USER'])) {
msg(p_locale_xhtml('anon-edit-warning'), 3);
}

if (isset($data['intro_locale'])) {
echo p_locale_xhtml($data['intro_locale']);
}
Expand Down
1 change: 1 addition & 0 deletions inc/infoutils.php
Expand Up @@ -333,6 +333,7 @@ function msg($message,$lvl=0,$line='',$file='',$allow=MSG_PUBLIC){
$errors[0] = 'info';
$errors[1] = 'success';
$errors[2] = 'notify';
$errors[3] = 'security';

if($line || $file) $message.=' ['.utf8_basename($file).':'.$line.']';

Expand Down
3 changes: 3 additions & 0 deletions inc/lang/de-informal/anon-edit-warning.txt
@@ -0,0 +1,3 @@
Du bist nicht angemeldet. Deine IP-Adresse wird bei Bearbeitungen öffentlich sichtbar.

Melde dich an, damit stattdessen dein Benutzername angezeigt wird.
3 changes: 3 additions & 0 deletions inc/lang/de/anon-edit-warning.txt
@@ -0,0 +1,3 @@
Sie sind nicht angemeldet. Ihre IP-Adresse wird bei Bearbeitungen öffentlich sichtbar.

Melden Sie sich an, damit stattdessen Ihr Benutzername angezeigt wird.
3 changes: 3 additions & 0 deletions inc/lang/en/anon-edit-warning.txt
@@ -0,0 +1,3 @@
You are not logged in. Your IP address will be publicly visible if you make any edits.

If you log in, your edits will be attributed to your user name.
21 changes: 19 additions & 2 deletions lib/styles/screen.css
Expand Up @@ -7,7 +7,8 @@
div.error,
div.info,
div.success,
div.notify {
div.notify,
div.security {
color: #000;
background-repeat: no-repeat;
background-position: 8px 50%;
Expand All @@ -20,10 +21,19 @@ div.notify {
border-radius: 5px;
}

div.error p,
div.info p,
div.success p,
div.notify p,
div.security p {
margin: 0 0 0 0;
}

[dir=rtl] div.error,
[dir=rtl] div.info,
[dir=rtl] div.success,
[dir=rtl] div.notify {
[dir=rtl] div.notify,
[dir=rtl] div.security {
background-position: 99% 50%;
padding-left: .4em;
padding-right: 32px;
Expand Down Expand Up @@ -53,6 +63,13 @@ div.notify {
border-color: #eeb;
}

div.security {
background-color: #ffc;
background-image: url(../images/admin/acl.png);
border-color: #eeb;
}


/* modal windows */
.JSpopup,
#link__wiz {
Expand Down