don't show categories widget if there are none
This commit is contained in:
parent
2c3c933ed4
commit
8981da89c3
1
boot.php
1
boot.php
@ -522,6 +522,7 @@ if(! class_exists('App')) {
|
|||||||
$this->cmd = 'profile/' . substr($this->cmd,1);
|
$this->cmd = 'profile/' . substr($this->cmd,1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Break the URL path into C style argc/argv style arguments for our
|
* Break the URL path into C style argc/argv style arguments for our
|
||||||
|
@ -111,20 +111,21 @@ function categories_widget($baseurl,$selected = '') {
|
|||||||
intval($a->profile['profile_uid']),
|
intval($a->profile['profile_uid']),
|
||||||
intval(TERM_CATEGORY)
|
intval(TERM_CATEGORY)
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
if($r && count($r)) {
|
||||||
foreach($r as $rr)
|
foreach($r as $rr)
|
||||||
$terms[] = array('name' => $rr['term'], 'selected' => (($selected == $rr['term']) ? 'selected' : ''));
|
$terms[] = array('name' => $rr['term'], 'selected' => (($selected == $rr['term']) ? 'selected' : ''));
|
||||||
|
|
||||||
|
return replace_macros(get_markup_template('categories_widget.tpl'),array(
|
||||||
|
'$title' => t('Categories'),
|
||||||
|
'$desc' => '',
|
||||||
|
'$sel_all' => (($selected == '') ? 'selected' : ''),
|
||||||
|
'$all' => t('Everything'),
|
||||||
|
'$terms' => $terms,
|
||||||
|
'$base' => $baseurl,
|
||||||
|
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
return replace_macros(get_markup_template('categories_widget.tpl'),array(
|
|
||||||
'$title' => t('Categories'),
|
|
||||||
'$desc' => '',
|
|
||||||
'$sel_all' => (($selected == '') ? 'selected' : ''),
|
|
||||||
'$all' => t('Everything'),
|
|
||||||
'$terms' => $terms,
|
|
||||||
'$base' => $baseurl,
|
|
||||||
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function common_friends_visitor_widget($profile_uid) {
|
function common_friends_visitor_widget($profile_uid) {
|
||||||
|
@ -157,7 +157,6 @@ $a->apps = $arr['app_menu'];
|
|||||||
if(strlen($a->module)) {
|
if(strlen($a->module)) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* We will always have a module name.
|
* We will always have a module name.
|
||||||
|
@ -84,7 +84,7 @@ function install_post(&$a) {
|
|||||||
'$dbdata' => $dbdata,
|
'$dbdata' => $dbdata,
|
||||||
'$timezone' => $timezone,
|
'$timezone' => $timezone,
|
||||||
'$siteurl' => $siteurl,
|
'$siteurl' => $siteurl,
|
||||||
'$site_id' => hash('whirlpool', random_string()),
|
'$site_id' => random_string(),
|
||||||
'$phpath' => $phpath,
|
'$phpath' => $phpath,
|
||||||
'$adminmail' => $adminmail
|
'$adminmail' => $adminmail
|
||||||
));
|
));
|
||||||
|
Reference in New Issue
Block a user