aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-28 17:13:11 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-28 17:13:11 -0700
commite5f47cd14b9dd97385d93c2610e05d959e526ce8 (patch)
tree9863fff105662540bc6e18b8fac5dbb156e5d0f3 /mod
parentdbeae16dc142c3bc832718b0c29eefd6a82033d6 (diff)
downloadvolse-hubzilla-e5f47cd14b9dd97385d93c2610e05d959e526ce8.tar.gz
volse-hubzilla-e5f47cd14b9dd97385d93c2610e05d959e526ce8.tar.bz2
volse-hubzilla-e5f47cd14b9dd97385d93c2610e05d959e526ce8.zip
create site records for all queued sites and check for death
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();