aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php2
-rw-r--r--database.sql2
-rw-r--r--include/notifier.php4
-rw-r--r--update.php9
4 files changed, 13 insertions, 4 deletions
diff --git a/boot.php b/boot.php
index 1ab00f84b..2160b2548 100644
--- 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' );
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 ");
+}
+