mirror of
https://github.com/friendica/friendica
synced 2024-12-26 23:46:18 +01:00
set update frequency to twice daily for 'feed' contacts, unable to set update frequency on contact edit form.
This commit is contained in:
parent
b4642ca650
commit
d2dddd995a
6 changed files with 26 additions and 15 deletions
|
@ -53,9 +53,9 @@ function contacts_post(&$a) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
logger('contact_edit ' . print_r($_POST,true));
|
||||
|
||||
|
||||
$priority = intval($_POST['priority']);
|
||||
$priority = intval($_POST['poll']);
|
||||
if($priority == (-1))
|
||||
|
||||
if($priority > 5 || $priority < 0)
|
||||
|
@ -252,7 +252,7 @@ function contacts_content(&$a) {
|
|||
'$contact_id' => $r[0]['id'],
|
||||
'$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ),
|
||||
'$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ),
|
||||
'$insecure' => (($r[0]['network'] === 'dfrn') ? '' : load_view_file('view/insecure_net.tpl')),
|
||||
'$insecure' => (($r[0]['network'] === 'stat') ? load_view_file('view/insecure_net.tpl') : ''),
|
||||
'$info' => $r[0]['info'],
|
||||
'$blocked' => (($r[0]['blocked']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''),
|
||||
'$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''),
|
||||
|
|
|
@ -48,7 +48,8 @@ function follow_post(&$a) {
|
|||
}
|
||||
}
|
||||
|
||||
$network = 'stat';
|
||||
$network = 'stat';
|
||||
$priority = 0;
|
||||
|
||||
if($hcard) {
|
||||
$vcard = scrape_vcard($hcard);
|
||||
|
@ -110,6 +111,7 @@ function follow_post(&$a) {
|
|||
if((! $vcard['photo']) && strlen($email))
|
||||
$vcard['photo'] = gravatar_img($email);
|
||||
$network = 'feed';
|
||||
$priority = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,7 +152,7 @@ function follow_post(&$a) {
|
|||
}
|
||||
else {
|
||||
// create contact record
|
||||
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `notify`, `poll`, `name`, `nick`, `photo`, `network`, `rel`,
|
||||
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `notify`, `poll`, `name`, `nick`, `photo`, `network`, `rel`, `priority`,
|
||||
`blocked`, `readonly`, `pending` )
|
||||
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, 0, 0, 0 ) ",
|
||||
intval(local_user()),
|
||||
|
@ -162,7 +164,8 @@ function follow_post(&$a) {
|
|||
dbesc($vcard['nick']),
|
||||
dbesc($vcard['photo']),
|
||||
dbesc($network),
|
||||
intval(REL_FAN)
|
||||
intval(REL_FAN),
|
||||
intval($priority)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
<a href="contacts/$contact_id/drop" id="contact-edit-drop-link" onclick="return confirmDelete();" ><img src="images/b_drophide.gif" alt="$delete" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" /></a>
|
||||
</div>
|
||||
<div id="contact-edit-nav-end"></div>
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
<div id="contact-edit-poll-wrapper">
|
||||
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span</div>
|
||||
<div id="contact-edit-poll-text">$updpub</div>
|
||||
|
@ -35,8 +39,6 @@ $insecure
|
|||
$blocked
|
||||
$ignored
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
<div id="contact-edit-info-wrapper">
|
||||
<h4>Kontaktinformation / Notizen</h4>
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
<a href="contacts/$contact_id/drop" id="contact-edit-drop-link" onclick="return confirmDelete();" ><img src="images/b_drophide.gif" alt="$delete" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" /></a>
|
||||
</div>
|
||||
<div id="contact-edit-nav-end"></div>
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
<div id="contact-edit-poll-wrapper">
|
||||
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span</div>
|
||||
<div id="contact-edit-poll-text">$updpub</div>
|
||||
|
@ -35,9 +39,6 @@ $insecure
|
|||
$blocked
|
||||
$ignored
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
<div id="contact-edit-info-wrapper">
|
||||
<h4>Contact Information / Notes</h4>
|
||||
<textarea id="contact-edit-info" rows="10" cols="72" name="info" >$info</textarea>
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
<a href="contacts/$contact_id/drop" id="contact-edit-drop-link" onclick="return confirmDelete();" ><img src="images/b_drophide.gif" alt="$delete" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" /></a>
|
||||
</div>
|
||||
<div id="contact-edit-nav-end"></div>
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
|
||||
<div id="contact-edit-poll-wrapper">
|
||||
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span</div>
|
||||
<div id="contact-edit-poll-text">$updpub</div>
|
||||
|
@ -35,8 +40,6 @@ $insecure
|
|||
$blocked
|
||||
$ignored
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
<div id="contact-edit-info-wrapper">
|
||||
<h4>Contact Information / Notes</h4>
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
<a href="contacts/$contact_id/drop" id="contact-edit-drop-link" onclick="return confirmDelete();" ><img src="images/b_drophide.gif" alt="$delete" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" /></a>
|
||||
</div>
|
||||
<div id="contact-edit-nav-end"></div>
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
<div id="contact-edit-poll-wrapper">
|
||||
<div id="contact-edit-last-update-text">$lastupdtext<span id="contact-edit-last-updated">$last_update</span</div>
|
||||
<div id="contact-edit-poll-text">$updpub</div>
|
||||
|
@ -35,8 +39,6 @@ $insecure
|
|||
$blocked
|
||||
$ignored
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
<div id="contact-edit-info-wrapper">
|
||||
<h4>Informazioni di contatto / Note</h4>
|
||||
|
|
Loading…
Reference in a new issue