aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-19 16:18:04 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-19 16:18:04 -0700
commitea37882b9533b2d6054a36568ef6ab9cc834478e (patch)
tree1e5ad716071560311bc0f19c5fc8519132e4630c /include
parent9f424bb20881841926976417d7eea04c0c14bdb3 (diff)
parent599a0c66b221f2c3a86462f920856d68630142cd (diff)
downloadvolse-hubzilla-ea37882b9533b2d6054a36568ef6ab9cc834478e.tar.gz
volse-hubzilla-ea37882b9533b2d6054a36568ef6ab9cc834478e.tar.bz2
volse-hubzilla-ea37882b9533b2d6054a36568ef6ab9cc834478e.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts: include/zot.php install/schema_mysql.sql install/schema_postgres.sql install/update.php mod/zfinger.php
Diffstat (limited to 'include')
-rw-r--r--include/zot.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/zot.php b/include/zot.php
index 02dab3617..793eb6b39 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -2739,6 +2739,7 @@ function import_site($arr, $pubkey) {
$sellpage = htmlspecialchars($arr['sellpage'],ENT_COMPAT,'UTF-8',false);
$site_location = htmlspecialchars($arr['location'],ENT_COMPAT,'UTF-8',false);
$site_realm = htmlspecialchars($arr['realm'],ENT_COMPAT,'UTF-8',false);
+ $site_project = htmlspecialchars($arr['project'],ENT_COMPAT,'UTF-8',false);
// You can have one and only one primary directory per realm.
// Downgrade any others claiming to be primary. As they have
@@ -2757,13 +2758,15 @@ function import_site($arr, $pubkey) {
|| ($siterecord['site_sellpage'] != $sellpage)
|| ($siterecord['site_location'] != $site_location)
|| ($siterecord['site_register'] != $register_policy)
+ || ($siterecord['site_project'] != $site_project)
|| ($siterecord['site_realm'] != $site_realm)) {
$update = true;
// logger('import_site: input: ' . print_r($arr,true));
// logger('import_site: stored: ' . print_r($siterecord,true));
- $r = q("update site set site_dead = 0, site_location = '%s', site_flags = %d, site_access = %d, site_directory = '%s', site_register = %d, site_update = '%s', site_sellpage = '%s', site_realm = '%s', site_type = %d
+
+ $r = q("update site set site_dead = 0, site_location = '%s', site_flags = %d, site_access = %d, site_directory = '%s', site_register = %d, site_update = '%s', site_sellpage = '%s', site_realm = '%s', site_type = %d, site_project = '%s'
where site_url = '%s'",
dbesc($site_location),
intval($site_directory),
@@ -2774,6 +2777,7 @@ function import_site($arr, $pubkey) {
dbesc($sellpage),
dbesc($site_realm),
intval(SITE_TYPE_ZOT),
+ dbesc($site_project),
dbesc($url)
);
if(! $r) {
@@ -2790,8 +2794,9 @@ function import_site($arr, $pubkey) {
}
else {
$update = true;
- $r = q("insert into site ( site_location, site_url, site_access, site_flags, site_update, site_directory, site_register, site_sellpage, site_realm, site_type )
- values ( '%s', '%s', %d, %d, '%s', '%s', %d, '%s', '%s', %d )",
+
+ $r = q("insert into site ( site_location, site_url, site_access, site_flags, site_update, site_directory, site_register, site_sellpage, site_realm, site_type, site_project )
+ values ( '%s', '%s', %d, %d, '%s', '%s', %d, '%s', '%s', %d, '%s' )",
dbesc($site_location),
dbesc($url),
intval($access_policy),
@@ -2801,7 +2806,8 @@ function import_site($arr, $pubkey) {
intval($register_policy),
dbesc($sellpage),
dbesc($site_realm),
- intval(SITE_TYPE_ZOT)
+ intval(SITE_TYPE_ZOT),
+ dbesc($site_project)
);
if(! $r) {
logger('import_site: record create failed. ' . print_r($arr,true));
@@ -3810,6 +3816,7 @@ function zotinfo($arr) {
$ret['site']['sellpage'] = get_config('system','sellpage');
$ret['site']['location'] = get_config('system','site_location');
$ret['site']['realm'] = get_directory_realm();
+ $ret['site']['project'] = PLATFORM_NAME;
}