aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-10-30 01:58:45 -0700
committerfriendica <info@friendica.com>2013-10-30 01:58:45 -0700
commit2035a5dd763f7524cdc1a678b0e8dbca94f270f5 (patch)
tree5109b71ad33146e6f99ef79aaca3a9c7844b3cd6 /include/zot.php
parent8da4da37ccbcc6921f97eeb0c9cd3c23567bd761 (diff)
downloadvolse-hubzilla-2035a5dd763f7524cdc1a678b0e8dbca94f270f5.tar.gz
volse-hubzilla-2035a5dd763f7524cdc1a678b0e8dbca94f270f5.tar.bz2
volse-hubzilla-2035a5dd763f7524cdc1a678b0e8dbca94f270f5.zip
allow zot public providers to list their location, as a non US-based server could be a strong selling point.
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php
index ae34beebc..c4dce5ceb 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1640,20 +1640,23 @@ function import_site($arr,$pubkey) {
$directory_url = htmlentities($arr['directory_url'],ENT_COMPAT,'UTF-8',false);
$url = htmlentities($arr['url'],ENT_COMPAT,'UTF-8',false);
$sellpage = htmlentities($arr['sellpage'],ENT_COMPAT,'UTF-8',false);
+ $site_location = htmlentities($arr['location'],ENT_COMPAT,'UTF-8',false);
if($exists) {
if(($siterecord['site_flags'] != $site_directory)
|| ($siterecord['site_access'] != $access_policy)
|| ($siterecord['site_directory'] != $directory_url)
|| ($siterecord['site_sellpage'] != $sellpage)
+ || ($siterecord['site_location'] != $site_location)
|| ($siterecord['site_register'] != $register_policy)) {
$update = true;
// logger('import_site: input: ' . print_r($arr,true));
// logger('import_site: stored: ' . print_r($siterecord,true));
- $r = q("update site set site_flags = %d, site_access = %d, site_directory = '%s', site_register = %d, site_update = '%s', site_sellpage = '%s'
+ $r = q("update site set site_location = '%s', site_flags = %d, site_access = %d, site_directory = '%s', site_register = %d, site_update = '%s', site_sellpage = '%s'
where site_url = '%s' limit 1",
+ dbesc($site_location),
intval($site_directory),
intval($access_policy),
dbesc($directory_url),
@@ -1669,8 +1672,9 @@ function import_site($arr,$pubkey) {
}
else {
$update = true;
- $r = q("insert into site ( site_url, site_access, site_flags, site_update, site_directory, site_register, site_sellpage )
- values ( '%s', %d, %d, '%s', '%s', %d, '%s' )",
+ $r = q("insert into site ( site_location, site_url, site_access, site_flags, site_update, site_directory, site_register, site_sellpage )
+ values ( '%s', '%s', %d, %d, '%s', '%s', %d, '%s' )",
+ dbesc($site_location),
dbesc($url),
intval($access_policy),
intval($site_directory),