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
parent a81d929cdf
commit db949bb802
123 changed files with 768 additions and 471 deletions

View File

@@ -1,6 +1,6 @@
<?php
if(! function_exists('viewsrc_content')) {
function viewsrc_content(&$a) {
if(! local_user()) {
@@ -16,7 +16,7 @@ function viewsrc_content(&$a) {
return;
}
$r = q("SELECT `item`.`body` FROM `item`
$r = q("SELECT `item`.`body` FROM `item`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
and `item`.`moderated` = 0
AND `item`.`id` = '%s' LIMIT 1",
@@ -33,4 +33,4 @@ function viewsrc_content(&$a) {
}
return $o;
}
}