Updated modules to allow for partial overrides without errors

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.
This commit is contained in:
Andrej Stieben 2016-02-05 21:52:39 +01:00
commit db949bb802
123 changed files with 768 additions and 471 deletions

View file

@ -1,5 +1,6 @@
<?php
if(! function_exists('redir_init')) {
function redir_init(&$a) {
$url = ((x($_GET,'url')) ? $_GET['url'] : '');
@ -57,9 +58,9 @@ function redir_init(&$a) {
intval(time() + 45)
);
logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
logger('mod_redir: ' . $r[0]['name'] . ' ' . $sec, LOGGER_DEBUG);
$dest = (($url) ? '&destination_url=' . $url : '');
goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest . $quiet );
}
@ -75,3 +76,4 @@ function redir_init(&$a) {
goaway(z_root());
}
}