diff options
author | friendica <info@friendica.com> | 2015-01-16 00:53:04 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-16 00:53:04 -0800 |
commit | 8f8700ddd2902525270a1e0e593b916ebb6f51fb (patch) | |
tree | 3ba8c2147eb584e12b5c9367da2236a563178f89 /mod | |
parent | 9bedb38621c567908cff21bed33ab2324c573a61 (diff) | |
download | volse-hubzilla-8f8700ddd2902525270a1e0e593b916ebb6f51fb.tar.gz volse-hubzilla-8f8700ddd2902525270a1e0e593b916ebb6f51fb.tar.bz2 volse-hubzilla-8f8700ddd2902525270a1e0e593b916ebb6f51fb.zip |
mod_prep usability enhancements, doc updates
Diffstat (limited to 'mod')
-rw-r--r-- | mod/prep.php | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/mod/prep.php b/mod/prep.php index 45cdddad6..896717826 100644 --- a/mod/prep.php +++ b/mod/prep.php @@ -19,6 +19,14 @@ function prep_init(&$a) { return; } + if(strpos($hash,'@')) { + $r = q("select * from hubloc where hubloc_addr = '%s' limit 1", + dbesc($hash) + ); + if($r) + $hash = $r[0]['hubloc_hash']; + } + $p = q("select * from xchan where xchan_hash like '%s'", dbesc($hash . '%') ); @@ -50,19 +58,18 @@ function prep_content(&$a) { dbesc($a->poi['xchan_hash']) ); - $ret = array(); + if(! $r) + notice( t('No ratings available') . EOL); - if($r) { - $o = replace_macros(get_markup_template('prep.tpl'),array( - '$header' => t('Ratings'), - '$rating_lbl' => t('Rating: ' ), - '$rating_text_lbl' => t('Description: '), - '$raters' => $r - )); - return $o; - } - return ''; + $o = replace_macros(get_markup_template('prep.tpl'),array( + '$header' => t('Ratings'), + '$rating_lbl' => t('Rating: ' ), + '$rating_text_lbl' => t('Description: '), + '$raters' => $r + )); + + return $o; }
\ No newline at end of file |