aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-28 17:15:34 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-28 17:15:34 -0700
commit3b53cd56ef151586024cb99742a91d4a75afdb5b (patch)
treef0d02417d5cac33bb1d7999bbeefd11848b18d7f /mod
parent6368b093375d50f929b0a419834299e6b62e274e (diff)
parent30e88a4f6b38e1d51ebcd97ac4b81c29f9ce4823 (diff)
downloadvolse-hubzilla-3b53cd56ef151586024cb99742a91d4a75afdb5b.tar.gz
volse-hubzilla-3b53cd56ef151586024cb99742a91d4a75afdb5b.tar.bz2
volse-hubzilla-3b53cd56ef151586024cb99742a91d4a75afdb5b.zip
Merge branch 'deadsite'
Diffstat (limited to 'mod')
-rw-r--r--mod/dirsearch.php10
-rw-r--r--mod/rate.php5
-rw-r--r--mod/ratingsearch.php5
-rw-r--r--mod/regdir.php5
-rw-r--r--mod/sitelist.php8
5 files changed, 21 insertions, 12 deletions
diff --git a/mod/dirsearch.php b/mod/dirsearch.php
index 132ed252b..ec730b28d 100644
--- a/mod/dirsearch.php
+++ b/mod/dirsearch.php
@@ -398,13 +398,15 @@ function list_public_sites() {
$rand = db_getfunc('rand');
$realm = get_directory_realm();
if($realm == DIRECTORY_REALM) {
- $r = q("select * from site where site_access != 0 and site_register !=0 and ( site_realm = '%s' or site_realm = '') order by $rand",
- dbesc($realm)
+ $r = q("select * from site where site_access != 0 and site_register !=0 and ( site_realm = '%s' or site_realm = '') and site_type = %d order by $rand",
+ dbesc($realm),
+ intval(SITE_TYPE_ZOT)
);
}
else {
- $r = q("select * from site where site_access != 0 and site_register !=0 and site_realm = '%s' order by $rand",
- dbesc($realm)
+ $r = q("select * from site where site_access != 0 and site_register !=0 and site_realm = '%s' and site_type = %d order by $rand",
+ dbesc($realm),
+ intval(SITE_TYPE_ZOT)
);
}
diff --git a/mod/rate.php b/mod/rate.php
index a3a36b4a9..f30afed64 100644
--- a/mod/rate.php
+++ b/mod/rate.php
@@ -22,8 +22,9 @@ function rate_init(&$a) {
$a->poi = $r[0];
}
else {
- $r = q("select * from site where site_url like '%s' ",
- dbesc('%' . $target)
+ $r = q("select * from site where site_url like '%s' and site_type = %d",
+ dbesc('%' . $target),
+ intval(SITE_TYPE_ZOT)
);
if($r) {
$a->data['site'] = $r[0];
diff --git a/mod/ratingsearch.php b/mod/ratingsearch.php
index 9c4f2f827..173dd39ff 100644
--- a/mod/ratingsearch.php
+++ b/mod/ratingsearch.php
@@ -35,8 +35,9 @@ function ratingsearch_init(&$a) {
if($p)
$target = $p[0]['xchan_hash'];
else {
- $p = q("select * from site where site_url like '%s' ",
- dbesc('%' . $hash)
+ $p = q("select * from site where site_url like '%s' and site_type = %d ",
+ dbesc('%' . $hash),
+ intval(SITE_TYPE_ZOT)
);
if($p) {
$target = strtolower($hash);
diff --git a/mod/regdir.php b/mod/regdir.php
index dce50e76a..7168c3373 100644
--- a/mod/regdir.php
+++ b/mod/regdir.php
@@ -86,8 +86,9 @@ function regdir_init(&$a) {
if ($dirmode == DIRECTORY_MODE_STANDALONE) {
$r = array(array('site_url' => z_root()));
} else {
- $r = q("select site_url from site where site_flags in ( 1, 2 ) and site_realm = '%s' $sql_extra ",
- dbesc(get_directory_realm())
+ $r = q("select site_url from site where site_flags in ( 1, 2 ) and site_realm = '%s' and site_type = %d $sql_extra ",
+ dbesc(get_directory_realm()),
+ intval(SITE_TYPE_ZOT)
);
}
if ($r) {
diff --git a/mod/sitelist.php b/mod/sitelist.php
index 12911cbd4..30b2359ac 100644
--- a/mod/sitelist.php
+++ b/mod/sitelist.php
@@ -28,7 +28,9 @@ function sitelist_init(&$a) {
$result = array('success' => false);
- $r = q("select count(site_url) as total from site where true $sql_extra ");
+ $r = q("select count(site_url) as total from site where site_type = %d $sql_extra ",
+ intval(SITE_TYPE_ZOT)
+ );
if($r)
$result['total'] = intval($r[0]['total']);
@@ -36,7 +38,9 @@ function sitelist_init(&$a) {
$result['start'] = $start;
$result['limit'] = $limit;
- $r = q("select * from site where true $sql_extra $sql_order $sql_limit");
+ $r = q("select * from site where site_type = %d $sql_extra $sql_order $sql_limit",
+ intval(SITE_TYPE_ZOT)
+ );
$result['results'] = 0;
$result['entries'] = array();