aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/Photo.php14
-rw-r--r--mod/item.php7
-rw-r--r--mod/pubsub.php6
3 files changed, 4 insertions, 23 deletions
diff --git a/include/Photo.php b/include/Photo.php
index ba4241a7b..324b8d776 100644
--- a/include/Photo.php
+++ b/include/Photo.php
@@ -311,13 +311,6 @@ class Photo {
public function store($uid, $cid, $rid, $filename, $album, $scale, $profile = 0, $allow_cid = '', $allow_gid = '', $deny_cid = '', $deny_gid = '') {
- $r = q("select `guid` from photo where `resource-id` = '%s' and `guid` != '' limit 1",
- dbesc($rid)
- );
- if(count($r))
- $guid = $r[0]['guid'];
- else
- $guid = get_guid();
$x = q("select id from photo where `resource-id` = '%s' and uid = %d and `contact-id` = %d and `scale` = %d limit 1",
dbesc($rid),
@@ -329,7 +322,6 @@ class Photo {
$r = q("UPDATE `photo`
set `uid` = %d,
`contact-id` = %d,
- `guid` = '%s',
`resource-id` = '%s',
`created` = '%s',
`edited` = '%s',
@@ -349,7 +341,6 @@ class Photo {
intval($uid),
intval($cid),
- dbesc($guid),
dbesc($rid),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
@@ -370,11 +361,10 @@ class Photo {
}
else {
$r = q("INSERT INTO `photo`
- ( `uid`, `contact-id`, `guid`, `resource-id`, `created`, `edited`, `filename`, type, `album`, `height`, `width`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` )
- VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, '%s', '%s', '%s', '%s' )",
+ ( `uid`, `contact-id`, `resource-id`, `created`, `edited`, `filename`, type, `album`, `height`, `width`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` )
+ VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d, '%s', '%s', '%s', '%s' )",
intval($uid),
intval($cid),
- dbesc($guid),
dbesc($rid),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
diff --git a/mod/item.php b/mod/item.php
index 1053bb8ca..3b0a52fc9 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -591,8 +591,6 @@ function item_post(&$a) {
if($orig_post)
$datarray['edit'] = true;
- else
- $datarray['guid'] = get_guid();
// preview mode - prepare the body for display and send it via json
@@ -670,11 +668,10 @@ function item_post(&$a) {
$post_id = 0;
- $r = q("INSERT INTO `item` (`guid`, `uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
+ $r = q("INSERT INTO `item` (`uid`,`type`,`wall`,`gravity`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`,
`author-name`, `author-link`, `author-avatar`, `created`, `edited`, `commented`, `received`, `changed`, `uri`, `thr-parent`, `title`, `body`, `app`, `lang`, `location`, `coord`,
`inform`, `verb`, `postopts`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`, `private`, `pubmail`, `attach`,`origin`, `moderated`)
- VALUES( '%s', %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d )",
- dbesc($datarray['guid']),
+ VALUES( %d, '%s', %d, %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', %d, %d )",
intval($datarray['uid']),
dbesc($datarray['type']),
intval($datarray['wall']),
diff --git a/mod/pubsub.php b/mod/pubsub.php
index 64fbda289..33d26d553 100644
--- a/mod/pubsub.php
+++ b/mod/pubsub.php
@@ -135,12 +135,6 @@ function pubsub_post(&$a) {
$contact = $r[0];
- // we have no way to match Diaspora guid's with atom post id's and could get duplicates.
- // we'll assume that direct delivery is robust (and this is a bad assumption, but the duplicates are messy).
-
- if($r[0]['network'] === NETWORK_DIASPORA)
- hub_post_return();
-
$feedhub = '';
require_once('include/items.php');