aboutsummaryrefslogtreecommitdiffstats
path: root/mod/webpages.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-04-21 23:08:54 +0200
committerMario Vavti <mario@mariovavti.com>2015-04-21 23:08:54 +0200
commite58e8f3f75ce2119698fb59bda55a5fbea9dda2a (patch)
tree4e6bffce8ed8b1369d05c5a75327fea6a2ee68ba /mod/webpages.php
parent21704ecb93e293f39d0228ae0d9765f37af8d99e (diff)
downloadvolse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.tar.gz
volse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.tar.bz2
volse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.zip
bring lockstate to webpages
Diffstat (limited to 'mod/webpages.php')
-rw-r--r--mod/webpages.php6
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
);
}
}