Adding site-health and noscrape support.
This commit is contained in:
parent
1bac9fb268
commit
a69a9d2278
15 changed files with 1025 additions and 61 deletions
|
@ -5,30 +5,7 @@ require_once('include/submit.php');
|
|||
function submit_content(&$a) {
|
||||
|
||||
$url = hex2bin(notags(trim($_GET['url'])));
|
||||
run_submit($a, $url);
|
||||
run_submit($url);
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function nuke_record($url) {
|
||||
|
||||
$nurl = str_replace(array('https:','//www.'), array('http:','//'), $url);
|
||||
|
||||
$r = q("SELECT `id` FROM `profile` WHERE ( `homepage` = '%s' OR `nurl` = '%s' ) ",
|
||||
dbesc($url),
|
||||
dbesc($nurl)
|
||||
);
|
||||
|
||||
if(count($r)) {
|
||||
foreach($r as $rr) {
|
||||
q("DELETE FROM `photo` WHERE `profile-id` = %d LIMIT 1",
|
||||
intval($rr['id'])
|
||||
);
|
||||
q("DELETE FROM `profile` WHERE `id` = %d LIMIT 1",
|
||||
intval($rr['id'])
|
||||
);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue