diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ItemObject.php | 1 | ||||
-rw-r--r-- | include/conversation.php | 1 | ||||
-rw-r--r-- | include/zot.php | 10 |
3 files changed, 9 insertions, 3 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php index 59b4538df..818f8c0b2 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -216,6 +216,7 @@ class Item extends BaseObject { 'str_app' => sprintf( t(' from %s'), $item['app']), 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'), 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), + 'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''), 'lock' => $lock, 'verified' => $verified, 'unverified' => $unverified, diff --git a/include/conversation.php b/include/conversation.php index 831a00519..e8b41e775 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -685,6 +685,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ 'str_app' => sprintf( t(' from %s'), $item['app']), 'isotime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'c'), 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'), + 'editedtime' => (($item['edited'] != $item['created']) ? sprintf( t('last edited: %s'), datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r')) : ''), 'location' => $location, 'indent' => '', 'owner_name' => $owner_name, 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), |