mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Code reworks: replaced hardcoded network text with the corresponding constants.
This commit is contained in:
parent
dea1b067bd
commit
0e895e24f7
7 changed files with 21 additions and 18 deletions
|
@ -33,7 +33,7 @@ function contacts_init(&$a) {
|
|||
$vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array(
|
||||
'$name' => $a->data['contact']['name'],
|
||||
'$photo' => $a->data['contact']['photo'],
|
||||
'$url' => ($a->data['contact']['network'] == 'dfrn') ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url']
|
||||
'$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url']
|
||||
));
|
||||
$follow_widget = '';
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ function contacts_content(&$a) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if(($rr['network'] === 'dfrn') && ($rr['rel'])) {
|
||||
if(($rr['network'] === NETWORK_DFRN) && ($rr['rel'])) {
|
||||
$url = "redir/{$rr['id']}";
|
||||
$sparkle = ' class="sparkle" ';
|
||||
}
|
||||
|
|
|
@ -340,7 +340,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
`pending` = 0,
|
||||
`duplex` = %d,
|
||||
`hidden` = %d,
|
||||
`network` = 'dfrn' WHERE `id` = %d
|
||||
`network` = '%s' WHERE `id` = %d
|
||||
",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
|
@ -351,6 +351,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
|
|||
dbesc(datetime_convert()),
|
||||
intval($duplex),
|
||||
intval($hidden),
|
||||
dbesc(NETWORK_DFRN),
|
||||
intval($contact_id)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1628,7 +1628,7 @@ function photos_content(&$a) {
|
|||
|
||||
|
||||
if(local_user() && ($item['contact-uid'] == local_user())
|
||||
&& ($item['network'] == 'dfrn') && (! $item['self'] )) {
|
||||
&& ($item['network'] == NETWORK_DFRN) && (! $item['self'] )) {
|
||||
$profile_url = $redirect_url;
|
||||
$sparkle = ' sparkle';
|
||||
}
|
||||
|
|
|
@ -37,7 +37,8 @@ function profperm_content(&$a) {
|
|||
|
||||
if(($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) {
|
||||
$r = q("SELECT `id` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `self` = 0
|
||||
AND `network` = 'dfrn' AND `id` = %d AND `uid` = %d LIMIT 1",
|
||||
AND `network` = '%s' AND `id` = %d AND `uid` = %d LIMIT 1",
|
||||
dbesc(NETWORK_DFRN),
|
||||
intval($a->argv[2]),
|
||||
intval(local_user())
|
||||
);
|
||||
|
@ -130,10 +131,11 @@ function profperm_content(&$a) {
|
|||
$o .= '<h3>' . t("All Contacts \x28with secure profile access\x29") . '</h3>';
|
||||
$o .= '</div>';
|
||||
$o .= '<div id="prof-all-contacts">';
|
||||
|
||||
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 and `pending` = 0 and `self` = 0
|
||||
AND `network` = 'dfrn' ORDER BY `name` ASC",
|
||||
intval(local_user())
|
||||
|
||||
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 and `pending` = 0 and `self` = 0
|
||||
AND `network` = '%s' ORDER BY `name` ASC",
|
||||
intval(local_user()),
|
||||
dbesc(NETWORK_DFRN)
|
||||
);
|
||||
|
||||
if(count($r)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue