Scrape now doesn't fetch page data when its twitter and Co./Update script that updates the contacts from the profile
This commit is contained in:
parent
bc2c046446
commit
e8bfa32b37
4 changed files with 70 additions and 21 deletions
21
update.php
21
update.php
|
@ -1609,3 +1609,24 @@ All following update functions are ONLY for jobs that need to run AFTER the data
|
|||
|
||||
Database changes are ONLY applied in the file include/dbstructure.php.
|
||||
*/
|
||||
|
||||
function update_1177() {
|
||||
require_once("mod/profiles.php");
|
||||
|
||||
$profiles = q("SELECT `uid`, `about`, `locality`, `pub_keywords`, `gender` FROM `profile` WHERE `is-default`");
|
||||
|
||||
foreach ($profiles AS $profile) {
|
||||
if ($profile["about"].$profile["locality"].$profile["pub_keywords"].$profile["gender"] == "")
|
||||
continue;
|
||||
|
||||
$profile["pub_keywords"] = profile_clean_keywords($profile["pub_keywords"]);
|
||||
|
||||
$r = q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` AND `uid` = %d",
|
||||
dbesc($profile["about"]),
|
||||
dbesc($profile["locality"]),
|
||||
dbesc($profile["pub_keywords"]),
|
||||
dbesc($profile["gender"]),
|
||||
intval($profile["uid"])
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue