242242
243243// print "Message ID: $id";
244244 // exit;
245- if (!$ GLOBALS ['can_fetchUrl ' ] && preg_match ("/\[URL:/i " , $ _POST ['message ' ])) {
246- echo $ GLOBALS ['can_fetchUrl ' ].Warn (s ('You are trying to send a remote URL, but PEAR::HTTP_Request or CURL is not available, so this will fail ' ));
247- }
248-
249245 if ($ GLOBALS ['commandline ' ]) {
250246 if (isset ($ _POST ['targetlist ' ]) && is_array ($ _POST ['targetlist ' ])) {
251247 Sql_query ("delete from {$ tables ['listmessage ' ]} where messageid = $ id " );
@@ -701,11 +697,11 @@ function submitform() {
701697 <label for="subject"> ' .s ('Campaign subject ' ).Help ('subject ' ).'</label> ' .
702698 '<input type="text" name="subject" id="subjectinput" value=" ' .htmlentities ($ utf8_subject , ENT_QUOTES , 'UTF-8 ' ).'" size="60" />
703699 </div>
704-
700+
705701 <div class="field"><label for="fromfield"> ' .$ GLOBALS ['I18N ' ]->get ('From Line ' ).Help ('from ' ).'</label> ' .'
706702 <input type="text" name="fromfield"
707703 value=" ' .htmlentities ($ utf8_from , ENT_QUOTES , 'UTF-8 ' ).'" size="60" /></div>
708-
704+
709705 <div class="field" id="message-text-preview">
710706 <label for="messagepreview"> ' .s ('Message preview ' ).Help ('generatetextpreview ' ).'</label>
711707 <input type="text" id="messagepreview" name="messagepreview" size="60" readonly />
@@ -714,29 +710,27 @@ function submitform() {
714710 </div>
715711 </div> ' ;
716712
717- if ($ GLOBALS ['can_fetchUrl ' ]) {
718- $ maincontent .= sprintf ('
713+ $ maincontent .= sprintf ('
719714
720715 <div id="contentchoice" class="field">
721716 <label for="sendmethod"> ' .$ GLOBALS ['I18N ' ]->get ('Content ' ).Help ('sendmethod ' ).'</label> ' .'
722717 <input type="radio" name="sendmethod" value="remoteurl" %s /> ' .$ GLOBALS ['I18N ' ]->get ('Send a Webpage ' ).'
723718 <input type="radio" name="sendmethod" value="inputhere" %s /> ' .$ GLOBALS ['I18N ' ]->get ('Compose Message ' ).'
724719 </div> ' ,
725- $ messagedata ['sendmethod ' ] == 'remoteurl ' ? 'checked="checked" ' : '' ,
726- $ messagedata ['sendmethod ' ] == 'inputhere ' ? 'checked="checked" ' : ''
720+ $ messagedata ['sendmethod ' ] == 'remoteurl ' ? 'checked="checked" ' : '' ,
721+ $ messagedata ['sendmethod ' ] == 'inputhere ' ? 'checked="checked" ' : ''
727722 );
728723
729- if (empty ($ messagedata ['sendurl ' ])) {
730- $ messagedata ['sendurl ' ] = 'e.g. https://www.phplist.com/testcampaign.html ' ;
731- }
724+ if (empty ($ messagedata ['sendurl ' ])) {
725+ $ messagedata ['sendurl ' ] = 'e.g. https://www.phplist.com/testcampaign.html ' ;
726+ }
732727
733- $ maincontent .= '
728+ $ maincontent .= '
734729 <div id="remoteurl" class="field"><label for="sendurl"> ' .$ GLOBALS ['I18N ' ]->get ('Send a Webpage - URL ' ).Help ('sendurl ' ).'</label> ' .'
735730 <input type="text" name="sendurl" id="remoteurlinput"
736- value=" ' .htmlspecialchars ($ messagedata ['sendurl ' ]).'" size="60" /> <span id="remoteurlstatus"></span></div> ' ;
737- if (isset ($ messagedata ['sendmethod ' ]) && $ messagedata ['sendmethod ' ] != 'remoteurl ' ) {
738- $ GLOBALS ['pagefooter ' ]['hideremoteurl ' ] = '<script type="text/javascript">$("#remoteurl").hide();</script> ' ;
739- }
731+ value=" ' .$ messagedata ['sendurl ' ].'" size="60" /> <span id="remoteurlstatus"></span></div> ' ;
732+ if (isset ($ messagedata ['sendmethod ' ]) && $ messagedata ['sendmethod ' ] != 'remoteurl ' ) {
733+ $ GLOBALS ['pagefooter ' ]['hideremoteurl ' ] = '<script type="text/javascript">$("#remoteurl").hide();</script> ' ;
740734 }
741735
742736// custom code - end
0 commit comments