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
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
if(! function_exists('msearch_post')) {
|
||||
function msearch_post(&$a) {
|
||||
|
||||
$perpage = (($_POST['n']) ? $_POST['n'] : 80);
|
||||
|
@ -26,8 +27,8 @@ function msearch_post(&$a) {
|
|||
if(count($r)) {
|
||||
foreach($r as $rr)
|
||||
$results[] = array(
|
||||
'name' => $rr['name'],
|
||||
'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'],
|
||||
'name' => $rr['name'],
|
||||
'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'],
|
||||
'photo' => $a->get_baseurl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
|
||||
'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords'])
|
||||
);
|
||||
|
@ -38,5 +39,5 @@ function msearch_post(&$a) {
|
|||
echo json_encode($output);
|
||||
|
||||
killme();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue