diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-04-21 23:08:54 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-04-21 23:08:54 +0200 |
commit | e58e8f3f75ce2119698fb59bda55a5fbea9dda2a (patch) | |
tree | 4e6bffce8ed8b1369d05c5a75327fea6a2ee68ba /mod | |
parent | 21704ecb93e293f39d0228ae0d9765f37af8d99e (diff) | |
download | volse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.tar.gz volse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.tar.bz2 volse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.zip |
bring lockstate to webpages
Diffstat (limited to 'mod')
-rw-r--r-- | mod/webpages.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mod/webpages.php b/mod/webpages.php index b303b8652..615969d78 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -142,6 +142,9 @@ function webpages_content(&$a) { $pages = array(); foreach($r as $rr) { unobscure($rr); + + $lockstate = (($rr['allow_cid'] || $rr['allow_gid'] || $rr['deny_cid'] || $rr['deny_gid']) ? 'lock' : 'unlock'); + $element_arr = array( 'type' => 'webpage', 'title' => $rr['title'], @@ -159,7 +162,8 @@ function webpages_content(&$a) { 'title' => $rr['title'], 'created' => datetime_convert('UTC',date_default_timezone_get(),$rr['created']), 'edited' => datetime_convert('UTC',date_default_timezone_get(),$rr['edited']), - 'bb_element' => '[element]' . base64url_encode(json_encode($element_arr)) . '[/element]' + 'bb_element' => '[element]' . base64url_encode(json_encode($element_arr)) . '[/element]', + 'lockstate' => $lockstate ); } } |