diff options
author | friendica <info@friendica.com> | 2013-09-01 19:15:08 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-09-01 19:15:08 -0700 |
commit | caa148c1e3736b6d51327883b04405b00a4cda0b (patch) | |
tree | 2d3d213a5011b54840a199cad430a0278f179193 /include/items.php | |
parent | a1906482dc3323f747744a1447aace78b494ddbd (diff) | |
download | volse-hubzilla-caa148c1e3736b6d51327883b04405b00a4cda0b.tar.gz volse-hubzilla-caa148c1e3736b6d51327883b04405b00a4cda0b.tar.bz2 volse-hubzilla-caa148c1e3736b6d51327883b04405b00a4cda0b.zip |
Sheesh. Three lines of Javascript. All you have to do is find which of the three lines is doing something wrong. Or FILE A BUG. Or use a different browser (not *try* a different browser, *use* a different browser), or turn off freaking tinymce. But no - let's argue about browsers instead.
Diffstat (limited to 'include/items.php')
-rwxr-xr-x | include/items.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php index c695a9b72..712c416de 100755 --- a/include/items.php +++ b/include/items.php @@ -1361,6 +1361,17 @@ function item_store($arr,$allow_exec = false) { return 0; } + // If a page layout is provided, ensure it exists and belongs to us. + + if(array_key_exists('layout_mid',$arr) && $arr['layout_mid']) { + $l = q("select item_restrict from item where mid = '%s' and uid = %d limit 1", + dbesc($arr['layout_mid']), + intval($arr['uid']) + ); + if((! $l) || (! ($l[0]['item_restrict'] & ITEM_PDL))) + unset($arr['layout_mid']); + } + // Don't let anybody set these, either intentionally or accidentally if(array_key_exists('id',$arr)) |