aboutsummaryrefslogtreecommitdiffstats
path: root/mod/ratingsearch.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-15 21:22:05 -0800
committerfriendica <info@friendica.com>2015-02-15 21:22:05 -0800
commit8774089005501a6429eb9a99a73de504598a24c3 (patch)
tree1654cc931e017c51d32568c0ce9b5f114db5903a /mod/ratingsearch.php
parent2e3daf77bbf38970cf22ec14e4a6e42b4d7bdb95 (diff)
downloadvolse-hubzilla-8774089005501a6429eb9a99a73de504598a24c3.tar.gz
volse-hubzilla-8774089005501a6429eb9a99a73de504598a24c3.tar.bz2
volse-hubzilla-8774089005501a6429eb9a99a73de504598a24c3.zip
preparatory work for site ratings
Diffstat (limited to 'mod/ratingsearch.php')
-rw-r--r--mod/ratingsearch.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/mod/ratingsearch.php b/mod/ratingsearch.php
index ec2db570b..b95b4367e 100644
--- a/mod/ratingsearch.php
+++ b/mod/ratingsearch.php
@@ -32,12 +32,19 @@ function ratingsearch_init(&$a) {
dbesc($hash . '%')
);
+ if(! $p) {
+ $p = q("select * from site where site_url like '%s' ",
+ dbesc('%' . $hash)
+ );
+
+ if(! $p) {
+ $ret['message'] = 'channel not found';
+ json_return_and_die($ret);
+ }
+ }
+
if($p)
$ret['target'] = $p[0];
- else {
- $ret['message'] = 'channel not found';
- json_return_and_die($ret);
- }
$ret['success'] = true;