diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2013-02-17 20:03:38 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-02-17 20:03:38 +0000 |
commit | 7e87a794494ea987ebc31decd939a25d44a5c00d (patch) | |
tree | a8b8fd591eea4899b87c9e52050b0c71e3188db0 | |
parent | 1015a57dff9a6f85b8e0534d280aa1e09945a598 (diff) | |
download | rpg-7e87a794494ea987ebc31decd939a25d44a5c00d.tar.gz rpg-7e87a794494ea987ebc31decd939a25d44a5c00d.tar.bz2 |
fix missing 'subscribed' key
-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']); |