]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '1.0.x' into testing
authorEvan Prodromou <evan@status.net>
Fri, 10 Jun 2011 20:51:07 +0000 (16:51 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 10 Jun 2011 20:51:07 +0000 (16:51 -0400)
plugins/EmailSummary/sendemailsummary.php
plugins/EmailSummary/useremailsummaryhandler.php

index aad79c736046e05fcd43d390afeec24191913e5e..01c11a210a009c6edbba4cf2a752c6966ca0db48 100644 (file)
@@ -1,22 +1,21 @@
-#!/usr/bin/env php
-   <?php
-   /*
-    * StatusNet - a distributed open-source microblogging tool
-    * Copyright (C) 2010, StatusNet, Inc.
-    *
-    * This program is free software: you can redistribute it and/or modify
-    * it under the terms of the GNU Affero General Public License as published by
-    * the Free Software Foundation, either version 3 of the License, or
-    * (at your option) any later version.
-    *
-    * This program is distributed in the hope that it will be useful,
-    * but WITHOUT ANY WARRANTY; without even the implied warranty of
-    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    * GNU Affero General Public License for more details.
-    *
-    * You should have received a copy of the GNU Affero General Public License
-    * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-    */
+<?php
+/*
+ * StatusNet - a distributed open-source microblogging tool
+ * Copyright (C) 2010, StatusNet, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..'));
 
@@ -44,7 +43,7 @@ if (have_option('u', 'universe')) {
             StatusNet::init($server);
             // Different queue manager, maybe!
             $qm = QueueManager::get();
-            $qm->enqueue(null, 'sitesum');
+            $qm->enqueue(1, 'sitesum');
         }
     }
 } else {
@@ -54,6 +53,6 @@ if (have_option('u', 'universe')) {
         $user = getUser();
         $qm->enqueue($user->id, 'usersum');
     } catch (NoUserArgumentException $nuae) {
-        $qm->enqueue(null, 'sitesum');
+        $qm->enqueue(1, 'sitesum');
     }
 }
index 2cdacd40b1ae2c23413eefcd0a1498a876cbf046..f03e8a1dcdfddca3a50b4f3f5db5d35aab14136c 100644 (file)
@@ -57,7 +57,7 @@ class UserEmailSummaryHandler extends QueueHandler
      */
     function transport()
     {
-        return 'sitesum';
+        return 'usersum';
     }
 
     /**
@@ -120,7 +120,7 @@ class UserEmailSummaryHandler extends QueueHandler
             $new_top = $notice->_items[0]->id;
         }
 
-        $out = new XMLStringer();
+        $out = new XMLStringer(true);
 
         $out->elementStart('div', array('width' => '100%',
                                         'style' => 'background-color: #ffffff; border: 4px solid #4c609a; padding: 10px;'));
@@ -206,8 +206,13 @@ class UserEmailSummaryHandler extends QueueHandler
 
         // FIXME: do something for people who don't like HTML email
 
+        $subject = sprintf(_m('Your latest updates from %s'), common_config('site', 'name'));
+
         // TRANS: Subject for e-mail.
-        mail_to_user($user, _m('Updates from your network'), $body,
+
+        mail_to_user($user,
+                     $subject,
+                     $body,
                      array('Content-Type' => 'text/html; charset=UTF-8'));
 
         if (empty($ess)) {