From e697b6cc39af08f80d3ee3743c9d4088791af634 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Sat, 24 Nov 2001 18:38:52 +0000 Subject: [PATCH] Some cleanup. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1798 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/options.php | 18 +- plugins/newmail/newmail_opt.php | 2 +- plugins/newmail/setup.php | 274 +++++++++---------- po/squirrelmail.po | 217 +++++++-------- src/options_display.php | 9 +- src/options_highlight.php | 91 ++++--- src/options_identities.php | 452 +++++++++++++++----------------- 7 files changed, 523 insertions(+), 540 deletions(-) diff --git a/functions/options.php b/functions/options.php index c944f995..e1de4e73 100644 --- a/functions/options.php +++ b/functions/options.php @@ -1,15 +1,15 @@ server files the media file to play when new m if ($media_changetitle == 'on') { echo 'checked '; } - echo 'name=media_changetitle> ' . _("Change title on supported browsers.") . '   (' . _("requires IE and JavaScript to work") . ')'. + echo 'name=media_changetitle> ' . _("Change title on supported browsers.") . '   (' . _("requires JavaScript to work") . ')'. ''. ''. ' '. diff --git a/plugins/newmail/setup.php b/plugins/newmail/setup.php index 0d3bac4d..618a9314 100644 --- a/plugins/newmail/setup.php +++ b/plugins/newmail/setup.php @@ -61,7 +61,6 @@ $squirrelmail_plugin_hooks['left_main_before']['newmail'] = 'newmail_plugin'; $squirrelmail_plugin_hooks['optpage_register_block']['newmail'] = 'newmail_optpage_register_block'; - // $squirrelmail_plugin_hooks['options_link_and_description']['newmail'] = 'newmail_options'; $squirrelmail_plugin_hooks['options_save']['newmail'] = 'newmail_sav'; $squirrelmail_plugin_hooks['loading_prefs']['newmail'] = 'newmail_pref'; } @@ -82,51 +81,51 @@ } } -function newmail_sav() { - - global $username,$data_dir; - global $submit_newmail,$media_file,$media_reset,$media_enable,$media_popup; - global $media_recent,$media_sel; - global $media_allbox, $media_changetitle; - - if ($submit_newmail) { - if(isset($media_enable)) { - setPref($data_dir,$username,"newmail_enable",$media_enable); - } else { - setPref($data_dir,$username,"newmail_enable",""); - } - if(isset($media_popup)) { - setPref($data_dir,$username,"newmail_popup",$media_popup); - } else { - setPref($data_dir,$username,"newmail_popup",""); - } - if(isset($media_allbox)) { - setPref($data_dir,$username,"newmail_allbox",$media_allbox); - } else { - setPref($data_dir,$username,"newmail_allbox",""); - } - if(isset($media_recent)) { - setPref($data_dir,$username,"newmail_recent",$media_recent); - } else { - setPref($data_dir,$username,"newmail_recent",""); - } - if(isset($media_changetitle)) { - setPref($data_dir,$username,"newmail_changetitle",$media_changetitle); - } else { - setPref($data_dir,$username,"newmail_changetitle",""); - } - if(isset($media_sel)) { - if($media_sel == "(local media)") { - setPref($data_dir,$username,"newmail_media",StripSlashes($media_file)); - } else { - setPref($data_dir,$username,"newmail_media",$media_sel); - } - } else { - setPref($data_dir,$username,"newmail_media",""); - } - echo '
' . _("New Mail Notification options saved") . '
'; - } -} + function newmail_sav() { + + global $username,$data_dir; + global $submit_newmail,$media_file,$media_reset,$media_enable,$media_popup; + global $media_recent,$media_sel; + global $media_allbox, $media_changetitle; + + if ($submit_newmail) { + if(isset($media_enable)) { + setPref($data_dir,$username,'newmail_enable',$media_enable); + } else { + setPref($data_dir,$username,'newmail_enable',''); + } + if(isset($media_popup)) { + setPref($data_dir,$username,'newmail_popup',$media_popup); + } else { + setPref($data_dir,$username,'newmail_popup',''); + } + if(isset($media_allbox)) { + setPref($data_dir,$username,'newmail_allbox',$media_allbox); + } else { + setPref($data_dir,$username,'newmail_allbox',''); + } + if(isset($media_recent)) { + setPref($data_dir,$username,'newmail_recent',$media_recent); + } else { + setPref($data_dir,$username,'newmail_recent',''); + } + if(isset($media_changetitle)) { + setPref($data_dir,$username,'newmail_changetitle',$media_changetitle); + } else { + setPref($data_dir,$username,'newmail_changetitle',''); + } + if(isset($media_sel)) { + if($media_sel == '(local media)') { + setPref($data_dir,$username,'newmail_media',StripSlashes($media_file)); + } else { + setPref($data_dir,$username,'newmail_media',$media_sel); + } + } else { + setPref($data_dir,$username,'newmail_media',''); + } + echo '
' . _("New Mail Notification options saved") . '
'; + } + } function newmail_pref() { @@ -140,102 +139,103 @@ function newmail_sav() { $newmail_popup = getPref($data_dir, $username, 'newmail_popup'); $newmail_allbox = getPref($data_dir, $username, 'newmail_allbox'); $newmail_changetitle = getPref($data_dir, $username, 'newmail_changetitle'); - + if ($newmail_media == '') { $newmail_media = '../plugins/newmail/sounds/Notify.wav'; } - - } -function newmail_plugin() { - - global $username,$key,$imapServerAddress,$imapPort; - global $newmail_media,$newmail_enable,$newmail_popup,$newmail_recent; - global $newmail_changetitle; - global $imapConnection; - - if ($newmail_enable == 'on' || $newmail_popup == 'on' || $newmail_changetitle) { - - // open a connection on the imap port (143) - - // $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 10); // the 10 is to hide the output - - $boxes = sqimap_mailbox_list($imapConnection); - $delimeter = sqimap_get_delimiter($imapConnection); - - $status = 0; - $totalNew = 0; - - for ($i = 0;$i < count($boxes); $i++) { - - $line = ''; - $mailbox = $boxes[$i]['formatted']; - - if (! isset($boxes[$i]['unseen'])) - $boxes[$i]['unseen'] = ''; - if ($boxes[$i]['flags']) { - $noselect = false; - for ($h = 0; $h < count($boxes[$i]['flags']); $h++) { - if (strtolower($boxes[$i]["flags"][$h]) == 'noselect') - $noselect = true; - } - if (! $noselect) { - $status = $status + CheckNewMailboxSound($imapConnection, $mailbox, - $boxes[$i]['unformatted'], $delimeter, $boxes[$i]['unseen'], - $totalNew); - } - } else { - $status = $status + CheckNewMailboxSound($imapConnection, $mailbox, $boxes[$i]['unformatted'], - $delimeter, $boxes[$i]['unseen'], $totalNew); - } - - } - - // sqimap_logout($imapConnection); - - // If we found unseen messages, then we - // will play the sound as follows: - - if ($newmail_changetitle) { - echo "\n"; } - if ($status > 0 && $newmail_enable == 'on') { - echo ""; - } - if ($status >0 && $newmail_popup == 'on') { -?> - -\n" . + "function ChangeTitleLoad() {\n"; + if( $totalNew > 1 ) { + echo 'window.parent.document.title = "' . + sprintf(_("%s New Messages"), $totalNew ) . + "\";\n"; + } else { + echo 'window.parent.document.title = "' . + sprintf(_("%s New Message"), $totalNew ) . + "\";\n"; + } + echo "if (BeforeChangeTitle != null)\n". + "BeforeChangeTitle();\n". + "}\n". + "BeforeChangeTitle = window.onload;\n". + "window.onload = ChangeTitleLoad;\n". + "\n"; + } + + if ($status > 0 && $newmail_enable == 'on') { + echo ""; + } + if ($status >0 && $newmail_popup == 'on') { + echo "\n"; + + } + } + } ?> diff --git a/po/squirrelmail.po b/po/squirrelmail.po index b33fa681..a278359e 100644 --- a/po/squirrelmail.po +++ b/po/squirrelmail.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-11-24 09:39+0100\n" +"POT-Creation-Date: 2001-11-24 19:36+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -81,7 +81,9 @@ msgstr "" #: squirrelmail/functions/mailbox_display.php:560 #: squirrelmail/plugins/filters/options.php:182 #: squirrelmail/src/compose.php:103 squirrelmail/src/download.php:121 -#: squirrelmail/src/download.php:127 squirrelmail/src/options_order.php:43 +#: squirrelmail/src/download.php:127 +#: squirrelmail/src/options_highlight.php:329 +#: squirrelmail/src/options_order.php:43 #: squirrelmail/src/printer_friendly_bottom.php:82 #: squirrelmail/src/search.php:66 squirrelmail/src/search.php:67 msgid "Subject" @@ -90,7 +92,9 @@ msgstr "" #: squirrelmail/functions/mailbox_display.php:546 #: squirrelmail/plugins/filters/options.php:170 #: squirrelmail/src/compose.php:104 squirrelmail/src/download.php:122 -#: squirrelmail/src/download.php:129 squirrelmail/src/options_order.php:41 +#: squirrelmail/src/download.php:129 +#: squirrelmail/src/options_highlight.php:317 +#: squirrelmail/src/options_order.php:41 #: squirrelmail/src/printer_friendly_bottom.php:76 #: squirrelmail/src/search.php:69 squirrelmail/src/search.php:70 msgid "From" @@ -100,6 +104,7 @@ msgstr "" #: squirrelmail/plugins/filters/options.php:173 #: squirrelmail/src/compose.php:105 squirrelmail/src/download.php:123 #: squirrelmail/src/download.php:131 +#: squirrelmail/src/options_highlight.php:320 #: squirrelmail/src/printer_friendly_bottom.php:77 #: squirrelmail/src/search.php:75 squirrelmail/src/search.php:76 msgid "To" @@ -257,8 +262,11 @@ msgstr "" #: squirrelmail/functions/mailbox_display.php:516 #: squirrelmail/plugins/filters/options.php:86 -#: squirrelmail/plugins/mail_fetch/options.php:185 -#: squirrelmail/src/folders.php:104 squirrelmail/src/read_body.php:452 +#: squirrelmail/plugins/mail_fetch/options.php:168 +#: squirrelmail/plugins/mail_fetch/options.php:175 +#: squirrelmail/src/folders.php:104 squirrelmail/src/options_highlight.php:71 +#: squirrelmail/src/options_identities.php:304 +#: squirrelmail/src/read_body.php:452 msgid "Delete" msgstr "" @@ -323,7 +331,7 @@ msgstr "" #: squirrelmail/plugins/newmail/newmail_opt.php:139 #: squirrelmail/plugins/translate/options.php:133 #: squirrelmail/src/folders_rename_getname.php:47 -#: squirrelmail/src/options_highlight.php:331 +#: squirrelmail/src/options_highlight.php:342 msgid "Submit" msgstr "" @@ -401,7 +409,7 @@ msgid "Name:" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:126 -#: squirrelmail/plugins/mail_fetch/options.php:223 +#: squirrelmail/plugins/mail_fetch/options.php:207 #: squirrelmail/src/login.php:127 msgid "Password:" msgstr "" @@ -441,87 +449,87 @@ msgstr "" msgid "Never" msgstr "" -#: squirrelmail/src/options_display.php:90 +#: squirrelmail/src/options_display.php:89 msgid "Mailbox Display Options" msgstr "" -#: squirrelmail/src/options_display.php:95 +#: squirrelmail/src/options_display.php:94 msgid "Number of Messages to Index" msgstr "" -#: squirrelmail/src/options_display.php:103 +#: squirrelmail/src/options_display.php:102 msgid "Enable Alternating Row Colors" msgstr "" -#: squirrelmail/src/options_display.php:110 +#: squirrelmail/src/options_display.php:109 msgid "Enable Page Selector" msgstr "" -#: squirrelmail/src/options_display.php:117 +#: squirrelmail/src/options_display.php:116 msgid "Maximum Number of Pages to Show" msgstr "" -#: squirrelmail/src/options_display.php:124 +#: squirrelmail/src/options_display.php:123 msgid "Message Display and Composition" msgstr "" -#: squirrelmail/src/options_display.php:129 +#: squirrelmail/src/options_display.php:128 msgid "Wrap Incoming Text At" msgstr "" -#: squirrelmail/src/options_display.php:137 +#: squirrelmail/src/options_display.php:136 msgid "Size of Editor Window" msgstr "" -#: squirrelmail/src/options_display.php:145 +#: squirrelmail/src/options_display.php:144 msgid "Location of Buttons when Composing" msgstr "" -#: squirrelmail/src/options_display.php:148 +#: squirrelmail/src/options_display.php:147 msgid "Before headers" msgstr "" -#: squirrelmail/src/options_display.php:149 +#: squirrelmail/src/options_display.php:148 msgid "Between headers and message body" msgstr "" -#: squirrelmail/src/options_display.php:150 +#: squirrelmail/src/options_display.php:149 msgid "After message body" msgstr "" -#: squirrelmail/src/options_display.php:155 +#: squirrelmail/src/options_display.php:154 msgid "Addressbook Display Format" msgstr "" -#: squirrelmail/src/options_display.php:158 +#: squirrelmail/src/options_display.php:157 msgid "Javascript" msgstr "" -#: squirrelmail/src/options_display.php:159 +#: squirrelmail/src/options_display.php:158 msgid "HTML" msgstr "" -#: squirrelmail/src/options_display.php:164 +#: squirrelmail/src/options_display.php:163 msgid "Show HTML Version by Default" msgstr "" -#: squirrelmail/src/options_display.php:171 +#: squirrelmail/src/options_display.php:170 msgid "Include Me in CC when I Reply All" msgstr "" -#: squirrelmail/src/options_display.php:178 +#: squirrelmail/src/options_display.php:177 msgid "Enable Mailer Display" msgstr "" -#: squirrelmail/src/options_display.php:185 +#: squirrelmail/src/options_display.php:184 msgid "Display Attached Images with Message" msgstr "" -#: squirrelmail/src/options_display.php:192 +#: squirrelmail/src/options_display.php:191 msgid "Enable Subtle Printer Friendly Link" msgstr "" -#: squirrelmail/src/options_display.php:199 +#: squirrelmail/src/options_display.php:198 msgid "Enable Printer Friendly Clean Display" msgstr "" @@ -653,105 +661,122 @@ msgstr "" #: squirrelmail/plugins/filters/options.php:73 #: squirrelmail/plugins/newmail/newmail_opt.php:41 #: squirrelmail/plugins/translate/options.php:67 -#: squirrelmail/src/options.php:157 squirrelmail/src/options_highlight.php:50 +#: squirrelmail/src/options.php:157 squirrelmail/src/options_highlight.php:57 #: squirrelmail/src/options_identities.php:42 #: squirrelmail/src/options_order.php:32 msgid "Options" msgstr "" #: squirrelmail/src/options.php:110 squirrelmail/src/options.php:255 -#: squirrelmail/src/options_highlight.php:50 +#: squirrelmail/src/options_highlight.php:57 msgid "Message Highlighting" msgstr "" #: squirrelmail/plugins/filters/options.php:75 -#: squirrelmail/src/options_highlight.php:54 +#: squirrelmail/src/options_highlight.php:61 msgid "New" msgstr "" #: squirrelmail/plugins/filters/options.php:76 #: squirrelmail/plugins/mail_fetch/fetch.php:225 -#: squirrelmail/src/options_highlight.php:55 +#: squirrelmail/src/options_highlight.php:62 msgid "Done" msgstr "" -#: squirrelmail/src/options_highlight.php:76 +#: squirrelmail/plugins/filters/options.php:84 +#: squirrelmail/plugins/filters/options.php:116 +#: squirrelmail/src/options_highlight.php:69 +msgid "Edit" +msgstr "" + +#: squirrelmail/src/options_highlight.php:82 msgid "No highlighting is defined" msgstr "" -#: squirrelmail/src/options_highlight.php:248 +#: squirrelmail/src/options_highlight.php:254 msgid "Identifying name" msgstr "" -#: squirrelmail/src/options_highlight.php:262 +#: squirrelmail/src/options_highlight.php:268 msgid "Color" msgstr "" -#: squirrelmail/src/options_highlight.php:266 +#: squirrelmail/src/options_highlight.php:272 msgid "Dark Blue" msgstr "" -#: squirrelmail/src/options_highlight.php:267 +#: squirrelmail/src/options_highlight.php:273 msgid "Dark Green" msgstr "" -#: squirrelmail/src/options_highlight.php:268 +#: squirrelmail/src/options_highlight.php:274 msgid "Dark Yellow" msgstr "" -#: squirrelmail/src/options_highlight.php:269 +#: squirrelmail/src/options_highlight.php:275 msgid "Dark Cyan" msgstr "" -#: squirrelmail/src/options_highlight.php:270 +#: squirrelmail/src/options_highlight.php:276 msgid "Dark Magenta" msgstr "" -#: squirrelmail/src/options_highlight.php:271 +#: squirrelmail/src/options_highlight.php:277 msgid "Light Blue" msgstr "" -#: squirrelmail/src/options_highlight.php:272 +#: squirrelmail/src/options_highlight.php:278 msgid "Light Green" msgstr "" -#: squirrelmail/src/options_highlight.php:273 +#: squirrelmail/src/options_highlight.php:279 msgid "Light Yellow" msgstr "" -#: squirrelmail/src/options_highlight.php:274 +#: squirrelmail/src/options_highlight.php:280 msgid "Light Cyan" msgstr "" -#: squirrelmail/src/options_highlight.php:275 +#: squirrelmail/src/options_highlight.php:281 msgid "Light Magenta" msgstr "" -#: squirrelmail/src/options_highlight.php:276 +#: squirrelmail/src/options_highlight.php:282 msgid "Dark Gray" msgstr "" -#: squirrelmail/src/options_highlight.php:277 +#: squirrelmail/src/options_highlight.php:283 msgid "Medium Gray" msgstr "" -#: squirrelmail/src/options_highlight.php:278 +#: squirrelmail/src/options_highlight.php:284 msgid "Light Gray" msgstr "" -#: squirrelmail/src/options_highlight.php:279 +#: squirrelmail/src/options_highlight.php:285 msgid "White" msgstr "" -#: squirrelmail/src/options_highlight.php:281 +#: squirrelmail/src/options_highlight.php:287 msgid "Other:" msgstr "" -#: squirrelmail/src/options_highlight.php:283 +#: squirrelmail/src/options_highlight.php:289 msgid "Ex: 63aa7f" msgstr "" -#: squirrelmail/src/options_highlight.php:320 +#: squirrelmail/plugins/filters/options.php:176 +#: squirrelmail/src/options_highlight.php:323 squirrelmail/src/search.php:72 +#: squirrelmail/src/search.php:73 +msgid "Cc" +msgstr "" + +#: squirrelmail/plugins/filters/options.php:179 +#: squirrelmail/src/options_highlight.php:326 +msgid "To or Cc" +msgstr "" + +#: squirrelmail/src/options_highlight.php:331 msgid "Matches" msgstr "" @@ -772,29 +797,29 @@ msgstr "" msgid "Add a New Identity" msgstr "" -#: squirrelmail/src/options_identities.php:291 +#: squirrelmail/src/options_identities.php:290 #: squirrelmail/src/options_personal.php:49 msgid "Full Name" msgstr "" -#: squirrelmail/src/options_identities.php:300 +#: squirrelmail/src/options_identities.php:291 msgid "E-Mail Address" msgstr "" -#: squirrelmail/src/options_identities.php:309 +#: squirrelmail/src/options_identities.php:292 #: squirrelmail/src/options_personal.php:65 msgid "Reply To" msgstr "" -#: squirrelmail/src/options_identities.php:321 +#: squirrelmail/src/options_identities.php:299 msgid "Save / Update" msgstr "" -#: squirrelmail/src/options_identities.php:325 +#: squirrelmail/src/options_identities.php:302 msgid "Make Default" msgstr "" -#: squirrelmail/src/options_identities.php:332 +#: squirrelmail/src/options_identities.php:308 msgid "Move Up" msgstr "" @@ -1051,11 +1076,6 @@ msgstr "" msgid "Everywhere" msgstr "" -#: squirrelmail/plugins/filters/options.php:176 squirrelmail/src/search.php:72 -#: squirrelmail/src/search.php:73 -msgid "Cc" -msgstr "" - #: squirrelmail/functions/page_header.php:56 squirrelmail/src/signout.php:66 msgid "Sign Out" msgstr "" @@ -1695,11 +1715,6 @@ msgstr "" msgid "Message Filtering" msgstr "" -#: squirrelmail/plugins/filters/options.php:84 -#: squirrelmail/plugins/filters/options.php:116 -msgid "Edit" -msgstr "" - #: squirrelmail/plugins/filters/options.php:90 msgid "Down" msgstr "" @@ -1747,10 +1762,6 @@ msgstr "" msgid "OFF" msgstr "" -#: squirrelmail/plugins/filters/options.php:179 -msgid "To or Cc" -msgstr "" - #: squirrelmail/plugins/filters/options.php:189 msgid "Contains:" msgstr "" @@ -2598,15 +2609,12 @@ msgid "Change title on supported browsers." msgstr "" #: squirrelmail/plugins/newmail/newmail_opt.php:88 -msgid "requires IE and JavaScript to work" -msgstr "" - #: squirrelmail/plugins/newmail/newmail_opt.php:96 -msgid "Show popup window on new mail" +msgid "requires JavaScript to work" msgstr "" #: squirrelmail/plugins/newmail/newmail_opt.php:96 -msgid "requires JavaScript to work" +msgid "Show popup window on new mail" msgstr "" #: squirrelmail/plugins/newmail/newmail_opt.php:99 @@ -2641,17 +2649,17 @@ msgstr "" msgid "You have new mail!" msgstr "" -#: squirrelmail/plugins/newmail/setup.php:77 +#: squirrelmail/plugins/newmail/setup.php:76 msgid "NewMail Options" msgstr "" -#: squirrelmail/plugins/newmail/setup.php:79 +#: squirrelmail/plugins/newmail/setup.php:78 msgid "" "This configures settings for playing sounds and/or showing popup windows " "when new mail arrives." msgstr "" -#: squirrelmail/plugins/newmail/setup.php:127 +#: squirrelmail/plugins/newmail/setup.php:126 msgid "New Mail Notification options saved" msgstr "" @@ -2660,7 +2668,7 @@ msgstr "" msgid "%s New Messages" msgstr "" -#: squirrelmail/plugins/newmail/setup.php:205 +#: squirrelmail/plugins/newmail/setup.php:207 #, c-format msgid "%s New Message" msgstr "" @@ -2991,94 +2999,89 @@ msgid "Add Server" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:123 -#: squirrelmail/plugins/mail_fetch/options.php:217 +#: squirrelmail/plugins/mail_fetch/options.php:201 msgid "Server:" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:124 -#: squirrelmail/plugins/mail_fetch/options.php:219 +#: squirrelmail/plugins/mail_fetch/options.php:203 msgid "Alias:" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:125 -#: squirrelmail/plugins/mail_fetch/options.php:221 +#: squirrelmail/plugins/mail_fetch/options.php:205 msgid "Username:" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:127 -#: squirrelmail/plugins/mail_fetch/options.php:225 +#: squirrelmail/plugins/mail_fetch/options.php:209 msgid "Store in Folder:" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:148 -#: squirrelmail/plugins/mail_fetch/options.php:248 +#: squirrelmail/plugins/mail_fetch/options.php:233 msgid "Leave Mail on Server" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:149 -#: squirrelmail/plugins/mail_fetch/options.php:250 +#: squirrelmail/plugins/mail_fetch/options.php:235 msgid "Check mail during login" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:150 -#: squirrelmail/plugins/mail_fetch/options.php:252 +#: squirrelmail/plugins/mail_fetch/options.php:237 msgid "Check mail during folder refresh" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:157 -#: squirrelmail/plugins/mail_fetch/options.php:253 +#: squirrelmail/plugins/mail_fetch/options.php:238 msgid "Modify Server" msgstr "" #: squirrelmail/plugins/mail_fetch/options.php:161 -#: squirrelmail/plugins/mail_fetch/options.php:179 msgid "Server Name:" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:166 +#: squirrelmail/plugins/mail_fetch/options.php:167 +#: squirrelmail/plugins/mail_fetch/options.php:190 msgid "Modify" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:168 -#: squirrelmail/plugins/mail_fetch/options.php:187 +#: squirrelmail/plugins/mail_fetch/options.php:171 msgid "No-one server in use. Try to add." msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:175 -msgid "Delete Server" -msgstr "" - -#: squirrelmail/plugins/mail_fetch/options.php:193 -#: squirrelmail/plugins/mail_fetch/options.php:208 -#: squirrelmail/plugins/mail_fetch/options.php:258 +#: squirrelmail/plugins/mail_fetch/options.php:177 +#: squirrelmail/plugins/mail_fetch/options.php:192 +#: squirrelmail/plugins/mail_fetch/options.php:243 msgid "Fetching Servers" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:197 +#: squirrelmail/plugins/mail_fetch/options.php:181 msgid "Confirm Deletion of a Server" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:201 +#: squirrelmail/plugins/mail_fetch/options.php:185 msgid "Selected Server:" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:202 +#: squirrelmail/plugins/mail_fetch/options.php:186 msgid "Confirm delete of selected server?" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:203 +#: squirrelmail/plugins/mail_fetch/options.php:187 msgid "Confirm Delete" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:212 +#: squirrelmail/plugins/mail_fetch/options.php:196 msgid "Mofify a Server" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:261 +#: squirrelmail/plugins/mail_fetch/options.php:246 msgid "Undefined Function" msgstr "" -#: squirrelmail/plugins/mail_fetch/options.php:263 +#: squirrelmail/plugins/mail_fetch/options.php:248 msgid "Hey! Wath do You are looking for?" msgstr "" diff --git a/src/options_display.php b/src/options_display.php index c351a990..2e03483e 100644 --- a/src/options_display.php +++ b/src/options_display.php @@ -71,11 +71,10 @@ function load_optpage_data_display() { SMPREF_JS_OFF => _("Never")) ); - $js_autodetect_script = " - - "; + $js_autodetect_script = + "\n"; $js_autodetect_results = SMPREF_JS_OFF; $optvals[SMOPT_GRP_GENERAL][] = array( 'name' => 'js_autodetect_results', diff --git a/src/options_highlight.php b/src/options_highlight.php index 1bc8afb2..2bfe3b0c 100644 --- a/src/options_highlight.php +++ b/src/options_highlight.php @@ -17,6 +17,13 @@ require_once('../functions/array.php'); require_once('../functions/plugin.php'); + function oh_opt( $val, $sel, $tit ) { + echo " \n"; + } + if (! isset($action)) $action = ''; if (! isset($message_highlight_list)) @@ -30,7 +37,7 @@ if ($color_type == 1) $newcolor = $newcolor_choose; elseif ($color_type == 2) $newcolor = $newcolor_input; else $newcolor = $color_type; - + $newcolor = ereg_replace(',', '', $newcolor); $newcolor = ereg_replace('#', '', $newcolor); $newcolor = ereg_replace('"', '', $newcolor); @@ -42,7 +49,7 @@ $message_highlight_list[$theid]['color'] = $newcolor; $message_highlight_list[$theid]['value'] = $value; $message_highlight_list[$theid]['match_type'] = $match_type; - } + } displayPageHeader($color, 'None'); ?>
@@ -51,30 +58,29 @@
[' . _("New") . ']'; - echo ' - ['._("Done").']

'."\n"; + echo '
[' . _("New") . ']'. + ' - ['._("Done").']

'."\n"; if (count($message_highlight_list) >= 1) { echo ''."\n"; for ($i=0; $i < count($message_highlight_list); $i++) { -?> - -'. + "'; } - echo "
- [] [] - - - - -
". + "[". + _("Edit") . + '] [' . _("Delete") . ']'. + ''. + htmlspecialchars($message_highlight_list[$i]['name']) . + ''. + $message_highlight_list[$i]['match_type'] . ' = ' . + htmlspecialchars($message_highlight_list[$i]['value']). + '
\n"; - echo "
\n"; + echo "\n". + "
\n"; } else { - echo '
' . _("No highlighting is defined") . "

\n"; - echo "
\n"; + echo '
' . _("No highlighting is defined") . "

\n". + "
\n"; } if ($action == 'edit' || $action == 'add') { if (!isset($theid)) @@ -82,7 +88,7 @@ $theid = count($message_highlight_list); $message_highlight_list[$theid] = array(); } - + $color_list[0] = '4444aa'; $color_list[1] = '44aa44'; $color_list[2] = 'aaaa44'; @@ -96,8 +102,8 @@ $color_list[10] = 'aaaaaa'; $color_list[11] = 'bfbfbf'; $color_list[12] = 'dfdfdf'; - $color_list[13] = 'ffffff'; - + $color_list[13] = 'ffffff'; + # helpful color chart from http://www.visibone.com/colorlab/big.html $new_color_list["0,0"] = 'cccccc'; $new_color_list["0,1"] = '999999'; @@ -142,7 +148,7 @@ $new_color_list["6,2"] = '66ff66'; $new_color_list["6,3"] = '33ff33'; $new_color_list["6,4"] = '00ff00'; - + # blue $new_color_list["7,0"] = '0000ff'; $new_color_list["7,1"] = '0000cc'; @@ -221,7 +227,7 @@ $selected_input = ''; $selected_choose = ''; - + for ($i=0; $i < 14; $i++) { ${"selected".$i} = ''; } @@ -232,7 +238,7 @@ ${"selected".$i} = ' selected'; continue; } - } + } } if (!isset($message_highlight_list[$theid]['color'])) $selected_choose = ' checked'; @@ -251,7 +257,7 @@ if (isset($message_highlight_list[$theid]['name'])) $disp = $message_highlight_list[$theid]['name']; else - $disp = ' '; + $disp = ''; $disp = htmlspecialchars($disp); echo " "; echo " \n"; @@ -293,7 +299,7 @@ for($y = 0; $y < 19; $y++) { $gridindex = "$y,$x"; $gridcolor = $new_color_list[$gridindex]; - $selected = ($gridcolor == $current_color)?'SELECTED':'' ; + $selected = ($gridcolor == $current_color)?'SELECTED':'' ; echo "\n"; echo "\n"; } @@ -306,16 +312,21 @@ echo " \n"; echo ' ' . "\n"; echo " \n"; echo '' . _("Matches") . ': '; if (isset($message_highlight_list[$theid]['value'])) @@ -330,7 +341,7 @@ echo "\n"; echo '
\n"; echo "\n"; - } + } do_hook('options_highlight_bottom'); ?> \ No newline at end of file diff --git a/src/options_identities.php b/src/options_identities.php index 37e5f5f6..63723f6a 100644 --- a/src/options_identities.php +++ b/src/options_identities.php @@ -77,7 +77,7 @@ ShowTableInfo('', '', '', $num); ?> - + @@ -89,256 +89,226 @@ 1) { - do_hook('options_identities_renumber', $i, $i - 1); - - $nameA = 'full_name' . $i; - $nameB = 'full_name' . ($i - 1); - global $$nameA, $$nameB; - $temp = $$nameA; - $$nameA = $$nameB; - $$nameB = $temp; - - $nameA = 'email_address' . $i; - $nameB = 'email_address' . ($i - 1); - global $$nameA, $$nameB; - $temp = $$nameA; - $$nameA = $$nameB; - $$nameB = $temp; - - $nameA = 'reply_to' . $i; - $nameB = 'reply_to' . ($i - 1); - global $$nameA, $$nameB; - $temp = $$nameA; - $$nameA = $$nameB; - $$nameB = $temp; - - return true; - } - - $i ++; - $name = 'form_for_' . $i; - global $$name; - } - return false; -} + $name = 'reply_to' . $i; + global $$name; + if ($$name != '') + $filled ++; + setPref($data_dir, $username, 'reply_to' . $fakeI, $$name); + + if ($filled == 0) + $fakeI --; + } + + $fakeI ++; + $i ++; + $name = 'form_for_' . $i; + global $$name; + } + + setPref($data_dir, $username, 'identities', $fakeI); + + while ($fakeI != $i) + { + removePref($data_dir, $username, 'full_name' . $fakeI); + removePref($data_dir, $username, 'email_address' . $fakeI); + removePref($data_dir, $username, 'reply_to' . $fakeI); + $fakeI ++; + } + + setPref($data_dir, $username, 'full_name', $full_name); + setPref($data_dir, $username, 'email_address', $email_address); + setPref($data_dir, $username, 'reply_to', $reply_to); + } + + function CheckAndDoDefault() { + global $username, $data_dir, $full_name, $email_address, $reply_to; + + $i = 1; + $name = 'form_for_' . $i; + global $$name; + while (isset($$name)) + { + $name = 'make_default_' . $i; + global $$name; + if (isset($$name)) { + do_hook('options_identities_renumber', $i, 'default'); + global $full_name, $email_address, $reply_to; + + $name = 'full_name' . $i; + global $$name; + $temp = $full_name; + $full_name = $$name; + $$name = $temp; + + $name = 'email_address' . $i; + global $$name; + $temp = $email_address; + $email_address = $$name; + $$name = $temp; + + $name = 'reply_to' . $i; + global $$name; + $temp = $reply_to; + $reply_to = $$name; + $$name = $temp; + + return true; + } + + $i ++; + $name = 'form_for_' . $i; + global $$name; + } + return FALSE; + } + + function CheckForDelete() { + global $username, $data_dir, $full_name, $email_address, $reply_to; -function LoadInfo(&$n, &$e, &$r, $post) -{ - global $username, $data_dir; + $i = 1; + $name = 'form_for_' . $i; + global $$name; + while (isset($$name)) + { + $name = 'delete_' . $i; + global $$name; + if (isset($$name)) { + return true; + } - $n = getPref($data_dir, $username, 'full_name' . $post); - $e = getPref($data_dir, $username, 'email_address' . $post); - $r = getPref($data_dir, $username, 'reply_to' . $post); + $i ++; + $name = 'form_for_' . $i; + global $$name; + } + return false; + } + + function CheckAndDoPromote() { + global $username, $data_dir, $full_name, $email_address, $reply_to; + + $i = 1; + $name = 'form_for_' . $i; + global $$name; + while (isset($$name)) { + $name = 'promote_' . $i; + global $$name; + if (isset($$name) && $i > 1) { + do_hook('options_identities_renumber', $i, $i - 1); + + $nameA = 'full_name' . $i; + $nameB = 'full_name' . ($i - 1); + global $$nameA, $$nameB; + $temp = $$nameA; + $$nameA = $$nameB; + $$nameB = $temp; + + $nameA = 'email_address' . $i; + $nameB = 'email_address' . ($i - 1); + global $$nameA, $$nameB; + $temp = $$nameA; + $$nameA = $$nameB; + $$nameB = $temp; + + $nameA = 'reply_to' . $i; + $nameB = 'reply_to' . ($i - 1); + global $$nameA, $$nameB; + $temp = $$nameA; + $$nameA = $$nameB; + $$nameB = $temp; + + return true; + } + + $i ++; + $name = 'form_for_' . $i; + global $$name; + } + return false; + } + + function LoadInfo(&$n, &$e, &$r, $post) { + global $username, $data_dir; + + $n = getPref($data_dir, $username, 'full_name' . $post); + $e = getPref($data_dir, $username, 'email_address' . $post); + $r = getPref($data_dir, $username, 'reply_to' . $post); + + if ($n != '' || $e != '' || $r != '') + return true; + } + +function sti_input( $title, $hd, $data, $post, $bg ) { + + echo "$title:". + ''. + '"; - if ($n != '' || $e != '' || $r != '') - return true; } -function ShowTableInfo($full_name, $email_address, $reply_to, $post) -{ - global $color; - - $OtherBG = ' bgcolor="' . $color[0] . '"'; - if ($full_name == '' && $email_address == '' && $reply_to == '') - $OtherBG = ''; +function ShowTableInfo($full_name, $email_address, $reply_to, $post) { + global $color; - if ($full_name == '' && $email_address == '' && $reply_to == '') - $isEmptySection = true; - else - $isEmptySection = false; + $OtherBG = ' bgcolor="' . $color[0] . '"'; + if ($full_name == '' && $email_address == '' && $reply_to == '') + $OtherBG = ''; -?> - > - - : - - - - - - > - - : - - - - - - > - - : - - - - - - - > -   - - '; - if (! $isEmptySection && $post != '') { -?> - "> - "> - 1) { -?> - "> - - - - -   - -". + ' '. + "". + ''; + if (! $isEmptySection && $post != '') { + echo "'. + "'; + } + if (! $isEmptySection && $post != '' && $post > 1) { + echo ''; + } + do_hook('options_identities_buttons', $isEmptySection, $post); + echo ''. + ' '; } ?> \ No newline at end of file -- 2.25.1