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:
parent
a81d929cdf
commit
db949bb802
123 changed files with 768 additions and 471 deletions
|
@ -5,6 +5,7 @@ require_once('include/follow.php');
|
|||
require_once('include/Contact.php');
|
||||
require_once('include/contact_selectors.php');
|
||||
|
||||
if(! function_exists('follow_content')) {
|
||||
function follow_content(&$a) {
|
||||
|
||||
if(! local_user()) {
|
||||
|
@ -148,7 +149,9 @@ function follow_content(&$a) {
|
|||
|
||||
return $o;
|
||||
}
|
||||
}
|
||||
|
||||
if(! function_exists('follow_post')) {
|
||||
function follow_post(&$a) {
|
||||
|
||||
if(! local_user()) {
|
||||
|
@ -185,3 +188,4 @@ function follow_post(&$a) {
|
|||
goaway($return_url);
|
||||
// NOTREACHED
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue