aboutsummaryrefslogtreecommitdiffstats
path: root/mod/lockview.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
committerfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
commit6679734135fb04f4a7beccb81663bf1e9574f062 (patch)
tree887488543d98b5dd297d917718bdd99844e83ba5 /mod/lockview.php
parent08b757a22cd2804bfec8ecf682b6987b8c06ca49 (diff)
parentc696860cc53bc25558d83de5eda65d9b583da382 (diff)
downloadvolse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.gz
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.bz2
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.zip
Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
Diffstat (limited to 'mod/lockview.php')
-rw-r--r--mod/lockview.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/mod/lockview.php b/mod/lockview.php
index a46fb6d69..84c16f658 100644
--- a/mod/lockview.php
+++ b/mod/lockview.php
@@ -14,10 +14,13 @@ function lockview_content(&$a) {
if(! $item_id)
killme();
- if (!in_array($type, array('item','photo','event')))
+ if (!in_array($type, array('item','photo','event', 'menu_item')))
killme();
- $r = q("SELECT * FROM %s WHERE id = %d LIMIT 1",
+ //we have different naming in in menu_item table
+ $id = (($type == 'menu_item') ? 'mitem_id' : 'id');
+
+ $r = q("SELECT * FROM %s WHERE $id = %d LIMIT 1",
dbesc($type),
intval($item_id)
);
@@ -27,7 +30,10 @@ function lockview_content(&$a) {
$item = $r[0];
- if($item['uid'] != local_channel()) {
+ //we have different naming in in menu_item table
+ $uid = (($type == 'menu_item') ? $item['mitem_channel_id'] : $item['uid']);
+
+ if($uid != local_channel()) {
echo '<li>' . t('Remote privacy information not available.') . '</li>';
killme();
}