diff options
author | Friendika <info@friendika.com> | 2011-06-30 19:02:11 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-06-30 19:02:11 -0700 |
commit | cdddfca0b5971d2437eee09ad6985f3df5ae5bfd (patch) | |
tree | d8caf30b951159cce76c041a20352138621fc446 | |
parent | 9aeccaaa9ef7f3569149bb7c9aae56e7f8b5f514 (diff) | |
download | volse-hubzilla-cdddfca0b5971d2437eee09ad6985f3df5ae5bfd.tar.gz volse-hubzilla-cdddfca0b5971d2437eee09ad6985f3df5ae5bfd.tar.bz2 volse-hubzilla-cdddfca0b5971d2437eee09ad6985f3df5ae5bfd.zip |
photos were not working in private mail
-rw-r--r-- | boot.php | 2 | ||||
-rw-r--r-- | database.sql | 2 | ||||
-rw-r--r-- | include/notifier.php | 4 | ||||
-rw-r--r-- | update.php | 9 |
4 files changed, 13 insertions, 4 deletions
@@ -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' ); diff --git a/database.sql b/database.sql index df99ca7f6..5187f3c3e 100644 --- a/database.sql +++ b/database.sql @@ -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, diff --git a/include/notifier.php b/include/notifier.php index 4b97311f6..9c194d962 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -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']) )); } diff --git a/update.php b/update.php index 306731a13..187662901 100644 --- a/update.php +++ b/update.php @@ -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 "); +} + |