diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/abook.php | 4 | ||||
-rw-r--r-- | mod/contacts.php | 14 | ||||
-rw-r--r-- | mod/crepair.php | 6 | ||||
-rw-r--r-- | mod/dfrn_confirm.php | 40 | ||||
-rw-r--r-- | mod/dfrn_notify.php | 18 | ||||
-rw-r--r-- | mod/dfrn_poll.php | 26 | ||||
-rw-r--r-- | mod/dfrn_request.php | 33 | ||||
-rw-r--r-- | mod/network.php | 4 | ||||
-rw-r--r-- | mod/notifications.php | 2 | ||||
-rw-r--r-- | mod/profile_photo.php | 4 | ||||
-rw-r--r-- | mod/profiles.php | 4 | ||||
-rw-r--r-- | mod/profperm.php | 8 | ||||
-rw-r--r-- | mod/redir.php | 10 | ||||
-rw-r--r-- | mod/settings.php | 2 |
14 files changed, 87 insertions, 88 deletions
diff --git a/mod/abook.php b/mod/abook.php index 0f69201b0..ee402d394 100644 --- a/mod/abook.php +++ b/mod/abook.php @@ -111,7 +111,7 @@ function abook_post(&$a) { $info = fix_mce_lf(escape_tags(trim($_POST['info']))); - $r = q("UPDATE `contact` SET `profile-id` = %d, `priority` = %d , `info` = '%s', + $r = q("UPDATE `contact` SET `profile_id` = %d, `priority` = %d , `info` = '%s', `hidden` = %d, closeness = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($profile_id), intval($priority), @@ -314,7 +314,7 @@ function abook_content(&$a) { '$updpub' => t('Update public posts'), '$last_update' => $last_update, '$udnow' => t('Update now'), - '$profile_select' => contact_profile_assign($contact['profile-id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)), + '$profile_select' => contact_profile_assign($contact['profile_id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)), '$contact_id' => $contact['id'], '$block_text' => (($contact['blocked']) ? t('Unblock') : t('Block') ), '$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ), diff --git a/mod/contacts.php b/mod/contacts.php index 434de6174..908c348f4 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -111,7 +111,7 @@ function contacts_post(&$a) { $info = fix_mce_lf(escape_tags(trim($_POST['info']))); - $r = q("UPDATE `contact` SET `profile-id` = %d, `priority` = %d , `info` = '%s', + $r = q("UPDATE `contact` SET `profile_id` = %d, `priority` = %d , `info` = '%s', `hidden` = %d, closeness = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($profile_id), intval($priority), @@ -288,12 +288,12 @@ function contacts_content(&$a) { $insecure = t('Private communications are not available for this contact.'); - $last_update = (($contact['last-update'] == '0000-00-00 00:00:00') + $last_update = (($contact['last_update'] == '0000-00-00 00:00:00') ? t('Never') - : datetime_convert('UTC',date_default_timezone_get(),$contact['last-update'],'D, j M Y, g:i A')); + : datetime_convert('UTC',date_default_timezone_get(),$contact['last_update'],'D, j M Y, g:i A')); - if($contact['last-update'] !== '0000-00-00 00:00:00') - $last_update .= ' ' . (($contact['last-update'] == $contact['success_update']) ? t("\x28Update was successful\x29") : t("\x28Update was not successful\x29")); + if($contact['last_update'] !== '0000-00-00 00:00:00') + $last_update .= ' ' . (($contact['last_update'] == $contact['success_update']) ? t("\x28Update was successful\x29") : t("\x28Update was not successful\x29")); $lblsuggest = (($contact['network'] === NETWORK_DFRN) ? t('Suggest friends') : ''); @@ -340,7 +340,7 @@ function contacts_content(&$a) { $tab_tpl = get_markup_template('common_tabs.tpl'); $tab_str = replace_macros($tab_tpl, array('$tabs' => $tabs)); - $lost_contact = (($contact['archive'] && $contact['term-date'] != '0000-00-00 00:00:00' && $contact['term-date'] < datetime_convert('','','now')) ? t('Communications lost with this contact!') : ''); + $lost_contact = (($contact['archive'] && $contact['term_date'] != '0000-00-00 00:00:00' && $contact['term_date'] < datetime_convert('','','now')) ? t('Communications lost with this contact!') : ''); $slider_tpl = get_markup_template('contact_slider.tpl'); $o .= replace_macros($slider_tpl,array( @@ -382,7 +382,7 @@ function contacts_content(&$a) { '$updpub' => t('Update public posts'), '$last_update' => $last_update, '$udnow' => t('Update now'), - '$profile_select' => contact_profile_assign($contact['profile-id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)), + '$profile_select' => contact_profile_assign($contact['profile_id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)), '$contact_id' => $contact['id'], '$block_text' => (($contact['blocked']) ? t('Unblock') : t('Block') ), '$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ), diff --git a/mod/crepair.php b/mod/crepair.php index ec963b105..e5ece0f98 100644 --- a/mod/crepair.php +++ b/mod/crepair.php @@ -83,9 +83,9 @@ function crepair_post(&$a) { $x = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s' + `name_date` = '%s', + `uri_date` = '%s', + `avatar_date` = '%s' WHERE `id` = %d LIMIT 1 ", dbesc($photos[0]), diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php index 7002b870f..b0bea7a61 100644 --- a/mod/dfrn_confirm.php +++ b/mod/dfrn_confirm.php @@ -107,7 +107,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { * */ - $r = q("SELECT * FROM `contact` WHERE ( ( `issued-id` != '' AND `issued-id` = '%s' ) OR ( `id` = %d AND `id` != 0 ) ) AND `uid` = %d AND `duplex` = 0 LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE ( ( `issued_id` != '' AND `issued_id` = '%s' ) OR ( `id` = %d AND `id` != 0 ) ) AND `uid` = %d AND `duplex` = 0 LIMIT 1", dbesc($dfrn_id), intval($cid), intval($uid) @@ -124,11 +124,11 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $contact_id = $contact['id']; $relation = $contact['rel']; - $site_pubkey = $contact['site-pubkey']; + $site_pubkey = $contact['site_pubkey']; $dfrn_confirm = $contact['confirm']; $aes_allow = $contact['aes_allow']; - $network = ((strlen($contact['issued-id'])) ? NETWORK_DFRN : NETWORK_OSTATUS); + $network = ((strlen($contact['issued_id'])) ? NETWORK_DFRN : NETWORK_OSTATUS); if($contact['network']) $network = $contact['network']; @@ -256,9 +256,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { notice( t('Remote site reported: ') . $message . EOL); break; case 1: - // birthday paradox - generate new dfrn-id and fall through. + // birthday paradox - generate new dfrn_id and fall through. $new_dfrn_id = random_string(); - $r = q("UPDATE contact SET `issued-id` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", + $r = q("UPDATE contact SET `issued_id` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", dbesc($new_dfrn_id), intval($contact_id), intval($uid) @@ -324,9 +324,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { `thumb` = '%s', `micro` = '%s', `rel` = %d, - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s', + `name_date` = '%s', + `uri_date` = '%s', + `avatar_date` = '%s', `blocked` = 0, `pending` = 0, `duplex` = %d, @@ -377,9 +377,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s', + `name_date` = '%s', + `uri_date` = '%s', + `avatar_date` = '%s', `notify` = '%s', `poll` = '%s', `blocked` = 0, @@ -594,7 +594,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) { // Decrypt all this stuff we just received - $foreign_pubkey = $ret[0]['site-pubkey']; + $foreign_pubkey = $ret[0]['site_pubkey']; $dfrn_record = $ret[0]['id']; if(! $foreign_pubkey) { @@ -614,16 +614,16 @@ function dfrn_confirm_post(&$a,$handsfree = null) { $dfrn_pubkey = $public_key; } - $r = q("SELECT * FROM `contact` WHERE `dfrn-id` = '%s' LIMIT 1", + $r = q("SELECT * FROM `contact` WHERE `dfrn_id` = '%s' LIMIT 1", dbesc($decrypted_dfrn_id) ); if(count($r)) { $message = t('The ID provided by your system is a duplicate on our system. It should work if you try again.'); - xml_status(1,$message); // Birthday paradox - duplicate dfrn-id + xml_status(1,$message); // Birthday paradox - duplicate dfrn_id // NOTREACHED } - $r = q("UPDATE `contact` SET `dfrn-id` = '%s', `pubkey` = '%s' WHERE `id` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `dfrn_id` = '%s', `pubkey` = '%s' WHERE `id` = %d LIMIT 1", dbesc($decrypted_dfrn_id), dbesc($dfrn_pubkey), intval($dfrn_record) @@ -634,10 +634,10 @@ function dfrn_confirm_post(&$a,$handsfree = null) { } // It's possible that the other person also requested friendship. - // If it is a duplex relationship, ditch the issued-id if one exists. + // If it is a duplex relationship, ditch the issued_id if one exists. if($duplex) { - $r = q("UPDATE `contact` SET `issued-id` = '' WHERE `id` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `issued_id` = '' WHERE `id` = %d LIMIT 1", intval($dfrn_record) ); } @@ -672,9 +672,9 @@ function dfrn_confirm_post(&$a,$handsfree = null) { `thumb` = '%s', `micro` = '%s', `rel` = %d, - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s', + `name_date` = '%s', + `uri_date` = '%s', + `avatar_date` = '%s', `blocked` = 0, `pending` = 0, `duplex` = %d, diff --git a/mod/dfrn_notify.php b/mod/dfrn_notify.php index e55da5572..94eb3a297 100644 --- a/mod/dfrn_notify.php +++ b/mod/dfrn_notify.php @@ -31,7 +31,7 @@ function dfrn_notify_post(&$a) { $dfrn_id = substr($dfrn_id,2); } - $r = q("SELECT * FROM `challenge` WHERE `dfrn-id` = '%s' AND `challenge` = '%s' LIMIT 1", + $r = q("SELECT * FROM `challenge` WHERE `dfrn_id` = '%s' AND `challenge` = '%s' LIMIT 1", dbesc($dfrn_id), dbesc($challenge) ); @@ -40,7 +40,7 @@ function dfrn_notify_post(&$a) { xml_status(3); } - $r = q("DELETE FROM `challenge` WHERE `dfrn-id` = '%s' AND `challenge` = '%s' LIMIT 1", + $r = q("DELETE FROM `challenge` WHERE `dfrn_id` = '%s' AND `challenge` = '%s' LIMIT 1", dbesc($dfrn_id), dbesc($challenge) ); @@ -50,13 +50,13 @@ function dfrn_notify_post(&$a) { $sql_extra = ''; switch($direction) { case (-1): - $sql_extra = sprintf(" AND ( `issued-id` = '%s' OR `dfrn-id` = '%s' ) ", dbesc($dfrn_id), dbesc($dfrn_id)); + $sql_extra = sprintf(" AND ( `issued_id` = '%s' OR `dfrn_id` = '%s' ) ", dbesc($dfrn_id), dbesc($dfrn_id)); break; case 0: - $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `issued_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); break; case 1: - $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `dfrn_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); break; default: xml_status(3); @@ -190,7 +190,7 @@ function dfrn_notify_content(&$a) { $r = q("DELETE FROM `challenge` WHERE `expire` < " . intval(time())); - $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn-id`, `expire` ) + $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn_id`, `expire` ) VALUES( '%s', '%s', %d ) ", dbesc($hash), dbesc($dfrn_id), @@ -202,15 +202,15 @@ function dfrn_notify_content(&$a) { $sql_extra = ''; switch($direction) { case (-1): - $sql_extra = sprintf(" AND ( `issued-id` = '%s' OR `dfrn-id` = '%s' ) ", dbesc($dfrn_id), dbesc($dfrn_id)); + $sql_extra = sprintf(" AND ( `issued_id` = '%s' OR `dfrn_id` = '%s' ) ", dbesc($dfrn_id), dbesc($dfrn_id)); $my_id = $dfrn_id; break; case 0: - $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `issued_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); $my_id = '1:' . $dfrn_id; break; case 1: - $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `dfrn_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); $my_id = '0:' . $dfrn_id; break; default: diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index f3c145410..c26d893e1 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -52,15 +52,15 @@ function dfrn_poll_init(&$a) { $sql_extra = ''; switch($direction) { case (-1): - $sql_extra = sprintf(" AND ( `dfrn-id` = '%s' OR `issued-id` = '%s' ) ", dbesc($dfrn_id),dbesc($dfrn_id)); + $sql_extra = sprintf(" AND ( `dfrn_id` = '%s' OR `issued_id` = '%s' ) ", dbesc($dfrn_id),dbesc($dfrn_id)); $my_id = $dfrn_id; break; case 0: - $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `issued_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); $my_id = '1:' . $dfrn_id; break; case 1: - $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `dfrn_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); $my_id = '0:' . $dfrn_id; break; default: @@ -269,7 +269,7 @@ function dfrn_poll_post(&$a) { } - $r = q("SELECT * FROM `challenge` WHERE `dfrn-id` = '%s' AND `challenge` = '%s' LIMIT 1", + $r = q("SELECT * FROM `challenge` WHERE `dfrn_id` = '%s' AND `challenge` = '%s' LIMIT 1", dbesc($dfrn_id), dbesc($challenge) ); @@ -280,7 +280,7 @@ function dfrn_poll_post(&$a) { $type = $r[0]['type']; $last_update = $r[0]['last_update']; - $r = q("DELETE FROM `challenge` WHERE `dfrn-id` = '%s' AND `challenge` = '%s' LIMIT 1", + $r = q("DELETE FROM `challenge` WHERE `dfrn_id` = '%s' AND `challenge` = '%s' LIMIT 1", dbesc($dfrn_id), dbesc($challenge) ); @@ -289,15 +289,15 @@ function dfrn_poll_post(&$a) { $sql_extra = ''; switch($direction) { case (-1): - $sql_extra = sprintf(" AND `issued-id` = '%s' ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `issued_id` = '%s' ", dbesc($dfrn_id)); $my_id = $dfrn_id; break; case 0: - $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `issued_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); $my_id = '1:' . $dfrn_id; break; case 1: - $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `dfrn_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); $my_id = '0:' . $dfrn_id; break; default: @@ -397,7 +397,7 @@ function dfrn_poll_content(&$a) { $r = q("DELETE FROM `challenge` WHERE `expire` < " . intval(time())); if($type !== 'profile') { - $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn-id`, `expire` , `type`, `last_update` ) + $r = q("INSERT INTO `challenge` ( `challenge`, `dfrn_id`, `expire` , `type`, `last_update` ) VALUES( '%s', '%s', '%s', '%s', '%s' ) ", dbesc($hash), dbesc($dfrn_id), @@ -410,17 +410,17 @@ function dfrn_poll_content(&$a) { switch($direction) { case (-1): if($type === 'profile') - $sql_extra = sprintf(" AND ( `dfrn-id` = '%s' OR `issued-id` = '%s' ) ", dbesc($dfrn_id),dbesc($dfrn_id)); + $sql_extra = sprintf(" AND ( `dfrn_id` = '%s' OR `issued_id` = '%s' ) ", dbesc($dfrn_id),dbesc($dfrn_id)); else - $sql_extra = sprintf(" AND `issued-id` = '%s' ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `issued_id` = '%s' ", dbesc($dfrn_id)); $my_id = $dfrn_id; break; case 0: - $sql_extra = sprintf(" AND `issued-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `issued_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); $my_id = '1:' . $dfrn_id; break; case 1: - $sql_extra = sprintf(" AND `dfrn-id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); + $sql_extra = sprintf(" AND `dfrn_id` = '%s' AND `duplex` = 1 ", dbesc($dfrn_id)); $my_id = '0:' . $dfrn_id; break; default: diff --git a/mod/dfrn_request.php b/mod/dfrn_request.php index e6c38a772..dc329aa19 100644 --- a/mod/dfrn_request.php +++ b/mod/dfrn_request.php @@ -84,7 +84,7 @@ function dfrn_request_post(&$a) { ); if(count($r)) { - if(strlen($r[0]['dfrn-id'])) { + if(strlen($r[0]['dfrn_id'])) { /** * We don't need to be here. It has already happened. @@ -98,8 +98,7 @@ function dfrn_request_post(&$a) { } if(is_array($contact_record)) { - $r = q("UPDATE `contact` SET `ret-aes` = %d, hidden = %d WHERE `id` = %d LIMIT 1", - intval($aes_allow), + $r = q("UPDATE `contact` SET hidden = %d WHERE `id` = %d LIMIT 1", intval($hidden), intval($contact_record['id']) ); @@ -144,7 +143,7 @@ function dfrn_request_post(&$a) { * Create a contact record on our site for the other person */ - $r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `nurl`, `name`, `nick`, `photo`, `site-pubkey`, + $r = q("INSERT INTO `contact` ( `uid`, `created`,`url`, `nurl`, `name`, `nick`, `photo`, `site_pubkey`, `request`, `confirm`, `notify`, `poll`, `poco`, `network`, `aes_allow`, `hidden`) VALUES ( %d, '%s', '%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d)", intval(local_user()), @@ -170,7 +169,7 @@ function dfrn_request_post(&$a) { info( t("Introduction complete.") . EOL); } - $r = q("select id from contact where uid = %d and url = '%s' and `site-pubkey` = '%s' limit 1", + $r = q("select id from contact where uid = %d and url = '%s' and `site_pubkey` = '%s' limit 1", intval(local_user()), dbesc($dfrn_url), $parms['key'] // this was already escaped @@ -401,9 +400,9 @@ function dfrn_request_post(&$a) { `photo` = '%s', `thumb` = '%s', `micro` = '%s', - `name-date` = '%s', - `uri-date` = '%s', - `avatar-date` = '%s', + `name_date` = '%s', + `uri_date` = '%s', + `avatar_date` = '%s', `hidden` = 0, WHERE `id` = %d LIMIT 1 ", @@ -466,7 +465,7 @@ function dfrn_request_post(&$a) { ); if(count($ret)) { - if(strlen($ret[0]['issued-id'])) { + if(strlen($ret[0]['issued_id'])) { notice( t('You have already introduced yourself here.') . EOL ); return; } @@ -483,9 +482,9 @@ function dfrn_request_post(&$a) { $issued_id = random_string(); if(is_array($contact_record)) { - // There is a contact record but no issued-id, so this + // There is a contact record but no issued_id, so this // is a reciprocal introduction from a known contact - $r = q("UPDATE `contact` SET `issued-id` = '%s' WHERE `id` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `issued_id` = '%s' WHERE `id` = %d LIMIT 1", dbesc($issued_id), intval($contact_record['id']) ); @@ -529,11 +528,11 @@ function dfrn_request_post(&$a) { $parms['url'] = $url; - $parms['issued-id'] = $issued_id; + $parms['issued_id'] = $issued_id; dbesc_array($parms); - $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`,`name`, `nick`, `issued-id`, `photo`, `site-pubkey`, + $r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`,`name`, `nick`, `issued_id`, `photo`, `site_pubkey`, `request`, `confirm`, `notify`, `poll`, `poco`, `network` ) VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )", intval($uid), @@ -542,7 +541,7 @@ function dfrn_request_post(&$a) { dbesc(normalise_link($parms['url'])), $parms['fn'], $parms['nick'], - $parms['issued-id'], + $parms['issued_id'], $parms['photo'], $parms['key'], $parms['dfrn-request'], @@ -556,10 +555,10 @@ function dfrn_request_post(&$a) { // find the contact record we just created if($r) { $r = q("SELECT `id` FROM `contact` - WHERE `uid` = %d AND `url` = '%s' AND `issued-id` = '%s' LIMIT 1", + WHERE `uid` = %d AND `url` = '%s' AND `issued_id` = '%s' LIMIT 1", intval($uid), $parms['url'], - $parms['issued-id'] + $parms['issued_id'] ); if(count($r)) $contact_record = $r[0]; @@ -725,7 +724,7 @@ function dfrn_request_content(&$a) { $handsfree = array( 'uid' => $r[0]['uid'], 'node' => $r[0]['nickname'], - 'dfrn_id' => $r[0]['issued-id'], + 'dfrn_id' => $r[0]['issued_id'], 'intro_id' => $intro[0]['id'], 'duplex' => (($r[0]['page-flags'] == PAGE_FREELOVE) ? 1 : 0), 'activity' => intval(get_pconfig($r[0]['uid'],'system','post_newfriend')) diff --git a/mod/network.php b/mod/network.php index b37be2fa8..18d5b8e11 100644 --- a/mod/network.php +++ b/mod/network.php @@ -605,7 +605,7 @@ function network_content(&$a, $update = 0, $load = false) { $items = q("SELECT `item`.*, `item`.`id` AS `item_id`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`writable`, - `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, + `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn_id`, `contact`.`self`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` FROM `item`, `contact` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 @@ -667,7 +667,7 @@ function network_content(&$a, $update = 0, $load = false) { $items = q("SELECT `item`.*, `item`.`id` AS `item_id`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`, `contact`.`writable`, - `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, + `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn_id`, `contact`.`self`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` FROM `item`, `contact` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 diff --git a/mod/notifications.php b/mod/notifications.php index b28b1478d..5bb85085f 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -191,7 +191,7 @@ function notifications_content(&$a) { '$str_notifytype' => t('Notification type: '), '$notify_type' => (($rr['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')), '$dfrn_text' => $dfrn_text, - '$dfrn_id' => $rr['issued-id'], + '$dfrn_id' => $rr['issued_id'], '$uid' => $_SESSION['uid'], '$intro_id' => $rr['intro_id'], '$contact_id' => $rr['contact-id'], diff --git a/mod/profile_photo.php b/mod/profile_photo.php index 058948ef0..14277e62e 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -110,7 +110,7 @@ function profile_photo_post(&$a) { // we'll set the updated profile-photo timestamp even if it isn't the default profile, // so that browsers will do a cache update unconditionally - $r = q("UPDATE `contact` SET `avatar-date` = '%s' WHERE `self` = 1 AND `uid` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `avatar_date` = '%s' WHERE `self` = 1 AND `uid` = %d LIMIT 1", dbesc(datetime_convert()), intval(local_user()) ); @@ -207,7 +207,7 @@ function profile_photo_content(&$a) { dbesc($resource_id) ); - $r = q("UPDATE `contact` SET `avatar-date` = '%s' WHERE `self` = 1 AND `uid` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `avatar_date` = '%s' WHERE `self` = 1 AND `uid` = %d LIMIT 1", dbesc(datetime_convert()), intval(local_user()) ); diff --git a/mod/profiles.php b/mod/profiles.php index 276fcaf64..d864c18d2 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -289,7 +289,7 @@ function profiles_post(&$a) { if($namechanged && $is_default) { - $r = q("UPDATE `contact` SET `name-date` = '%s' WHERE `self` = 1 AND `uid` = %d LIMIT 1", + $r = q("UPDATE `contact` SET `name_date` = '%s' WHERE `self` = 1 AND `uid` = %d LIMIT 1", dbesc(datetime_convert()), intval(local_user()) ); @@ -420,7 +420,7 @@ function profiles_content(&$a) { // move every contact using this profile as their default to the user default - $r = q("UPDATE `contact` SET `profile-id` = (SELECT `profile`.`id` AS `profile-id` FROM `profile` WHERE `profile`.`is_default` = 1 AND `profile`.`uid` = %d LIMIT 1) WHERE `profile-id` = %d AND `uid` = %d ", + $r = q("UPDATE `contact` SET `profile_id` = (SELECT `profile`.`id` AS `profile_id` FROM `profile` WHERE `profile`.`is_default` = 1 AND `profile`.`uid` = %d LIMIT 1) WHERE `profile_id` = %d AND `uid` = %d ", intval(local_user()), intval($a->argv[2]), intval(local_user()) diff --git a/mod/profperm.php b/mod/profperm.php index d29581beb..b31dfc128 100644 --- a/mod/profperm.php +++ b/mod/profperm.php @@ -57,7 +57,7 @@ function profperm_content(&$a) { } $profile = $r[0]; - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `profile-id` = %d", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `profile_id` = %d", intval(local_user()), intval($a->argv[1]) ); @@ -71,13 +71,13 @@ function profperm_content(&$a) { if($change) { if(in_array($change,$ingroup)) { - q("UPDATE `contact` SET `profile-id` = 0 WHERE `id` = %d AND `uid` = %d LIMIT 1", + q("UPDATE `contact` SET `profile_id` = 0 WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($change), intval(local_user()) ); } else { - q("UPDATE `contact` SET `profile-id` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", + q("UPDATE `contact` SET `profile_id` = %d WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($a->argv[1]), intval($change), intval(local_user()) @@ -85,7 +85,7 @@ function profperm_content(&$a) { } - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `profile-id` = %d", + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `profile_id` = %d", intval(local_user()), intval($a->argv[1]) ); diff --git a/mod/redir.php b/mod/redir.php index 0f7b5cc23..113f6c200 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -18,14 +18,14 @@ function redir_init(&$a) { if((! count($r)) || ($r[0]['network'] !== NETWORK_DFRN)) goaway(z_root()); - $dfrn_id = $orig_id = (($r[0]['issued-id']) ? $r[0]['issued-id'] : $r[0]['dfrn-id']); + $dfrn_id = $orig_id = (($r[0]['issued_id']) ? $r[0]['issued_id'] : $r[0]['dfrn_id']); - if($r[0]['duplex'] && $r[0]['issued-id']) { - $orig_id = $r[0]['issued-id']; + if($r[0]['duplex'] && $r[0]['issued_id']) { + $orig_id = $r[0]['issued_id']; $dfrn_id = '1:' . $orig_id; } - if($r[0]['duplex'] && $r[0]['dfrn-id']) { - $orig_id = $r[0]['dfrn-id']; + if($r[0]['duplex'] && $r[0]['dfrn_id']) { + $orig_id = $r[0]['dfrn_id']; $dfrn_id = '0:' . $orig_id; } diff --git a/mod/settings.php b/mod/settings.php index 0699e94d8..ca70c53cf 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -396,7 +396,7 @@ function settings_post(&$a) { if($name_change) { - q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `self` = 1 LIMIT 1", + q("UPDATE `contact` SET `name` = '%s', `name_date` = '%s' WHERE `uid` = %d AND `self` = 1 LIMIT 1", dbesc($username), dbesc(datetime_convert()), intval(local_user()) |