aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-03-21 18:25:41 -0700
committerfriendica <info@friendica.com>2013-03-21 18:25:41 -0700
commitddf5bf8968a12501939cd37898d303967b748600 (patch)
tree9ec457948c7fadae811b1af676257c43bab93d4c /mod/photos.php
parentb3c699d49a5ef2023fcbdaa8226be95fce9589a7 (diff)
downloadvolse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.tar.gz
volse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.tar.bz2
volse-hubzilla-ddf5bf8968a12501939cd37898d303967b748600.zip
rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present.
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 90b2990aa..c562fc139 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -187,10 +187,10 @@ function photos_post(&$a) {
intval($page_owner_uid)
);
if(count($i)) {
- q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent_uri` = '%s' AND `uid` = %d",
+ q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent_mid` = '%s' AND `uid` = %d",
dbesc(datetime_convert()),
dbesc(datetime_convert()),
- dbesc($i[0]['uri']),
+ dbesc($i[0]['mid']),
intval($page_owner_uid)
);
@@ -459,13 +459,13 @@ function photos_post(&$a) {
if(count($taginfo)) {
foreach($taginfo as $tagged) {
- $uri = item_message_id();
+ $mid = item_message_id();
$arr = array();
$arr['uid'] = $page_owner_uid;
- $arr['uri'] = $uri;
- $arr['parent_uri'] = $uri;
+ $arr['mid'] = $mid;
+ $arr['parent_mid'] = $mid;
$arr['type'] = 'activity';
$arr['wall'] = 1;
$arr['contact-id'] = $owner_record['id'];
@@ -1000,12 +1000,12 @@ function photos_content(&$a) {
$link_item = $linked_items[0];
$r = q("SELECT COUNT(*) AS `total`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `parent_uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0
+ WHERE `parent_mid` = '%s' AND `mid` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`uid` = %d
$sql_extra ",
- dbesc($link_item['uri']),
- dbesc($link_item['uri']),
+ dbesc($link_item['mid']),
+ dbesc($link_item['mid']),
intval($link_item['uid'])
);
@@ -1019,13 +1019,13 @@ function photos_content(&$a) {
`contact`.`rel`, `contact`.`thumb`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `parent_uri` = '%s' AND `uri` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0
+ WHERE `parent_mid` = '%s' AND `mid` != '%s' AND `item`.`deleted` = 0 and `item`.`moderated` = 0
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
AND `item`.`uid` = %d
$sql_extra
ORDER BY `parent` DESC, `id` ASC LIMIT %d ,%d ",
- dbesc($link_item['uri']),
- dbesc($link_item['uri']),
+ dbesc($link_item['mid']),
+ dbesc($link_item['mid']),
intval($link_item['uid']),
intval($a->pager['start']),
intval($a->pager['itemspage'])