From b5460ee2c820d95f75fd47d2f8bcbe5dddc21e7e Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 26 Jan 2013 15:10:52 +0100 Subject: Implement media subscriptions in the new subscription class --- inc/media.php | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'inc/media.php') diff --git a/inc/media.php b/inc/media.php index 6335bf210..572b1177c 100644 --- a/inc/media.php +++ b/inc/media.php @@ -535,32 +535,13 @@ function media_contentcheck($file,$mime){ * Send a notify mail on uploads * * @author Andreas Gohr - * @fixme this should embed thumbnails of images in HTML version */ function media_notify($id,$file,$mime,$old_rev=false){ - global $lang; global $conf; - global $INFO; if(empty($conf['notify'])) return; //notify enabled? - $text = rawLocale('uploadmail'); - $trep = array( - 'MIME' => $mime, - 'MEDIA' => ml($id,'',true,'&',true), - 'SIZE' => filesize_h(filesize($file)), - ); - - if ($old_rev && $conf['mediarevisions']) { - $trep['OLD'] = ml($id, "rev=$old_rev", true, '&', true); - } else { - $trep['OLD'] = '---'; - } - - $mail = new Mailer(); - $mail->to($conf['notify']); - $mail->subject($lang['mail_upload'].' '.$id); - $mail->setBody($text,$trep); - return $mail->send(); + $subscription = new Subscription(); + return $subscription->send_media_diff($conf['notify'], 'uploadmail', $id, $old_rev, ''); } /** -- cgit v1.2.3