db949bb802
Only define functions if they have not been defined before, e.g. in themes. This makes it possible to override parts of a module and still use the other functions.
17 lines
311 B
PHP
17 lines
311 B
PHP
<?php
|
|
|
|
require_once('include/Scrape.php');
|
|
|
|
if(! function_exists('acctlink_init')) {
|
|
function acctlink_init(&$a) {
|
|
if(x($_GET,'addr')) {
|
|
$addr = trim($_GET['addr']);
|
|
$res = probe_url($addr);
|
|
//logger('acctlink: ' . print_r($res,true));
|
|
if($res['url']) {
|
|
goaway($res['url']);
|
|
killme();
|
|
}
|
|
}
|
|
}
|
|
}
|