From: Marcel Werk Date: Tue, 24 Jun 2014 21:03:13 +0000 (+0200) Subject: Improved user profile privacy function X-Git-Tag: 2.1.0_Alpha_1~677 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93823e40c8b4569a2fabf87d5243de31da871fc8;p=GitHub%2FWoltLab%2FWCF.git Improved user profile privacy function --- diff --git a/com.woltlab.wcf/templates/user.tpl b/com.woltlab.wcf/templates/user.tpl index 6f3656a01c..af4abc8cf5 100644 --- a/com.woltlab.wcf/templates/user.tpl +++ b/com.woltlab.wcf/templates/user.tpl @@ -207,39 +207,43 @@ {include file='userNotice'} -
- {hascontent} -
- -
- - - {foreach from=$__wcf->getUserProfileMenu()->getMenuItems() item=menuItem} - {if $menuItem->getContentManager()->isVisible($userID)} -
- {if $menuItem === $__wcf->getUserProfileMenu()->getActiveMenuItem()} - {@$profileContent} - {/if} -
- {/if} - {/foreach} -
+ + {foreach from=$__wcf->getUserProfileMenu()->getMenuItems() item=menuItem} + {if $menuItem->getContentManager()->isVisible($userID)} +
+ {if $menuItem === $__wcf->getUserProfileMenu()->getActiveMenuItem()} + {@$profileContent} + {/if} +
+ {/if} + {/foreach} + +{else} +

{lang}wcf.user.profile.proctected{/lang}

+{/if} {include file='footer'} diff --git a/com.woltlab.wcf/templates/userSidebar.tpl b/com.woltlab.wcf/templates/userSidebar.tpl index 24fc23268e..c5d01c3b02 100644 --- a/com.woltlab.wcf/templates/userSidebar.tpl +++ b/com.woltlab.wcf/templates/userSidebar.tpl @@ -37,58 +37,60 @@ {/hascontent} -{if $followingCount} -
- {lang}wcf.user.profile.following{/lang} {#$followingCount} - -
- +{if !$user->isProtected()} + {if $followingCount} +
+ {lang}wcf.user.profile.following{/lang} {#$followingCount} - {if $followingCount > 10} - {lang}wcf.global.button.showAll{/lang} - {/if} -
-
-{/if} - -{if $followerCount} -
- {lang}wcf.user.profile.followers{/lang} {#$followerCount} - -
- +
+ - {if $followerCount > 10} - {lang}wcf.global.button.showAll{/lang} - {/if} -
-
-{/if} - -{if $visitorCount} -
- {lang}wcf.user.profile.visitors{/lang} {#$visitorCount} - -
- - - {if $visitorCount > 10} - {lang}wcf.global.button.showAll{/lang} - {/if} -
-
+ {if $followingCount > 10} + {lang}wcf.global.button.showAll{/lang} + {/if} + + + {/if} + + {if $followerCount} +
+ {lang}wcf.user.profile.followers{/lang} {#$followerCount} + +
+ + + {if $followerCount > 10} + {lang}wcf.global.button.showAll{/lang} + {/if} +
+
+ {/if} + + {if $visitorCount} +
+ {lang}wcf.user.profile.visitors{/lang} {#$visitorCount} + +
+ + + {if $visitorCount > 10} + {lang}wcf.global.button.showAll{/lang} + {/if} +
+
+ {/if} + + {event name='boxes'} {/if} - -{event name='boxes'} diff --git a/wcfsetup/install/files/lib/page/UserPage.class.php b/wcfsetup/install/files/lib/page/UserPage.class.php index c079dce1e2..c3057cba07 100644 --- a/wcfsetup/install/files/lib/page/UserPage.class.php +++ b/wcfsetup/install/files/lib/page/UserPage.class.php @@ -102,11 +102,6 @@ class UserPage extends AbstractPage { throw new PermissionDeniedException(); } - // check is Accessible - if ($this->user->isProtected()) { - throw new PermissionDeniedException(); - } - if (isset($_REQUEST['editOnInit'])) $this->editOnInit = true; } @@ -185,7 +180,7 @@ class UserPage extends AbstractPage { */ public function show() { // update profile hits - if ($this->user->userID != WCF::getUser()->userID && !WCF::getSession()->spiderID) { + if ($this->user->userID != WCF::getUser()->userID && !WCF::getSession()->spiderID && !$this->user->isProtected()) { $editor = new UserEditor($this->user->getDecoratedObject()); $editor->updateCounters(array('profileHits' => 1)); diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 6d9210ce40..e61af85e2b 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2930,6 +2930,7 @@ Möchten Sie diese E-Mail-Benachrichtigung in Zukunft nicht mehr erhalten, könn {$commentAuthor->username} an der Pinnwand von {$user->username}{if $like->isDislike()} nicht{/if}.]]> {$responseAuthor->username} zum Kommentar von {$commentAuthor->username} an der Pinnwand von {$user->username}{if $like->isDislike()} nicht{/if}.]]> + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 83ccb68afe..d8d6bada2f 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2787,6 +2787,7 @@ If you do not want to receive further email notifications for this event, you ca {$commentAuthor->username} an der Pinnwand von {$user->username}{if $like->isDislike()} nicht{/if}.]]> {$responseAuthor->username} zum Kommentar von {$commentAuthor->username} an der Pinnwand von {$user->username}{if $like->isDislike()} nicht{/if}.]]> +