]> git.mxchange.org Git - friendica.git/commitdiff
photos were not working in private mail
authorFriendika <info@friendika.com>
Fri, 1 Jul 2011 02:02:11 +0000 (19:02 -0700)
committerFriendika <info@friendika.com>
Fri, 1 Jul 2011 02:02:11 +0000 (19:02 -0700)
boot.php
database.sql
include/notifier.php
update.php

index 1ab00f84b89e1bcc92ba7f4e06ec4300f8e1e070..2160b2548ca31327a9816be7640b12722a7104f5 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -6,7 +6,7 @@ ini_set('pcre.backtrack_limit', 250000);
 
 define ( 'FRIENDIKA_VERSION',      '2.2.1027' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
-define ( 'DB_UPDATE_VERSION',      1070      );
+define ( 'DB_UPDATE_VERSION',      1071      );
 
 define ( 'EOL',                    "<br />\r\n"     );
 define ( 'ATOM_TIME',              'Y-m-d\TH:i:s\Z' );
index df99ca7f6cbb8a7cff634bbd3b2d51d8d7e2abd3..5187f3c3ecdc5270ace7b16b75d3e26a1fc87ae5 100644 (file)
@@ -243,7 +243,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
   `from-url` char(255) NOT NULL,
   `contact-id` char(255) NOT NULL,
   `title` char(255) NOT NULL,
-  `body` text NOT NULL,
+  `body` mediumtext NOT NULL,
   `seen` tinyint(1) NOT NULL,
   `replied` tinyint(1) NOT NULL,
   `uri` char(255) NOT NULL,
index 4b97311f65df8d3a38ccceb491e9b4a5d9b0f48c..9c194d962cfbbc5e419d94a354a7f391612244c0 100644 (file)
@@ -238,6 +238,8 @@ function notifier_run($argv, $argc){
        if($cmd === 'mail') {
                $notify_hub = false;  // mail is  not public
 
+               $body = fix_private_photos($item['body'],$owner['uid']);
+
                $atom .= replace_macros($mail_template, array(
                        '$name'         => xmlify($owner['name']),
                        '$profile_page' => xmlify($owner['url']),
@@ -245,7 +247,7 @@ function notifier_run($argv, $argc){
                        '$item_id'      => xmlify($item['uri']),
                        '$subject'      => xmlify($item['title']),
                        '$created'      => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)),
-                       '$content'      => xmlify($item['body']),
+                       '$content'      => xmlify($body),
                        '$parent_id'    => xmlify($item['parent-uri'])
                ));
        }
index 306731a139ea87091502ce3330d5e367aea9f36f..1876629017102ab8ff9bb8fd8578fc5d84d98c6f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define( 'UPDATE_VERSION' , 1070 );
+define( 'UPDATE_VERSION' , 1071 );
 
 /**
  *
@@ -565,3 +565,10 @@ function update_1069() {
        q("ALTER TABLE `fsuggest` ADD `request` CHAR( 255 ) NOT NULL AFTER `url` ");
        q("ALTER TABLE `fcontact` ADD `request` CHAR( 255 ) NOT NULL AFTER `photo` ");
 }
+
+// mail body needs to accomodate private photos
+
+function update_1070() {
+       q("ALTER TABLE `mail` CHANGE `body` `body` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");
+}
+