Normalize App parameter declaration (mod folder, 1 out of 3)
This commit is contained in:
+20
-20
@@ -16,7 +16,7 @@
|
||||
// and 10-20 milliseconds to fetch all the child items.
|
||||
|
||||
|
||||
function content_content(&$a, $update = 0) {
|
||||
function content_content(App $a, $update = 0) {
|
||||
|
||||
require_once('include/conversation.php');
|
||||
|
||||
@@ -61,7 +61,7 @@ function content_content(&$a, $update = 0) {
|
||||
|
||||
$o = '';
|
||||
|
||||
|
||||
|
||||
|
||||
$contact_id = $a->cid;
|
||||
|
||||
@@ -100,7 +100,7 @@ function content_content(&$a, $update = 0) {
|
||||
$def_acl = array('allow_cid' => $str);
|
||||
}
|
||||
|
||||
|
||||
|
||||
$sql_options = (($star) ? " and starred = 1 " : '');
|
||||
$sql_options .= (($bmark) ? " and bookmark = 1 " : '');
|
||||
|
||||
@@ -137,7 +137,7 @@ function content_content(&$a, $update = 0) {
|
||||
}
|
||||
elseif($cid) {
|
||||
|
||||
$r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
|
||||
$r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
|
||||
AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
|
||||
intval($cid)
|
||||
);
|
||||
@@ -307,7 +307,7 @@ function content_content(&$a, $update = 0) {
|
||||
|
||||
|
||||
|
||||
function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
function render_content(App $a, $items, $mode, $update, $preview = false) {
|
||||
|
||||
require_once('include/bbcode.php');
|
||||
require_once('mod/proxy.php');
|
||||
@@ -382,7 +382,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
|
||||
if($mode === 'network-new' || $mode === 'search' || $mode === 'community') {
|
||||
|
||||
// "New Item View" on network page or search page results
|
||||
// "New Item View" on network page or search page results
|
||||
// - just loop through the items and format them minimally for display
|
||||
|
||||
//$tpl = get_markup_template('search_item.tpl');
|
||||
@@ -402,7 +402,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
|| (activity_match($item['verb'],ACTIVITY_DISLIKE))
|
||||
|| activity_match($item['verb'],ACTIVITY_ATTEND)
|
||||
|| activity_match($item['verb'],ACTIVITY_ATTENDNO)
|
||||
|| activity_match($item['verb'],ACTIVITY_ATTENDMAYBE))
|
||||
|| activity_match($item['verb'],ACTIVITY_ATTENDMAYBE))
|
||||
&& ($item['id'] != $item['parent']))
|
||||
continue;
|
||||
$nickname = $item['nickname'];
|
||||
@@ -450,7 +450,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
|
||||
$drop = array(
|
||||
'dropping' => $dropping,
|
||||
'select' => t('Select'),
|
||||
'select' => t('Select'),
|
||||
'delete' => t('Delete'),
|
||||
);
|
||||
|
||||
@@ -540,11 +540,11 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
$comments[$item['parent']] = 1;
|
||||
else
|
||||
$comments[$item['parent']] += 1;
|
||||
} elseif(! x($comments,$item['parent']))
|
||||
} elseif(! x($comments,$item['parent']))
|
||||
$comments[$item['parent']] = 0; // avoid notices later on
|
||||
}
|
||||
|
||||
// map all the like/dislike/attendance activities for each parent item
|
||||
// map all the like/dislike/attendance activities for each parent item
|
||||
// Store these in the $alike and $dlike arrays
|
||||
|
||||
foreach($items as $item) {
|
||||
@@ -633,14 +633,14 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
|
||||
$redirect_url = 'redir/' . $item['cid'] ;
|
||||
|
||||
$lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|
||||
$lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|
||||
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
|
||||
? t('Private Message')
|
||||
: false);
|
||||
|
||||
|
||||
// Top-level wall post not written by the wall owner (wall-to-wall)
|
||||
// First figure out who owns it.
|
||||
// First figure out who owns it.
|
||||
|
||||
$osparkle = '';
|
||||
|
||||
@@ -667,13 +667,13 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) {
|
||||
|
||||
// The author url doesn't match the owner (typically the contact)
|
||||
// and also doesn't match the contact alias.
|
||||
// The name match is a hack to catch several weird cases where URLs are
|
||||
// and also doesn't match the contact alias.
|
||||
// The name match is a hack to catch several weird cases where URLs are
|
||||
// all over the park. It can be tricked, but this prevents you from
|
||||
// seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn
|
||||
// well that it's the same Bob Smith.
|
||||
// well that it's the same Bob Smith.
|
||||
|
||||
// But it could be somebody else with the same name. It just isn't highly likely.
|
||||
// But it could be somebody else with the same name. It just isn't highly likely.
|
||||
|
||||
|
||||
$owner_url = $item['owner-link'];
|
||||
@@ -682,7 +682,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
$template = $wallwall;
|
||||
$commentww = 'ww';
|
||||
// If it is our contact, use a friendly redirect link
|
||||
if((link_compare($item['owner-link'],$item['url']))
|
||||
if((link_compare($item['owner-link'],$item['url']))
|
||||
&& ($item['network'] === NETWORK_DFRN)) {
|
||||
$owner_url = $redirect_url;
|
||||
$osparkle = ' sparkle';
|
||||
@@ -694,7 +694,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
}
|
||||
|
||||
$likebuttons = '';
|
||||
$shareable = ((($profile_owner == local_user()) && ($item['private'] != 1)) ? true : false);
|
||||
$shareable = ((($profile_owner == local_user()) && ($item['private'] != 1)) ? true : false);
|
||||
|
||||
if($page_writeable) {
|
||||
/* if($toplevelpost) { */
|
||||
@@ -714,7 +714,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
|
||||
if(($show_comment_box) || (($show_comment_box == false) && ($override_comment_box == false) && ($item['last-child']))) {
|
||||
$comment = replace_macros($cmnt_tpl,array(
|
||||
'$return_path' => '',
|
||||
'$return_path' => '',
|
||||
'$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''),
|
||||
'$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'),
|
||||
'$id' => $item['item_id'],
|
||||
@@ -756,7 +756,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
|
||||
|
||||
$drop = array(
|
||||
'dropping' => $dropping,
|
||||
'select' => t('Select'),
|
||||
'select' => t('Select'),
|
||||
'delete' => t('Delete'),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user