diff options
-rw-r--r-- | inc/common.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/inc/common.php b/inc/common.php index d4265f78c..5c28cf9c3 100644 --- a/inc/common.php +++ b/inc/common.php @@ -88,8 +88,8 @@ function formSecurityToken($print = true) { /** * Determine basic information for a request of $id * - * @param unknown_type $id - * @param unknown_type $httpClient + * @author Andreas Gohr <andi@splitbrain.org> + * @author Chris Smith <chris@jalakai.co.uk> */ function basicinfo($id, $htmlClient=true){ global $USERINFO; @@ -116,7 +116,6 @@ function basicinfo($id, $htmlClient=true){ } else { $info['perm'] = auth_aclcheck($id, '', null); - $info['subscribed'] = false; $info['client'] = clientIP(true); } @@ -149,6 +148,13 @@ function pageinfo() { $info['id'] = $ID; $info['rev'] = $REV; + if(isset($_SERVER['REMOTE_USER'])) {
+ $sub = new Subscription(); + $info['subscribed'] = $sub->user_subscription(); + } else { + $info['subscribed'] = false; + } + $info['locked'] = checklock($ID); $info['filepath'] = fullpath(wikiFN($ID)); $info['exists'] = @file_exists($info['filepath']); |