]> git.mjollnir.org Git - s9y.git/commitdiff
bump
authorgarvinhicking <garvinhicking>
Fri, 23 Nov 2007 14:57:08 +0000 (14:57 +0000)
committergarvinhicking <garvinhicking>
Fri, 23 Nov 2007 14:57:08 +0000 (14:57 +0000)
docs/NEWS
include/plugin_internal.inc.php
plugins/serendipity_event_mailer/UTF-8/lang_de.inc.php
plugins/serendipity_event_mailer/lang_de.inc.php
plugins/serendipity_event_mailer/lang_en.inc.php
plugins/serendipity_event_mailer/serendipity_event_mailer.php

index e2fe0df34172038e53f199bf3e5863774d2c5f62..2b635446c8d8c481e378cd9fabf7a4e708eff26e 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.3 ()
 ------------------------------------------------------------------------
 
+    * Allow the "send mail" plugin to send mails to all registered
+      authors (garvinhicking)
+
     * Add spartacus remote management versioning information subpage.
       (garvinhicking)
 
index 838bbfb2bc0dad959c8fb7537e04262afe271420..28274aea0e1f2c8e29351bf261c73b8c6939109b 100644 (file)
@@ -382,7 +382,7 @@ class serendipity_quicksearch_plugin extends serendipity_plugin {
     <div>
         <input type="hidden"  name="serendipity[action]" value="search" />
         <input alt="<?php echo QUICKSEARCH; ?>" type="text"   id="serendipityQuickSearchTermField" name="serendipity[searchTerm]" size="13" />
-        <input type="submit" value="&gt;" alt="<?php echo QUICKSEARCH; ?>" name="serendipity[searchButton]" title="<?PHP echo GO; ?>" style="width: 2em;" />
+        <input class="quicksearch_submit" type="submit" value="&gt;" alt="<?php echo QUICKSEARCH; ?>" name="serendipity[searchButton]" title="<?PHP echo GO; ?>" style="width: 2em;" />
     </div>
     <div id="LSResult" style="display: none;"><div id="LSShadow"></div></div>
 </form>
index 8b286887628a181b80cb339deeaf83409ebba2e0..78a09af961f3545e88a79004e79eeb7df2539608 100644 (file)
@@ -14,3 +14,4 @@
         @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Dieser Eintrage wurde nicht per E-Mail versendet, da diese Option deaktiviert wurde.');
         @define('PLUGIN_EVENT_MAILER_SENDING', 'Versende');
         @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Diesen Eintrag per E-Mail versenden');
+        @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'An alle Redakteure schicken');
index 55cce37ccd067692499163a0909c98a69ba0b831..9e342596f1c7de306dfdd347d96a3775fe00edca 100644 (file)
@@ -14,3 +14,4 @@
         @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'Dieser Eintrage wurde nicht per E-Mail versendet, da diese Option deaktiviert wurde.');
         @define('PLUGIN_EVENT_MAILER_SENDING', 'Versende');
         @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Diesen Eintrag per E-Mail versenden');
+        @define('PLUGIN_EVENT_MAILER_SENDTOALL', 'An alle Redakteure schicken');
index 11e5ff7f9a1fb182c49f31a95385ebf5758242c4..f1fcced5e2042d23b1378a8d29911d23cd06fc94 100644 (file)
@@ -20,6 +20,4 @@
 @define('PLUGIN_EVENT_MAILER_NOTSENDDECISION', 'This entry was not sent via E-Mail because you decided to not send it.');
 @define('PLUGIN_EVENT_MAILER_SENDING', 'Sending');
 @define('PLUGIN_EVENT_MAILER_ISTOSENDIT', 'Send this entry via E-Mail');
-
-
-?>
+@define('PLUGIN_EVENT_MAILER_SENDTOALL', 'Send to all authors');
index 08e0983595dcee12ac79882bcfe7133177d5138e..aafa5f4e6dc18c9fa3f935698948a62b93261367 100644 (file)
@@ -26,7 +26,7 @@ class serendipity_event_mailer extends serendipity_event
         $propbag->add('description',   PLUGIN_EVENT_MAILER_DESC);
         $propbag->add('stackable',     false);
         $propbag->add('author',        'Sebastian Nohn, Kristian Koehntopp, Garvin Hicking');
-        $propbag->add('version',       '1.47');
+        $propbag->add('version',       '1.50');
         $propbag->add('requirements',  array(
             'serendipity' => '0.8',
             'smarty'      => '2.6.7',
@@ -38,7 +38,7 @@ class serendipity_event_mailer extends serendipity_event
         ));
         $propbag->add('groups', array('FRONTEND_ENTRY_RELATED'));
 
-        $config = array('what', 'mailto', 'includelink', 'striptags', 'convertp');
+        $config = array('what', 'mailto', 'sendtoall', 'includelink', 'striptags', 'convertp');
         $propbag->add('configuration', $config);
     }
 
@@ -99,6 +99,13 @@ class serendipity_event_mailer extends serendipity_event
                 $propbag->add('default', '');
                 break;
 
+            case 'sendtoall':
+                $propbag->add('type',        'boolean');
+                $propbag->add('name',        PLUGIN_EVENT_MAILER_SENDTOALL);
+                $propbag->add('description', '');
+                $propbag->add('default',     'false');
+                break;
+
             case 'includelink':
                 $propbag->add('type',        'boolean');
                 $propbag->add('name',        PLUGIN_EVENT_MAILER_LINK);
@@ -144,6 +151,12 @@ class serendipity_event_mailer extends serendipity_event
                     } else {
                         $mailto = $this->get_config('mailto');
                     }
+                    
+                    if (isset($serendipity['POST']['properties']['sendentry_all'])) {
+                        $sendtoall = $serendipity['POST']['properties']['sendentry_all'];
+                    } else {
+                        $sendtoall = serendipity_db_bool($this->get_config('sendtoall'));
+                    }
 
 ?>
                     <fieldset style="margin: 5px">
@@ -151,7 +164,9 @@ class serendipity_event_mailer extends serendipity_event
                             <input class="input_checkbox" type="checkbox" name="serendipity[properties][sendentry]" id="properties_sendentry" value="true" checked="checked" />
                             <label title="<?php echo PLUGIN_EVENT_MAILER_SENDING; ?>" for="properties_sendentry">&nbsp;<?php echo PLUGIN_EVENT_MAILER_ISTOSENDIT; ?></label><br />
                             <label title="<?php echo PLUGIN_EVENT_MAILER_RECIPIENT; ?>" for="properties_mailto">&nbsp;<?php echo PLUGIN_EVENT_MAILER_RECIPIENTS; ?>&nbsp;&nbsp;</label>&nbsp;
-                            <input class="input_textbox" type="text" name="serendipity[properties][mailto]" id="properties_mailto" value="<?php echo htmlspecialchars($mailto); ?>" />
+                            <input class="input_textbox" type="text" name="serendipity[properties][mailto]" id="properties_mailto" value="<?php echo htmlspecialchars($mailto); ?>" /><br />
+                            <input type="checkbox" value="true" id="sendall" name="serendipity[properties][sendentry_all]" <?php echo ($sendtoall ? 'checked="checked"': ''); ?> />
+                            <label title="<?php echo PLUGIN_EVENT_MAILER_SENDTOALL; ?>" for="sendall">&nbsp;<?php echo PLUGIN_EVENT_MAILER_SENDTOALL; ?></label>
                     </fieldset>
 <?php
                     break;
@@ -190,6 +205,12 @@ class serendipity_event_mailer extends serendipity_event
                             }
                         }
 
+                        if ($serendipity['POST']['properties']['sendentry_all']) {
+                            $mails = serendipity_db_query("SELECT email FROM {$serendipity['dbPrefix']}authors");
+                            foreach($mails AS $mail) {
+                                $to[] = trim($mail['email']);
+                            }
+                        }
 
                         $mail = array(
                             'subject' => $eventData['title'],