1
0
Fork 0

Revert "Updated modules to allow for partial overrides without errors"

This reverts commit db949bb802.
This commit is contained in:
fabrixxm 2016-02-07 15:11:34 +01:00
commit b202e02fbf
123 changed files with 471 additions and 768 deletions

View file

@ -1,8 +1,8 @@
<?php
if(! function_exists('lockview_content')) {
function lockview_content(&$a) {
function lockview_content(&$a) {
$type = (($a->argc > 1) ? $a->argv[1] : 0);
if (is_numeric($type)) {
$item_id = intval($type);
@ -10,13 +10,13 @@ function lockview_content(&$a) {
} else {
$item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
}
if(! $item_id)
killme();
if (!in_array($type, array('item','photo','event')))
killme();
$r = q("SELECT * FROM `%s` WHERE `id` = %d LIMIT 1",
dbesc($type),
intval($item_id)
@ -33,7 +33,7 @@ function lockview_content(&$a) {
}
if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
&& (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) {
echo t('Remote privacy information not available.') . '<br />';
@ -53,7 +53,7 @@ function lockview_content(&$a) {
dbesc(implode(', ', $allowed_groups))
);
if(count($r))
foreach($r as $rr)
foreach($r as $rr)
$l[] = '<b>' . $rr['name'] . '</b>';
}
if(count($allowed_users)) {
@ -61,7 +61,7 @@ function lockview_content(&$a) {
dbesc(implode(', ',$allowed_users))
);
if(count($r))
foreach($r as $rr)
foreach($r as $rr)
$l[] = $rr['name'];
}
@ -71,7 +71,7 @@ function lockview_content(&$a) {
dbesc(implode(', ', $deny_groups))
);
if(count($r))
foreach($r as $rr)
foreach($r as $rr)
$l[] = '<b><strike>' . $rr['name'] . '</strike></b>';
}
if(count($deny_users)) {
@ -79,12 +79,12 @@ function lockview_content(&$a) {
dbesc(implode(', ',$deny_users))
);
if(count($r))
foreach($r as $rr)
foreach($r as $rr)
$l[] = '<strike>' . $rr['name'] . '</strike>';
}
echo $o . implode(', ', $l);
killme();
}
}