$r = q("SELECT * from `item`,`contact` WHERE
`item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
dbesc($item['parent-uri']));
- if(count($r)==0) return;
+ if (!dbm::is_result($r)) return;
$obj=$r[0];
$author = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
$r = q("SELECT * from `item`,`contact` WHERE
`item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
dbesc($item['parent-uri']));
- if(count($r)==0) return;
+ if (!dbm::is_result($r)) return;
$obj=$r[0];
$author = '[url=' . zrl($item['author-link']) . ']' . $item['author-name'] . '[/url]';
dbesc($obj->id),
intval($item['uid'])
);
- if(count($r) && $r[0]['plink']) {
+ if (dbm::is_result($r) && $r[0]['plink']) {
$target = $r[0];
$Bname = $target['author-name'];
$Blink = $target['author-link'];
}
$o = replace_macros($page_template, array(
- '$baseurl' => $a->get_baseurl($ssl_state),
+ '$baseurl' => App::get_baseurl($ssl_state),
'$return_path' => $a->query_string,
'$live_update' => $live_update_div,
'$remove' => t('remove'),
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$newpost' => 'true',
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$geotag' => $geotag,
'$nickname' => $x['nickname'],
$tpl = get_markup_template('jot-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$newpost' => 'true',
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$geotag' => $geotag,
'$nickname' => $x['nickname'],
'$ptyp' => (($notes_cid) ? 'note' : 'wall'),
'$content' => $x['content'],
'$post_id' => $x['post_id'],
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$defloc' => $x['default_location'],
'$visitor' => $x['visitor'],
'$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),